Skip to content

Commit

Permalink
Apply upstream patch to remove sibling argument
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper committed Apr 23, 2024
1 parent b092e83 commit 79c00e1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configs/components/_base-ruby-augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

pkg.add_source("file://resources/patches/augeas/ruby-augeas-0.5.0-patch_c_extension.patch")
pkg.add_source("file://resources/patches/augeas/ruby-augeas-0.5.0-remove-sibling-argument.patch")

# These can be overridden by the including component.
ruby_version ||= settings[:ruby_version]
Expand Down Expand Up @@ -75,6 +76,7 @@
if ruby_version =~ /^3/
build_commands << "#{platform.patch} --strip=2 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../ruby-augeas-0.5.0-patch_c_extension.patch"
end
build_commands << "#{platform.patch} --strip=1 --fuzz=0 --ignore-whitespace --no-backup-if-mismatch < ../ruby-augeas-0.5.0-remove-sibling-argument.patch"
build_commands << "#{ruby} ext/augeas/extconf.rb"
build_commands << "#{platform[:make]} -e -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 9f1f9df48ef8c6f62349eccb90dc54a3c3d75e3f Mon Sep 17 00:00:00 2001
From: Ewoud Kohl van Wijngaarden <[email protected]>
Date: Wed, 31 Jan 2024 12:52:45 +0100
Subject: [PATCH] Remove unused sibling argument from augeas_rm

This makes the function match the method definition. There was already a
warning about this, but Fedora 40 applies more hardening and it's a
fatal error.

Fixes: e6b57c58d24b ("Initial ruby bindings, written by Bryan Kearney")
---
ext/augeas/_augeas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/augeas/_augeas.c b/ext/augeas/_augeas.c
index f9b49d1..7ef0d7d 100644
--- a/ext/augeas/_augeas.c
+++ b/ext/augeas/_augeas.c
@@ -184,7 +184,7 @@ VALUE augeas_mv(VALUE s, VALUE src, VALUE dst) {
*
* Remove path and all its children. Returns the number of entries removed
*/
-VALUE augeas_rm(VALUE s, VALUE path, VALUE sibling) {
+VALUE augeas_rm(VALUE s, VALUE path) {
augeas *aug = aug_handle(s);
const char *cpath = StringValueCStr(path) ;

0 comments on commit 79c00e1

Please sign in to comment.