Set Puppet-related ports to use Ruby 2.7
Puppet 5 and 6 currently use Ruby 2.7, as that is the default Ruby version. Puppet 6 can probably run on Ruby 3.0 after a distpatch, but Puppet 5 would require additional backporting (how much is unknown). Both Puppet 5 and 6 depend on facter and mcollective, and all must use the same Ruby version. So setting all four ports to use Ruby 2.7 seems like the simplest way to continue to keep things working when the default Ruby version is switched to Ruby 3.0. While here, add install patches for Puppet 5, 6, and mcollective to build with Ruby 3.0, and add backport a distpatch from Puppet 7 to Puppet 6 to allow Puppet 6 to run on Ruby 3.0. This will make a future switch to Ruby 3.0 easier. These changes should not have a runtime effect on Puppet 5 or 6. The Puppet 6 port is bumped, due to the backported patch, but that patch should not change runtime behavior on Ruby 2.7. review from sebastia@ (Puppet 5 maintainer) OK kn@ (Puppet 6 maintainer)
This commit is contained in:
parent
813b34866e
commit
d44947f608
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.90 2021/07/23 18:56:19 sebastia Exp $
|
||||
# $OpenBSD: Makefile,v 1.91 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
ONLY_FOR_ARCHS = ${CLANG_ARCHS} ${LLVM_ARCHS}
|
||||
|
||||
@ -11,7 +11,6 @@ SHARED_LIBS += facter 3.3
|
||||
PKGSPEC = facter->=3.0,<4.0
|
||||
CATEGORIES = sysutils
|
||||
|
||||
|
||||
MAINTAINER = Sebastian Reitenbach <sebastia@openbsd.org>
|
||||
|
||||
# Apache2
|
||||
@ -19,6 +18,7 @@ PERMIT_PACKAGE = Yes
|
||||
|
||||
MASTER_SITES = https://downloads.puppetlabs.com/facter/
|
||||
|
||||
MODRUBY_REV = 2.7
|
||||
MODULES += devel/cmake \
|
||||
lang/ruby
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.58 2020/11/17 03:19:37 jeremy Exp $
|
||||
# $OpenBSD: Makefile,v 1.59 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
BROKEN-alpha= SIGABRT during make fake
|
||||
COMMENT= framework for server orchestration/parallel job execution
|
||||
@ -27,6 +27,7 @@ PKG_ARCH= *
|
||||
NO_TEST= Yes
|
||||
SUBST_VARS += RUBY
|
||||
|
||||
MODRUBY_REV = 2.7
|
||||
MODRUBY_ADJ_FILES=mco mcollectived
|
||||
|
||||
pre-configure:
|
||||
|
41
sysutils/mcollective/patches/patch-install_rb
Normal file
41
sysutils/mcollective/patches/patch-install_rb
Normal file
@ -0,0 +1,41 @@
|
||||
$OpenBSD: patch-install_rb,v 1.1 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
Work on ruby 3.0+.
|
||||
|
||||
Index: install.rb
|
||||
--- install.rb.orig
|
||||
+++ install.rb
|
||||
@@ -48,7 +48,7 @@ end
|
||||
if (defined?(RbConfig) ? RbConfig : Config)::CONFIG['host_os'] =~ /mswin|win32|dos|mingw|cygwin/i
|
||||
WINDOWS = TRUE
|
||||
else
|
||||
- WINDOWS = FALSE
|
||||
+ WINDOWS = false
|
||||
end
|
||||
|
||||
PREREQS = %w{}
|
||||
@@ -79,8 +79,8 @@ def do_configs(configs, target, strip = 'etc/')
|
||||
configs.each do |cf|
|
||||
ocf = File.join(target, cf.gsub(Regexp.new(strip), ''))
|
||||
oc = File.dirname(ocf)
|
||||
- makedirs(oc, {:mode => 0755, :verbose => true})
|
||||
- install(cf, ocf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ makedirs(oc, :mode => 0755, :verbose => true)
|
||||
+ install(cf, ocf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -97,10 +97,10 @@ def do_libs(libs, target, strip = 'lib/')
|
||||
olf = File.join(target, lf.sub(/^#{strip}/, ''))
|
||||
op = File.dirname(olf)
|
||||
if File.directory?(lf)
|
||||
- makedirs(olf, {:mode => 0755, :verbose => true})
|
||||
+ makedirs(olf, :mode => 0755, :verbose => true)
|
||||
else
|
||||
- makedirs(op, {:mode => 0755, :verbose => true})
|
||||
- install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ makedirs(op, :mode => 0755, :verbose => true)
|
||||
+ install(lf, olf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
end
|
52
sysutils/ruby-puppet/5/patches/patch-install_rb
Normal file
52
sysutils/ruby-puppet/5/patches/patch-install_rb
Normal file
@ -0,0 +1,52 @@
|
||||
$OpenBSD: patch-install_rb,v 1.1 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
Work on ruby 3.0+.
|
||||
|
||||
Index: install.rb
|
||||
--- install.rb.orig
|
||||
+++ install.rb
|
||||
@@ -60,7 +60,7 @@ def do_configs(configs, target, strip = 'conf/')
|
||||
Dir.mkdir(target) unless File.directory? target
|
||||
configs.each do |cf|
|
||||
ocf = File.join(InstallOptions.config_dir, cf.gsub(/#{strip}/, ''))
|
||||
- FileUtils.install(cf, ocf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(cf, ocf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,9 +77,9 @@ def do_libs(libs, strip = 'lib/')
|
||||
next if File.directory? lf
|
||||
olf = File.join(InstallOptions.site_dir, lf.sub(/^#{strip}/, ''))
|
||||
op = File.dirname(olf)
|
||||
- FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
|
||||
+ FileUtils.makedirs(op, :mode => 0755, :verbose => true)
|
||||
FileUtils.chmod(0755, op)
|
||||
- FileUtils.install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(lf, olf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -87,9 +87,9 @@ def do_man(man, strip = 'man/')
|
||||
man.each do |mf|
|
||||
omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
|
||||
om = File.dirname(omf)
|
||||
- FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
|
||||
+ FileUtils.makedirs(om, :mode => 0755, :verbose => true)
|
||||
FileUtils.chmod(0755, om)
|
||||
- FileUtils.install(mf, omf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(mf, omf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
# Solaris does not support gzipped man pages. When called with
|
||||
# --no-check-prereqs/without facter the default gzip behavior still applies
|
||||
unless $operatingsystem == "Solaris"
|
||||
@@ -105,9 +105,9 @@ def do_locales(locale, strip = 'locales/')
|
||||
next if File.directory? lf
|
||||
olf = File.join(InstallOptions.locale_dir, lf.sub(/^#{strip}/, ''))
|
||||
op = File.dirname(olf)
|
||||
- FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
|
||||
+ FileUtils.makedirs(op, :mode => 0755, :verbose => true)
|
||||
FileUtils.chmod(0755, op)
|
||||
- FileUtils.install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(lf, olf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
@ -1,8 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2021/07/23 20:21:49 kn Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
PORTROACH= limit:^6
|
||||
|
||||
VERSION= 6.24.0
|
||||
REVISION= 0
|
||||
|
||||
MASTER_SITES0= https://github.com/puppetlabs/puppet/commit/
|
||||
PATCHFILES= puppet-uri-encode-fix{41dcae71c7d10b9cc3c190897d02c5082ddd2076}.patch:0
|
||||
PATCH_DIST_STRIP= -p1
|
||||
|
||||
MAINTAINER= Klemens Nanni <kn@openbsd.org>
|
||||
|
||||
|
@ -1,2 +1,4 @@
|
||||
SHA256 (puppet-6.24.0.tar.gz) = 5PwFS4bBM0a+aSlTu+WbxvpR1VjZngK9wUvAnVMb2tQ=
|
||||
SHA256 (puppet-uri-encode-fix.patch) = ZhX/jy84ifAwkEhTsqSGKHVQ8dtx35VhKnuJWn1tpC0=
|
||||
SIZE (puppet-6.24.0.tar.gz) = 3003557
|
||||
SIZE (puppet-uri-encode-fix.patch) = 3038
|
||||
|
52
sysutils/ruby-puppet/6/patches/patch-install_rb
Normal file
52
sysutils/ruby-puppet/6/patches/patch-install_rb
Normal file
@ -0,0 +1,52 @@
|
||||
$OpenBSD: patch-install_rb,v 1.1 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
Work on ruby 3.0+.
|
||||
|
||||
Index: install.rb
|
||||
--- install.rb.orig
|
||||
+++ install.rb
|
||||
@@ -60,7 +60,7 @@ def do_configs(configs, target, strip = 'conf/')
|
||||
Dir.mkdir(target) unless File.directory? target
|
||||
configs.each do |cf|
|
||||
ocf = File.join(InstallOptions.config_dir, cf.gsub(/#{strip}/, ''))
|
||||
- FileUtils.install(cf, ocf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(cf, ocf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,9 +77,9 @@ def do_libs(libs, strip = 'lib/')
|
||||
next if File.directory? lf
|
||||
olf = File.join(InstallOptions.site_dir, lf.sub(/^#{strip}/, ''))
|
||||
op = File.dirname(olf)
|
||||
- FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
|
||||
+ FileUtils.makedirs(op, :mode => 0755, :verbose => true)
|
||||
FileUtils.chmod(0755, op)
|
||||
- FileUtils.install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(lf, olf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -87,9 +87,9 @@ def do_man(man, strip = 'man/')
|
||||
man.each do |mf|
|
||||
omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
|
||||
om = File.dirname(omf)
|
||||
- FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
|
||||
+ FileUtils.makedirs(om, :mode => 0755, :verbose => true)
|
||||
FileUtils.chmod(0755, om)
|
||||
- FileUtils.install(mf, omf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(mf, omf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
# Solaris does not support gzipped man pages. When called with
|
||||
# --no-check-prereqs/without facter the default gzip behavior still applies
|
||||
unless $operatingsystem == "Solaris"
|
||||
@@ -105,9 +105,9 @@ def do_locales(locale, strip = 'locales/')
|
||||
next if File.directory? lf
|
||||
olf = File.join(InstallOptions.locale_dir, lf.sub(/^#{strip}/, ''))
|
||||
op = File.dirname(olf)
|
||||
- FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
|
||||
+ FileUtils.makedirs(op, :mode => 0755, :verbose => true)
|
||||
FileUtils.chmod(0755, op)
|
||||
- FileUtils.install(lf, olf, {:mode => 0644, :preserve => true, :verbose => true})
|
||||
+ FileUtils.install(lf, olf, :mode => 0644, :preserve => true, :verbose => true)
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.50 2021/02/23 19:39:43 sthen Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.51 2021/08/30 19:23:38 jeremy Exp $
|
||||
|
||||
PKG_ARCH ?= *
|
||||
COMMENT ?= centralised configuration management for networks
|
||||
@ -37,6 +37,7 @@ MODULES += lang/ruby \
|
||||
lang/python
|
||||
MODPY_BUILDDEP = No
|
||||
MODPY_RUNDEP = No
|
||||
MODRUBY_REV = 2.7
|
||||
|
||||
BUILD_DEPENDS +=${RUN_DEPENDS}
|
||||
RUN_DEPENDS += archivers/gtar \
|
||||
|
Loading…
Reference in New Issue
Block a user