Compare commits

...
Sign in to create a new pull request.

26 commits

Author SHA1 Message Date
Mamoru TASAKA
682f6ca704 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 2026-01-09 00:48:58 +09:00
Mamoru TASAKA
9a38d4fa8f Adjust patches for ruby4_0 2025-11-08 23:52:12 +09:00
Fedora Release Engineering
da888ebfd0 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 12:46:46 +00:00
Fedora Release Engineering
a0734ffbcc Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 23:59:58 +00:00
Mamoru TASAKA
fa13bebe8f Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 2025-01-08 16:46:10 +09:00
Miroslav Suchý
61458bff39 Migrate to SPDX license
For the analysis see https://gitlab.com/fedora/legal/fedora-license-data/-/merge_requests/674

This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-10-21 14:27:48 +00:00
Fedora Release Engineering
4389bc63f7 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 19:56:57 +00:00
Terje Rosten
a08979ab40 Use autosetup macro 2024-07-01 10:42:50 +02:00
Software Management Team
46d7ffc9ee Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:49 +02:00
Fedora Release Engineering
798464bec3 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 17:28:32 +00:00
Vít Ondruch
73d09480eb Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.3 2024-01-03 15:33:42 +01:00
Fedora Release Engineering
2c2fbed812 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 18:22:36 +00:00
Fedora Release Engineering
2f0c75211e Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 21:06:43 +00:00
Mamoru TASAKA
5843fa735b Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 2023-01-04 10:28:37 +09:00
Mamoru TASAKA
4c80d55c42 change to modern geminstall method 2022-12-01 13:47:16 +09:00
Mamoru TASAKA
ee2720c212 Backport upstream pull request for ruby3.2 build issue
Add -Werror=implicit-function explicitly to detect such function
2022-12-01 13:31:20 +09:00
Mamoru TASAKA
d1919849e7 2.5.1 2022-12-01 11:38:00 +09:00
Fedora Release Engineering
2164ed318a Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 02:15:25 +00:00
Vít Ondruch
0a287e6d02 Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.1 2022-01-26 20:56:28 +01:00
Fedora Release Engineering
a057df864e - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 19:13:22 +00:00
Fedora Release Engineering
145affc1d6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 12:39:51 +00:00
Fedora Release Engineering
d89d9dbfc9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 16:28:37 +00:00
Vít Ondruch
9b3dc8c8fc Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0 2021-01-06 21:57:01 +01:00
Fedora Release Engineering
74cd3406c2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 07:03:15 +00:00
Fedora Release Engineering
b5774411fc - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 19:21:16 +00:00
Mamoru TASAKA
244b8445ad F-32: rebuild against ruby27 2020-01-18 08:07:06 +09:00
7 changed files with 197 additions and 28 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
/ruby-shadow-2.5.0.gem
/ruby-shadow-*.gem

View file

@ -1,16 +0,0 @@
--- extconf.rb~ 2017-10-05 20:21:59.480315863 +0200
+++ extconf.rb 2017-10-05 20:23:55.077931560 +0200
@@ -6,12 +6,7 @@
require 'mkmf'
require 'rbconfig'
-
-$CFLAGS = case RUBY_VERSION
- when /^1\.9/; '-DRUBY19'
- when /^2\./; '-DRUBY19'
- else; ''
- end
+$CFLAGS = "#{$CFLAGS} -DRUBY19"
implementation = case CONFIG['host_os']
when /linux/i; 'shadow'

View file

@ -0,0 +1,11 @@
--- ruby-shadow-2.5.1/extconf.rb.orig 2022-11-30 15:03:24.946310154 +0900
+++ ruby-shadow-2.5.1/extconf.rb 2022-11-30 15:04:27.984276887 +0900
@@ -7,7 +7,7 @@
require 'mkmf'
require 'rbconfig'
-$CFLAGS = case RUBY_VERSION
+$CFLAGS = "#{$CFLAGS} " + case RUBY_VERSION
when /^1\.9/; '-DRUBY19'
when /^2\./; '-DRUBY19'
when /^[34]\./; '-DRUBY19 -DRUBY30'

View file

@ -0,0 +1,29 @@
commit eab4aba3f5e06ea8f124d3e5ff6b3fa88c4807cd
Author: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Thu Dec 1 12:23:05 2022 +0900
extconf.rb: use Rbconfig::CONFIG instead of mkmf CONFIG
In mkmf.rb CONFIG is defined as CONFIG is defined as RbConfig::MAKEFILE_CONFIG
and RbConfig::MAKEFILE_CONFIG is almost same as RbConfig::CONFIG
except that RbConfig::MAKEFILE_CONFIG uses reference for other variables.
Using CONFIG in extconf.rb causes error with ruby3.2 because now
CONFIG['host_os'] uses reference for target_os variable, and extconf.rb
expects that this variable is all expanded. So instead, use RbConfig::CONFIG .
Closes #30
diff --git a/extconf.rb b/extconf.rb
index d17f926..55dcff5 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -14,7 +14,7 @@ $CFLAGS = case RUBY_VERSION
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'

View file

