2025-06-03 08:15:25 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Crypt-URandom-Token
|
|
|
|
#
|
|
|
|
# Copyright (c) 2025 SUSE LLC
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define cpan_name Crypt-URandom-Token
|
|
|
|
Name: perl-Crypt-URandom-Token
|
|
|
|
Version: 0.5.0
|
|
|
|
Release: 0
|
|
|
|
# 0.005 -> normalize -> 0.5.0
|
|
|
|
%define cpan_version 0.005
|
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
|
|
Summary: Generate secure strings for passwords, secrets and similar
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/S/ST/STIGTSP/%{cpan_name}-%{cpan_version}.tar.gz
|
2025-08-12 18:12:54 +02:00
|
|
|
Source100: README.md
|
2025-06-03 08:15:25 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
BuildRequires: perl(Crypt::URandom) >= 0.400
|
|
|
|
BuildRequires: perl(Test::Exception) >= 0.43
|
|
|
|
Requires: perl(Crypt::URandom) >= 0.400
|
|
|
|
Provides: perl(Crypt::URandom::Token) = %{version}
|
|
|
|
%undefine __perllib_provides
|
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
This module provides a secure way to generate a random token for passwords
|
|
|
|
and similar using Crypt::URandom as the source of random bits.
|
|
|
|
|
|
|
|
By default, it generates a 44 character alphanumeric token with more than
|
|
|
|
256 bits of entropy. A custom alphabet with between 2 and 256 elements can
|
|
|
|
be provided.
|
|
|
|
|
|
|
|
Modulo reduction and rejection sampling is used to prevent modulus bias.
|
|
|
|
Keep in mind that bias will be introduced if duplicate elements are
|
|
|
|
provided in the alphabet.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
%check
|
|
|
|
make test
|
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%doc Changes README SECURITY.md shell.nix
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%changelog
|