Skip to content

Commit

Permalink
Remove git_service (#179)
Browse files Browse the repository at this point in the history
* Remove git_service

- Remove service resource
- Remove the server recipe
  The server recipe was insecure and not a recommended way of running a Git service

* Remove md-links

* Remove links to tickets.chef.io

* Remove server from CI testing

Signed-off-by: Lance Albertson <lance@osuosl.org>

* Update the MacOS runner version for Windows tests

* Add final step

---------

Signed-off-by: Lance Albertson <lance@osuosl.org>
Co-authored-by: Lance Albertson <lance@osuosl.org>
  • Loading branch information
damacus and ramereth committed May 18, 2023
1 parent 09569ab commit adacebc
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 227 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -35,7 +35,6 @@ jobs:
suite:
- resources
- source
- server
fail-fast: false

steps:
Expand All @@ -60,7 +59,7 @@ jobs:
integration-windows:
needs: lint-unit
runs-on: macos-10.15
runs-on: macos-latest
strategy:
matrix:
os:
Expand Down Expand Up @@ -107,3 +106,22 @@ jobs:
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}

results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [integration, integration-macos, integration-windows]
steps:
- run: |
results=(
"${{ needs.integration.result }}"
"${{ needs.integration-macos.result }}"
"${{ needs.integration-windows.result }}"
)
for exit_code in $results; do
if [[ $exit_code != "success" && $exit_code != "skipped" ]]; then
exit 1
fi
done
19 changes: 0 additions & 19 deletions .github/workflows/md-links.yml

This file was deleted.

15 changes: 10 additions & 5 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Remove service resource
- Remove server recipe
The server recipe was insecure and not a recommended way of runing a Git service
- Remove links to tickets.chef.io

## 11.2.9 - *2023-05-16*

## 11.2.8 - *2023-05-16*
Expand Down Expand Up @@ -332,22 +337,22 @@ Locking yum dependency to '< 3'

## v2.8.0

- [COOK-3433] - git::server does not correctly set git-daemon's base-path on Debian
- git::server does not correctly set git-daemon's base-path on Debian

## v2.7.0

