rpms/perl-Term-ReadLine-Gnu/F-9 import.log, NONE, 1.1 perl-Term-ReadLine-Gnu-1.17-malloc.patch, NONE, 1.1 perl-Term-ReadLine-Gnu.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Lubomir Rintel (lkundrak)
fedora-extras-commits at redhat.com
Fri Jul 4 21:07:16 UTC 2008
- Previous message (by thread): rpms/s3cmd/F-9 import.log, NONE, 1.1 s3cmd-0.9.8.1-noet.patch, NONE, 1.1 s3cmd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/s3cmd/devel import.log,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lkundrak
Update of /cvs/pkgs/rpms/perl-Term-ReadLine-Gnu/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15660/F-9
Modified Files:
.cvsignore sources
Added Files:
import.log perl-Term-ReadLine-Gnu-1.17-malloc.patch
perl-Term-ReadLine-Gnu.spec
Log Message:
Initial import
--- NEW FILE import.log ---
perl-Term-ReadLine-Gnu-1_17a-3_fc9:F-9:perl-Term-ReadLine-Gnu-1.17a-3.fc9.src.rpm:1215205593
perl-Term-ReadLine-Gnu-1.17-malloc.patch:
--- NEW FILE perl-Term-ReadLine-Gnu-1.17-malloc.patch ---
http://rt.perl.org/rt3/Ticket/Display.html?id=56500
_THIS COULD HAVE BEEN MUCH WORSE_
Lubomir Rintel <lkundrak at v3.sk>
diff -urp Term-ReadLine-Gnu-1.17.orig/Gnu.pm Term-ReadLine-Gnu-1.17/Gnu.pm
--- Term-ReadLine-Gnu-1.17.orig/Gnu.pm 2008-02-07 15:12:43.000000000 +0100
+++ Term-ReadLine-Gnu-1.17/Gnu.pm 2008-07-01 18:36:50.000000000 +0200
@@ -68,6 +68,11 @@ END
}
}
+# Tidy up what could have been malloc()'d
+END {
+ new Term::ReadLine::Gnu('_ultimate_destroyer_')->env_workaround ();
+}
+
{
use Exporter ();
use DynaLoader;
diff -urp Term-ReadLine-Gnu-1.17.orig/Gnu.xs Term-ReadLine-Gnu-1.17/Gnu.xs
--- Term-ReadLine-Gnu-1.17.orig/Gnu.xs 2008-02-06 15:49:47.000000000 +0100
+++ Term-ReadLine-Gnu-1.17/Gnu.xs 2008-07-01 18:21:59.000000000 +0200
@@ -1317,6 +1317,32 @@ MODULE = Term::ReadLine::Gnu PACKAGE =
# 2.1 Basic Behavior
#
+void
+env_workaround()
+ PROTOTYPE:
+ CODE:
+ {
+ int i;
+ char **envptr;
+ // We intentionally not free old pointers,
+ // given we can't really sure where do they come from
+ // and how were they allocated
+ for (i = 0; environ[i] != NULL; i++) {
+ char *oldptr;
+
+ if (strncmp (environ[i], "LINES=", 6) == 0 ||
+ strncmp (environ[i], "COLUMNS=", 8) == 0) {
+ oldptr = environ[i];
+ environ[i] = safesysmalloc (strlen (oldptr)+1);
+ strcpy (environ[i], oldptr);
+ }
+ }
+ i++;
+ envptr = safesysmalloc (sizeof (environ) * i);
+ memcpy (envptr, environ, sizeof (environ) * i);
+ environ = envptr;
+ }
+
# The function name "readline()" is reserved for a method name.
t_xstr
--- NEW FILE perl-Term-ReadLine-Gnu.spec ---
Name: perl-Term-ReadLine-Gnu
Version: 1.17a
Release: 3%{?dist}
Summary: Perl extension for the GNU Readline/History Library
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Term-ReadLine-Gnu/
Source0: http://www.cpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-%{version}.tar.gz
Patch0: perl-Term-ReadLine-Gnu-1.17-malloc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: ncurses-devel
BuildRequires: readline-devel >= 2.1
BuildRequires: perl >= 5.7
BuildRequires: expect
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
An implementation of Term::ReadLine using the GNU Readline/History Library.
%prep
%setup -q -n Term-ReadLine-Gnu-1.17
%patch0 -p1 -b .malloc
%build
# Fix permissions and shebang paths at one shot
find . -type f -exec chmod 0664 '{}' \; \
-exec sed 's,^#! */usr/local,#!%{_prefix},' -i '{}' \;
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT
%check
# Expect is used so that we get a PTY, as if we were
# in a real terminal, where readline works
expect -c '
spawn make test
expect eof
exit [lindex [wait] 3]
'
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Term*
%{_mandir}/man3/*
%changelog
* Tue Jul 01 2008 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> 1.17a-3
- Patch around rt#56500 perl bug hoping for better tomorrows
* Sat Jun 28 2008 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> 1.17a-2
- Run the test suite with a pseudo-terminal
* Fri Jun 27 2008 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> 1.17a-1
- Specfile autogenerated by cpanspec 1.75.
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/perl-Term-ReadLine-Gnu/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 4 Jul 2008 20:32:56 -0000 1.1
+++ .cvsignore 4 Jul 2008 21:06:31 -0000 1.2
@@ -0,0 +1 @@
+Term-ReadLine-Gnu-1.17a.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/perl-Term-ReadLine-Gnu/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 4 Jul 2008 20:32:56 -0000 1.1
+++ sources 4 Jul 2008 21:06:31 -0000 1.2
@@ -0,0 +1 @@
+acdd3ded64423390824f31149ebfdf5c Term-ReadLine-Gnu-1.17a.tar.gz
- Previous message (by thread): rpms/s3cmd/F-9 import.log, NONE, 1.1 s3cmd-0.9.8.1-noet.patch, NONE, 1.1 s3cmd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/s3cmd/devel import.log,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list