Skip to content

Commit 23c3704

Browse files
authored
Merge pull request #908 from puppetlabs/revert-905-PA-6900
2 parents 3224edb + 0cd19d4 commit 23c3704

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

configs/components/_base-ruby-augeas.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@
33
# load it with instance_eval. See ruby-x.y-augeas.rb configs.
44
#
55

6+
pkg.add_source("file://resources/patches/augeas/ruby-augeas-0.5.0-patch_c_extension.patch")
7+
8+
# We can remove the below patch after https://github.com/hercules-team/ruby-augeas/pull/17 is merged.
9+
pkg.add_source("file://resources/patches/augeas/ruby-augeas-0.5.0-patch_remove_unused_parameter.patch")
610

711
# These can be overridden by the including component.
812
ruby_version ||= settings[:ruby_version]
913
host_ruby ||= settings[:host_ruby]
1014
ruby_dir ||= settings[:ruby_dir]
1115
ruby_bindir ||= settings[:ruby_bindir]
1216

13-
pkg.version "0.6.0"
14-
pkg.md5sum "3c2a13b748300b5a984bab9a30e74d0f"
15-
pkg.url "https://github.com/hercules-team/ruby-augeas/releases/download/release-#{pkg.get_version}/ruby-augeas-#{pkg.get_version}.tgz"
17+
pkg.version "0.5.0"
18+
pkg.md5sum "a132eace43ce13ccd059e22c0b1188ac"
19+
pkg.url "http://download.augeas.net/ruby/ruby-augeas-#{pkg.get_version}.tgz"
1620
pkg.mirror "#{settings[:buildsources_url]}/ruby-augeas-#{pkg.get_version}.tgz"
1721

1822
pkg.build_requires "ruby-#{ruby_version}"
@@ -71,6 +75,10 @@
7175

7276
pkg.build do
7377
build_commands = []
78+
if ruby_version =~ /^3/
79+
build_commands << "#{platform.patch} --strip=2 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../ruby-augeas-0.5.0-patch_c_extension.patch"
80+
end
81+
build_commands << "#{platform.patch} --strip=2 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../ruby-augeas-0.5.0-patch_remove_unused_parameter.patch"
7482
build_commands << "#{ruby} ext/augeas/extconf.rb"
7583
build_commands << "#{platform[:make]} -e -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"
7684

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/ruby-augeas-0.5.0/ext/augeas/_augeas.c b/ruby-augeas-0.5.0/ext/augeas/_augeas.c
2+
index 95d9e05024..7aac0eb96d 100644
3+
--- a/ruby-augeas-0.5.0/ext/augeas/_augeas.c
4+
+++ b/ruby-augeas-0.5.0/ext/augeas/_augeas.c
5+
@@ -489,6 +489,7 @@ void Init__augeas() {
6+
7+
/* Define the ruby class */
8+
c_augeas = rb_define_class("Augeas", rb_cObject) ;
9+
+ rb_undef_alloc_func(c_augeas);
10+
11+
/* Constants for enum aug_flags */
12+
#define DEF_AUG_FLAG(name) \
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/ext/augeas/_augeas.c b/ext/augeas/_augeas.c
2+
index f9b49d1..7ef0d7d 100644
3+
--- a/ruby-augeas-0.5.0/ext/augeas/_augeas.c
4+
+++ b/ruby-augeas-0.5.0/ext/augeas/_augeas.c
5+
@@ -184,7 +184,7 @@ VALUE augeas_mv(VALUE s, VALUE src, VALUE dst) {
6+
*
7+
* Remove path and all its children. Returns the number of entries removed
8+
*/
9+
-VALUE augeas_rm(VALUE s, VALUE path, VALUE sibling) {
10+
+VALUE augeas_rm(VALUE s, VALUE path) {
11+
augeas *aug = aug_handle(s);
12+
const char *cpath = StringValueCStr(path) ;

0 commit comments

Comments
 (0)