2018-10-07 19:54:52 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Email-Address-XS
|
|
|
|
#
|
2022-08-16 12:27:58 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2018-10-07 19:54:52 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2022-08-16 12:27:58 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-10-07 19:54:52 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-08-16 12:27:58 +00:00
|
|
|
%define cpan_name Email-Address-XS
|
2018-10-07 19:54:52 +00:00
|
|
|
Name: perl-Email-Address-XS
|
2022-08-16 12:27:58 +00:00
|
|
|
Version: 1.05
|
2018-10-07 19:54:52 +00:00
|
|
|
Release: 0
|
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2022-08-16 12:27:58 +00:00
|
|
|
Summary: Parse and format RFC 5322 email addresses and groups
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2018-10-07 19:54:52 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/P/PA/PALI/%{cpan_name}-%{version}.tar.gz
|
2022-08-16 12:27:58 +00:00
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:13:49 +02:00
|
|
|
Source100: README.md
|
2018-10-07 19:54:52 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
This module implements at https://tools.ietf.org/html/rfc5322 parser and
|
|
|
|
formatter of email addresses and groups. It parses an input string from
|
|
|
|
email headers which contain a list of email addresses or a groups of email
|
|
|
|
addresses (like From, To, Cc, Bcc, Reply-To, Sender, ...). Also it can
|
|
|
|
generate a string value for those headers from a list of email addresses
|
|
|
|
objects. Module is backward compatible with at
|
|
|
|
https://tools.ietf.org/html/rfc2822 and at
|
|
|
|
https://tools.ietf.org/html/rfc822.
|
|
|
|
|
|
|
|
Parser and formatter functionality is implemented in XS and uses shared
|
|
|
|
code from Dovecot IMAP server.
|
|
|
|
|
|
|
|
It is a drop-in replacement for the Email::Address module which has several
|
|
|
|
security issues. E.g. issue at
|
|
|
|
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7686, which allows
|
|
|
|
remote attackers to cause denial of service, is still present in
|
|
|
|
Email::Address version 1.908.
|
|
|
|
|
|
|
|
Email::Address::XS module was created to finally fix CVE-2015-7686.
|
|
|
|
|
|
|
|
Existing applications that use Email::Address module could be easily
|
|
|
|
switched to Email::Address::XS module. In most cases only changing 'use
|
|
|
|
Email::Address' to 'use Email::Address::XS' and replacing every
|
|
|
|
'Email::Address' occurrence with 'Email::Address::XS' is sufficient.
|
|
|
|
|
|
|
|
So unlike Email::Address, this module does not use regular expressions for
|
|
|
|
parsing but instead native XS implementation parses input string
|
|
|
|
sequentially according to RFC 5322 grammar.
|
|
|
|
|
|
|
|
Additionally it has support also for named groups and so can be use instead
|
|
|
|
of the Email::Address::List module.
|
|
|
|
|
|
|
|
If you are looking for the module which provides object representation for
|
|
|
|
the list of email addresses suitable for the MIME email headers, see
|
|
|
|
Email::MIME::Header::AddressList.
|
|
|
|
|
|
|
|
%prep
|
2022-08-16 12:27:58 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{version}
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
2018-10-07 19:54:52 +00:00
|
|
|
|
|
|
|
%build
|
2022-08-16 12:27:58 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
|
|
|
%make_build
|
2018-10-07 19:54:52 +00:00
|
|
|
|
|
|
|
%check
|
2022-08-16 12:27:58 +00:00
|
|
|
make test
|
2018-10-07 19:54:52 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%doc Changes README
|
|
|
|
|
|
|
|
%changelog
|