Skip to content

Commit 6eedce7

Browse files
authored
PMM-7 update license to Apache 2.0 (#679)
* PMM-7 update license to Apache 2.0 * PMM-7 Fix format * PMM-7 Fix license checker * PMM-7 Fix linters * PMM-7 revert Go version update and fix some linters
1 parent f546f9e commit 6eedce7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+693
-481
lines changed

.github/check-license.go

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
// mongodb_exporter
22
// Copyright (C) 2017 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
//go:build ignore
1817
// +build ignore
1918

20-
// check-license checks that AGPL license header in all files matches header in this file.
19+
// check-license checks that Apache 2.0 header in all files matches header in this file.
2120
package main
2221

2322
import (
@@ -36,35 +35,33 @@ var (
3635
copyrightText = `// mongodb_exporter
3736
// Copyright (C) 2022 Percona LLC
3837
//
39-
// This program is free software: you can redistribute it and/or modify
40-
// it under the terms of the GNU Affero General Public License as published by
41-
// the Free Software Foundation, either version 3 of the License, or
42-
// (at your option) any later version.
38+
// Licensed under the Apache License, Version 2.0 (the "License");
39+
// you may not use this file except in compliance with the License.
40+
// You may obtain a copy of the License at
4341
//
44-
// This program is distributed in the hope that it will be useful,
45-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
46-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47-
// GNU Affero General Public License for more details.
42+
// http://www.apache.org/licenses/LICENSE-2.0
4843
//
49-
// You should have received a copy of the GNU Affero General Public License
50-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
44+
// Unless required by applicable law or agreed to in writing, software
45+
// distributed under the License is distributed on an "AS IS" BASIS,
46+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
47+
// See the License for the specific language governing permissions and
48+
// limitations under the License.
5149
`
5250

5351
copyrightPattern = regexp.MustCompile(`^// mongodb_exporter
5452
// Copyright \(C\) 20\d{2} Percona LLC
5553
//
56-
// This program is free software: you can redistribute it and/or modify
57-
// it under the terms of the GNU Affero General Public License as published by
58-
// the Free Software Foundation, either version 3 of the License, or
59-
// \(at your option\) any later version.
54+
// Licensed under the Apache License, Version 2\.0 \(the "License"\);
55+
// you may not use this file except in compliance with the License.
56+
// You may obtain a copy of the License at
6057
//
61-
// This program is distributed in the hope that it will be useful,
62-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
63-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64-
// GNU Affero General Public License for more details.
58+
// http://www\.apache\.org/licenses/LICENSE-2\.0
6559
//
66-
// You should have received a copy of the GNU Affero General Public License
67-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
60+
// Unless required by applicable law or agreed to in writing, software
61+
// distributed under the License is distributed on an "AS IS" BASIS,
62+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
63+
// See the License for the specific language governing permissions and
64+
// limitations under the License\.
6865
`)
6966
)
7067

.golangci-required.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
---
2+
linters-settings:
3+
# prevent import of "errors" instead of "github.com/pkg/errors"
4+
depguard:
5+
rules:
6+
# Name of a rule.
7+
main:
8+
# Packages that are not allowed where the value is a suggestion.
9+
deny:
10+
- pkg: "errors"
11+
desc: Should be replaced by github.com/pkg/errors package
12+
213
# The most valuable linters; they are required to pass for PR to be merged.
314
linters:
415
disable-all: true

.golangci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
linters-settings:
33
# prevent import of "errors" instead of "github.com/pkg/errors"
44
depguard:
5-
list-type: blacklist
6-
include-go-root: true
7-
packages:
8-
- errors
5+
rules:
6+
# Name of a rule.
7+
main:
8+
# Packages that are not allowed where the value is a suggestion.
9+
deny:
10+
- pkg: "errors"
11+
desc: Should be replaced by github.com/pkg/errors package
912

1013
lll:
1114
line-length: 140

exporter/base_collector.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2022 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

exporter/collstats_collector.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2017 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

exporter/collstats_collector_test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2017 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

exporter/common.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2022 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

exporter/common_test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2022 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

exporter/dbstats_collector.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2017 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

exporter/dbstats_collector_test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// mongodb_exporter
22
// Copyright (C) 2017 Percona LLC
33
//
4-
// This program is free software: you can redistribute it and/or modify
5-
// it under the terms of the GNU Affero General Public License as published by
6-
// the Free Software Foundation, either version 3 of the License, or
7-
// (at your option) any later version.
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
87
//
9-
// This program is distributed in the hope that it will be useful,
10-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
// GNU Affero General Public License for more details.
8+
// http://www.apache.org/licenses/LICENSE-2.0
139
//
14-
// You should have received a copy of the GNU Affero General Public License
15-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
1615

1716
package exporter
1817

0 commit comments

Comments
 (0)