redmine_with_git 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0042c0866a1c3837ee497d22bc60af1c308205aacfd5ed3dcbc1f8f5d18a1d55
4
- data.tar.gz: 4900f7e85ee5f940d7a8fbe04a5d865c9b7fec47e86d47fd21a618d35df40493
3
+ metadata.gz: 8376ffb89217b800453d89c45b8431a5e734aac47885834477e5b5d3833fafa1
4
+ data.tar.gz: 56a715f0258f0f8ad07acf0233b1c08733197257afe6383ba709ae63d320c8f2
5
5
  SHA512:
6
- metadata.gz: 3f5f9e2047c92a341762015813cd34e6d375267a3db52c3a2ae6f60249c9b9efec82920dcf3ecc47309655e330e1f03eed6d2c283ec673e98fe3c4d1753e6b16
7
- data.tar.gz: dae66e51c807e2c87df8242a8207f8f538320f14e0463029bca54d25679d00135a93e16aba1363bcb2f8e3f8ffba28df0cb1b252b7aa9f01f5f735d021dc2db2
6
+ metadata.gz: f97c9dc74a61afed67b1a45012020dcbbee98640e1447c65619a51e721d2904ef4bd1261968a8b015788c21873c3a4a3625d6a26486dcb4c0174388542b90306
7
+ data.tar.gz: 70fa2dada5d61ca44b70ed9c3f66fe0e2b843697c26a1597f792032b72ed1d3ebbd6804327c0691dc61a6bedab9d12f76939617aaa7b12c5bf99c6579fbeaff1
@@ -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
@@ -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
- SUDOER_FILE="/etc/sudoers.d/$(programeiro /rails/user)_redmine_with_git${SUFFIX}"
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
- TMPFILE="$(mktemp)"
14
- sudo cp "$SUDOER_FILE" "$TMPFILE"
15
- sudo chmod og+r "$TMPFILE"
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" | sudo tee "$SUDOER_FILE" > /dev/null
47
- sudo chmod 440 "$SUDOER_FILE"
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}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RedmineWithGit
4
- VERSION = '0.6.7'
4
+ VERSION = '0.6.8'
5
5
  end
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.7
4
+ version: 0.6.8
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: 2020-07-06 00:00:00.000000000 Z
11
+ date: 2020-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-tools
@@ -74,6 +74,7 @@ files:
74
74
  - init.rb
75
75
  - installer/default_settings.sh
76
76
  - installer/programs/linux/sudo_file_exists.sh
77
+ - installer/programs/linux/sudo_write.sh
77
78
  - installer/programs/rails/user.sh
78
79
  - installer/programs/redmine/installer/triggers/list/redmine_git_hosting_rescue.sh
79
80
  - installer/programs/redmine_git_hosting/ssh_key.sh
@@ -135,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
136
  - !ruby/object:Gem::Version
136
137
  version: '0'
137
138
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.7.7
139
+ rubygems_version: 3.0.8
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Additional features for RedmineGitHosting.