@ -0,0 +1,72 @@
commit 7b450355b540df43bab2617fe25437dc3dde12af
Author: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Thu Dec 1 12:54:31 2022 +0900
Replace taintedness function with generic one
Taintedness is deprecated from ruby 2.7.0 and is removed on ruby3.2.0preview3.
To keep compatibility with ruby older than 2.7, introduce -DRUBY30 compilation
flag from ruby3.0 and onwards, and replace taintedness function with generic one
when RUBY30 is defined (i.e. from ruby3.0 and onwards)
diff --git a/extconf.rb b/extconf.rb
index d17f926..04f8f97 100644
--- a/extconf.rb
+++ b/extconf.rb
@@ -10,7 +10,7 @@ require 'rbconfig'
$CFLAGS = case RUBY_VERSION
when /^1\.9/; '-DRUBY19'
when /^2\./; '-DRUBY19'
- when /^3\./; '-DRUBY19'
+ when /^[34]\./; '-DRUBY19 -DRUBY30'
else; ''
end
diff --git a/pwd/shadow.c b/pwd/shadow.c
index eeb96d4..e73e0db 100644
--- a/pwd/shadow.c
+++ b/pwd/shadow.c
@@ -56,8 +56,13 @@ static VALUE convert_pw_struct( struct passwd *entry )
{
/* Hmm. Why custom pw_change instead of sp_lstchg? */
return rb_struct_new(rb_sPasswdEntry,
+#if defined(RUBY30)
+ rb_str_new2(entry->pw_name), /* sp_namp */
+ rb_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */
+#else
rb_tainted_str_new2(entry->pw_name), /* sp_namp */
rb_tainted_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */
+#endif
Qnil, /* sp_lstchg, date when the password was last changed (in days since Jan 1, 1970) */
Qnil, /* sp_min, days that password must stay same */
Qnil, /* sp_max, days until password changes. */
@@ -66,7 +71,11 @@ static VALUE convert_pw_struct( struct passwd *entry )
INT2FIX(difftime(entry->pw_change, 0) / (24*60*60)), /* pw_change */
INT2FIX(difftime(entry->pw_expire, 0) / (24*60*60)), /* sp_expire */
Qnil, /* sp_flag */
+#if defined(RUBY30)
+ rb_str_new2(entry->pw_class), /* sp_loginclass, user access class */
+#else
rb_tainted_str_new2(entry->pw_class), /* sp_loginclass, user access class */
+#endif
NULL);
}
diff --git a/shadow/shadow.c b/shadow/shadow.c
index 35a77a1..5202ce5 100644
--- a/shadow/shadow.c
+++ b/shadow/shadow.c
@@ -34,8 +34,13 @@ static VALUE rb_eFileLock;
static VALUE convert_pw_struct( struct spwd *entry )
{
return rb_struct_new(rb_sPasswdEntry,
+#if defined(RUBY30)
+ rb_str_new2(entry->sp_namp),
+ rb_str_new2(entry->sp_pwdp),
+#else
rb_tainted_str_new2(entry->sp_namp),
rb_tainted_str_new2(entry->sp_pwdp),
+#endif
INT2FIX(entry->sp_lstchg),
INT2FIX(entry->sp_min),
INT2FIX(entry->sp_max),

View file

@ -1,14 +1,20 @@
%global gem_name ruby-shadow
Name: rubygem-%{gem_name}
Version: 2.5.0
Release: 10%{?dist}
Version: 2.5.1
Release: 14%{?dist}
Summary: Ruby shadow password module
License: Public Domain
License: LicenseRef-Fedora-UltraPermissive OR Unlicense
URL: https://github.com/apalmblad/ruby-shadow
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://raw.githubusercontent.com/apalmblad/ruby-shadow/master/test/basic_test.rb
Patch0: ruby-shadow-2.5.0-cflags.patch
# https://github.com/apalmblad/ruby-shadow/pull/29
# Ruby3.2 completely removes taintedness function
Patch0: ruby-shadow-2.5.1-taintedness-ruby32-removal.patch
# https://github.com/apalmblad/ruby-shadow/pull/31
# Ruby3.2 mkmf CONFIG uses reference for other variables yet more
Patch1: ruby-shadow-2.5.1-extconf-ruby32-fix.patch
Patch2: ruby-shadow-2.5.1-cflags.patch
BuildRequires: gcc
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
@ -29,15 +35,12 @@ BuildArch: noarch
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p0
%autosetup -p1 -n %{gem_name}-%{version}
cp %{SOURCE1} .
%build
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
gem build %{gem_name}.gemspec
export CONFIGURE_ARGS="--with-cflags='%{optflags} -Werror=implicit-function-declaration'"
gem build ../%{gem_name}-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
@ -83,6 +86,76 @@ popd
%doc %{gem_instdir}/README.euc
%changelog
* Thu Jan 08 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.1-14
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0
* Sat Nov 08 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.1-13
- Adjust patches for ruby4_0
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jan 08 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.1-10
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jul 01 2024 Terje Rosten <terje.rosten@ntnu.no> - 2.5.0-8
- Use autosetup macro
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jan 03 2024 Vít Ondruch <vondruch@redhat.com> - 2.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.3
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 04 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.1-3
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2
* Thu Dec 1 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.1-2
- Backport upstream pull request for ruby3.2 build issue
- Add -Werror=implicit-function explicitly to detect such function
* Thu Dec 1 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.1-1
- 2.5.1
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 26 2022 Vít Ondruch <vondruch@redhat.com> - 2.5.0-18
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.1
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 6 2021 Vít Ondruch <vondruch@redhat.com> - 2.5.0-14
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jan 17 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.5.0-11
- F-32: rebuild against ruby27
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (ruby-shadow-2.5.0.gem) = 1abd54df1bd4f29e135093df9b22886a726824f8b72b742017fd31bdc3fa39e3d79410a747cf2ebe4117f75e665fb89c904375b5c44a674bec91a4cc37646520
SHA512 (ruby-shadow-2.5.1.gem) = 401ba31f6f87b9b50597e3924c67ef9d0a8f566ea4649735caf59e2b706861babf9b3aa273b7c47ca1cc9c8b4fde79ab21d2e264cd7ba58041fe7b8f9fd87411