ndr_dev_support 7.3.3 → 7.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 075d6598048f0b0288649a9ea1c071c33abb11481bdc93dbc7db4cf678ea033c
4
- data.tar.gz: d95c2dc791de40932ccf0720b96e9f6ca252842dbe45cb1b02f6344d3a6bdd79
3
+ metadata.gz: 5a9657d61fe9727e7023491944d7005896e9c4a41b47c5a79a017b6989a125a8
4
+ data.tar.gz: 8175fd01914592c8ea9dfdb364a02de49622ca56a7fe85626f07318f5cf7377f
5
5
  SHA512:
6
- metadata.gz: 6772091bb99f0f1f70c4d36049789244bcf4f1e1e386510c3e9c603a32d43cbc1fbdb3b78a044e4c973623ce4a29601f4987a95a7b4bc7c884879988bc523845
7
- data.tar.gz: 24fcca3b39d2adee7fc8964fd80a404ed60ed6b4a563a06a91ef40c6cae3f0cb4945e8be9f92539b73e16741214ad1500a944280a130baec4f7ebe3bd8d893f9
6
+ metadata.gz: 44f9c9ba5543eee3b9b506026eacdaf5f3a9a6513dde51629e457e9de489cb87bad909661891bd0eeb179e4e95fbc6b88c222661fc9c4ecd2c9a278493b486b3
7
+ data.tar.gz: 274c6fe966a87ea07060aea1fef879b6c98d6644dfb7a740dfcdee417354379d77a31af5acfdfb0caff4b20ba144be13047126e80f04f7ca83b92ff1d417ab83
data/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  ## [Unreleased]
2
2
  *no unreleased changes*
3
3
 
4
+ ## 7.3.5 / 2025-10-16
5
+ ### Fixed
6
+ * Capistrano: Do not include macOS extended attributes in tar files
7
+
8
+ ## 7.3.4 / 2025-09-26
9
+ ### Fixed
10
+ * Capistrano: deploy:preinstall should fix up installed gem permissions
11
+ * Support Ruby 3.4
12
+
13
+ ### Added
14
+ * Capistrano: cleanup bundled gems for old ruby versions.
15
+
4
16
  ## 7.3.3 / 2025-07-31
5
17
  ### Fixed
6
18
  * Update rubocop version dependency
@@ -97,7 +97,29 @@ Capistrano::Configuration.instance(:must_exist).load do
97
97
  fi
98
98
  SHELL
99
99
  end
100
+
101
+ desc <<~DESC
102
+ Cleanup bundled gems for old ruby versions.
103
+
104
+ Deletes shared bundle files that no longer match any installed releases.
105
+
106
+ This interacts reasonably with deploy:preinstall:
107
+ When deploy:preinstall installs new .rbenv and new shared bundled gems, this
108
+ will not delete them. If an older ruby version is then deployed, this removes
109
+ the new version's installed bundle, but leaves the .rbenv installation.
110
+ DESC
111
+ task :cleanup_unused_bundles do
112
+ # For ruby X.Y.Z, bundled gems are in .../shared/bundle/ruby/X.Y.0
113
+ # Generates e.g.
114
+ # find_options="-not ( -name DUMMY -or -name 3.1.0 -or -name 3.2.0 )"
115
+ # and then removes e.g. shared/bundle/ruby/3.0.0
116
+ run "find_options=\"-not ( -name DUMMY `grep -ho '^[0-9]*[.][0-9]*' " \
117
+ "#{releases_path}/*/.ruby-version | sed -e 's/.*/-or -name &.0/'` ) \"; " \
118
+ "find #{File.join(shared_path, 'bundle/ruby/*')} -maxdepth 0 $find_options " \
119
+ "-exec echo rm -rf '{}' ';' -exec rm -rf '{}' ';'"
120
+ end
100
121
  end
101
122
 
102
123
  before 'bundle:install', 'ndr_dev_support:install_ruby'
124
+ after 'deploy:finalize_update', 'ndr_dev_support:cleanup_unused_bundles'
103
125
  end
