redmine_with_git 0.6.4 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/redmine_with_git/tableless/load.rb +1 -1
- data/config/initializers/000_dependencies.rb +3 -3
- data/config/initializers/001_patches.rb +7 -0
- data/installer/programs/linux/sudo_write.sh +17 -0
- data/installer/tasks/redmine_enabled_scm_setting.sh +1 -2
- data/installer/tasks/redmine_git_hosting.sh +1 -1
- data/installer/tasks/redmine_git_hosting_settings.sh +2 -2
- data/installer/tasks/redmine_gitolite_sudoer.sh +8 -7
- data/installer/template/redmine_user_sudoer +4 -0
- data/lib/redmine_with_git/version.rb +1 -1
- metadata +10 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b43eef6bc04197831758a646547a33e6b05cede8338e4b21b50df8989db4d7ae
|
4
|
+
data.tar.gz: 321682d144c93839a38055228e53b914e437cd918673a9a1d27dde5bdc2f5f4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 356f4795423a7a23cb9c2d6d2c4440a3a30517fafe6b22952175b8c9e135f31360992a52f94c5cdf1841191c18a19b670530c85ceea952937af2c62774484dd5
|
7
|
+
data.tar.gz: fa7026bf5fd45db0658d613492d0a43edaad2e70886a5560040588ce54b7353506d6cd7f48aecd7cc5325c5bcd05a53863409b2750e9b8311a6f44d34cb0bec9
|
@@ -6,11 +6,11 @@ Redmine::Plugin.post_register :redmine_with_git do
|
|
6
6
|
# Source: https://github.com/jbox-web/redmine_bootstrap_kit.git
|
7
7
|
# Note: redmine_bootstrap_kit is a redmine_git_hosting's dependency.
|
8
8
|
requires_redmine_plugin(:redmine_bootstrap_kit, version_or_higher: '0.2.5')
|
9
|
-
# Source: https://github.com/
|
10
|
-
requires_redmine_plugin(:redmine_git_hosting, version_or_higher: '1.2.3')
|
9
|
+
# Source: https://github.com/esquilo-azul/redmine_git_hosting
|
10
|
+
requires_redmine_plugin(:redmine_git_hosting, version_or_higher: '1.2.3.1')
|
11
11
|
|
12
12
|
# Source: https://github.com/esquilo-azul/redmine_installer
|
13
13
|
if ::Redmine::Plugin.registered_plugins.keys.include?(:redmine_installer)
|
14
|
-
requires_redmine_plugin(:redmine_installer, version_or_higher: '0.
|
14
|
+
requires_redmine_plugin(:redmine_installer, version_or_higher: '0.10.0')
|
15
15
|
end
|
16
16
|
end
|
@@ -1,4 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
apply_patches_version_limit = ::Gem::Version.new('4.0.0')
|
4
|
+
redmine_git_hosting_version = ::Gem::Version.new(
|
5
|
+
::Redmine::Plugin.registered_plugins[:redmine_git_hosting].version
|
6
|
+
)
|
7
|
+
|
8
|
+
return unless redmine_git_hosting_version < apply_patches_version_limit
|
9
|
+
|
3
10
|
require 'redmine_with_git/patches/redmine_git_hosting/cache/database_patch'
|
4
11
|
require 'redmine_with_git/patches/redmine_git_hosting/commands/git/git_patch'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -e
|
4
|
+
set -u
|
5
|
+
|
6
|
+
if [ $# -lt 1 ]; then
|
7
|
+
printf "Usage: $0 <TARGET_FILE>"
|
8
|
+
exit 1
|
9
|
+
fi
|
10
|
+
|
11
|
+
if [ $(id -u) -eq 0 ]; then
|
12
|
+
TARGET_FILE="$1"
|
13
|
+
EDITOR='tee' visudo -f "$TARGET_FILE" <&0
|
14
|
+
chmod 440 "$TARGET_FILE"
|
15
|
+
else
|
16
|
+
sudo "$0" "$@"
|
17
|
+
fi
|
@@ -24,6 +24,5 @@ function task_condition {
|
|
24
24
|
function task_fix {
|
25
25
|
set -u
|
26
26
|
set -e
|
27
|
-
|
28
|
-
programeiro /redmine/set_setting_value 'enabled_scm' "$setting_value"
|
27
|
+
programeiro /redmine/set_setting_value 'enabled_scm' "$(enabled_scm_setting_template)"
|
29
28
|
}
|
@@ -23,7 +23,7 @@ function task_condition {
|
|
23
23
|
}
|
24
24
|
|
25
25
|
function task_fix {
|
26
|
-
|
27
|
-
|
26
|
+
programeiro /redmine/set_setting_value 'plugin_redmine_git_hosting' \
|
27
|
+
"$(redmine_git_hosting_setting_template)"
|
28
28
|
programeiro /redmine/installer/triggers/set 'redmine_git_hosting_rescue'
|
29
29
|
}
|
@@ -7,13 +7,14 @@ SUFFIX=''
|
|
7
7
|
if [ -n "$address_path" ]; then
|
8
8
|
SUFFIX="_$(printf "$address_path" | sed -e 's/^\///')"
|
9
9
|
fi
|
10
|
-
|
10
|
+
export SUDOER_FILE_BASENAME="$(programeiro /rails/user)_redmine_with_git${SUFFIX}"
|
11
|
+
export SUDOER_FILE="/etc/sudoers.d/${SUDOER_FILE_BASENAME}"
|
12
|
+
export SUDOER_TMP_FILE="/tmp/${SUDOER_FILE_BASENAME}"
|
11
13
|
|
12
14
|
function sudoers_file_copy_file() {
|
13
|
-
|
14
|
-
sudo
|
15
|
-
|
16
|
-
printf "$TMPFILE\n"
|
15
|
+
sudo cp "$SUDOER_FILE" "$SUDOER_TMP_FILE"
|
16
|
+
sudo chmod og+r "$SUDOER_TMP_FILE"
|
17
|
+
printf "$SUDOER_TMP_FILE\n"
|
17
18
|
}
|
18
19
|
|
19
20
|
function task_dependencies {
|
@@ -43,7 +44,7 @@ function task_fix {
|
|
43
44
|
set -u
|
44
45
|
set -e
|
45
46
|
export rails_user="$(programeiro /rails/user)"
|
46
|
-
programeiro /template/apply "$REDMINE_WITH_GIT_TEMPLATE_ROOT/redmine_user_sudoer" |
|
47
|
-
|
47
|
+
programeiro /template/apply "$REDMINE_WITH_GIT_TEMPLATE_ROOT/redmine_user_sudoer" | \
|
48
|
+
programeiro /linux/sudo_write "$SUDOER_FILE"
|
48
49
|
}
|
49
50
|
export -f task_fix
|
@@ -1,2 +1,6 @@
|
|
1
1
|
Defaults:redmine !requiretty
|
2
2
|
${rails_user} ALL=(${gitolite_user}) NOPASSWD:ALL
|
3
|
+
${rails_user} ALL=(root) NOPASSWD:/usr/bin/stat
|
4
|
+
${rails_user} ALL=(root) NOPASSWD:/bin/cp ${SUDOER_FILE} ${SUDOER_TMP_FILE}
|
5
|
+
${rails_user} ALL=(root) NOPASSWD:/bin/chmod og+r ${SUDOER_TMP_FILE}
|
6
|
+
${rails_user} ALL=(root) NOPASSWD:/bin/rm -f ${SUDOER_TMP_FILE}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_with_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-tools
|
@@ -16,48 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.48'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.48'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: eac_rails_utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 0.7.1
|
33
|
+
version: '0.11'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 0.7.1
|
40
|
+
version: '0.11'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: eac_ruby_utils
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
47
|
+
version: '0.35'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
52
|
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
54
|
+
version: '0.35'
|
61
55
|
description:
|
62
56
|
email:
|
63
57
|
executables: []
|
@@ -80,6 +74,7 @@ files:
|
|
80
74
|
- init.rb
|
81
75
|
- installer/default_settings.sh
|
82
76
|
- installer/programs/linux/sudo_file_exists.sh
|
77
|
+
- installer/programs/linux/sudo_write.sh
|
83
78
|
- installer/programs/rails/user.sh
|
84
79
|
- installer/programs/redmine/installer/triggers/list/redmine_git_hosting_rescue.sh
|
85
80
|
- installer/programs/redmine_git_hosting/ssh_key.sh
|
@@ -141,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
136
|
- !ruby/object:Gem::Version
|
142
137
|
version: '0'
|
143
138
|
requirements: []
|
144
|
-
|
145
|
-
rubygems_version: 2.7.7
|
139
|
+
rubygems_version: 3.0.8
|
146
140
|
signing_key:
|
147
141
|
specification_version: 4
|
148
142
|
summary: Additional features for RedmineGitHosting.
|