Merge branch 'develop' into bugfix/restart_with_jsvc

This commit is contained in:
eheimbuch
2020-07-01 14:26:26 +02:00
committed by GitHub
14 changed files with 85 additions and 40 deletions

View File

@@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed installation of debian packages on distros without preinstalled `at` ([#1216](https://github.com/scm-manager/scm-manager/issues/1216) and [#1217](https://github.com/scm-manager/scm-manager/pull/1217))
- Fixed restart with deb or rpm installation ([#1222](https://github.com/scm-manager/scm-manager/issues/1222) and [#1227](https://github.com/scm-manager/scm-manager/pull/1227))
- Fixed broken migration with empty security.xml ([#1219](https://github.com/scm-manager/scm-manager/issues/1219) and [#1221](https://github.com/scm-manager/scm-manager/pull/1221))
- Added missing architecture to debian installation documentation ([#1230](https://github.com/scm-manager/scm-manager/pull/1230))
## [2.1.1] - 2020-06-23
### Fixed

View File

@@ -9,8 +9,8 @@ repositories over http.
- Very easy installation
- No need to hack configuration files, SCM-Manager is completely
configureable from its Web-Interface
- No Apache and no database installation is required
configurable from its Web-Interface
- No Apache and no database installation required
- Central user, group and permission management
- Out of the box support for Git, Mercurial and Subversion
- Full RESTFul Web Service API (JSON and XML)
@@ -19,34 +19,32 @@ repositories over http.
- Useful plugins available
- Licensed under the MIT-License
This branch (default) is for the development of SCM-Manager 2.x. If you are interested in the development of version 1.x, please checkout the 1.x branch.
This branch (`develop`) is for the development of SCM-Manager 2.x. If you are interested in the development of version
1.x, please checkout the branch `support/1.x`.
## News
- **2018-09-25** - [SCM-Manager 2 gets a boost by Cloudogu
GmbH](https://www.scm-manager.org/scm-manager-2/scm-manager-2-gets-a-boost-by-cloudogu-gmbh/)
- **2018-05-04** - SCM-Manager 1.60 released
([download](http://www.scm-manager.org/download/) \|
[release notes](release-notes.md))
- **2018-04-11** - SCM-Manager 1.59 released
[All news](http://www.scm-manager.org/news/)
All news regarding SCM-Manager will be published in our [blog](https://www.scm-manager.org/blog/).
## Mailing List
- <scmmanager@googlegroups.com> -
[archive](http://groups.google.com/group/scmmanager) \|
[subscribe](mailto:scmmanager+subscribe@googlegroups.com)
\|
[subscribe](mailto:scmmanager+subscribe@googlegroups.com) \|
[unsubscribe](mailto:scmmanager+unsubscribe@googlegroups.com)
## Documentation
You can find the complete documentation in the [docs/](docs/Home.md) directory.
You can find the complete documentation on our [homepage](https://www.scm-manager.org/docs/).
## Need help?
Looking for more guidance? Full documentation lives [in the SCM-Manager repository](https://github.com/scm-manager/scm-manager/blob/develop/docs/Home.md). Do you have further ideas or need support?
Looking for more guidance? Full documentation lives on our [homepage](https://www.scm-manager.org/docs/) or the
dedicated pages for our [plugins](https://www.scm-manager.org/plugins/). Do you have further ideas or need support?
- **Community Support** - Contact the SCM-Manager support team for questions about SCM-Manager, to report bugs or to request features through the official channels. [Find more about this here](https://www.scm-manager.org/support/).
- **Community Support** - Contact the SCM-Manager support team for questions about SCM-Manager, to report bugs or to
request features through the official channels. [Find more about this here](https://www.scm-manager.org/support/).
- **Enterprise Support** - Do you require support with the integration of SCM-Manager into your processes, with the customization of the tool or simply a service level agreement (SLA)? **Contact our development partner Cloudogu! Their team is looking forward to discussing your individual requirements with you and will be more than happy to give you a quote.** [Request Enterprise Support](https://cloudogu.com/en/scm-manager-enterprise/).
- **Enterprise Support** - Do you require support with the integration of SCM-Manager into your processes, with the
customization of the tool or simply a service level agreement (SLA)? **Contact our development partner Cloudogu!
Their team is looking forward to discussing your individual requirements with you and will be more than happy to
give you a quote.** [Request Enterprise Support](https://cloudogu.com/en/scm-manager-enterprise/).

View File

@@ -9,7 +9,7 @@ displayToc: true
The following code block will configure an apt repository for scm-manager and install it.
```bash
echo 'deb https://packages.scm-manager.org/repository/apt-v2-releases/ stable main' | sudo tee /etc/apt/sources.list.d/scm-manager.list
echo 'deb [arch=all] https://packages.scm-manager.org/repository/apt-v2-releases/ stable main' | sudo tee /etc/apt/sources.list.d/scm-manager.list
sudo apt-key adv --recv-keys --keyserver hkps://keys.openpgp.org 0x975922F193B07D6E
sudo apt-get update
sudo apt-get install scm-server
@@ -24,7 +24,7 @@ To install SCM-Manager as a debian package (.deb), we have to configure an apt r
Create a file at `/etc/apt/sources.list.d/scm-manager.list` with the following content:
```text
deb https://packages.scm-manager.org/repository/apt-v2-releases/ stable main
deb [arch=all] https://packages.scm-manager.org/repository/apt-v2-releases/ stable main
```
This will add the apt repository of the scm-manager stable releases to the list of your apt repositories.

View File

@@ -5,5 +5,5 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "2.1.1"
"version": "2.2.0-SNAPSHOT"
}

View File

@@ -1,7 +1,7 @@
{
"name": "@scm-manager/scm-git-plugin",
"private": true,
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"license": "MIT",
"main": "./src/main/js/index.ts",
"scripts": {
@@ -20,6 +20,6 @@
},
"prettier": "@scm-manager/prettier-config",
"dependencies": {
"@scm-manager/ui-plugins": "^2.1.1"
"@scm-manager/ui-plugins": "^2.2.0-SNAPSHOT"
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "@scm-manager/scm-hg-plugin",
"private": true,
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"license": "MIT",
"main": "./src/main/js/index.ts",
"scripts": {
@@ -19,6 +19,6 @@
},
"prettier": "@scm-manager/prettier-config",
"dependencies": {
"@scm-manager/ui-plugins": "^2.1.1"
"@scm-manager/ui-plugins": "^2.2.0-SNAPSHOT"
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "@scm-manager/scm-legacy-plugin",
"private": true,
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"license": "MIT",
"main": "./src/main/js/index.tsx",
"scripts": {
@@ -19,6 +19,6 @@
},
"prettier": "@scm-manager/prettier-config",
"dependencies": {
"@scm-manager/ui-plugins": "^2.1.1"
"@scm-manager/ui-plugins": "^2.2.0-SNAPSHOT"
}
}

View File

@@ -1,7 +1,7 @@
{
"name": "@scm-manager/scm-svn-plugin",
"private": true,
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"license": "MIT",
"main": "./src/main/js/index.ts",
"scripts": {
@@ -19,6 +19,6 @@
},
"prettier": "@scm-manager/prettier-config",
"dependencies": {
"@scm-manager/ui-plugins": "^2.1.1"
"@scm-manager/ui-plugins": "^2.2.0-SNAPSHOT"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@scm-manager/ui-components",
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"description": "UI Components for SCM-Manager and its plugins",
"main": "src/index.ts",
"files": [

View File

@@ -1,12 +1,12 @@
{
"name": "@scm-manager/ui-plugins",
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"license": "MIT",
"bin": {
"ui-plugins": "./bin/ui-plugins.js"
},
"dependencies": {
"@scm-manager/ui-components": "^2.1.1",
"@scm-manager/ui-components": "^2.2.0-SNAPSHOT",
"@scm-manager/ui-extensions": "^2.1.0",
"classnames": "^2.2.6",
"query-string": "^5.0.1",

View File

@@ -1,9 +1,9 @@
{
"name": "@scm-manager/ui-webapp",
"version": "2.1.1",
"version": "2.2.0-SNAPSHOT",
"private": true,
"dependencies": {
"@scm-manager/ui-components": "^2.1.1",
"@scm-manager/ui-components": "^2.2.0-SNAPSHOT",
"@scm-manager/ui-extensions": "^2.1.0",
"classnames": "^2.2.5",
"history": "^4.10.1",

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.update.security;
import org.slf4j.Logger;
@@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.File;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
@@ -179,7 +180,7 @@ public class XmlSecurityV1UpdateStep implements UpdateStep {
@XmlRootElement(name = "configuration")
private static class V1Security {
@XmlElement(name = "entry")
private List<Entry> entries;
private List<Entry> entries = new ArrayList<>();
}
@XmlAccessorType(XmlAccessType.FIELD)

View File

@@ -43,6 +43,7 @@ import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import static java.util.stream.Collectors.toList;
import static org.assertj.core.api.Assertions.assertThat;
@@ -107,15 +108,17 @@ class XmlSecurityV1UpdateStepTest {
@Nested
class WithExistingSecurityXml {
private Path configDir;
@BeforeEach
void createSecurityV1XML(@TempDir Path tempDir) throws IOException {
Path configDir = tempDir.resolve("config");
configDir = tempDir.resolve("config");
Files.createDirectories(configDir);
copyTestDatabaseFile(configDir, "securityV1.xml");
}
@Test
void shouldMapV1PermissionsFromSecurityV1XML() throws JAXBException {
void shouldMapV1PermissionsFromSecurityV1XML() throws IOException, JAXBException {
copyTestDatabaseFile(configDir, "securityV1.xml");
updateStep.doUpdate();
List<String> assignedPermission =
assignedPermissionStore.getAll().values()
@@ -127,15 +130,27 @@ class XmlSecurityV1UpdateStepTest {
assertThat(assignedPermission).contains("test");
}
@Test
void shouldNotFailOnEmptyV1SecurityXml() throws IOException, JAXBException {
copyTestDatabaseFile(configDir, "emptySecurityV1.xml", "securityV1.xml");
updateStep.doUpdate();
assertThat(assignedPermissionStore.getAll()).isEmpty();
}
}
private void copyTestDatabaseFile(Path configDir, String fileName) throws IOException {
URL url = Resources.getResource("sonia/scm/update/security/" + fileName);
Files.copy(url.openStream(), configDir.resolve(fileName));
copyTestDatabaseFile(configDir, fileName, fileName);
}
private void copyTestDatabaseFile(Path configDir, String sourceFileName, String targetFileName) throws IOException {
URL url = Resources.getResource("sonia/scm/update/security/" + sourceFileName);
Files.copy(url.openStream(), configDir.resolve(targetFileName));
}
@Test
void shouldNotFailForMissingConfigDir() throws JAXBException {
updateStep.doUpdate();
assertThat(assignedPermissionStore.getAll()).isEmpty();
}
}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" ?>
<!--
MIT License
Copyright (c) 2020-present Cloudogu GmbH and Contributors
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.
-->
<configuration>
</configuration>