Retrieved from: https://github.com/jordansissel/fpm/pull/1561.patch From 956a218a7b35de08ea35da3b702ffdc716656b68 Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Mon, 15 Oct 2018 21:05:47 -0700 Subject: [PATCH] Check if an option has a default value before we try to look it up. This fixes fpm when used with clamp 1.3.0 or above. Fixes #1543 --- lib/fpm/command.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/fpm/command.rb b/lib/fpm/command.rb index a204001e1..a99ddb627 100644 --- a/lib/fpm/command.rb +++ b/lib/fpm/command.rb @@ -394,7 +394,12 @@ def execute set = proc do |object, attribute| # if the package's attribute is currently nil *or* the flag setting for this # attribute is non-default, use the value. - if object.send(attribute).nil? || send(attribute) != send("default_#{attribute}") + + # Not all options have a default value, so we assume `nil` if there's no default. (#1543) + # In clamp >= 1.3.0, options without `:default => ..` will not have any # `default_xyz` + # methods generated, so we need to check for the presence of this method first. + default = respond_to?("default_#{attribute}") ? send("default_#{attribute}") : nil + if object.send(attribute).nil? || send(attribute) != default logger.info("Setting from flags: #{attribute}=#{send(attribute)}") object.send("#{attribute}=", send(attribute)) end ge'>range
path: root/gnu/system/setuid.scm
AgeCommit message (Expand)Author
2024-09-08privilege: Add file-like->setuid-program helper....* gnu/system/privilege.scm (file-like->setuid-program): New public procedure. * gnu/system/setuid.scm: Re-export it for compatibility. (file-like->setuid-program): Remove this old version. * gnu/services/docker.scm (singularity-setuid-programs): Use it (again). * gnu/services/desktop.scm (enlightenment-privileged-programs): Likewise. Change-Id: I8e41144438677a15cdadb3063651dbc780715497 Tobias Geerinckx-Rice
2024-08-11system: (gnu system setuid) wraps (gnu system privilege)....* gnu/system/setuid.scm (setuid-program): Rewrite as syntax to create a <privileged-program> record that is setuid by default. (setuid-program?, setuid-program-program, setuid-program-setuid?) (setuid-program-setgid?, setuid-program-user, setuid-program-group): Alias their privileged-program equivalent. Tobias Geerinckx-Rice
2021-07-29system: Add (gnu system setuid)....I flubbed and somehow when including the patch series, this got dropped. Oops... should fix things again. * gnu/system/setuid.scm: New file. Christopher Lemmer Webber