[packages/ruby-shadow] Up to 2.5.1
arekm
arekm at pld-linux.org
Sat Mar 28 00:31:34 CET 2026
commit ab2fad150ceb703283712c365bef53503023e4eb
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Mar 28 00:31:22 2026 +0100
Up to 2.5.1
cflags.patch | 11 +++++------
host_os.patch | 11 +++++++++++
ruby-shadow.spec | 9 ++++++---
ruby3.patch | 13 +++++++++++++
4 files changed, 35 insertions(+), 9 deletions(-)
---
diff --git a/ruby-shadow.spec b/ruby-shadow.spec
index 9b9f900..9aa03c7 100644
--- a/ruby-shadow.spec
+++ b/ruby-shadow.spec
@@ -1,20 +1,21 @@
%define pkgname shadow
Summary: Ruby bindings for shadow password access
Name: ruby-%{pkgname}
-Version: 2.5.0
+Version: 2.5.1
Release: 1
License: Public Domain
Group: Development/Languages
Source0: https://github.com/apalmblad/ruby-shadow/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: e9c35620f6c25233b7b54dcab8ee955e
+# Source0-md5: f492de9c233cebc393c8aa86118fe333
Patch1: cflags.patch
+Patch2: host_os.patch
+Patch3: ruby3.patch
URL: https://github.com/apalmblad/ruby-shadow
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.665
BuildRequires: ruby >= 1:1.8.6
BuildRequires: ruby-devel
BuildRequires: ruby-modules
-BuildRequires: setup.rb
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -23,6 +24,8 @@ Ruby bindings for shadow password access.
%prep
%setup -q
%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
iconv -f EUCJP -t utf8 -o README.ja README.euc
%build
diff --git a/cflags.patch b/cflags.patch
index 6628233..f38c5aa 100644
--- a/cflags.patch
+++ b/cflags.patch
@@ -1,13 +1,12 @@
-diff -up shadow-1.4.1/extconf.rb~ shadow-1.4.1/extconf.rb
---- shadow-1.4.1/extconf.rb~ 2012-04-20 10:48:06.724264584 -0400
-+++ shadow-1.4.1/extconf.rb 2012-04-20 10:40:45.517013943 -0400
-@@ -6,7 +6,8 @@
+--- a/extconf.rb
++++ b/extconf.rb
+@@ -7,7 +7,8 @@
require 'mkmf'
require 'rbconfig'
-
+
-$CFLAGS = case RUBY_VERSION
+$CFLAGS = "#{$CFLAGS}"
+$CFLAGS += case RUBY_VERSION
when /^1\.9/; '-DRUBY19'
when /^2\./; '-DRUBY19'
- else; ''
+ when /^3\./; '-DRUBY19'
diff --git a/host_os.patch b/host_os.patch
new file mode 100644
index 0000000..645e538
--- /dev/null
+++ b/host_os.patch
@@ -0,0 +1,11 @@
+--- a/extconf.rb
++++ b/extconf.rb
+@@ -16,7 +16,7 @@
+ else; ''
+ end
+
+-implementation = case CONFIG['host_os']
++implementation = case RbConfig::CONFIG['host_os']
+ when /linux/i; 'shadow'
+ when /sunos|solaris/i; 'shadow'
+ when /freebsd|mirbsd|netbsd|openbsd/i; 'pwd'
diff --git a/ruby3.patch b/ruby3.patch
new file mode 100644
index 0000000..40361af
--- /dev/null
+++ b/ruby3.patch
@@ -0,0 +1,13 @@
+--- a/shadow/shadow.c
++++ b/shadow/shadow.c
+@@ -34,8 +34,8 @@
+ static VALUE convert_pw_struct( struct spwd *entry )
+ {
+ return rb_struct_new(rb_sPasswdEntry,
+- rb_tainted_str_new2(entry->sp_namp),
+- rb_tainted_str_new2(entry->sp_pwdp),
++ rb_str_new_cstr(entry->sp_namp),
++ rb_str_new_cstr(entry->sp_pwdp),
+ INT2FIX(entry->sp_lstchg),
+ INT2FIX(entry->sp_min),
+ INT2FIX(entry->sp_max),
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-shadow.git/commitdiff/ab2fad150ceb703283712c365bef53503023e4eb
More information about the pld-cvs-commit
mailing list