@@ -0,0 +1,33 @@
1
+ require 'capistrano/recipes/deploy/strategy/copy'
2
+
3
+ # Do not include macOS extended attributes in capistrano tar files
4
+ #
5
+ # Without this, the system default tar (bsdtar) creates AppleDouble files with a
6
+ # ._ prefix, and the linux default tar (gnutar) generates many warnings such as:
7
+ # tar: Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'
8
+ #
9
+ # This fix works because we compress files only locally, for capistrano deployments.
10
+ # If we were compressing files remotely too, we would instead need to selectively
11
+ # redefine behaviour for local tar usage vs remote usage, e.g. by adding a
12
+ # :copy_local_tar_options variable, similar to :copy_local_tar
13
+ module CopyMacosTarSupport
14
+ private
15
+
16
+ def compress(directory, file)
17
+ if compression.compress_command[0] == 'tar' && local_tar_is_macos_bsdtar?
18
+ return macos_bsdtar_compress(directory, file)
19
+ end
20
+
21
+ super
22
+ end
23
+
24
+ def local_tar_is_macos_bsdtar?
25
+ RUBY_PLATFORM =~ /darwin/ && system('tar --version | grep -q ^bsdtar')
26
+ end
27
+
28
+ def macos_bsdtar_compress(directory, file)
29
+ compression.compress_command + [file, '--no-xattr', '--no-mac-metadata', directory]
30
+ end
31
+ end
32
+
33
+ Capistrano::Deploy::Strategy::Copy.prepend(CopyMacosTarSupport)
@@ -4,6 +4,7 @@ require 'rainbow'
4
4
  require_relative 'assets'
5
5
  require_relative 'deploy_secrets'
6
6
  require_relative 'install_ruby'
7
+ require_relative 'macos_bsdtar'
7
8
  require_relative 'preinstall'
8
9
  require_relative 'restart'
9
10
  require_relative 'revision_logger'
@@ -164,8 +165,12 @@ Capistrano::Configuration.instance(:must_exist).load do
164
165
  # already there:
165
166
  run "rm -rf #{File.join(release_path, path)} && ln -s #{File.join(shared_path, path)} #{File.join(release_path, path)}"
166
167
  end
168
+ end
169
+
170
+ after 'deploy:finalize_update', 'ndr_dev_support:filesystem_tweaks'
167
171
 
168
- # Make the shared/bundle/ directory writeable by deployers:
172
+ desc 'Make the shared/bundle/ directory writeable by deployers'
173
+ task :bundle_permissions do
169
174
  # We already set group permissions correctly in the bundle directory, but some gem installs
170
175
  # ignore these permissions, so we need to fix them up.
171
176
  # Set deployer group for everything created by this user
@@ -178,7 +183,8 @@ Capistrano::Configuration.instance(:must_exist).load do
178
183
  '-not -perm -0064 -print0 |xargs -r0 chmod g+rw,o+r'
179
184
  end
180
185
 
181
- after 'deploy:finalize_update', 'ndr_dev_support:filesystem_tweaks'
186
+ # Ensure we have fixed the bundle permissions before potentially aborting
187
+ before 'ndr_dev_support:check_preinstall', 'ndr_dev_support:bundle_permissions'
182
188
  end
183
189
  end
184
190
 
@@ -2,5 +2,5 @@
2
2
  # This defines the NdrDevSupport version. If you change it, rebuild and commit the gem.
3
3
  # Use "rake build" to build the gem, see rake -T for all bundler rake tasks (and our own).
4
4
  module NdrDevSupport
5
- VERSION = '7.3.3'
5
+ VERSION = '7.3.5'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_dev_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.3
4
+ version: 7.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - NCRS Development Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-08-01 00:00:00.000000000 Z
11
+ date: 2025-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -411,6 +411,7 @@ files:
411
411
  - lib/ndr_dev_support/capistrano/assets.rb
412
412
  - lib/ndr_dev_support/capistrano/deploy_secrets.rb
413
413
  - lib/ndr_dev_support/capistrano/install_ruby.rb
414
+ - lib/ndr_dev_support/capistrano/macos_bsdtar.rb
414
415
  - lib/ndr_dev_support/capistrano/ndr_model.rb
415
416
  - lib/ndr_dev_support/capistrano/preinstall.rb
416
417
  - lib/ndr_dev_support/capistrano/restart.rb
@@ -487,7 +488,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
487
488
  - !ruby/object:Gem::Version
488
489
  version: '0'
489
490
  requirements: []
490
- rubygems_version: 3.4.19
491
+ rubygems_version: 3.5.22
491
492
  signing_key:
492
493
  specification_version: 4
493
494
  summary: NDR Developer Support library