- **[COOK-3624](https://tickets.chef.io/browse/COOK-3624)** - Don't restart `xinetd` on each Chef client run
- **[COOK-3482](https://tickets.chef.io/browse/COOK-3482)** - Force git to add itself to the current process' PATH
- Don't restart `xinetd` on each Chef client run
- Force git to add itself to the current process' PATH

### New Feature

- **[COOK-3223](https://tickets.chef.io/browse/COOK-3223)** - Support Omnios and SmartOS package installs
- Support Omnios and SmartOS package installs

## v2.6.0

### Improvement

- **[COOK-3193](https://tickets.chef.io/browse/COOK-3193)** - Add proper debian packages
- Add proper debian packages

## v2.5.2

Expand Down
93 changes: 2 additions & 91 deletions README.md
Expand Up @@ -18,34 +18,6 @@ This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of

## Requirements

### Platforms

The following platforms have been tested with Test Kitchen:

```
|---------------+-------|
| amazonlinux-2 | X |
|---------------+-------|
| centos-7 | X |
|---------------+-------|
| centos-8 | X |
|---------------+-------|
| fedora | X |
|---------------+-------|
| debian-9 | X |
|---------------+-------|
| debian-10 | X |
|---------------+-------|
| ubuntu-16.04 | X |
|---------------+-------|
| ubuntu-18.04 | X |
|---------------+-------|
| ubuntu-20.04 | X |
|---------------+-------|
| openSUSE Leap | X |
|---------------+-------|
```

### Chef

- Chef 15.3+
Expand All @@ -60,69 +32,8 @@ Include `git::default`, `git::windows`, or `git::source` in your cookbook OR use

## Resources Overview

- `git_client`: Manages a Git client installation on a machine. Source install action is available on Linux.
- `git_service`: Sets up a Git service via xinetd. WARNING: This is insecure and will probably be removed in the future
- `git_config`: Sets up Git configuration on a node.

### git_client

The `git_client` resource manages the installation of a Git client on a machine.

`Note`: on macOS systems homebrew must first be installed on the system before running this resource. Prior to version 9.0 of this cookbook homebrew was automatically installed.

#### Example

```ruby
git_client 'default'
```

#### Example of source install

```ruby
git_client 'source' do
source_version '2.14.2'
source_checksum 'a03a12331d4f9b0f71733db9f47e1232d4ddce00e7f2a6e20f6ec9a19ce5ff61'
action :install_from_source
end
```

### git_config

The `git_config` resource manages the configuration of Git client on a machine.

#### Example

```ruby
git_config 'url.https://github.com/.insteadOf' do
value 'git://github.com/'
scope 'system'
options '--add'
end
```

#### Properties

Currently, there are distinct sets of resource properties, used by the providers for source, package, macos, and windows.

# used by Linux provider

- `package_name` - Package name to install on Linux machines. Defaults to a calculated value based on platform.
- `package_version` - Defaults to nil.
- `package_action` - Defaults to `:install`

# used by Linux source install

- `source_prefix` - Defaults to '/usr/local'
- `source_url` - Defaults to a calculated URL based on source_version
- `source_version` - Defaults to 2.8.1
- `source_use_pcre` - configure option for build. Defaults to false
- `source_checksum` - Defaults to a known value for the 2.8.1 source tarball

# used by the Windows provider

- `windows_display_name` - Windows display name
- `windows_package_url` - Defaults to the Internet
- `windows_package_checksum` - Defaults to the value for 2.8.1
- [`git_client`](./documentation/git_client.md): Manages a Git client installation on a machine. Source install action is available on Linux.
- [`git_config`](./documentation/git_config.md): Sets up Git configuration on a node.

## Recipes

Expand Down
21 changes: 21 additions & 0 deletions documentation/git_client.md
@@ -0,0 +1,21 @@
# git_client

The `git_client` resource manages the installation of a Git client on a machine.

`Note`: on macOS systems homebrew must first be installed on the system before running this resource. Prior to version 9.0 of this cookbook homebrew was automatically installed.

## Example

```ruby
git_client 'default'
```

## Example of source install

```ruby
git_client 'source' do
source_version '2.14.2'
source_checksum 'a03a12331d4f9b0f71733db9f47e1232d4ddce00e7f2a6e20f6ec9a19ce5ff61'
action :install_from_source
end
```
37 changes: 37 additions & 0 deletions documentation/git_config.md
@@ -0,0 +1,37 @@
# git_config

The `git_config` resource manages the configuration of Git client on a machine.

## Example

```ruby
git_config 'url.https://github.com/.insteadOf' do
value 'git://github.com/'
scope 'system'
options '--add'
end
```

## Properties

Currently, there are distinct sets of resource properties, used by the providers for source, package, macos, and windows.

### used by Linux provider

- `package_name` - Package name to install on Linux machines. Defaults to a calculated value based on platform.
- `package_version` - Defaults to nil.
- `package_action` - Defaults to `:install`

### used by Linux source install

- `source_prefix` - Defaults to '/usr/local'
- `source_url` - Defaults to a calculated URL based on source_version
- `source_version` - Defaults to 2.8.1
- `source_use_pcre` - configure option for build. Defaults to false
- `source_checksum` - Defaults to a known value for the 2.8.1 source tarball

### used by the Windows provider

- `windows_display_name` - Windows display name
- `windows_package_url` - Defaults to the Internet
- `windows_package_checksum` - Defaults to the value for 2.8.1
8 changes: 0 additions & 8 deletions kitchen.yml
Expand Up @@ -78,11 +78,3 @@ suites:
- windows-2016
- windows-2019
- macos-10.15
- name: server
run_list:
- recipe[test::server]
excludes:
- windows-2012r2
- windows-2016
- windows-2019
- macos-10.15
21 changes: 0 additions & 21 deletions recipes/server.rb

This file was deleted.

47 changes: 0 additions & 47 deletions resources/service.rb

This file was deleted.

34 changes: 0 additions & 34 deletions spec/unit/recipes/server_spec.rb

This file was deleted.

0 comments on commit adacebc

Please sign in to comment.