[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62196] [PATCH 000/182] Add FPM, update Rails and other Ruby additio
From: |
Maxim Cournoyer |
Subject: |
[bug#62196] [PATCH 000/182] Add FPM, update Rails and other Ruby additions/updates |
Date: |
Thu, 23 Mar 2023 00:04:25 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
I needed the following adjustments to get fpm to truly work:
--8<---------------cut here---------------start------------->8---
modified gnu/local.mk
@@ -1136,6 +1136,7 @@ dist_patch_DATA =
\
%D%/packages/patches/fp16-implicit-double.patch \
%D%/packages/patches/fp16-system-libraries.patch \
%D%/packages/patches/fpc-reproducibility.patch \
+ %D%/packages/patches/fpm-newer-clamp-fix.patch \
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
%D%/packages/patches/freeimage-unbundle.patch \
%D%/packages/patches/fuse-glibc-2.34.patch \
modified gnu/packages/package-management.scm
@@ -2021,7 +2021,8 @@ (define-public fpm
(file-name (git-file-name name version))
(sha256
(base32
- "1m2zxf7wyk7psvm611yxs68hnwm0pyqilsmcq3x791hz7rvbg68w"))))
+ "1m2zxf7wyk7psvm611yxs68hnwm0pyqilsmcq3x791hz7rvbg68w"))
+ (patches (search-patches "fpm-newer-clamp-fix.patch"))))
(build-system ruby-build-system)
(arguments
(list #:phases
@@ -2034,6 +2035,11 @@ (define-public fpm
(("\"/bin/sh\"")
(string-append "\"" (search-input-file inputs "bin/sh")
"\"")))))
+ (add-after 'extract-gemspec 'relax-requirements
+ (lambda _
+ (substitute* "fpm.gemspec"
+ (("\"clamp\", \"~> 1.0.0\"")
+ "\"clamp\", \">= 1.0.0\""))))
(add-after 'extract-gemspec 'disable-problematic-tests
;; Disable some tests which are failing (see:
;; https://github.com/jordansissel/fpm/issues/2000).
new file gnu/packages/patches/fpm-newer-clamp-fix.patch
@@ -0,0 +1,31 @@
+From 956a218a7b35de08ea35da3b702ffdc716656b68 Mon Sep 17 00:00:00 2001
+From: Jordan Sissel <jls@semicomplete.com>
+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
--8<---------------cut here---------------end--------------->8---
Attached is the modified patch.
0001-gnu-Add-fpm.patch
Description: Text Data
--
Thanks,
Maxim
- [bug#62196] [PATCH 192/223] gnu: ruby-shoulda-matchers: Honor #:tests?., (continued)
- [bug#62196] [PATCH 192/223] gnu: ruby-shoulda-matchers: Honor #:tests?., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 200/223] gnu: Add ruby-ruby-version., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 195/223] gnu: ruby-unf-ext: Update to 0.0.8.2., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 198/223] gnu: Add ruby-rspec-stubbed-env., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 151/223] gnu: Add ruby-net-protocol., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 153/223] gnu: Add ruby-net-imap., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 166/223] gnu: Add ruby-propshaft., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 170/223] gnu: ruby-spring: Update to 4.1.1., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 173/223] gnu: Add ruby-pleaserun., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 179/223] gnu: Add fpm., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 000/182] Add FPM, update Rails and other Ruby additions/updates,
Maxim Cournoyer <=
- [bug#62196] [PATCH 189/223] gnu: ruby-shoulda-context: Update to 2.0.0., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 162/223] gnu: ruby-globalid: Update to 1.1.0., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 145/223] gnu: ruby-marcel: Update to 1.0.2., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 172/223] gnu: Add ruby-flores., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 158/223] gnu: ruby-sprockets: Update to 4.2.0., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 175/223] gnu: Add perl-app-cpanminus., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 187/223] gnu: ruby-terminal-table: Update to 3.0.2., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 118/223] gnu: Add ruby-msgpack., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 157/223] gnu: ruby-actionmailer: Update to 7.0.4.3., Maxim Cournoyer, 2023/03/20
- [bug#62196] [PATCH 186/223] gnu: Add ruby-minitest-profile., Maxim Cournoyer, 2023/03/20