openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2015
- 1 participants
- 1958 discussions
Hello community,
here is the log from the commit of package DirectFB.3723 for openSUSE:13.2:Update checked in at 2015-04-30 14:44:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.2:Update/DirectFB.3723 (Old)
and /work/SRC/openSUSE:13.2:Update/.DirectFB.3723.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "DirectFB.3723"
Changes:
--------
New Changes file:
--- /dev/null 2015-04-29 01:05:10.436023256 +0200
+++ /work/SRC/openSUSE:13.2:Update/.DirectFB.3723.new/DirectFB.changes 2015-04-30 14:44:51.000000000 +0200
@@ -0,0 +1,615 @@
+-------------------------------------------------------------------
+Thu Apr 23 07:45:23 UTC 2015 - pgajdos(a)suse.com
+
+- security update
+ * CVE-2014-2977 [bnc#878345]
+ + DirectFB-CVE-2014-2977.patch
+ * CVE-2014-2978 [bnc#878349]
+ + DirectFB-CVE-2014-2978.patch
+
+-------------------------------------------------------------------
+Mon Aug 18 09:14:09 UTC 2014 - pgajdos(a)suse.com
+
+- also do not build omap driver [bnc#860256] (internal)
+
+-------------------------------------------------------------------
+Wed Jul 30 14:53:51 UTC 2014 - pgajdos(a)suse.com
+
+- baselibs.conf again
+
+-------------------------------------------------------------------
+Wed Jul 30 14:47:36 UTC 2014 - pgajdos(a)suse.com
+
+- do not build nsc driver (unclear license, outdated)
+ [bnc#860256] (internal)
+
+-------------------------------------------------------------------
+Tue Jul 29 07:54:40 UTC 2014 - pgajdos(a)suse.com
+
+- update to version 1.7.5:
+ * libdirect: Fix deadlock using a fallback flag for removing a
+ signal handler.
+ * Core: Fix order of CoreSystemFuncs initialisation
+ * API: Add DSPF_ARGB8565 and DSPF_ABGR to DFB_COLOR_IS_RGB
+ * etc. see ChangeLog
+
+-------------------------------------------------------------------
+Tue Apr 29 09:10:11 UTC 2014 - pgajdos(a)suse.com
+
+- update to version 1.7.4:
+ * SaWMan: Fix shutdown crash with slave processes exiting with
+ master
+
+-------------------------------------------------------------------
+Thu Apr 10 09:25:37 UTC 2014 - p.drouand(a)gmail.com
+
+- Update baselibs.conf too
+
+-------------------------------------------------------------------
+Wed Apr 9 10:11:29 UTC 2014 - p.drouand(a)gmail.com
+
+- Update to version 1.7.3
+ + Read the ChangeLog for more news
+- Adapt DirectFB-1.7.1-drop-test_foo.patch to upstream changes
+
+-------------------------------------------------------------------
+Thu Dec 19 10:27:04 UTC 2013 - mvyskocil(a)suse.com
+
+- correct baselibs.conf
+
+-------------------------------------------------------------------
+Wed Dec 18 10:19:46 UTC 2013 - mvyskocil(a)suse.com
+
+- Update to 1.7.1
+ * API
+ + Add 4k display resolution.
+ + Add alternative UHDTV mode.
+ * API | C++
+ + Add convenience classes like DFBRectangle to new header file
+ <directfb++.h>, fix dynamic cast with NULL pointer
+ * Options
+ + Add 'nm-for-trace' option that must be used to run
+ 'nm' at trace dump (as done before). Add D_ARGS env as
+ input to libdirect's config_init (constructor).
+ * And many bugfixes and refactoring
+ 1.7.0:
+ * task-manager allows to automatically distribute
+ rendering tasks over multiple cpu and/or gpu cores
+ * Merged Projects:
+ + DirectFB-extra (missing bits)
+ + SaWMan
+ + FusionDale
+ + FusionSound
+ + DiVine
+ + ++dfb (packaged in separate lib++dfb-1_7-1 and lib++dfb-devel packages)
+ * New APIs
+ + Add IDirectFBSurface::DumpRaw() to dump raw pixel data of a surface to a file
+ + Add IDirectFBSurface::GetFrameTime() to receive the timestamp for the next
+ frame to be rendered + Add IDirectFBSurface::SetFrameTimeConfig() to
+ configure GetFrameTime()
+ + Add IDirectFBVideoProvider::SetDestination() to change the destination
+ surface and/or destination rectangle during playback
+ * New System Module drm/kms
+ * New ImageProviders
+ + WebP
+ + tiff
+ * Tons of bugfixes and performance improvements...
+- build with more features - timidity, vorbis, cddb, drm, kms, jasper, wepb,
+ rsvg and imlib2
+- refreshed/rebased
+ * DirectFB-1.6.1-lm.patch
+ * DirectFB-int.patch
+- added patches
+ * DirectFB-1.7.1-drop-test_foo.patch, drop a test, which can't be compiled
+
+-------------------------------------------------------------------
+Tue Aug 13 09:37:00 UTC 2013 - mvyskocil(a)suse.com
+
+- Enable X11/vdpau
+
+-------------------------------------------------------------------
+Wed Aug 7 11:45:16 UTC 2013 - guillaume(a)opensuse.org
+
+- Enable openGL ES 2 support (Mesa only)
+
+-------------------------------------------------------------------
+Wed Aug 7 10:07:03 UTC 2013 - guillaume(a)opensuse.org
+
+- Add omap support (ARM)
+
+-------------------------------------------------------------------
+Wed Aug 7 10:06:44 UTC 2013 - guillaume(a)opensuse.org
+
+- Enable tslib support for openSUSE 13.1+
+
+-------------------------------------------------------------------
+Mon Jun 17 12:22:44 UTC 2013 - p.drouand(a)gmail.com
+
+- Update to version 1.6.3. There is a large list of changes
+ see Changelog for details
+- Remove DirectFB-1.6.1-mesa-libgbm-stridefix.patch; fixed by upstream
+
+-------------------------------------------------------------------
+Fri Mar 15 10:20:14 UTC 2013 - coolo(a)suse.com
+
+- use original tar as source url
+
+-------------------------------------------------------------------
+Fri Dec 21 11:30:05 UTC 2012 - dvaleev(a)suse.com
+
+- Fix cyber5k and radeon drivers build on powerpc
+ (DirectFB-setregion.patch)
+
+-------------------------------------------------------------------
+Tue Dec 18 10:02:38 UTC 2012 - mvyskocil(a)suse.com
+
+- remove unused files
+ * 85-directfb.rules
+ * DirectFB-1.5.3-lm.patch
+ * DirectFB-1.6.1-fix-Wimplicit-function-declaration-cflags-error.patch
+ * DirectFB-1.7.11.3-mesa-libgbm-stridefix.patch
+
+-------------------------------------------------------------------
+Thu Dec 6 21:36:32 UTC 2012 - joop.boonen(a)opensuse.org
+
+- Only apply patch DirectFB-1.6.1-mesa-libgbm-stridefix.patch on
+ openSUSE > 12.2
+
+-------------------------------------------------------------------
+Mon Oct 22 16:20:07 UTC 2012 - p.drouand(a)gmail.com
+
+- Update to 1.6.2 version :
+ * IDirectFB
+ - When creating a windowed primary, translate
+ window-surface-policy option to DSCAPS_SYSTEMONLY/VIDEOONLY.
+ * Core
+ - Stub out Core_Push/Pop/GetCalling in case of single app build, thanks to Mike Nelis!
+ - Temporary solution for permissions not being granted to a surface from GetSurface().
+ - prevent segfault when calls are launched from non-dfb threads.
+ - Reset flip counter to zero when changing buffer mode.
+ - When creating a window pass through DSCAPS_GL.
+ * Util
+ - Add dfb_regions_unite() to calculate bounds of one or more regions.
+ * Genefx
+ - Avoid division by zero with rotation and formats < 1 byte per pixel.
+ * gfxutil
+ - Avoid double premultiplication when loading an image scaled.
+ * One
+ - Use direct_list_foreach_safe() when iterating through receiving list.
+ - In OneAppTarget_Destroy() remove from receiving list if needed.
+ * fonts
+ - Make x and y advances 24.8 fixed point to fix font rotation.
+ * X11
+ - Set max value for absolute motion events.
+ * EGL
+ - Support ARGB directly in fboWrite(), add fboRead().
+ * Android
+ - Use sawman wm.
+ - Force quit by segfaulting on purpose.
+ * Video Provider
+ - Add WIP gstreamer video provider.
+ * Tools
+ - dfbg: Add option '-p' to create a surface with DSCAPS_PREMULTIPLIED.
+- Update baselibs.conf
+
+-------------------------------------------------------------------
+Thu Sep 27 08:59:42 UTC 2012 - idonmez(a)suse.com
+
++++ 418 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.2:Update/.DirectFB.3723.new/DirectFB.changes
New:
----
DirectFB-0.9.24-matroxi2c.diff
DirectFB-0.9.24-warning.patch
DirectFB-1.2.9-headers.patch
DirectFB-1.2.9-ignore-fbmodes.patch
DirectFB-1.5.3-add-missing-davinci-files.patch
DirectFB-1.5.3-fix_v4l1.patch
DirectFB-1.5.3-vdpau.patch
DirectFB-1.6.1-FusionID-fix-git21c3684.patch
DirectFB-1.6.1-gcc-atomics-on-arm.patch
DirectFB-1.6.1-lm.patch
DirectFB-1.7.0-int.patch
DirectFB-1.7.3-drop-test_foo.patch
DirectFB-1.7.5.tar.gz
DirectFB-CVE-2014-2977.patch
DirectFB-CVE-2014-2978.patch
DirectFB-cc-cflags.patch
DirectFB-setregion.patch
DirectFB.changes
DirectFB.spec
baselibs.conf
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ DirectFB.spec ++++++
#
# spec file for package DirectFB
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%global directfbdir %{_libdir}/directfb-1.7-5
%global libdirectfb libdirectfb-1_7-5
%global libdfb lib++dfb-1_7-5
Name: DirectFB
Version: 1.7.5
Release: 0
Summary: Graphics Library for Framebuffer Devices
License: LGPL-2.1+
Group: System/Libraries
Url: http://www.directfb.org/
Source: http://www.directfb.org/downloads/Core/DirectFB-1.7/%{name}-%{version}.tar.…
Source2: baselibs.conf
# PATCH-FIX-UPSTREAM
Patch2: DirectFB-0.9.24-matroxi2c.diff
# PATCH-FIX-UPSTREAM
Patch3: DirectFB-1.2.9-headers.patch
# PATCH-FIX-UPSTREAM
Patch4: DirectFB-cc-cflags.patch
# PATCH-FIX-UPSTREAM
Patch5: DirectFB-1.7.0-int.patch
# PATCH-FIX-UPSTREAM
Patch6: DirectFB-0.9.24-warning.patch
# PATCH-FIX-UPSTREAM
Patch11: DirectFB-1.2.9-ignore-fbmodes.patch
# PATCH-FIX-UPSTREAM pngtoico-libpng15.patch -- pgajdos(a)suse.com; build with libpng15; sent today to andi(a)directfb.org
# build against libpng14 should not be affected, otherwise please let me know
Patch12: DirectFB-1.5.3-fix_v4l1.patch
# PATCH-FIX-UPSTREAM
Patch13: DirectFB-1.6.1-lm.patch
# PATCH-FIX-UPSTREAM
Patch14: DirectFB-1.6.1-gcc-atomics-on-arm.patch
# PATCH-FIX-UPSTREAM
Patch15: DirectFB-1.5.3-add-missing-davinci-files.patch
# PATCH-FIX-UPSTREAM
Patch16: DirectFB-1.5.3-vdpau.patch
# PATCH-FIX-UPSTREAM
Patch19: DirectFB-1.6.1-FusionID-fix-git21c3684.patch
# PATCH-FIX-OPENSUSE DirectFB-setregion.patch -- dvaleev(a)suse.com; fixes cyber5k and readeon drivers build on powerpc
Patch20: DirectFB-setregion.patch
# PATCH-FIX_OPENSUSE drop test_foo as it does not build in 1.7, mvyskocil(a)suse.com
Patch21: DirectFB-1.7.3-drop-test_foo.patch
Patch22: DirectFB-CVE-2014-2977.patch
Patch23: DirectFB-CVE-2014-2978.patch
BuildRequires: LibVNCServer-devel
%if 0%{?suse_version} > 1220
# Mesa-lib* available only in 12.2+
# but build fail with 12.2
BuildRequires: Mesa-devel
BuildRequires: Mesa-libEGL-devel
BuildRequires: Mesa-libGLESv2-devel
%endif
BuildRequires: SDL-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: imlib2-devel
BuildRequires: libcddb-devel
BuildRequires: libdrm-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libkms-devel
BuildRequires: libpng-devel
BuildRequires: librsvg-devel
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
BuildRequires: libtimidity-devel
BuildRequires: libv4l-devel
BuildRequires: libvdpau-devel
BuildRequires: libvorbis-devel
BuildRequires: libwebp-devel
BuildRequires: sysfsutils-devel
%if 0%{?suse_version} > 1230
# TSLib not available for 12.3 and previous
BuildRequires: tslib-devel
%endif
BuildRequires: udev
BuildRequires: xorg-x11-libX11-devel
BuildRequires: xorg-x11-libXext-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifnarch s390 s390x
BuildRequires: i2c-tools
%endif
# bug437293
%ifarch ppc64
Obsoletes: DirectFB-64bit
%endif
%description
DirectFB is a thin library that provides hardware graphics
acceleration, input device handling and abstraction, an integrated
windowing system with support for translucent windows, and multiple
display layers on top of the Linux framebuffer device. It is a complete
hardware abstraction layer with software fallbacks for every graphics
operation that is not supported by the underlying hardware. DirectFB
adds graphical power to embedded systems and sets a new standard for
graphics under Linux.
%package -n %libdirectfb
Summary: Graphics Library for Framebuffer Devices
Group: System/Libraries
%description -n %libdirectfb
DirectFB is a thin library that provides hardware graphics
acceleration, input device handling and abstraction, an integrated
windowing system with support for translucent windows, and multiple
display layers on top of the Linux framebuffer device. It is a
complete hardware abstraction layer with software fallbacks for every
graphics operation that is not supported by the underlying hardware.
DirectFB adds graphical power to embedded systems and sets a new
standard for graphics under Linux.
%package -n %libdfb
Summary: Graphics Library for Framebuffer Devices
Group: System/Libraries
%description -n %libdfb
DirectFB is a thin library that provides hardware graphics
acceleration, input device handling and abstraction, an integrated
windowing system with support for translucent windows, and multiple
display layers on top of the Linux framebuffer device. It is a
complete hardware abstraction layer with software fallbacks for every
graphics operation that is not supported by the underlying hardware.
DirectFB adds graphical power to embedded systems and sets a new
standard for graphics under Linux.
%package devel
Summary: Graphics Library for Framebuffer Devices
Group: Development/Libraries/C and C++
Requires: %libdirectfb = %{version}
Requires: /bin/sh
Requires: glibc-devel
Requires: zlib-devel
%description devel
Development files (headers, so files, pkg-config, documentation) for %{name}.
%package -n lib++dfb-devel
Summary: C++ Bindings for %{name}
Group: Development/Libraries/C and C++
Requires: %libdfb = %{version}
Requires: %{name}-devel = %{version}
Requires: /bin/sh
Requires: glibc-devel
Requires: zlib-devel
%description -n lib++dfb-devel
Development files (headers, so files, pkg-config, documentation) for C++
bindings for %{name}.
%package doc
Summary: Graphics Library for Framebuffer Devices Documentation
Group: System/Libraries
%description doc
Graphics Library for Framebuffer Devices Documentation in html form.
%package libSDL
Summary: SDL backend of Graphics Library for Framebuffer Devices
Group: System/Libraries
Supplements: packageand(%{name}:libSDL)
%description libSDL
SDL backend of Graphics Library for Framebuffer Devices:
* gfxdrivers/libdirectfb_sdlgraphics.so
* inputdrivers/libdirectfb_sdlinput.so
* systems/libdirectfb_sdl.so
%package Mesa
Summary: Mesa backend of Graphics Library for Framebuffer Devices
Group: System/Libraries
Supplements: packageand(%{name}:Mesa)
%description Mesa
Mesa backend of Graphics Library for Framebuffer Devices:
* gfxdrivers/libdirectfb_gl.so
* systems/libdirectfb_x11.so
%package libvncclient
Summary: Mesa backend of Graphics Library for Framebuffer Devices
Group: System/Libraries
Supplements: packageand(%{name}:libvncclient)
%description libvncclient
VNC backend of Graphics Library for Framebuffer Devices:
* systems/libdirectfb_vnc.so
%prep
%setup -q
# to make fastre working
mv patches _patches
%patch2 -p1
%patch3
%patch4 -p1
%patch5 -p1
%patch6
#%patch8
%patch11 -p1
%patch12 -p1 -b .fix_v4l1
%patch13 -p1 -b .lm
%patch14 -p1 -b .arm-atomics
%patch15 -p1 -b .davinci
%patch16 -p1 -b .vdpau
%patch19 -p1 -b .fusionID
%patch20 -p1
%patch21 -p1
%patch22
%patch23
#Disable ppc asm since compilation fails (and it seems better to use glibc)
sed -i.noppcasm -e 's/want_ppcasm=yes/want_ppcasm=no/'g configure.in configure
# Fix file-not-utf8
for i in ChangeLog README NEWS AUTHORS ; do
cp -pr $i $i.not-utf8
iconv -f ISO_8859-1 -t UTF8 $i.not-utf8 > $i
touch -r $i.not-utf8 $i
rm $i.not-utf8
done
#Remove old headers
rm interfaces/IDirectFBVideoProvider/{videodev.h,videodev2.h}
#FIXME: mvyskocil - can't compile test_foo.c due missing region->context
rm wm/unique/test_foo.c
%build
# move things back
mv _patches patches
%ifarch s390 s390x
sed 's/-O3/-Os/' configure >c;chmod +x c;mv c configure;
%endif
%{configure} --enable-sdl --with-pic --enable-video4linux2 \
--enable-zlib \
%ifarch x86_64
--enable-mmx \
--enable-sse \
%endif
%ifarch ppc64 ppc
--with-gfxdrivers="ati128 cle266 cyber5k gl i810 mach64 matrox neomagic nvidia pxa3xx radeon sis315 tdfx unichrome" \
%endif
%ifarch s390 s390x
--with-gfxdrivers=none --with-inputdrivers=none --disable-video4linux --disable-fbdev \
%endif
%ifarch %arm
--with-gfxdrivers="gl gles2 nvidia" \
%endif
%ifarch %{ix86} x86_64
--with-gfxdrivers="ati128 ep9x gles2 i810 i830 mach64 matrox neomagic nvidia pxa3xx sis315 tdfx vdpau gl" \
%endif
--enable-x11 \
--enable-unique \
--with-smooth-scaling \
--disable-gettid
# Remove rpath for 64bit
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
find %{buildroot} -name '*.la' -type f -delete
#Fix some relative fonts for dfbinspector.c
# ln -s ../fonts/dejavu/DejaVuSans.ttf %{buildroot}%{_datadir}/%{name}-%{version}/decker.ttf
%check
make check %{?_smp_mflags}
%post -n %libdirectfb -p /sbin/ldconfig
%postun -n %libdirectfb -p /sbin/ldconfig
%post -n %libdfb -p /sbin/ldconfig
%postun -n %libdfb -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_datadir}/directfb-%{version}
%{_bindir}/dfbg
%{_bindir}/dfbdump
%{_bindir}/dfbdumpinput
%{_bindir}/dfbinfo
%{_bindir}/dfblayer
%{_bindir}/dfbplay
%{_bindir}/dfbshow
%{_bindir}/dfbswitch
%{_bindir}/directfb-csource
%{_bindir}/dfbscreen
%{_bindir}/dfbinspector
%{_bindir}/dfbmaster
%{_bindir}/dfbfx
%{_bindir}/uwmdump
%{_bindir}/dfbinput
%{_bindir}/dfbpenmount
%{_bindir}/directfb-config
%{_bindir}/mkdgifft
%ifnarch %arm s390 s390x
%{_bindir}/pxa3xx_dump
%endif
%{_bindir}/mkd*iff
%doc %{_mandir}/man1/dfbg.1.gz
%doc %{_mandir}/man1/directfb-csource.1.gz
%doc %{_mandir}/man5/directfbrc.5.gz
%files -n %libdirectfb
%defattr(-,root,root)
%doc COPYING
%{_libdir}/libdirect*.so.*
%{_libdir}/libfusion*.so.*
%{_libdir}/libuniquewm*.so.*
%{directfbdir}
%exclude %{directfbdir}/gfxdrivers/libdirectfb_sdlgraphics.so
%exclude %{directfbdir}/inputdrivers/libdirectfb_sdlinput.so
%exclude %{directfbdir}/systems/libdirectfb_sdl.so
%ifnarch s390 s390x
%exclude %{directfbdir}/gfxdrivers/libdirectfb_gl.so
%endif
%exclude %{directfbdir}/systems/libdirectfb_x11.so
%exclude %{directfbdir}/systems/libdirectfb_vnc.so
%files devel
%defattr(-,root,root)
%{_libdir}/libdirect*.so
%{_libdir}/libfusion*.so
%{_libdir}/libuniquewm*.so
%{_includedir}/directfb-internal
%{_includedir}/directfb
%{_libdir}/pkgconfig/directfb-internal.pc
%{_libdir}/pkgconfig/directfb.pc
%{_libdir}/pkgconfig/direct.pc
%{_libdir}/pkgconfig/fusion.pc
%files -n %libdfb
%defattr(-,root,root)
%doc COPYING
%{_libdir}/lib++dfb-1.7.so.*
%files -n lib++dfb-devel
%defattr(-,root,root)
%{_libdir}/lib++dfb.so
%{_includedir}/++dfb
%{_libdir}/pkgconfig/++dfb.pc
%files doc
%defattr(-,root,root)
%doc docs/html/*.html
%doc docs/html/*.png
%files libSDL
%defattr(-,root,root)
%{directfbdir}/gfxdrivers/libdirectfb_sdlgraphics.so
%{directfbdir}/inputdrivers/libdirectfb_sdlinput.so
%{directfbdir}/systems/libdirectfb_sdl.so
%files Mesa
%defattr(-,root,root)
%ifnarch s390 s390x
%{directfbdir}/gfxdrivers/libdirectfb_gl.so
%endif
%{directfbdir}/systems/libdirectfb_x11.so
%files libvncclient
%defattr(-,root,root)
%{directfbdir}/systems/libdirectfb_vnc.so
%changelog
++++++ DirectFB-0.9.24-matroxi2c.diff ++++++
--- DirectFB-1.0.1/gfxdrivers/matrox/i2c-userspace.h
+++ DirectFB-1.0.1/gfxdrivers/matrox/i2c-userspace.h
@@ -0,0 +1,66 @@
+#ifndef I2C_USERSPACE_H
+#define I2C_USERSPACE_H
+/* copied from i2c-dev.h,i2c.h */
+
+#define I2C_SLAVE 0x0703 /* Change slave address */
+ /* Attn.: Slave address is 7 or 10 bits */
+#define I2C_SMBUS 0x0720 /* SMBus-level access */
+/* smbus_access read or write markers */
+#define I2C_SMBUS_READ 1
+#define I2C_SMBUS_WRITE 0
+/* SMBus transaction types (size parameter in the above functions)
+ Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */
+#define I2C_SMBUS_QUICK 0
+#define I2C_SMBUS_BYTE 1
+#define I2C_SMBUS_BYTE_DATA 2
+#define I2C_SMBUS_WORD_DATA 3
+#define I2C_SMBUS_PROC_CALL 4
+#define I2C_SMBUS_BLOCK_DATA 5
+#define I2C_SMBUS_I2C_BLOCK_DATA 6
+#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */
+#define I2C_SMBUS_BLOCK_DATA_PEC 8 /* SMBus 2.0 */
+#define I2C_SMBUS_PROC_CALL_PEC 9 /* SMBus 2.0 */
+#define I2C_SMBUS_BLOCK_PROC_CALL_PEC 10 /* SMBus 2.0 */
+#define I2C_SMBUS_WORD_DATA_PEC 11 /* SMBus 2.0 */
+
+#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */
+#define I2C_SMBUS_I2C_BLOCK_MAX 32 /* Not specified but we use same structure */
+
+
+union i2c_smbus_data {
+ __u8 byte;
+ __u16 word;
+ __u8 block[I2C_SMBUS_BLOCK_MAX + 3]; /* block[0] is used for length */
+ /* one more for read length in block process call */
+ /* and one more for PEC */
+};
+
+static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command,
+ int size, union i2c_smbus_data *data)
+{
+ struct i2c_smbus_ioctl_data args;
+
+ args.read_write = read_write;
+ args.command = command;
+ args.size = size;
+ args.data = data;
+ return ioctl(file,I2C_SMBUS,&args);
+}
+static inline __s32 i2c_smbus_write_byte_data(int file, __u8 command,
+ __u8 value)
+{
+ union i2c_smbus_data data;
+ data.byte = value;
+ return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
+ I2C_SMBUS_BYTE_DATA, &data);
+}
+static inline __s32 i2c_smbus_write_word_data(int file, __u8 command,
+ __u16 value)
+{
+ union i2c_smbus_data data;
+ data.word = value;
+ return i2c_smbus_access(file,I2C_SMBUS_WRITE,command,
+ I2C_SMBUS_WORD_DATA, &data);
+}
+
+#endif
--- DirectFB-1.0.1/gfxdrivers/matrox/matrox_maven.c
+++ DirectFB-1.0.1/gfxdrivers/matrox/matrox_maven.c
@@ -34,7 +34,7 @@
#include <errno.h>
#include <dirent.h>
-#include <linux/i2c.h>
+//#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <directfb.h>
@@ -51,6 +51,10 @@
#include "matrox_maven.h"
#define SYS_CLASS_I2C_DEV "/sys/class/i2c-dev"
+#ifndef I2C_SLAVE
+#include "i2c-userspace.h"
+#endif
+
static void
maven_write_byte( MatroxMavenData *mav,
++++++ DirectFB-0.9.24-warning.patch ++++++
--- tests/direct_test.c
+++ tests/direct_test.c:
@@ -58,6 +58,7 @@
DirectLogType log_type = DLT_STDERR;
const char *log_param = NULL;
DirectLog *log;
+ void * discard;
for (i=1; i<argc; i++) {
@@ -91,7 +92,7 @@
/* Test memory leak detector by not freeing this one. */
- D_MALLOC( 1351 );
+ discard = D_MALLOC( 1351 );
D_INFO( "Direct/Test: Application starting...\n" );
++++++ DirectFB-1.2.9-headers.patch ++++++
Index: systems/fbdev/fbdev.c
===================================================================
--- systems/fbdev/fbdev.c.orig 2009-11-24 14:54:14.099489693 +0100
+++ systems/fbdev/fbdev.c 2009-11-24 14:54:27.374488970 +0100
@@ -43,6 +43,7 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/kd.h>
+#undef _LINUX_TYPES_H
#include <pthread.h>
Index: systems/fbdev/vt.c
===================================================================
--- systems/fbdev/vt.c.orig 2009-11-24 14:54:14.099489693 +0100
+++ systems/fbdev/vt.c 2009-11-24 14:54:27.375488725 +0100
@@ -43,6 +43,7 @@
#include <sys/kd.h>
#include <errno.h>
#include <pthread.h>
+#undef _LINUX_TYPES_H
#include <directfb.h>
++++++ DirectFB-1.2.9-ignore-fbmodes.patch ++++++
Index: DirectFB-1.2.9/include/directfb.h
===================================================================
--- DirectFB-1.2.9.orig/include/directfb.h
+++ DirectFB-1.2.9/include/directfb.h
@@ -6326,6 +6326,11 @@ DEFINE_INTERFACE( IDirectFBDataBuffer,
);
)
+static inline int ignore_fb_modes()
+{
+ return getenv("SUSE_IGNORE_FBMODES") != NULL;
+}
+
#ifdef __cplusplus
}
#endif
Index: DirectFB-1.2.9/systems/fbdev/fbdev.c
===================================================================
--- DirectFB-1.2.9.orig/systems/fbdev/fbdev.c
+++ DirectFB-1.2.9/systems/fbdev/fbdev.c
@@ -945,7 +945,9 @@ system_get_deviceid( unsigned int *ret_v
static DFBResult
init_modes( void )
{
- dfb_fbdev_read_modes();
+ if (!ignore_fb_modes()) {
+ dfb_fbdev_read_modes();
+ }
if (!dfb_fbdev->shared->modes) {
/* try to use current mode*/
Index: DirectFB-1.2.9/systems/sdl/sdl.c
===================================================================
--- DirectFB-1.2.9.orig/systems/sdl/sdl.c
+++ DirectFB-1.2.9/systems/sdl/sdl.c
@@ -96,7 +96,9 @@ system_initialize( CoreDFB *core, void *
dfb_sdl_core = core;
- dfb_fbdev_read_modes(); /* use same mode list as a fake */
+ if (!ignore_fb_modes()) {
+ dfb_fbdev_read_modes(); /* use same mode list as a fake */
+ }
driver = getenv( "SDL_VIDEODRIVER" );
if (driver && !strcasecmp( driver, "directfb" )) {
++++++ DirectFB-1.5.3-add-missing-davinci-files.patch ++++++
++++ 1698 lines (skipped)
++++++ DirectFB-1.5.3-fix_v4l1.patch ++++++
diff -up DirectFB-1.5.3/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_v4l.c.fix_v4l1 DirectFB-1.5.3/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_v4l.c
--- DirectFB-1.5.3/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_v4l.c.fix_v4l1 2011-07-31 20:51:06.000000000 +0200
+++ DirectFB-1.5.3/interfaces/IDirectFBVideoProvider/idirectfbvideoprovider_v4l.c 2011-08-23 22:38:39.154862445 +0200
@@ -49,7 +49,7 @@
#ifdef HAVE_LINUX_COMPILER_H
#include <linux/compiler.h>
#endif
-#include "videodev.h"
+#include <libv4l1-videodev.h>
#include <directfb.h>
@@ -78,7 +78,7 @@
#include <direct/util.h>
#ifdef DFB_HAVE_V4L2
-#include "videodev2.h"
+#include <linux/videodev2.h>
#endif
static DFBResult
++++++ DirectFB-1.5.3-vdpau.patch ++++++
diff -up DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.am.vdpaufix DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.am
--- DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.am.vdpaufix 2011-07-31 20:51:06.000000000 +0200
+++ DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.am 2012-08-30 22:42:55.680504159 +0200
@@ -25,7 +25,7 @@ libdirectfb_vdpau_la_SOURCES = \
libdirectfb_vdpau_la_LDFLAGS = \
-module \
-avoid-version \
- $(DFB_LDFLAGS) -lm
+ $(DFB_LDFLAGS) -lm $(X11VDPAU_LIBS)
libdirectfb_vdpau_la_LIBADD = \
$(top_builddir)/lib/direct/libdirect.la \
diff -up DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.in.vdpaufix DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.in
--- DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.in.vdpaufix 2011-08-07 06:33:35.000000000 +0200
+++ DirectFB-1.5.3/gfxdrivers/vdpau/Makefile.in 2012-08-30 22:43:07.616564143 +0200
@@ -333,7 +333,7 @@ libdirectfb_vdpau_la_SOURCES = \
libdirectfb_vdpau_la_LDFLAGS = \
-module \
-avoid-version \
- $(DFB_LDFLAGS) -lm
+ $(DFB_LDFLAGS) -lm $(X11VDPAU_LIBS)
libdirectfb_vdpau_la_LIBADD = \
$(top_builddir)/lib/direct/libdirect.la \
++++++ DirectFB-1.6.1-FusionID-fix-git21c3684.patch ++++++
diff -up DirectFB-1.6.1/wm/unique/uniquewm.c.fusionID DirectFB-1.6.1/wm/unique/uniquewm.c
--- DirectFB-1.6.1/wm/unique/uniquewm.c.fusionID 2012-08-29 10:58:22.009758786 -0400
+++ DirectFB-1.6.1/wm/unique/uniquewm.c 2012-08-29 10:58:58.753759640 -0400
@@ -34,6 +34,7 @@
#include <direct/memcpy.h>
#include <direct/messages.h>
+#include <core/core.h>
#include <core/input.h>
#include <core/surface.h>
#include <core/surface_buffer.h>
@@ -275,7 +276,7 @@ unique_wm_create_context( void )
D_MAGIC_ASSERT( wm_shared, WMShared );
D_ASSERT( wm_shared->context_pool != NULL );
- return (UniqueContext*) fusion_object_create( wm_shared->context_pool, wm_data->world );
+ return (UniqueContext*) fusion_object_create( wm_shared->context_pool, wm_data->world, Core_GetIdentity() );
}
UniqueDecoration *
@@ -286,7 +287,7 @@ unique_wm_create_decoration( void )
D_MAGIC_ASSERT( wm_shared, WMShared );
D_ASSERT( wm_shared->decoration_pool != NULL );
- return (UniqueDecoration*) fusion_object_create( wm_shared->decoration_pool, wm_data->world );
+ return (UniqueDecoration*) fusion_object_create( wm_shared->decoration_pool, wm_data->world, Core_GetIdentity() );
}
UniqueWindow *
@@ -297,7 +298,7 @@ unique_wm_create_window( void )
D_MAGIC_ASSERT( wm_shared, WMShared );
D_ASSERT( wm_shared->window_pool != NULL );
- return (UniqueWindow*) fusion_object_create( wm_shared->window_pool, wm_data->world );
+ return (UniqueWindow*) fusion_object_create( wm_shared->window_pool, wm_data->world, Core_GetIdentity() );
}
/**************************************************************************************************/
++++++ DirectFB-1.6.1-gcc-atomics-on-arm.patch ++++++
diff -up DirectFB-1.6.1/lib/direct/atomic.h.arm-atomics DirectFB-1.6.1/lib/direct/atomic.h
--- DirectFB-1.6.1/lib/direct/atomic.h.arm-atomics 2012-06-29 12:01:11.000000000 -0400
+++ DirectFB-1.6.1/lib/direct/atomic.h 2012-08-29 10:18:08.596702883 -0400
@@ -239,6 +239,31 @@ static inline int _D__atomic_add_return(
#define D_SYNC_ADD_AND_FETCH( ptr, value ) \
(_D__atomic_add_return( (int) (value), (volatile int*) (ptr) ))
+#elif defined(ARCH_ARM) && !defined(ARCH_IWMMXT)
+
+static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new)
+{
+ unsigned long oldval = old;
+
+ __atomic_compare_exchange_n(ptr, &oldval, _new,
+ false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+
+ return oldval;
+}
+
+#define D_SYNC_BOOL_COMPARE_AND_SWAP( ptr, old_value, new_value ) \
+ (_D__atomic_cmpxchg( (void*) ptr, (int) old_value, (int) new_value ) == (int) old_value)
+
+static inline int _D__atomic_add_return(int i, volatile int *v)
+{
+ int result = __atomic_add_fetch(v, i, __ATOMIC_SEQ_CST);
+
+ return result;
+}
+
+#define D_SYNC_ADD_AND_FETCH( ptr, value ) \
+ (_D__atomic_add_return( (int) (value), (volatile int*) (ptr) ))
+
#endif
++++++ DirectFB-1.6.1-lm.patch ++++++
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: DirectFB-1.7.1/tests/Makefile.am
===================================================================
--- DirectFB-1.7.1.orig/tests/Makefile.am
+++ DirectFB-1.7.1/tests/Makefile.am
@@ -282,7 +282,7 @@ fusion_call_SOURCES = fusion_call.c
fusion_call_LDADD = $(DFB_BASE_LIBS)
fusion_call_bench_SOURCES = fusion_call_bench.c
-fusion_call_bench_LDADD = $(DFB_BASE_LIBS)
+fusion_call_bench_LDADD = $(DFB_BASE_LIBS) $(LIBM)
fusion_fork_SOURCES = fusion_fork.c
fusion_fork_LDADD = $(DFB_BASE_LIBS)
Index: DirectFB-1.7.1/tests/Makefile.in
===================================================================
--- DirectFB-1.7.1.orig/tests/Makefile.in
+++ DirectFB-1.7.1/tests/Makefile.in
@@ -963,7 +963,7 @@ direct_test_LDADD = $(libdirect)
fusion_call_SOURCES = fusion_call.c
fusion_call_LDADD = $(DFB_BASE_LIBS)
fusion_call_bench_SOURCES = fusion_call_bench.c
-fusion_call_bench_LDADD = $(DFB_BASE_LIBS)
+fusion_call_bench_LDADD = $(DFB_BASE_LIBS) $(LIBM)
fusion_fork_SOURCES = fusion_fork.c
fusion_fork_LDADD = $(DFB_BASE_LIBS)
fusion_reactor_SOURCES = fusion_reactor.c
++++++ DirectFB-1.7.0-int.patch ++++++
Index: DirectFB-1.7.1/include/dfb_types.h
===================================================================
--- DirectFB-1.7.1.orig/include/dfb_types.h
+++ DirectFB-1.7.1/include/dfb_types.h
@@ -56,11 +56,9 @@
#define __u8 u8
#define __u16 u16
#define __u32 u32
-#define __u64 u64
#define __s8 s8
#define __s16 s16
#define __s32 s32
-#define __s64 s64
#endif
++++++ DirectFB-1.7.3-drop-test_foo.patch ++++++
Index: DirectFB-1.7.1/wm/unique/Makefile.am
===================================================================
--- DirectFB-1.7.1.orig/wm/unique/Makefile.am
+++ DirectFB-1.7.1/wm/unique/Makefile.am
@@ -13,7 +13,7 @@ INCLUDES = \
bin_PROGRAMS = uwmdump
-noinst_PROGRAMS = test_color test_foo stret_test
+noinst_PROGRAMS = test_color stret_test
uwmdump_SOURCES = uwmdump.c
@@ -31,15 +31,6 @@ test_color_LDADD = \
libuniquewm.la \
$(top_builddir)/lib/direct/libdirect.la \
$(top_builddir)/lib/fusion/libfusion.la \
- $(top_builddir)/src/libdirectfb.la
-
-
-test_foo_SOURCES = test_foo.c
-
-test_foo_LDADD = \
- libuniquewm.la \
- $(top_builddir)/lib/direct/libdirect.la \
- $(top_builddir)/lib/fusion/libfusion.la \
$(top_builddir)/src/libdirectfb.la
Index: DirectFB-1.7.1/wm/unique/Makefile.in
===================================================================
@@ -83,7 +83,7 @@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = uwmdump$(EXEEXT)
-noinst_PROGRAMS = test_color$(EXEEXT) test_foo$(EXEEXT) \
+noinst_PROGRAMS = test_color$(EXEEXT) \
stret_test$(EXEEXT)
DIST_COMMON = $(top_srcdir)/rules/libobject.make $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/depcomp $(include_HEADERS)
@@ -171,12 +171,6 @@
$(top_builddir)/lib/direct/libdirect.la \
$(top_builddir)/lib/fusion/libfusion.la \
$(top_builddir)/src/libdirectfb.la
-am_test_foo_OBJECTS = test_foo.$(OBJEXT)
-test_foo_OBJECTS = $(am_test_foo_OBJECTS)
-test_foo_DEPENDENCIES = libuniquewm.la \
- $(top_builddir)/lib/direct/libdirect.la \
- $(top_builddir)/lib/fusion/libfusion.la \
- $(top_builddir)/src/libdirectfb.la
am_uwmdump_OBJECTS = uwmdump.$(OBJEXT)
uwmdump_OBJECTS = $(am_uwmdump_OBJECTS)
uwmdump_DEPENDENCIES = libuniquewm.la \
@@ -219,10 +213,10 @@
am__v_CCLD_1 =
SOURCES = $(libdirectfbwm_unique_la_SOURCES) $(libuniquewm_la_SOURCES) \
$(stret_test_SOURCES) $(test_color_SOURCES) \
- $(test_foo_SOURCES) $(uwmdump_SOURCES)
+ $(uwmdump_SOURCES)
DIST_SOURCES = $(libdirectfbwm_unique_la_SOURCES) \
$(libuniquewm_la_SOURCES) $(stret_test_SOURCES) \
- $(test_color_SOURCES) $(test_foo_SOURCES) $(uwmdump_SOURCES)
+ $(test_color_SOURCES) $(uwmdump_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
@@ -588,13 +582,6 @@
$(top_builddir)/lib/fusion/libfusion.la \
$(top_builddir)/src/libdirectfb.la
-test_foo_SOURCES = test_foo.c
-test_foo_LDADD = \
- libuniquewm.la \
- $(top_builddir)/lib/direct/libdirect.la \
- $(top_builddir)/lib/fusion/libfusion.la \
- $(top_builddir)/src/libdirectfb.la
-
stret_test_SOURCES = stret_test.c
stret_test_LDADD = \
libuniquewm.la \
@@ -844,10 +831,6 @@
@rm -f test_color$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_color_OBJECTS) $(test_color_LDADD) $(LIBS)
-test_foo$(EXEEXT): $(test_foo_OBJECTS) $(test_foo_DEPENDENCIES) $(EXTRA_test_foo_DEPENDENCIES)
- @rm -f test_foo$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_foo_OBJECTS) $(test_foo_LDADD) $(LIBS)
-
uwmdump$(EXEEXT): $(uwmdump_OBJECTS) $(uwmdump_DEPENDENCIES) $(EXTRA_uwmdump_DEPENDENCIES)
@rm -f uwmdump$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(uwmdump_OBJECTS) $(uwmdump_LDADD) $(LIBS)
@@ -867,7 +850,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stret_iteration.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stret_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_color.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_foo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unique.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniquewm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uwmdump.Po@am__quote@
++++++ DirectFB-CVE-2014-2977.patch ++++++
Index: proxy/dispatcher/idirectfbsurface_dispatcher.c
===================================================================
--- proxy/dispatcher/idirectfbsurface_dispatcher.c.orig 2014-03-22 21:05:18.000000000 +0100
+++ proxy/dispatcher/idirectfbsurface_dispatcher.c 2015-03-23 13:07:30.840507533 +0100
@@ -1729,6 +1729,9 @@
VOODOO_PARSER_GET_INT( parser, pitch );
VOODOO_PARSER_END( parser );
+ /* CVE-2014-2977 */
+ DFB_RECTANGLE_ASSERT_IF( rect );
+
if (encoded) {
switch (encoded) {
case 2: {
++++++ DirectFB-CVE-2014-2978.patch ++++++
Index: proxy/dispatcher/idirectfbsurface_dispatcher.c
===================================================================
--- proxy/dispatcher/idirectfbsurface_dispatcher.c.orig 2014-03-22 21:05:18.000000000 +0100
+++ proxy/dispatcher/idirectfbsurface_dispatcher.c 2015-03-23 15:03:28.650053384 +0100
@@ -1629,6 +1629,11 @@
dst[out++] = RLE16_KEY;
}
else {
+ /* CVE-2014-2978 */
+ if (count > num - out ) {
+ break;
+ }
+
last = src[n++];
while (count >= 4) {
@@ -1679,6 +1684,11 @@
dst[out++] = RLE32_KEY;
}
else {
+ /* CVE-2014-2978 */
+ if (count > num - out ) {
+ break;
+ }
+
last = src[n++];
while (count >= 4) {
++++++ DirectFB-cc-cflags.patch ++++++
Index: DirectFB-1.2.9/configure.in
===================================================================
--- DirectFB-1.2.9.orig/configure.in 2009-11-24 14:54:14.042364493 +0100
+++ DirectFB-1.2.9/configure.in 2009-11-24 14:54:38.866364832 +0100
@@ -341,8 +341,12 @@
##
AS=$CC
ASFLAGS=$CFLAGS
+ CCAS=$CC
+ CCASFLAGS=$CFLAGS
AC_SUBST(AS)
AC_SUBST(ASFLAGS)
+ AC_SUBST(CCAS)
+ AC_SUBST(CCASFLAGS)
AC_DEFINE(HAVE_INB_OUTB_IOPL,1,
[Define to 1 if inb, outb and iopl are available.])
++++++ DirectFB-setregion.patch ++++++
Index: DirectFB-1.6.2/gfxdrivers/cyber5k/cyber5k.c
===================================================================
--- DirectFB-1.6.2.orig/gfxdrivers/cyber5k/cyber5k.c
+++ DirectFB-1.6.2/gfxdrivers/cyber5k/cyber5k.c
@@ -636,7 +636,8 @@ osdSetRegion( CoreLayer
CoreLayerRegionConfigFlags updated,
CoreSurface *surface,
CorePalette *palette,
- CoreSurfaceBufferLock *lock )
+ CoreSurfaceBufferLock *left_lock,
+ CoreSurfaceBufferLock *right_lock )
{
DFBResult ret;
@@ -644,7 +645,7 @@ osdSetRegion( CoreLayer
ret = oldPrimaryFuncs.SetRegion( layer, oldPrimaryDriverData,
layer_data, region_data,
config, updated, surface,
- palette, lock );
+ palette, left_lock, right_lock );
if (ret)
return ret;
Index: DirectFB-1.6.2/gfxdrivers/radeon/radeon_crtc1.c
===================================================================
--- DirectFB-1.6.2.orig/gfxdrivers/radeon/radeon_crtc1.c
+++ DirectFB-1.6.2/gfxdrivers/radeon/radeon_crtc1.c
@@ -147,14 +147,15 @@ crtc1SetRegion( CoreLayer
CoreLayerRegionConfigFlags updated,
CoreSurface *surface,
CorePalette *palette,
- CoreSurfaceBufferLock *lock )
+ CoreSurfaceBufferLock *left_lock,
+ CoreSurfaceBufferLock *right_lock )
{
if (updated & ~CLRCF_OPTIONS) {
return OldPrimaryLayerFuncs.SetRegion( layer,
OldPrimaryLayerDriverData,
layer_data, region_data,
- config, updated, surface, palette, lock );
+ config, updated, surface, palette, left_lock, right_lock );
}
return DFB_OK;
++++++ baselibs.conf ++++++
libdirectfb-1_7-5
DirectFB-devel
requires -DirectFB-<targettype>
requires "libdirectfb-1_7-5-<targettype> = <version>"
1
0
Hello community,
here is the log from the commit of package patchinfo.3724 for openSUSE:13.2:Update checked in at 2015-04-30 12:16:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.2:Update/patchinfo.3724 (Old)
and /work/SRC/openSUSE:13.2:Update/.patchinfo.3724.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "patchinfo.3724"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
New:
----
_patchinfo
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _patchinfo ++++++
<patchinfo>
<category>recommended</category>
<rating>moderate</rating>
<packager>pgajdos</packager>
<summary>Recommended update for poppler</summary>
<description>This recommended update fixes the following issues for poppler
- Map Standard/Expert encoding ligatures to AGLFN names. [bnc#927466]</description>
<issue tracker="bnc" id="927466">poppler: does not display standard ligatures correctly</issue>
</patchinfo>
1
0
Hello community,
here is the log from the commit of package poppler for openSUSE:13.1:Update checked in at 2015-04-30 12:16:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/poppler (Old)
and /work/SRC/openSUSE:13.1:Update/.poppler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "poppler"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
--- /var/tmp/diff_new_pack.ueq5uy/_old 2015-04-30 12:16:15.000000000 +0200
+++ /var/tmp/diff_new_pack.ueq5uy/_new 2015-04-30 12:16:15.000000000 +0200
@@ -1 +1 @@
-<link package='poppler.2607' cicount='copy' />
+<link package='poppler.3724' cicount='copy' />
1
0
Hello community,
here is the log from the commit of package poppler-qt for openSUSE:13.1:Update checked in at 2015-04-30 12:16:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/poppler-qt (Old)
and /work/SRC/openSUSE:13.1:Update/.poppler-qt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "poppler-qt"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
--- /var/tmp/diff_new_pack.x4ox24/_old 2015-04-30 12:16:03.000000000 +0200
+++ /var/tmp/diff_new_pack.x4ox24/_new 2015-04-30 12:16:03.000000000 +0200
@@ -1 +1 @@
-<link package='poppler-qt.2607' cicount='copy' />
+<link package='poppler-qt.3724' cicount='copy' />
1
0
Hello community,
here is the log from the commit of package unrar for openSUSE:Factory:NonFree checked in at 2015-04-30 11:51:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory:NonFree/unrar (Old)
and /work/SRC/openSUSE:Factory:NonFree/.unrar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "unrar"
Changes:
--------
--- /work/SRC/openSUSE:Factory:NonFree/unrar/unrar.changes 2015-02-16 21:15:06.000000000 +0100
+++ /work/SRC/openSUSE:Factory:NonFree/.unrar.new/unrar.changes 2015-04-30 11:51:41.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Apr 26 14:03:11 UTC 2015 - lazy.kent(a)opensuse.org
+
+- Update to 5.2.7.
+ * No changelog available.
+
+-------------------------------------------------------------------
Old:
----
unrarsrc-5.2.6.tar.gz
New:
----
unrarsrc-5.2.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ unrar.spec ++++++
--- /var/tmp/diff_new_pack.RmtQt5/_old 2015-04-30 11:51:42.000000000 +0200
+++ /var/tmp/diff_new_pack.RmtQt5/_new 2015-04-30 11:51:42.000000000 +0200
@@ -18,10 +18,10 @@
# majorversion should match the major version number.
%define majorversion 5
-%define libsuffix 5_2_6
+%define libsuffix 5_2_7
Name: unrar
-Version: 5.2.6
+Version: 5.2.7
Release: 0
Summary: A program to extract, test, and view RAR archives
License: SUSE-NonFree
++++++ unrarsrc-5.2.6.tar.gz -> unrarsrc-5.2.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/dll.rc new/unrar/dll.rc
--- old/unrar/dll.rc 2015-02-15 08:58:01.000000000 +0100
+++ new/unrar/dll.rc 2015-03-04 12:45:30.000000000 +0100
@@ -2,8 +2,8 @@
#include <commctrl.h>
VS_VERSION_INFO VERSIONINFO
-FILEVERSION 5, 21, 100, 1509
-PRODUCTVERSION 5, 21, 100, 1509
+FILEVERSION 5, 21, 100, 1510
+PRODUCTVERSION 5, 21, 100, 1510
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/extract.cpp new/unrar/extract.cpp
--- old/unrar/extract.cpp 2015-02-15 09:02:48.000000000 +0100
+++ new/unrar/extract.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -387,9 +387,13 @@
if (Arc.FileHead.Encrypted)
{
+ // Stop archive extracting if user cancelled a password prompt.
#ifdef RARDLL
if (!ExtrDllGetPassword())
+ {
+ Cmd->DllError=ERAR_MISSING_PASSWORD;
return false;
+ }
#else
if (!ExtrGetPassword(Arc,ArcFileName))
{
@@ -398,6 +402,9 @@
}
#endif
// Skip only the current encrypted file if empty password is entered.
+ // Actually our "cancel" code above intercepts empty passwords too now,
+ // so we keep the code below just in case we'll decide process empty
+ // and cancelled passwords differently sometimes.
if (!Cmd->Password.IsSet())
{
ErrHandler.SetErrorCode(RARX_WARNING);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/filestr.cpp new/unrar/filestr.cpp
--- old/unrar/filestr.cpp 2015-02-15 09:02:48.000000000 +0100
+++ new/unrar/filestr.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -38,16 +38,20 @@
unsigned int DataSize=0,ReadSize;
const int ReadBlock=4096;
- Array<char> Data(ReadBlock+3);
+
+ // Our algorithm below needs at least two trailing zeroes after data.
+ // So for Unicode we provide 2 Unicode zeroes and one more byte
+ // in case read Unicode data contains uneven number of bytes.
+ const size_t ZeroPadding=5;
+
+ Array<char> Data(ReadBlock+ZeroPadding);
while ((ReadSize=SrcFile.Read(&Data[DataSize],ReadBlock))!=0)
{
DataSize+=ReadSize;
- Data.Add(ReadSize);
+ Data.Add(ReadSize); // Always have ReadBlock available for next data.
}
-
- // Add trailing Unicode zero after text data. We add 3 bytes instead of 2
- // in case read Unicode data contains uneven number of bytes.
- memset(&Data[DataSize],0,3);
+
+ memset(&Data[DataSize],0,ZeroPadding); // Provide at least 2 Unicode zero bytes.
Array<wchar> WideStr;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/strfn.cpp new/unrar/strfn.cpp
--- old/unrar/strfn.cpp 2015-02-15 09:02:48.000000000 +0100
+++ new/unrar/strfn.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -19,7 +19,7 @@
Dest[DestSize-1]=0;
#elif defined(_ANDROID)
wchar DestW[NM];
- UnkToWide(Src,DestW,ASIZE(DestW));
+ JniCharToWide(Src,DestW,ASIZE(DestW),true);
WideToChar(DestW,Dest,DestSize);
#else
if (Dest!=Src)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/timefn.cpp new/unrar/timefn.cpp
--- old/unrar/timefn.cpp 2015-02-15 09:02:48.000000000 +0100
+++ new/unrar/timefn.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -223,7 +223,7 @@
RarLocalTime lt;
GetLocal(<);
if (FullMS)
- swprintf(DateStr,MaxSize,L"%u-%02u-%02u %02u:%02u,%03u",lt.Year,lt.Month,lt.Day,lt.Hour,lt.Minute,lt.Reminder/10000);
+ swprintf(DateStr,MaxSize,L"%u-%02u-%02u %02u:%02u:%02u,%03u",lt.Year,lt.Month,lt.Day,lt.Hour,lt.Minute,lt.Second,lt.Reminder/10000);
else
if (FullYear)
swprintf(DateStr,MaxSize,L"%02u-%02u-%u %02u:%02u",lt.Day,lt.Month,lt.Year,lt.Hour,lt.Minute);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/uiconsole.cpp new/unrar/uiconsole.cpp
--- old/unrar/uiconsole.cpp 2015-02-15 09:02:48.000000000 +0100
+++ new/unrar/uiconsole.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -9,10 +9,17 @@
itoa(ExistingFD.Size,SizeText1);
ExistingFD.mtime.GetText(DateStr1,ASIZE(DateStr1),true,false);
- itoa(FileSize,SizeText2);
- FileTime->GetText(DateStr2,ASIZE(DateStr2),true,false);
-
- eprintf(St(MAskReplace),Name,SizeText1,DateStr1,SizeText2,DateStr2);
+ if (FileSize==INT64NDF || FileTime==NULL)
+ {
+ eprintf(L"\n");
+ eprintf(St(MAskOverwrite),Name);
+ }
+ else
+ {
+ itoa(FileSize,SizeText2);
+ FileTime->GetText(DateStr2,ASIZE(DateStr2),true,false);
+ eprintf(St(MAskReplace),Name,SizeText1,DateStr1,SizeText2,DateStr2);
+ }
bool AllowRename=(Flags & UIASKREP_F_NORENAME)==0;
int Choice=0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/ulinks.cpp new/unrar/ulinks.cpp
--- old/unrar/ulinks.cpp 2015-02-15 09:02:48.000000000 +0100
+++ new/unrar/ulinks.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -56,7 +56,7 @@
if (!Cmd->AbsoluteLinks && (IsFullPath(Target) ||
!IsRelativeSymlinkSafe(Arc.FileHead.FileName,Arc.FileHead.RedirName)))
-
+ return false;
return UnixSymlink(Target,LinkName,&Arc.FileHead.mtime,&Arc.FileHead.atime);
}
return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/unpack50mt.cpp new/unrar/unpack50mt.cpp
--- old/unrar/unpack50mt.cpp 2015-02-15 09:02:49.000000000 +0100
+++ new/unrar/unpack50mt.cpp 2015-03-25 18:35:42.000000000 +0100
@@ -90,6 +90,9 @@
DataSize+=ReadSize;
if (DataSize==0)
break;
+
+ // First read chunk can be small if we are near the end of volume
+ // and we want it to fit block header and tables.
if (ReadSize>0 && DataSize<TooSmallToProcess)
continue;
1
0
Hello community,
here is the log from the commit of package perl-App-cpanminus for openSUSE:Factory checked in at 2015-04-30 11:51:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-App-cpanminus (Old)
and /work/SRC/openSUSE:Factory/.perl-App-cpanminus.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-App-cpanminus"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-App-cpanminus/perl-App-cpanminus.changes 2015-04-25 11:23:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-App-cpanminus.new/perl-App-cpanminus.changes 2015-04-30 11:51:38.000000000 +0200
@@ -1,0 +2,12 @@
+Thu Apr 30 05:41:41 UTC 2015 - coolo(a)suse.com
+
+- updated to 1.7032
+ see /usr/share/doc/packages/perl-App-cpanminus/Changes
+
+ 1.7032 2015-04-29 18:51:36 PDT
+ [Improvements]
+ - Prefer to use cpanmetadb's package history API for pinning versions. Note that it only
+ works against versions since April 2012. You can set `--metacpan` to still prefer MetaCPAN
+ API search, and can use `--cascade-search` to fallback to MetaCPAN after CPAN MetaDB as well.
+
+-------------------------------------------------------------------
Old:
----
App-cpanminus-1.7031.tar.gz
New:
----
App-cpanminus-1.7032.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-App-cpanminus.spec ++++++
--- /var/tmp/diff_new_pack.wzsC8Z/_old 2015-04-30 11:51:39.000000000 +0200
+++ /var/tmp/diff_new_pack.wzsC8Z/_new 2015-04-30 11:51:39.000000000 +0200
@@ -17,7 +17,7 @@
Name: perl-App-cpanminus
-Version: 1.7031
+Version: 1.7032
Release: 0
%define cpan_name App-cpanminus
Summary: Get, Unpack, Build and Install Modules From Cpan
@@ -36,7 +36,7 @@
BuildRequires: perl(Module::Build) >= 0.380000
Requires: perl(ExtUtils::Install) >= 1.46
Requires: perl(ExtUtils::MakeMaker) >= 6.58
-Requires: perl(Module::Build) >= 0.38
+Requires: perl(Module::Build) >= 0.380000
%{perl_requires}
# MANUAL BEGIN
# Run-time:
++++++ App-cpanminus-1.7031.tar.gz -> App-cpanminus-1.7032.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/Changes new/App-cpanminus-1.7032/Changes
--- old/App-cpanminus-1.7031/Changes 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/Changes 2015-04-30 03:51:42.000000000 +0200
@@ -1,5 +1,11 @@
See http://github.com/miyagawa/cpanminus/ for the latest development.
+1.7032 2015-04-29 18:51:36 PDT
+ [Improvements]
+ - Prefer to use cpanmetadb's package history API for pinning versions. Note that it only
+ works against versions since April 2012. You can set `--metacpan` to still prefer MetaCPAN
+ API search, and can use `--cascade-search` to fallback to MetaCPAN after CPAN MetaDB as well.
+
1.7031 2015-04-22 14:13:37 PDT
[Bug Fixes]
- Fixed a rare case where circular dependencies in cpanfile prevents satisfying modules from
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/META.json new/App-cpanminus-1.7032/META.json
--- old/App-cpanminus-1.7031/META.json 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/META.json 2015-04-30 03:51:42.000000000 +0200
@@ -104,7 +104,7 @@
"web" : "https://github.com/miyagawa/cpanminus"
}
},
- "version" : "1.7031",
+ "version" : "1.7032",
"x_contributors" : [
"Alessandro Ghedini <al3xbio(a)gmail.com>",
"Andrew Rodland <andrew(a)cleverdomain.org>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/META.yml new/App-cpanminus-1.7032/META.yml
--- old/App-cpanminus-1.7031/META.yml 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/META.yml 2015-04-30 03:51:42.000000000 +0200
@@ -32,7 +32,7 @@
bugtracker: https://github.com/miyagawa/cpanminus/issues
homepage: https://github.com/miyagawa/cpanminus
repository: https://github.com/miyagawa/cpanminus.git
-version: '1.7031'
+version: '1.7032'
x_contributors:
- 'Alessandro Ghedini <al3xbio(a)gmail.com>'
- 'Andrew Rodland <andrew(a)cleverdomain.org>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/Makefile.PL new/App-cpanminus-1.7032/Makefile.PL
--- old/App-cpanminus-1.7031/Makefile.PL 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/Makefile.PL 2015-04-30 03:51:42.000000000 +0200
@@ -27,7 +27,7 @@
"TEST_REQUIRES" => {
"Test::More" => 0
},
- "VERSION" => "1.7031",
+ "VERSION" => "1.7032",
"test" => {
"TESTS" => "t/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/README new/App-cpanminus-1.7032/README
--- old/App-cpanminus-1.7031/README 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/README 2015-04-30 03:51:42.000000000 +0200
@@ -39,12 +39,12 @@
you'll need the --sudo option to write to the directory, unless you
configured INSTALL_BASE with local::lib.
- Installing to local perl (perlbrew)
+ Installing to local perl (perlbrew, plenv etc.)
If you have perl in your home directory, which is the case if you use
- tools like perlbrew, you don't need the --sudo option, since you're
- most likely to have a write permission to the perl's library path. You
- can just do:
+ tools like perlbrew or plenv, you don't need the --sudo option, since
+ you're most likely to have a write permission to the perl's library
+ path. You can just do:
curl -L https://cpanmin.us | perl - App::cpanminus
@@ -71,8 +71,9 @@
(curl) being old, or SSL certificates installed on your system needs to
be updated.
- You might need to update the software or system if you can, or use the
- -k option with curl.
+ You're recommended to update the software or system if you can. If that
+ is impossible or difficult, use the -k option with curl or an
+ alternative URL, https://git.io/cpanm
DEPENDENCIES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/bin/cpanm new/App-cpanminus-1.7032/bin/cpanm
--- old/App-cpanminus-1.7031/bin/cpanm 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/bin/cpanm 2015-04-30 03:51:42.000000000 +0200
@@ -21,7 +21,7 @@
my %fatpacked;
$fatpacked{"App/cpanminus.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS';
- package App::cpanminus;our$VERSION="1.7031";1;
+ package App::cpanminus;our$VERSION="1.7032";1;
APP_CPANMINUS
$fatpacked{"App/cpanminus/CPANVersion.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_CPANVERSION';
@@ -33,7 +33,7 @@
APP_CPANMINUS_DEPENDENCY
$fatpacked{"App/cpanminus/script.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_SCRIPT';
- package App::cpanminus::script;use strict;use Config;use Cwd ();use App::cpanminus;use App::cpanminus::Dependency;use File::Basename ();use File::Find ();use File::Path ();use File::Spec ();use File::Copy ();use File::Temp ();use Getopt::Long ();use Symbol ();use String::ShellQuote ();use version ();use constant WIN32=>$^O eq 'MSWin32';use constant BAD_TAR=>($^O eq 'solaris' || $^O eq 'hpux');use constant CAN_SYMLINK=>eval {symlink("","");1};our$VERSION=$App::cpanminus::VERSION;if ($INC{"App/FatPacker/Trace.pm"}){require version::vpp}my$quote=WIN32 ? q/"/ : q/'/;sub agent {my$self=shift;my$agent="cpanminus/$VERSION";$agent .= " perl/$]" if$self->{report_perl_version};$agent}sub determine_home {my$class=shift;my$homedir=$ENV{HOME}|| eval {require File::HomeDir;File::HomeDir->my_home}|| join('',@ENV{qw(HOMEDRIVE HOMEPATH)});if (WIN32){require Win32;$homedir=Win32::GetShortPathName($homedir)}return "$homedir/.cpanm"}sub new {my$class=shift;bless {home=>$class->determine_home,cmd=>'install',seen=>{},notest=>undef,test_only=>undef,installdeps=>undef,force=>undef,sudo=>undef,make=>undef,verbose=>undef,quiet=>undef,interactive=>undef,log=>undef,mirrors=>[],mirror_only=>undef,mirror_index=>undef,cpanmetadb=>"http://cpanmetadb.plackperl.org/v1.0/",perl=>$^X,argv=>[],local_lib=>undef,self_contained=>undef,exclude_vendor=>undef,prompt_timeout=>0,prompt=>undef,configure_timeout=>60,build_timeout=>3600,test_timeout=>1800,try_lwp=>1,try_wget=>1,try_curl=>1,uninstall_shadows=>($] < 5.012),skip_installed=>1,skip_satisfied=>0,auto_cleanup=>7,pod2man=>1,installed_dists=>0,install_types=>['requires'],with_develop=>0,showdeps=>0,scandeps=>0,scandeps_tree=>[],format=>'tree',save_dists=>undef,skip_configure=>0,verify=>0,report_perl_version=>!$class->maybe_ci,build_args=>{},features=>{},pure_perl=>0,cpanfile_path=>'cpanfile',@_,},$class}sub env {my($self,$key)=@_;$ENV{"PERL_CPANM_" .$key}}sub maybe_ci {my$class=shift;grep$ENV{$_},qw(TRAVIS CI AUTOMATED_TESTING AUTHOR_TESTING)}sub install_type_handlers {my$self=shift;my@handlers;for my$type (qw(recommends suggests)){push@handlers,"with-$type"=>sub {my%uniq;$self->{install_types}=[grep!$uniq{$_}++,@{$self->{install_types}},$type ]};push@handlers,"without-$type"=>sub {$self->{install_types}=[grep $_ ne $type,@{$self->{install_types}}]}}@handlers}sub build_args_handlers {my$self=shift;my@handlers;for my$phase (qw(configure build test install)){push@handlers,"$phase-args=s"=>\($self->{build_args}{$phase})}@handlers}sub parse_options {my$self=shift;local@ARGV=@{$self->{argv}};push@ARGV,grep length,split /\s+/,$self->env('OPT');push@ARGV,@_;Getopt::Long::Configure("bundling");Getopt::Long::GetOptions('f|force'=>sub {$self->{skip_installed}=0;$self->{force}=1},'n|notest!'=>\$self->{notest},'test-only'=>sub {$self->{notest}=0;$self->{skip_installed}=0;$self->{test_only}=1},'S|sudo!'=>\$self->{sudo},'v|verbose'=>\$self->{verbose},'verify!'=>\$self->{verify},'q|quiet!'=>\$self->{quiet},'h|help'=>sub {$self->{action}='show_help'},'V|version'=>sub {$self->{action}='show_version'},'perl=s'=>sub {$self->diag("--perl is deprecated since it's known to be fragile in figuring out dependencies. Run `$_[1] -S cpanm` instead.\n",1);$self->{perl}=$_[1]},'l|local-lib=s'=>sub {$self->{local_lib}=$self->maybe_abs($_[1])},'L|local-lib-contained=s'=>sub {$self->{local_lib}=$self->maybe_abs($_[1]);$self->{self_contained}=1;$self->{pod2man}=undef},'self-contained!'=>\$self->{self_contained},'exclude-vendor!'=>\$self->{exclude_vendor},'mirror=s@'=>$self->{mirrors},'mirror-only!'=>\$self->{mirror_only},'mirror-index=s'=>sub {$self->{mirror_index}=$self->maybe_abs($_[1])},'M|from=s'=>sub {$self->{mirrors}=[$_[1]];$self->{mirror_only}=1},'cpanmetadb=s'=>\$self->{cpanmetadb},'cascade-search!'=>\$self->{cascade_search},'prompt!'=>\$self->{prompt},'installdeps'=>\$self->{installdeps},'skip-installed!'=>\$self->{skip_installed},'skip-satisfied!'=>\$self->{skip_satisfied},'reinstall'=>sub {$self->{skip_installed}=0},'interactive!'=>\$self->{interactive},'i|install'=>sub {$self->{cmd}='install'},'info'=>sub {$self->{cmd}='info'},'look'=>sub {$self->{cmd}='look';$self->{skip_installed}=0},'U|uninstall'=>sub {$self->{cmd}='uninstall'},'self-upgrade'=>sub {$self->{action}='self_upgrade'},'uninst-shadows!'=>\$self->{uninstall_shadows},'lwp!'=>\$self->{try_lwp},'wget!'=>\$self->{try_wget},'curl!'=>\$self->{try_curl},'auto-cleanup=s'=>\$self->{auto_cleanup},'man-pages!'=>\$self->{pod2man},'scandeps'=>\$self->{scandeps},'showdeps'=>sub {$self->{showdeps}=1;$self->{skip_installed}=0},'format=s'=>\$self->{format},'save-dists=s'=>sub {$self->{save_dists}=$self->maybe_abs($_[1])},'skip-configure!'=>\$self->{skip_configure},'dev!'=>\$self->{dev_release},'metacpan!'=>\$self->{metacpan},'report-perl-version!'=>\$self->{report_perl_version},'configure-timeout=i'=>\$self->{configure_timeout},'build-timeout=i'=>\$self->{build_timeout},'test-timeout=i'=>\$self->{test_timeout},'with-develop'=>\$self->{with_develop},'without-develop'=>sub {$self->{with_develop}=0},'with-feature=s'=>sub {$self->{features}{$_[1]}=1},'without-feature=s'=>sub {$self->{features}{$_[1]}=0},'with-all-features'=>sub {$self->{features}{__all}=1},'pp|pureperl!'=>\$self->{pure_perl},"cpanfile=s"=>\$self->{cpanfile_path},$self->install_type_handlers,$self->build_args_handlers,);if (!@ARGV && $0 ne '-' &&!-t STDIN){push@ARGV,$self->load_argv_from_fh(\*STDIN);$self->{load_from_stdin}=1}$self->{argv}=\@ARGV}sub check_upgrade {my$self=shift;my$install_base=$ENV{PERL_LOCAL_LIB_ROOT}? $self->local_lib_target($ENV{PERL_LOCAL_LIB_ROOT}): $Config{installsitebin};if ($0 eq '-'){return}elsif ($0 !~ /^$install_base/){if ($0 =~ m!perlbrew/bin!){die <<DIE}else {die <<DIE}}}sub check_libs {my$self=shift;return if$self->{_checked}++;$self->bootstrap_local_lib;if (@{$self->{bootstrap_deps}|| []}){local$self->{notest}=1;local$self->{scandeps}=0;$self->install_deps(Cwd::cwd,0,@{$self->{bootstrap_deps}})}}sub setup_verify {my$self=shift;my$has_modules=eval {require Module::Signature;require Digest::SHA;1};$self->{cpansign}=$self->which('cpansign');unless ($has_modules && $self->{cpansign}){warn "WARNING: Module::Signature and Digest::SHA is required for distribution verifications.\n";$self->{verify}=0}}sub parse_module_args {my($self,$module)=@_;$module =~ s/^([A-Za-z0-9_:]+)@([v\d\._]+)$/$1~== $2/;if ($module =~ /\~[v\d\._,\!<>= ]+$/){return split /\~/,$module,2}else {return$module,undef}}sub doit {my$self=shift;my$code;eval {$code=($self->_doit==0)};if (my$e=$@){warn$e;$code=1}return$code}sub _doit {my$self=shift;$self->setup_home;$self->init_tools;$self->setup_verify if$self->{verify};if (my$action=$self->{action}){$self->$action()and return 1}return$self->show_help(1)unless @{$self->{argv}}or $self->{load_from_stdin};$self->configure_mirrors;my$cwd=Cwd::cwd;my@fail;for my$module (@{$self->{argv}}){if ($module =~ s/\.pm$//i){my ($volume,$dirs,$file)=File::Spec->splitpath($module);$module=join '::',grep {$_}File::Spec->splitdir($dirs),$file}($module,my$version)=$self->parse_module_args($module);$self->chdir($cwd);if ($self->{cmd}eq 'uninstall'){$self->uninstall_module($module)or push@fail,$module}else {$self->install_module($module,0,$version)or push@fail,$module}}if ($self->{base}&& $self->{auto_cleanup}){$self->cleanup_workdirs}if ($self->{installed_dists}){my$dists=$self->{installed_dists}> 1 ? "distributions" : "distribution";$self->diag("$self->{installed_dists} $dists installed\n",1)}if ($self->{scandeps}){$self->dump_scandeps()}$self->chdir($cwd);return!@fail}sub setup_home {my$self=shift;$self->{home}=$self->env('HOME')if$self->env('HOME');unless (_writable($self->{home})){die "Can't write to cpanm home '$self->{home}': You should fix it with chown/chmod first.\n"}$self->{base}="$self->{home}/work/" .time .".$$";File::Path::mkpath([$self->{base}],0,0777);$self->{log}=File::Spec->catfile($self->{base},"build.log");my$final_log="$self->{home}/build.log";{open my$out,">$self->{log}" or die "$self->{log}: $!"}if (CAN_SYMLINK){my$build_link="$self->{home}/latest-build";unlink$build_link;symlink$self->{base},$build_link;unlink$final_log;symlink$self->{log},$final_log}else {my$log=$self->{log};my$home=$self->{home};$self->{at_exit}=sub {my$self=shift;my$temp_log="$home/build.log." .time .".$$";File::Copy::copy($log,$temp_log)&& unlink($final_log);rename($temp_log,$final_log)}}$self->chat("cpanm (App::cpanminus) $VERSION on perl $] built for $Config{archname}\n" ."Work directory is $self->{base}\n")}sub package_index_for {my ($self,$mirror)=@_;return$self->source_for($mirror)."/02packages.details.txt"}sub generate_mirror_index {my ($self,$mirror)=@_;my$file=$self->package_index_for($mirror);my$gz_file=$file .'.gz';my$index_mtime=(stat$gz_file)[9];unless (-e $file && (stat$file)[9]>= $index_mtime){$self->chat("Uncompressing index file...\n");if (eval {require Compress::Zlib}){my$gz=Compress::Zlib::gzopen($gz_file,"rb")or do {$self->diag_fail("$Compress::Zlib::gzerrno opening compressed index");return};open my$fh,'>',$file or do {$self->diag_fail("$! opening uncompressed index for write");return};my$buffer;while (my$status=$gz->gzread($buffer)){if ($status < 0){$self->diag_fail($gz->gzerror ." reading compressed index");return}print$fh $buffer}}else {if (system("gunzip -c $gz_file > $file")){$self->diag_fail("Cannot uncompress -- please install gunzip or Compress::Zlib");return}}utime$index_mtime,$index_mtime,$file}return 1}sub search_mirror_index {my ($self,$mirror,$module,$version)=@_;$self->search_mirror_index_file($self->package_index_for($mirror),$module,$version)}sub search_mirror_index_file {my($self,$file,$module,$version)=@_;open my$fh,'<',$file or return;my$found;while (<$fh>){if (m!^\Q$module\E\s+([\w\.]+)\s+(\S*)!m){$found=$self->cpan_module($module,$2,$1);last}}return$found unless$self->{cascade_search};if ($found){if ($self->satisfy_version($module,$found->{module_version},$version)){return$found}else {$self->chat("Found $module $found->{module_version} which doesn't satisfy $version.\n")}}return}sub with_version_range {my($self,$version)=@_;defined($version)&& $version =~ /[<>=]/}sub encode_json {my($self,$data)=@_;require JSON::PP;my$json=JSON::PP::encode_json($data);$json =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;$json}sub version_to_query {my($self,$module,$version)=@_;require CPAN::Meta::Requirements;my$requirements=CPAN::Meta::Requirements->new;$requirements->add_string_requirement($module,$version || '0');my$req=$requirements->requirements_for_module($module);if ($req =~ s/^==\s*//){return {term=>{'module.version'=>$req },}}elsif ($req !~ /\s/){return {range=>{'module.version_numified'=>{'gte'=>$self->numify_ver_metacpan($req)}},}}else {my%ops=qw(< lt <= lte > gt >= gte);my(%range,@exclusion);my@requirements=split /,\s*/,$req;for my$r (@requirements){if ($r =~ s/^([<>]=?)\s*//){$range{$ops{$1}}=$self->numify_ver_metacpan($r)}elsif ($r =~ s/\!=\s*//){push@exclusion,$self->numify_ver_metacpan($r)}}my@filters=({range=>{'module.version_numified'=>\%range }},);if (@exclusion){push@filters,{not=>{or=>[map {+{term=>{'module.version_numified'=>$self->numify_ver_metacpan($_)}}}@exclusion ]},}}return@filters}}sub numify_ver_metacpan {my($self,$ver)=@_;$ver =~ s/_//g;version->new($ver)->numify}sub numify_ver {my($self,$ver)=@_;eval version->new($ver)->numify}sub maturity_filter {my($self,$module,$version)=@_;my@filters;if (!$self->with_version_range($version)or $self->{dev_release}){push@filters,{not=>{term=>{status=>'backpan' }}}}unless ($self->{dev_release}or $version =~ /==/){push@filters,{term=>{maturity=>'released' }}}return@filters}sub by_version {my%s=qw(latest 3 cpan 2 backpan 1);$b->{_score}<=> $a->{_score}|| $s{$b->{fields}{status}}<=> $s{$a->{fields}{status}}}sub by_first_come {$a->{fields}{date}cmp $b->{fields}{date}}sub by_date {$b->{fields}{date}cmp $a->{fields}{date}}sub find_best_match {my($self,$match,$version)=@_;return unless$match && @{$match->{hits}{hits}|| []};my@hits=$self->{dev_release}? sort {by_version || by_date}@{$match->{hits}{hits}}: sort {by_version || by_first_come}@{$match->{hits}{hits}};$hits[0]->{fields}}sub search_metacpan {my($self,$module,$version)=@_;require JSON::PP;$self->chat("Searching $module ($version) on metacpan ...\n");my$metacpan_uri='http://api.metacpan.org/v0';my@filter=$self->maturity_filter($module,$version);my$query={filtered=>{(@filter ? (filter=>{and=>\@filter }): ()),query=>{nested=>{score_mode=>'max',path=>'module',query=>{custom_score=>{metacpan_script=>"score_version_numified",query=>{constant_score=>{filter=>{and=>[{term=>{'module.authorized'=>JSON::PP::true()}},{term=>{'module.indexed'=>JSON::PP::true()}},{term=>{'module.name'=>$module }},$self->version_to_query($module,$version),]}}},}},}},}};my$module_uri="$metacpan_uri/file/_search?source=";$module_uri .= $self->encode_json({query=>$query,fields=>['date','release','author','module','status' ],});my($release,$author,$module_version);my$module_json=$self->get($module_uri);my$module_meta=eval {JSON::PP::decode_json($module_json)};my$match=$self->find_best_match($module_meta);if ($match){$release=$match->{release};$author=$match->{author};my$module_matched=(grep {$_->{name}eq $module}@{$match->{module}})[0];$module_version=$module_matched->{version}}unless ($release){$self->chat("! Could not find a release matching $module ($version) on MetaCPAN.\n");return}my$dist_uri="$metacpan_uri/release/_search?source=";$dist_uri .= $self->encode_json({filter=>{and=>[{term=>{'release.name'=>$release }},{term=>{'release.author'=>$author }},]},fields=>['download_url','stat','status' ],});my$dist_json=$self->get($dist_uri);my$dist_meta=eval {JSON::PP::decode_json($dist_json)};if ($dist_meta){$dist_meta=$dist_meta->{hits}{hits}[0]{fields}}if ($dist_meta && $dist_meta->{download_url}){(my$distfile=$dist_meta->{download_url})=~ s!.+/authors/id/!!;local$self->{mirrors}=$self->{mirrors};if ($dist_meta->{status}eq 'backpan'){$self->{mirrors}=['http://backpan.perl.org' ]}elsif ($dist_meta->{stat}{mtime}> time()-24*60*60){$self->{mirrors}=['http://cpan.metacpan.org' ]}return$self->cpan_module($module,$distfile,$module_version)}$self->diag_fail("Finding $module on metacpan failed.");return}sub search_database {my($self,$module,$version)=@_;my$found;my$range=($self->with_version_range($version)|| $self->{dev_release});if ($range or $self->{metacpan}){$found=$self->search_metacpan($module,$version)and return$found;$found=$self->search_cpanmetadb($module,$version)and return$found}else {$found=$self->search_cpanmetadb($module,$version)and return$found;$found=$self->search_metacpan($module,$version)and return$found}}sub search_cpanmetadb {my($self,$module,$version)=@_;require CPAN::Meta::YAML;$self->chat("Searching $module on cpanmetadb ...\n");(my$uri=$self->{cpanmetadb})=~ s{/?$}{/package/$module};my$yaml=$self->get($uri);my$meta=eval {CPAN::Meta::YAML::Load($yaml)};if ($meta && $meta->{distfile}){return$self->cpan_module($module,$meta->{distfile},$meta->{version})}$self->diag_fail("Finding $module on cpanmetadb failed.");return}sub search_module {my($self,$module,$version)=@_;if ($self->{mirror_index}){$self->mask_output(chat=>"Searching $module on mirror index $self->{mirror_index} ...\n");my$pkg=$self->search_mirror_index_file($self->{mirror_index},$module,$version);return$pkg if$pkg;unless ($self->{cascade_search}){$self->mask_output(diag_fail=>"Finding $module ($version) on mirror index $self->{mirror_index} failed.");return}}unless ($self->{mirror_only}){my$found=$self->search_database($module,$version);return$found if$found}MIRROR: for my$mirror (@{$self->{mirrors}}){$self->mask_output(chat=>"Searching $module on mirror $mirror ...\n");my$name='02packages.details.txt.gz';my$uri="$mirror/modules/$name";my$gz_file=$self->package_index_for($mirror).'.gz';unless ($self->{pkgs}{$uri}){$self->mask_output(chat=>"Downloading index file $uri ...\n");$self->mirror($uri,$gz_file);$self->generate_mirror_index($mirror)or next MIRROR;$self->{pkgs}{$uri}="!!retrieved!!"}my$pkg=$self->search_mirror_index($mirror,$module,$version);return$pkg if$pkg;$self->mask_output(diag_fail=>"Finding $module ($version) on mirror $mirror failed.")}return}sub source_for {my($self,$mirror)=@_;$mirror =~ s/[^\w\.\-]+/%/g;my$dir="$self->{home}/sources/$mirror";File::Path::mkpath([$dir ],0,0777);return$dir}sub load_argv_from_fh {my($self,$fh)=@_;my@argv;while(defined(my$line=<$fh>)){chomp$line;$line =~ s/#.+$//;$line =~ s/^\s+//;$line =~ s/\s+$//;push@argv,split ' ',$line if$line}return@argv}sub show_version {my$self=shift;print "cpanm (App::cpanminus) version $VERSION ($0)\n";print "perl version $] ($^X)\n\n";print " \%Config:\n";for my$key (qw(archname installsitelib installsitebin installman1dir installman3dir sitearchexp sitelibexp vendorarch vendorlibexp archlibexp privlibexp)){print " $key=$Config{$key}\n" if$Config{$key}}print " \%ENV:\n";for my$key (grep /^PERL/,sort keys%ENV){print " $key=$ENV{$key}\n"}print " \@INC:\n";for my$inc (@INC){print " $inc\n" unless ref($inc)eq 'CODE'}return 1}sub show_help {my$self=shift;if ($_[0]){print <<USAGE;return}print <<HELP;return 1}sub _writable {my$dir=shift;my@dir=File::Spec->splitdir($dir);while (@dir){$dir=File::Spec->catdir(@dir);if (-e $dir){return -w _}pop@dir}return}sub maybe_abs {my($self,$lib)=@_;if ($lib eq '_' or $lib =~ /^~/ or File::Spec->file_name_is_absolute($lib)){return$lib}else {return File::Spec->canonpath(File::Spec->catdir(Cwd::cwd(),$lib))}}sub local_lib_target {my($self,$root)=@_;(grep {$_ ne ''}split /\Q$Config{path_sep}/,$root)[0]}sub bootstrap_local_lib {my$self=shift;if ($self->{local_lib}){return$self->setup_local_lib($self->{local_lib})}if ($ENV{PERL_LOCAL_LIB_ROOT}&& $ENV{PERL_MM_OPT}){return$self->setup_local_lib($self->local_lib_target($ENV{PERL_LOCAL_LIB_ROOT}),1)}return if$self->{sudo}or (_writable($Config{installsitelib})and _writable($Config{installsitebin}));if ($ENV{PERL_MM_OPT}and ($ENV{MODULEBUILDRC}or $ENV{PERL_MB_OPT})){$self->bootstrap_local_lib_deps;return}$self->setup_local_lib;$self->diag(<<DIAG,1);sleep 2}sub _core_only_inc {my($self,$base)=@_;require local::lib;(local::lib->resolve_path(local::lib->install_base_arch_path($base)),local::lib->resolve_path(local::lib->install_base_perl_path($base)),(!$self->{exclude_vendor}? grep {$_}@Config{qw(vendorarch vendorlibexp)}: ()),@Config{qw(archlibexp privlibexp)},)}sub _diff {my($self,$old,$new)=@_;my@diff;my%old=map {$_=>1}@$old;for my$n (@$new){push@diff,$n unless exists$old{$n}}@diff}sub _setup_local_lib_env {my($self,$base)=@_;$self->diag(<<WARN,1)if$base =~ /\s/;local$SIG{__WARN__}=sub {};local::lib->setup_env_hash_for($base,0)}sub setup_local_lib {my($self,$base,$no_env)=@_;$base=undef if$base eq '_';require local::lib;{local $0='cpanm';$base ||= "~/perl5";$base=local::lib->resolve_path($base);if ($self->{self_contained}){my@inc=$self->_core_only_inc($base);$self->{search_inc}=[@inc ]}else {$self->{search_inc}=[local::lib->install_base_arch_path($base),local::lib->install_base_perl_path($base),@INC,]}$self->_setup_local_lib_env($base)unless$no_env;$self->{local_lib}=$base}$self->bootstrap_local_lib_deps}sub bootstrap_local_lib_deps {my$self=shift;push @{$self->{bootstrap_deps}},App::cpanminus::Dependency->new('ExtUtils::MakeMaker'=>6.58),App::cpanminus::Dependency->new('ExtUtils::Install'=>1.46)}sub prompt_bool {my($self,$mess,$def)=@_;my$val=$self->prompt($mess,$def);return lc$val eq 'y'}sub prompt {my($self,$mess,$def)=@_;my$isa_tty=-t STDIN && (-t STDOUT ||!(-f STDOUT || -c STDOUT));my$dispdef=defined$def ? "[$def] " : " ";$def=defined$def ? $def : "";if (!$self->{prompt}|| (!$isa_tty && eof STDIN)){return$def}local $|=1;local $\;my$ans;eval {local$SIG{ALRM}=sub {undef$ans;die "alarm\n"};print STDOUT "$mess $dispdef";alarm$self->{prompt_timeout}if$self->{prompt_timeout};$ans=<STDIN>;alarm 0};if (defined$ans){chomp$ans}else {print STDOUT "\n"}return (!defined$ans || $ans eq '')? $def : $ans}sub diag_ok {my($self,$msg)=@_;chomp$msg;$msg ||= "OK";if ($self->{in_progress}){$self->_diag("$msg\n");$self->{in_progress}=0}$self->log("-> $msg\n")}sub diag_fail {my($self,$msg,$always)=@_;chomp$msg;if ($self->{in_progress}){$self->_diag("FAIL\n");$self->{in_progress}=0}if ($msg){$self->_diag("! $msg\n",$always,1);$self->log("-> FAIL $msg\n")}}sub diag_progress {my($self,$msg)=@_;chomp$msg;$self->{in_progress}=1;$self->_diag("$msg ... ");$self->log("$msg\n")}sub _diag {my($self,$msg,$always,$error)=@_;my$fh=$error ? *STDERR : *STDOUT;print {$fh}$msg if$always or $self->{verbose}or!$self->{quiet}}sub diag {my($self,$msg,$always)=@_;$self->_diag($msg,$always);$self->log($msg)}sub chat {my$self=shift;print STDERR @_ if$self->{verbose};$self->log(@_)}sub mask_output {my$self=shift;my$method=shift;$self->$method($self->mask_uri_passwords(@_))}sub log {my$self=shift;open my$out,">>$self->{log}";print$out @_}sub run {my($self,$cmd)=@_;if (WIN32){$cmd=$self->shell_quote(@$cmd)if ref$cmd eq 'ARRAY';unless ($self->{verbose}){$cmd .= " >> " .$self->shell_quote($self->{log})." 2>&1"}!system$cmd}else {my$pid=fork;if ($pid){waitpid$pid,0;return!$?}else {$self->run_exec($cmd)}}}sub run_exec {my($self,$cmd)=@_;if (ref$cmd eq 'ARRAY'){unless ($self->{verbose}){open my$logfh,">>",$self->{log};open STDERR,'>&',$logfh;open STDOUT,'>&',$logfh;close$logfh}exec @$cmd}else {unless ($self->{verbose}){$cmd .= " >> " .$self->shell_quote($self->{log})." 2>&1"}exec$cmd}}sub run_timeout {my($self,$cmd,$timeout)=@_;return$self->run($cmd)if WIN32 || $self->{verbose}||!$timeout;my$pid=fork;if ($pid){eval {local$SIG{ALRM}=sub {die "alarm\n"};alarm$timeout;waitpid$pid,0;alarm 0};if ($@ && $@ eq "alarm\n"){$self->diag_fail("Timed out (> ${timeout}s). Use --verbose to retry.");local$SIG{TERM}='IGNORE';kill TERM=>0;waitpid$pid,0;return}return!$?}elsif ($pid==0){$self->run_exec($cmd)}else {$self->chat("! fork failed: falling back to system()\n");$self->run($cmd)}}sub append_args {my($self,$cmd,$phase)=@_;if (my$args=$self->{build_args}{$phase}){$cmd=join ' ',$self->shell_quote(@$cmd),$args}$cmd}sub configure {my($self,$cmd,$depth)=@_;local$ENV{PERL5_CPAN_IS_RUNNING}=local$ENV{PERL5_CPANPLUS_IS_RUNNING}=$$;local$ENV{PERL5_CPANM_IS_RUNNING}=$$;my$use_default=!$self->{interactive};local$ENV{PERL_MM_USE_DEFAULT}=$use_default;local$ENV{PERL_MM_OPT}=$ENV{PERL_MM_OPT};local$ENV{PERL_MB_OPT}=$ENV{PERL_MB_OPT};unless ($self->{pod2man}){$ENV{PERL_MM_OPT}.= " INSTALLMAN1DIR=none INSTALLMAN3DIR=none";$ENV{PERL_MB_OPT}.= " --config installman1dir= --config installsiteman1dir= --config installman3dir= --config installsiteman3dir="}if ($self->{pure_perl}){$ENV{PERL_MM_OPT}.= " PUREPERL_ONLY=1";$ENV{PERL_MB_OPT}.= " --pureperl-only"}$cmd=$self->append_args($cmd,'configure')if$depth==0;local$self->{verbose}=$self->{verbose}|| $self->{interactive};$self->run_timeout($cmd,$self->{configure_timeout})}sub build {my($self,$cmd,$distname,$depth)=@_;local$ENV{PERL_MM_USE_DEFAULT}=!$self->{interactive};$cmd=$self->append_args($cmd,'build')if$depth==0;return 1 if$self->run_timeout($cmd,$self->{build_timeout});while (1){my$ans=lc$self->prompt("Building $distname failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?","s");return if$ans eq 's';return$self->build($cmd,$distname,$depth)if$ans eq 'r';$self->show_build_log if$ans eq 'e';$self->look if$ans eq 'l'}}sub test {my($self,$cmd,$distname,$depth)=@_;return 1 if$self->{notest};local$ENV{PERL_MM_USE_DEFAULT}=!$self->{interactive};local$ENV{NONINTERACTIVE_TESTING}=!$self->{interactive};$cmd=$self->append_args($cmd,'test')if$depth==0;return 1 if$self->run_timeout($cmd,$self->{test_timeout});if ($self->{force}){$self->diag_fail("Testing $distname failed but installing it anyway.");return 1}else {$self->diag_fail;while (1){my$ans=lc$self->prompt("Testing $distname failed.\nYou can s)kip, r)etry, f)orce install, e)xamine build log, or l)ook ?","s");return if$ans eq 's';return$self->test($cmd,$distname,$depth)if$ans eq 'r';return 1 if$ans eq 'f';$self->show_build_log if$ans eq 'e';$self->look if$ans eq 'l'}}}sub install {my($self,$cmd,$uninst_opts,$depth)=@_;if ($depth==0 && $self->{test_only}){return 1}if ($self->{sudo}){unshift @$cmd,"sudo"}if ($self->{uninstall_shadows}&&!$ENV{PERL_MM_OPT}){push @$cmd,@$uninst_opts}$cmd=$self->append_args($cmd,'install')if$depth==0;$self->run($cmd)}sub look {my$self=shift;my$shell=$ENV{SHELL};$shell ||= $ENV{COMSPEC}if WIN32;if ($shell){my$cwd=Cwd::cwd;$self->diag("Entering $cwd with $shell\n");system$shell}else {$self->diag_fail("You don't seem to have a SHELL :/")}}sub show_build_log {my$self=shift;my@pagers=($ENV{PAGER},(WIN32 ? (): ('less')),'more');my$pager;while (@pagers){$pager=shift@pagers;next unless$pager;$pager=$self->which($pager);next unless$pager;last}if ($pager){system("$pager < $self->{log}")}else {$self->diag_fail("You don't seem to have a PAGER :/")}}sub chdir {my$self=shift;Cwd::chdir(File::Spec->canonpath($_[0]))or die "$_[0]: $!"}sub configure_mirrors {my$self=shift;unless (@{$self->{mirrors}}){$self->{mirrors}=['http://www.cpan.org' ]}for (@{$self->{mirrors}}){s!^/!file:///!;s!/$!!}}sub self_upgrade {my$self=shift;$self->check_upgrade;$self->{argv}=['App::cpanminus' ];return}sub install_module {my($self,$module,$depth,$version)=@_;$self->check_libs;if ($self->{seen}{$module}++){$self->chat("Already tried $module. Skipping.\n");return 1}if ($self->{skip_satisfied}){my($ok,$local)=$self->check_module($module,$version || 0);if ($ok){$self->diag("You have $module ($local)\n",1);return 1}}my$dist=$self->resolve_name($module,$version);unless ($dist){my$what=$module .($version ? " ($version)" : "");$self->diag_fail("Couldn't find module or a distribution $what",1);return}if ($dist->{distvname}&& $self->{seen}{$dist->{distvname}}++){$self->chat("Already tried $dist->{distvname}. Skipping.\n");return 1}if ($self->{cmd}eq 'info'){print$self->format_dist($dist),"\n";return 1}$dist->{depth}=$depth;if ($dist->{module}){unless ($self->satisfy_version($dist->{module},$dist->{module_version},$version)){$self->diag("Found $dist->{module} $dist->{module_version} which doesn't satisfy $version.\n",1);return}my$cmp=$version ? "==" : "";my$requirement=$dist->{module_version}? "$cmp$dist->{module_version}" : 0;my($ok,$local)=$self->check_module($dist->{module},$requirement);if ($self->{skip_installed}&& $ok){$self->diag("$dist->{module} is up to date. ($local)\n",1);return 1}}if ($dist->{dist}eq 'perl'){$self->diag("skipping $dist->{pathname}\n");return 1}$self->diag("--> Working on $module\n");$dist->{dir}||= $self->fetch_module($dist);unless ($dist->{dir}){$self->diag_fail("Failed to fetch distribution $dist->{distvname}",1);return}$self->chat("Entering $dist->{dir}\n");$self->chdir($self->{base});$self->chdir($dist->{dir});if ($self->{cmd}eq 'look'){$self->look;return 1}return$self->build_stuff($module,$dist,$depth)}sub uninstall_search_path {my$self=shift;$self->{local_lib}? (local::lib->install_base_arch_path($self->{local_lib}),local::lib->install_base_perl_path($self->{local_lib})): @Config{qw(installsitearch installsitelib)}}sub uninstall_module {my ($self,$module)=@_;$self->check_libs;my@inc=$self->uninstall_search_path;my($metadata,$packlist)=$self->packlists_containing($module,\@inc);unless ($packlist){$self->diag_fail(<<DIAG,1);return}my@uninst_files=$self->uninstall_target($metadata,$packlist);$self->ask_permission($module,\@uninst_files)or return;$self->uninstall_files(@uninst_files,$packlist);$self->diag("Successfully uninstalled $module\n",1);return 1}sub packlists_containing {my($self,$module,$inc)=@_;require Module::Metadata;my$metadata=Module::Metadata->new_from_module($module,inc=>$inc)or return;my$packlist;my$wanted=sub {return unless $_ eq '.packlist' && -f $_;for my$file ($self->unpack_packlist($File::Find::name)){$packlist ||= $File::Find::name if$file eq $metadata->filename}};{require File::pushd;my$pushd=File::pushd::pushd();my@search=grep -d $_,map File::Spec->catdir($_,'auto'),@$inc;File::Find::find($wanted,@search)}return$metadata,$packlist}sub uninstall_target {my($self,$metadata,$packlist)=@_;if ($self->has_shadow_install($metadata)or $self->{local_lib}){grep$self->should_unlink($_),$self->unpack_packlist($packlist)}else {$self->unpack_packlist($packlist)}}sub has_shadow_install {my($self,$metadata)=@_;my@shadow=grep defined,map Module::Metadata->new_from_module($metadata->name,inc=>[$_]),@INC;@shadow >= 2}sub should_unlink {my($self,$file)=@_;if ($self->{local_lib}){$file =~ /^\Q$self->{local_lib}\E/}else {!(grep$file =~ /^\Q$_\E/,@Config{qw(installbin installscript installman1dir installman3dir)})}}sub ask_permission {my ($self,$module,$files)=@_;$self->diag("$module contains the following files:\n\n");for my$file (@$files){$self->diag(" $file\n")}$self->diag("\n");return 'force uninstall' if$self->{force};local$self->{prompt}=1;return$self->prompt_bool("Are you sure you want to uninstall $module?",'y')}sub unpack_packlist {my ($self,$packlist)=@_;open my$fh,'<',$packlist or die "$packlist: $!";map {chomp;$_}<$fh>}sub uninstall_files {my ($self,@files)=@_;$self->diag("\n");for my$file (@files){$self->diag("Unlink: $file\n");unlink$file or $self->diag_fail("$!: $file")}$self->diag("\n");return 1}sub format_dist {my($self,$dist)=@_;return "$dist->{cpanid}/$dist->{filename}"}sub trim {local $_=shift;tr/\n/ /d;s/^\s*|\s*$//g;$_}sub fetch_module {my($self,$dist)=@_;$self->chdir($self->{base});for my$uri (@{$dist->{uris}}){$self->mask_output(diag_progress=>"Fetching $uri");my$filename=$dist->{filename}|| $uri;my$name=File::Basename::basename($filename);my$cancelled;my$fetch=sub {my$file;eval {local$SIG{INT}=sub {$cancelled=1;die "SIGINT\n"};$self->mirror($uri,$name);$file=$name if -e $name};$self->diag("ERROR: " .trim("$@")."\n",1)if $@ && $@ ne "SIGINT\n";return$file};my($try,$file);while ($try++ < 3){$file=$fetch->();last if$cancelled or $file;$self->mask_output(diag_fail=>"Download $uri failed. Retrying ... ")}if ($cancelled){$self->diag_fail("Download cancelled.");return}unless ($file){$self->mask_output(diag_fail=>"Failed to download $uri");next}$self->diag_ok;$dist->{local_path}=File::Spec->rel2abs($name);my$dir=$self->unpack($file,$uri,$dist);next unless$dir;if (my$save=$self->{save_dists}){my$path=$dist->{pathname}? "$save/authors/id/$dist->{pathname}" : "$save/vendor/$file";$self->chat("Copying $name to $path\n");File::Path::mkpath([File::Basename::dirname($path)],0,0777);File::Copy::copy($file,$path)or warn $!}return$dist,$dir}}sub unpack {my($self,$file,$uri,$dist)=@_;if ($self->{verify}){$self->verify_archive($file,$uri,$dist)or return}$self->chat("Unpacking $file\n");my$dir=$file =~ /\.zip/i ? $self->unzip($file): $self->untar($file);unless ($dir){$self->diag_fail("Failed to unpack $file: no directory")}return$dir}sub verify_checksums_signature {my($self,$chk_file)=@_;require Module::Signature;$self->chat("Verifying the signature of CHECKSUMS\n");my$rv=eval {local$SIG{__WARN__}=sub {};my$v=Module::Signature::_verify($chk_file);$v==Module::Signature::SIGNATURE_OK()};if ($rv){$self->chat("Verified OK!\n")}else {$self->diag_fail("Verifying CHECKSUMS signature failed: $rv\n");return}return 1}sub verify_archive {my($self,$file,$uri,$dist)=@_;unless ($dist->{cpanid}){$self->chat("Archive '$file' does not seem to be from PAUSE. Skip verification.\n");return 1}(my$mirror=$uri)=~ s!/authors/id.*$!!;(my$chksum_uri=$uri)=~ s!/[^/]*$!/CHECKSUMS!;my$chk_file=$self->source_for($mirror)."/$dist->{cpanid}.CHECKSUMS";$self->mask_output(diag_progress=>"Fetching $chksum_uri");$self->mirror($chksum_uri,$chk_file);unless (-e $chk_file){$self->diag_fail("Fetching $chksum_uri failed.\n");return}$self->diag_ok;$self->verify_checksums_signature($chk_file)or return;$self->verify_checksum($file,$chk_file)}sub verify_checksum {my($self,$file,$chk_file)=@_;$self->chat("Verifying the SHA1 for $file\n");open my$fh,"<$chk_file" or die "$chk_file: $!";my$data=join '',<$fh>;$data =~ s/\015?\012/\n/g;require Safe;my$chksum=Safe->new->reval($data);if (!ref$chksum or ref$chksum ne 'HASH'){$self->diag_fail("! Checksum file downloaded from $chk_file is broken.\n");return}if (my$sha=$chksum->{$file}{sha256}){my$hex=$self->sha1_for($file);if ($hex eq $sha){$self->chat("Checksum for $file: Verified!\n")}else {$self->diag_fail("Checksum mismatch for $file\n");return}}else {$self->chat("Checksum for $file not found in CHECKSUMS.\n");return}}sub sha1_for {my($self,$file)=@_;require Digest::SHA;open my$fh,"<",$file or die "$file: $!";my$dg=Digest::SHA->new(256);my($data);while (read($fh,$data,4096)){$dg->add($data)}return$dg->hexdigest}sub verify_signature {my($self,$dist)=@_;$self->diag_progress("Verifying the SIGNATURE file");my$out=`$self->{cpansign} -v --skip 2>&1`;$self->log($out);if ($out =~ /Signature verified OK/){$self->diag_ok("Verified OK");return 1}else {$self->diag_fail("SIGNATURE verificaion for $dist->{filename} failed\n");return}}sub resolve_name {my($self,$module,$version)=@_;if ($module =~ /^(ftp|https?|file):/){if ($module =~ m!authors/id/(.*)!){return$self->cpan_dist($1,$module)}else {return {uris=>[$module ]}}}if ($module =~ m!^[\./]! && -d $module){return {source=>'local',dir=>Cwd::abs_path($module),}}if (-f $module){return {source=>'local',uris=>["file://" .Cwd::abs_path($module)],}}if ($module =~ /(?:^git:|\.git(?:@.+)?$)/){return$self->git_uri($module)}if ($module =~ s!^cpan:///distfile/!!){return$self->cpan_dist($module)}if ($module =~ m!^(?:[A-Z]/[A-Z]{2}/)?([A-Z]{2}[\-A-Z0-9]*/.*)$!){return$self->cpan_dist($1)}return$self->search_module($module,$version)}sub cpan_module {my($self,$module,$dist,$version)=@_;my$dist=$self->cpan_dist($dist);$dist->{module}=$module;$dist->{module_version}=$version if$version && $version ne 'undef';return$dist}sub cpan_dist {my($self,$dist,$url)=@_;$dist =~ s!^([A-Z]{2})!substr($1,0,1)."/".substr($1,0,2)."/".$1!e;require CPAN::DistnameInfo;my$d=CPAN::DistnameInfo->new($dist);if ($url){$url=[$url ]unless ref$url eq 'ARRAY'}else {my$id=$d->cpanid;my$fn=substr($id,0,1)."/" .substr($id,0,2)."/" .$id ."/" .$d->filename;my@mirrors=@{$self->{mirrors}};my@urls=map "$_/authors/id/$fn",@mirrors;$url=\@urls,}return {$d->properties,source=>'cpan',uris=>$url,}}sub git_uri {my ($self,$uri)=@_;($uri,my$commitish)=split /(?<=\.git)@/i,$uri,2;my$dir=File::Temp::tempdir(CLEANUP=>1);$self->mask_output(diag_progress=>"Cloning $uri");$self->run(['git','clone',$uri,$dir ]);unless (-e "$dir/.git"){$self->diag_fail("Failed cloning git repository $uri",1);return}if ($commitish){require File::pushd;my$dir=File::pushd::pushd($dir);unless ($self->run(['git','checkout',$commitish ])){$self->diag_fail("Failed to checkout '$commitish' in git repository $uri\n");return}}$self->diag_ok;return {source=>'local',dir=>$dir,}}sub setup_module_build_patch {my$self=shift;open my$out,">$self->{base}/ModuleBuildSkipMan.pm" or die $!;print$out <<EOF}sub core_version_for {my($self,$module)=@_;require Module::CoreList;unless (exists$Module::CoreList::version{$]+0}){die sprintf("Module::CoreList %s (loaded from %s) doesn't seem to have entries for perl $]. " ."You're strongly recommended to upgrade Module::CoreList from CPAN.\n",$Module::CoreList::VERSION,$INC{"Module/CoreList.pm"})}unless (exists$Module::CoreList::version{$]+0}{$module}){return -1}return$Module::CoreList::version{$]+0}{$module}}sub search_inc {my$self=shift;$self->{search_inc}||= do {if (defined$::Bin){[grep!/^\Q$::Bin\E\/..\/(?:fat)?lib$/,@INC]}else {[@INC]}}}sub check_module {my($self,$mod,$want_ver)=@_;require Module::Metadata;my$meta=Module::Metadata->new_from_module($mod,inc=>$self->search_inc)or return 0,undef;my$version=$meta->version;if ($self->{self_contained}&& $self->loaded_from_perl_lib($meta)){$version=$self->core_version_for($mod);return 0,undef if$version && $version==-1}$self->{local_versions}{$mod}=$version;if ($self->is_deprecated($meta)){return 0,$version}elsif ($self->satisfy_version($mod,$version,$want_ver)){return 1,($version || 'undef')}else {return 0,$version}}sub satisfy_version {my($self,$mod,$version,$want_ver)=@_;$want_ver='0' unless defined($want_ver)&& length($want_ver);require CPAN::Meta::Requirements;my$requirements=CPAN::Meta::Requirements->new;$requirements->add_string_requirement($mod,$want_ver);$requirements->accepts_module($mod,$version)}sub unsatisfy_how {my($self,$ver,$want_ver)=@_;if ($want_ver =~ /^[v0-9\.\_]+$/){return "$ver < $want_ver"}else {return "$ver doesn't satisfy $want_ver"}}sub is_deprecated {my($self,$meta)=@_;my$deprecated=eval {require Module::CoreList;Module::CoreList::is_deprecated($meta->{module})};return$deprecated && $self->loaded_from_perl_lib($meta)}sub loaded_from_perl_lib {my($self,$meta)=@_;require Config;my@dirs=qw(archlibexp privlibexp);if ($self->{self_contained}&&!$self->{exclude_vendor}&& $Config{vendorarch}){unshift@dirs,qw(vendorarch vendorlibexp)}for my$dir (@dirs){my$confdir=$Config{$dir};if ($confdir eq substr($meta->filename,0,length($confdir))){return 1}}return}sub should_install {my($self,$mod,$ver)=@_;$self->chat("Checking if you have $mod $ver ... ");my($ok,$local)=$self->check_module($mod,$ver);if ($ok){$self->chat("Yes ($local)\n")}elsif ($local){$self->chat("No (" .$self->unsatisfy_how($local,$ver).")\n")}else {$self->chat("No\n")}return$mod unless$ok;return}sub check_perl_version {my($self,$version)=@_;require CPAN::Meta::Requirements;my$req=CPAN::Meta::Requirements->from_string_hash({perl=>$version });$req->accepts_module(perl=>$])}sub install_deps {my($self,$dir,$depth,@deps)=@_;my(@install,%seen,@fail);for my$dep (@deps){next if$seen{$dep->module};if ($dep->module eq 'perl'){if ($dep->is_requirement &&!$self->check_perl_version($dep->version)){$self->diag("Needs perl @{[$dep->version]}, you have $]\n");push@fail,'perl'}}elsif ($self->should_install($dep->module,$dep->version)){push@install,$dep;$seen{$dep->module}=1}}if (@install){$self->diag("==> Found dependencies: " .join(", ",map $_->module,@install)."\n")}for my$dep (@install){$self->install_module($dep->module,$depth + 1,$dep->version)}$self->chdir($self->{base});$self->chdir($dir)if$dir;if ($self->{scandeps}){return 1}my@not_ok=$self->unsatisfied_deps(@deps);if (@not_ok){return 0,\@not_ok}else {return 1}}sub unsatisfied_deps {my($self,@deps)=@_;require CPAN::Meta::Check;require CPAN::Meta::Requirements;my$reqs=CPAN::Meta::Requirements->new;for my$dep (grep $_->is_requirement,@deps){$reqs->add_string_requirement($dep->module=>$dep->requires_version || '0')}my$ret=CPAN::Meta::Check::check_requirements($reqs,'requires',$self->{search_inc});grep defined,values %$ret}sub install_deps_bailout {my($self,$target,$dir,$depth,@deps)=@_;my($ok,$fail)=$self->install_deps($dir,$depth,@deps);if (!$ok){$self->diag_fail("Installing the dependencies failed: " .join(", ",@$fail),1);unless ($self->prompt_bool("Do you want to continue building $target anyway?","n")){$self->diag_fail("Bailing out the installation for $target.",1);return}}return 1}sub build_stuff {my($self,$stuff,$dist,$depth)=@_;if ($self->{verify}&& -e 'SIGNATURE'){$self->verify_signature($dist)or return}require CPAN::Meta;my($meta_file)=grep -f,qw(META.json META.yml);if ($meta_file){$self->chat("Checking configure dependencies from $meta_file\n");$dist->{cpanmeta}=eval {CPAN::Meta->load_file($meta_file)}}elsif ($dist->{dist}&& $dist->{version}){$self->chat("META.yml/json not found. Creating skeleton for it.\n");$dist->{cpanmeta}=CPAN::Meta->new({name=>$dist->{dist},version=>$dist->{version}})}$dist->{meta}=$dist->{cpanmeta}? $dist->{cpanmeta}->as_struct : {};my@config_deps;if ($dist->{cpanmeta}){push@config_deps,App::cpanminus::Dependency->from_prereqs($dist->{cpanmeta}->effective_prereqs,['configure'],$self->{install_types},)}if (-e 'Build.PL' &&!$self->should_use_mm($dist->{dist})&&!@config_deps){push@config_deps,App::cpanminus::Dependency->from_versions({'Module::Build'=>'0.36' },'configure',)}my$target=$dist->{meta}{name}? "$dist->{meta}{name}-$dist->{meta}{version}" : $dist->{dir};$self->install_deps_bailout($target,$dist->{dir},$depth,@config_deps)or return;$self->diag_progress("Configuring $target");my$configure_state=$self->configure_this($dist,$depth);$self->diag_ok($configure_state->{configured_ok}? "OK" : "N/A");if ($dist->{cpanmeta}&& $dist->{source}eq 'cpan'){$dist->{provides}=$dist->{cpanmeta}{provides}|| $self->extract_packages($dist->{cpanmeta},".")}my$root_target=(($self->{installdeps}or $self->{showdeps})and $depth==0);$dist->{want_phases}=$self->{notest}&&!$root_target ? [qw(build runtime)]: [qw(build test runtime)];push @{$dist->{want_phases}},'develop' if$self->{with_develop}&& $depth==0;my@deps=$self->find_prereqs($dist);my$module_name=$self->find_module_name($configure_state)|| $dist->{meta}{name};$module_name =~ s/-/::/g;if ($self->{showdeps}){for my$dep (@config_deps,@deps){print$dep->module,($dep->version ? ("~".$dep->version): ""),"\n"}return 1}my$distname=$dist->{meta}{name}? "$dist->{meta}{name}-$dist->{meta}{version}" : $stuff;my$walkup;if ($self->{scandeps}){$walkup=$self->scandeps_append_child($dist)}$self->install_deps_bailout($distname,$dist->{dir},$depth,@deps)or return;if ($self->{scandeps}){unless ($configure_state->{configured_ok}){my$diag=<<DIAG;if (@config_deps){my@tree=@{$self->{scandeps_tree}};$diag .= "!\n" .join("",map "! * $_->[0]{module}\n",@tree[0..$#tree-1])if@tree}$self->diag("!\n$diag!\n",1)}$walkup->();return 1}if ($self->{installdeps}&& $depth==0){if ($configure_state->{configured_ok}){$self->diag("<== Installed dependencies for $stuff. Finishing.\n");return 1}else {$self->diag("! Configuring $distname failed. See $self->{log} for details.\n",1);return}}my$installed;if ($configure_state->{use_module_build}&& -e 'Build' && -f _){$self->diag_progress("Building " .($self->{notest}? "" : "and testing ").$distname);$self->build([$self->{perl},"./Build" ],$distname,$depth)&& $self->test([$self->{perl},"./Build","test" ],$distname,$depth)&& $self->install([$self->{perl},"./Build","install" ],["--uninst",1 ],$depth)&& $installed++}elsif ($self->{make}&& -e 'Makefile'){$self->diag_progress("Building " .($self->{notest}? "" : "and testing ").$distname);$self->build([$self->{make}],$distname,$depth)&& $self->test([$self->{make},"test" ],$distname,$depth)&& $self->install([$self->{make},"install" ],["UNINST=1" ],$depth)&& $installed++}else {my$why;my$configure_failed=$configure_state->{configured}&&!$configure_state->{configured_ok};if ($configure_failed){$why="Configure failed for $distname."}elsif ($self->{make}){$why="The distribution doesn't have a proper Makefile.PL/Build.PL"}else {$why="Can't configure the distribution. You probably need to have 'make'."}$self->diag_fail("$why See $self->{log} for details.",1);return}if ($installed && $self->{test_only}){$self->diag_ok;$self->diag("Successfully tested $distname\n",1)}elsif ($installed){my$local=$self->{local_versions}{$dist->{module}|| ''};my$version=$dist->{module_version}|| $dist->{meta}{version}|| $dist->{version};my$reinstall=$local && ($local eq $version);my$action=$local &&!$reinstall ? $self->numify_ver($version)< $self->numify_ver($local)? "downgraded" : "upgraded" : undef;my$how=$reinstall ? "reinstalled $distname" : $local ? "installed $distname ($action from $local)" : "installed $distname" ;my$msg="Successfully $how";$self->diag_ok;$self->diag("$msg\n",1);$self->{installed_dists}++;$self->save_meta($stuff,$dist,$module_name,\@config_deps,\@deps);return 1}else {my$what=$self->{test_only}? "Testing" : "Installing";$self->diag_fail("$what $stuff failed. See $self->{log} for details. Retry with --force to force install it.",1);return}}sub perl_requirements {my($self,@requires)=@_;my@perl;for my$requires (grep defined,@requires){if (exists$requires->{perl}){push@perl,App::cpanminus::Dependency->new(perl=>$requires->{perl})}}return@perl}sub should_use_mm {my($self,$dist)=@_;my%should_use_mm=map {$_=>1}qw(version ExtUtils-ParseXS ExtUtils-Install ExtUtils-Manifest);$should_use_mm{$dist}}sub configure_this {my($self,$dist,$depth)=@_;if (-e $self->{cpanfile_path}&& $self->{installdeps}&& $depth==0){require Module::CPANfile;$dist->{cpanfile}=eval {Module::CPANfile->load($self->{cpanfile_path})};$self->diag_fail($@,1)if $@;return {configured=>1,configured_ok=>!!$dist->{cpanfile},use_module_build=>0,}}if ($self->{skip_configure}){my$eumm=-e 'Makefile';my$mb=-e 'Build' && -f _;return {configured=>1,configured_ok=>$eumm || $mb,use_module_build=>$mb,}}my$state={};my$try_eumm=sub {if (-e 'Makefile.PL'){$self->chat("Running Makefile.PL\n");if ($self->configure([$self->{perl},"Makefile.PL" ],$depth)){$state->{configured_ok}=-e 'Makefile'}$state->{configured}++}};my$try_mb=sub {if (-e 'Build.PL'){$self->chat("Running Build.PL\n");if ($self->configure([$self->{perl},"Build.PL" ],$depth)){$state->{configured_ok}=-e 'Build' && -f _}$state->{use_module_build}++;$state->{configured}++}};my@try;if ($dist->{dist}&& $self->should_use_mm($dist->{dist})){@try=($try_eumm,$try_mb)}else {@try=($try_mb,$try_eumm)}for my$try (@try){$try->();last if$state->{configured_ok}}unless ($state->{configured_ok}){while (1){my$ans=lc$self->prompt("Configuring $dist->{dist} failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?","s");last if$ans eq 's';return$self->configure_this($dist,$depth)if$ans eq 'r';$self->show_build_log if$ans eq 'e';$self->look if$ans eq 'l'}}return$state}sub find_module_name {my($self,$state)=@_;return unless$state->{configured_ok};if ($state->{use_module_build}&& -e "_build/build_params"){my$params=do {open my$in,"_build/build_params";$self->safe_eval(join "",<$in>)};return eval {$params->[2]{module_name}}|| undef}elsif (-e "Makefile"){open my$mf,"Makefile";while (<$mf>){if (/^\#\s+NAME\s+=>\s+(.*)/){return$self->safe_eval($1)}}}return}sub list_files {my$self=shift;if (-e 'MANIFEST'){require ExtUtils::Manifest;my$manifest=eval {ExtUtils::Manifest::manifind()}|| {};return sort {lc$a cmp lc$b}keys %$manifest}else {require File::Find;my@files;my$finder=sub {my$name=$File::Find::name;$name =~ s!\.[/\\]!!;push@files,$name};File::Find::find($finder,".");return sort {lc$a cmp lc$b}@files}}sub extract_packages {my($self,$meta,$dir)=@_;my$try=sub {my$file=shift;return 0 if$file =~ m!^(?:x?t|inc|local|perl5|fatlib|_build)/!;return 1 unless$meta->{no_index};return 0 if grep {$file =~ m!^$_/!}@{$meta->{no_index}{directory}|| []};return 0 if grep {$file eq $_}@{$meta->{no_index}{file}|| []};return 1};require Parse::PMFile;my@files=grep {/\.pm(?:\.PL)?$/ && $try->($_)}$self->list_files;my$provides={};for my$file (@files){my$parser=Parse::PMFile->new($meta,{UNSAFE=>1,ALLOW_DEV_VERSION=>1 });my$packages=$parser->parse($file);while (my($package,$meta)=each %$packages){$provides->{$package}||= {file=>$meta->{infile},($meta->{version}eq 'undef')? (): (version=>$meta->{version}),}}}return$provides}sub save_meta {my($self,$module,$dist,$module_name,$config_deps,$build_deps)=@_;return unless$dist->{distvname}&& $dist->{source}eq 'cpan';my$base=($ENV{PERL_MM_OPT}|| '')=~ /INSTALL_BASE=/ ? ($self->install_base($ENV{PERL_MM_OPT})."/lib/perl5"): $Config{sitelibexp};my$provides=$dist->{provides};File::Path::mkpath("blib/meta",0,0777);my$local={name=>$module_name,target=>$module,version=>exists$provides->{$module_name}? ($provides->{$module_name}{version}|| $dist->{version}): $dist->{version},dist=>$dist->{distvname},pathname=>$dist->{pathname},provides=>$provides,};require JSON::PP;open my$fh,">","blib/meta/install.json" or die $!;print$fh JSON::PP::encode_json($local);if (-e "MYMETA.json"){File::Copy::copy("MYMETA.json","blib/meta/MYMETA.json")}my@cmd=(($self->{sudo}? 'sudo' : ()),$^X,'-MExtUtils::Install=install','-e',qq[install({ 'blib/meta' => '$base/$Config{archname}/.meta/$dist->{distvname}' })],);$self->run(\@cmd)}sub _merge_hashref {my($self,@hashrefs)=@_;my%hash;for my$h (@hashrefs){%hash=(%hash,%$h)}return \%hash}sub install_base {my($self,$mm_opt)=@_;$mm_opt =~ /INSTALL_BASE=(\S+)/ and return $1;die "Your PERL_MM_OPT doesn't contain INSTALL_BASE"}sub safe_eval {my($self,$code)=@_;eval$code}sub configure_features {my($self,$dist,@features)=@_;map $_->identifier,grep {$self->effective_feature($dist,$_)}@features}sub effective_feature {my($self,$dist,$feature)=@_;if ($dist->{depth}==0){my$value=$self->{features}{$feature->identifier};return$value if defined$value;return 1 if$self->{features}{__all}}if ($self->{interactive}){require CPAN::Meta::Requirements;$self->diag("[@{[ $feature->description ]}]\n",1);my$req=CPAN::Meta::Requirements->new;for my$phase (@{$dist->{want_phases}}){for my$type (@{$self->{install_types}}){$req->add_requirements($feature->prereqs->requirements_for($phase,$type))}}my$reqs=$req->as_string_hash;my@missing;for my$module (keys %$reqs){if ($self->should_install($module,$req->{$module})){push@missing,$module}}if (@missing){my$howmany=@missing;$self->diag("==> Found missing dependencies: " .join(", ",@missing)."\n",1);local$self->{prompt}=1;return$self->prompt_bool("Install the $howmany optional module(s)?","y")}}return}sub find_prereqs {my($self,$dist)=@_;my@deps=$self->extract_meta_prereqs($dist);if ($dist->{module}=~ /^Bundle::/i){push@deps,$self->bundle_deps($dist)}if ($self->{cpanfile_requirements}&&!$dist->{cpanfile}){for my$dep (@deps){$dep->merge_with($self->{cpanfile_requirements})}}return@deps}sub extract_meta_prereqs {my($self,$dist)=@_;if ($dist->{cpanfile}){my@features=$self->configure_features($dist,$dist->{cpanfile}->features);my$prereqs=$dist->{cpanfile}->prereqs_with(@features);$self->{cpanfile_requirements}=$prereqs->merged_requirements($dist->{want_phases},['requires']);return App::cpanminus::Dependency->from_prereqs($prereqs,$dist->{want_phases},$self->{install_types})}require CPAN::Meta;my@deps;my($meta_file)=grep -f,qw(MYMETA.json MYMETA.yml);if ($meta_file){$self->chat("Checking dependencies from $meta_file ...\n");my$mymeta=eval {CPAN::Meta->load_file($meta_file,{lazy_validation=>1 })};if ($mymeta){$dist->{meta}{name}=$mymeta->name;$dist->{meta}{version}=$mymeta->version;return$self->extract_prereqs($mymeta,$dist)}}if (-e '_build/prereqs'){$self->chat("Checking dependencies from _build/prereqs ...\n");my$prereqs=do {open my$in,"_build/prereqs";$self->safe_eval(join "",<$in>)};my$meta=CPAN::Meta->new({name=>$dist->{meta}{name},version=>$dist->{meta}{version},%$prereqs },{lazy_validation=>1 },);@deps=$self->extract_prereqs($meta,$dist)}elsif (-e 'Makefile'){$self->chat("Finding PREREQ from Makefile ...\n");open my$mf,"Makefile";while (<$mf>){if (/^\#\s+PREREQ_PM => \{\s*(.*?)\s*\}/){my@all;my@pairs=split ', ',$1;for (@pairs){my ($pkg,$v)=split '=>',$_;push@all,[$pkg,$v ]}my$list=join ", ",map {"'$_->[0]' => $_->[1]"}@all;my$prereq=$self->safe_eval("no strict; +{ $list }");push@deps,App::cpanminus::Dependency->from_versions($prereq)if$prereq;last}}}return@deps}sub bundle_deps {my($self,$dist)=@_;my@files;File::Find::find({wanted=>sub {push@files,File::Spec->rel2abs($_)if /\.pm/i},no_chdir=>1,},'.');my@deps;for my$file (@files){open my$pod,"<",$file or next;my$in_contents;while (<$pod>){if (/^=head\d\s+CONTENTS/){$in_contents=1}elsif (/^=/){$in_contents=0}elsif ($in_contents){/^(\S+)\s*(\S+)?/ and push@deps,App::cpanminus::Dependency->new($1,$self->maybe_version($2))}}}return@deps}sub maybe_version {my($self,$string)=@_;return$string && $string =~ /^\.?\d/ ? $string : undef}sub extract_prereqs {my($self,$meta,$dist)=@_;my@features=$self->configure_features($dist,$meta->features);return App::cpanminus::Dependency->from_prereqs($meta->effective_prereqs(\@features),$dist->{want_phases},$self->{install_types})}sub cleanup_workdirs {my$self=shift;my$expire=time - 24 * 60 * 60 * $self->{auto_cleanup};my@targets;opendir my$dh,"$self->{home}/work";while (my$e=readdir$dh){next if$e !~ /^(\d+)\.\d+$/;my$time=$1;if ($time < $expire){push@targets,"$self->{home}/work/$e"}}if (@targets){if (@targets >= 64){$self->diag("Expiring " .scalar(@targets)." work directories. This might take a while...\n")}else {$self->chat("Expiring " .scalar(@targets)." work directories.\n")}File::Path::rmtree(\@targets,0,0)}}sub scandeps_append_child {my($self,$dist)=@_;my$new_node=[$dist,[]];my$curr_node=$self->{scandeps_current}|| [undef,$self->{scandeps_tree}];push @{$curr_node->[1]},$new_node;$self->{scandeps_current}=$new_node;return sub {$self->{scandeps_current}=$curr_node}}sub dump_scandeps {my$self=shift;if ($self->{format}eq 'tree'){$self->walk_down(sub {my($dist,$depth)=@_;if ($depth==0){print "$dist->{distvname}\n"}else {print " " x ($depth - 1);print "\\_ $dist->{distvname}\n"}},1)}elsif ($self->{format}=~ /^dists?$/){$self->walk_down(sub {my($dist,$depth)=@_;print$self->format_dist($dist),"\n"},0)}elsif ($self->{format}eq 'json'){require JSON::PP;print JSON::PP::encode_json($self->{scandeps_tree})}elsif ($self->{format}eq 'yaml'){require YAML;print YAML::Dump($self->{scandeps_tree})}else {$self->diag("Unknown format: $self->{format}\n")}}sub walk_down {my($self,$cb,$pre)=@_;$self->_do_walk_down($self->{scandeps_tree},$cb,0,$pre)}sub _do_walk_down {my($self,$children,$cb,$depth,$pre)=@_;for my$node (@$children){$cb->($node->[0],$depth)if$pre;$self->_do_walk_down($node->[1],$cb,$depth + 1,$pre);$cb->($node->[0],$depth)unless$pre}}sub DESTROY {my$self=shift;$self->{at_exit}->($self)if$self->{at_exit}}sub shell_quote {my($self,@stuff)=@_;if (WIN32){join ' ',map {/^${quote}.+${quote}$/ ? $_ : ($quote .$_ .$quote)}@stuff}else {String::ShellQuote::shell_quote_best_effort(@stuff)}}sub which {my($self,$name)=@_;if (File::Spec->file_name_is_absolute($name)){if (-x $name &&!-d _){return$name}}my$exe_ext=$Config{_exe};for my$dir (File::Spec->path){my$fullpath=File::Spec->catfile($dir,$name);if ((-x $fullpath || -x ($fullpath .= $exe_ext))&&!-d _){if ($fullpath =~ /\s/){$fullpath=$self->shell_quote($fullpath)}return$fullpath}}return}sub get {my($self,$uri)=@_;if ($uri =~ /^file:/){$self->file_get($uri)}else {$self->{_backends}{get}->(@_)}}sub mirror {my($self,$uri,$local)=@_;if ($uri =~ /^file:/){$self->file_mirror($uri,$local)}else {$self->{_backends}{mirror}->(@_)}}sub untar {$_[0]->{_backends}{untar}->(@_)};sub unzip {$_[0]->{_backends}{unzip}->(@_)};sub uri_to_file {my($self,$uri)=@_;if ($uri =~ s!file:/+!!){$uri="/$uri" unless$uri =~ m![a-zA-Z]:!}return$uri}sub file_get {my($self,$uri)=@_;my$file=$self->uri_to_file($uri);open my$fh,"<$file" or return;join '',<$fh>}sub file_mirror {my($self,$uri,$path)=@_;my$file=$self->uri_to_file($uri);File::Copy::copy($file,$path)}sub has_working_lwp {my($self,$mirrors)=@_;my$https=grep /^https:/,@$mirrors;eval {require LWP::UserAgent;LWP::UserAgent->VERSION(5.802);require LWP::Protocol::https if$https;1}}sub init_tools {my$self=shift;return if$self->{initialized}++;if ($self->{make}=$self->which($Config{make})){$self->chat("You have make $self->{make}\n")}if ($self->{try_lwp}&& $self->has_working_lwp($self->{mirrors})){$self->chat("You have LWP $LWP::VERSION\n");my$ua=sub {LWP::UserAgent->new(parse_head=>0,env_proxy=>1,agent=>$self->agent,timeout=>30,@_,)};$self->{_backends}{get}=sub {my$self=shift;my$res=$ua->()->request(HTTP::Request->new(GET=>$_[0]));return unless$res->is_success;return$res->decoded_content};$self->{_backends}{mirror}=sub {my$self=shift;my$res=$ua->()->mirror(@_);die$res->content if$res->code==501;$res->code}}elsif ($self->{try_wget}and my$wget=$self->which('wget')){$self->chat("You have $wget\n");my@common=('--user-agent',$self->agent,'--retry-connrefused',($self->{verbose}? (): ('-q')),);$self->{_backends}{get}=sub {my($self,$uri)=@_;$self->safeexec(my$fh,$wget,$uri,@common,'-O','-')or die "wget $uri: $!";local $/;<$fh>};$self->{_backends}{mirror}=sub {my($self,$uri,$path)=@_;$self->safeexec(my$fh,$wget,$uri,@common,'-O',$path)or die "wget $uri: $!";local $/;<$fh>}}elsif ($self->{try_curl}and my$curl=$self->which('curl')){$self->chat("You have $curl\n");my@common=('--location','--user-agent',$self->agent,($self->{verbose}? (): '-s'),);$self->{_backends}{get}=sub {my($self,$uri)=@_;$self->safeexec(my$fh,$curl,@common,$uri)or die "curl $uri: $!";local $/;<$fh>};$self->{_backends}{mirror}=sub {my($self,$uri,$path)=@_;$self->safeexec(my$fh,$curl,@common,$uri,'-#','-o',$path)or die "curl $uri: $!";local $/;<$fh>}}else {require HTTP::Tiny;$self->chat("Falling back to HTTP::Tiny $HTTP::Tiny::VERSION\n");my%common=(agent=>$self->agent,);$self->{_backends}{get}=sub {my$self=shift;my$res=HTTP::Tiny->new(%common)->get($_[0]);return unless$res->{success};return$res->{content}};$self->{_backends}{mirror}=sub {my$self=shift;my$res=HTTP::Tiny->new(%common)->mirror(@_);return$res->{status}}}my$tar=$self->which('tar');my$tar_ver;my$maybe_bad_tar=sub {WIN32 || BAD_TAR || (($tar_ver=`$tar --version 2>/dev/null`)=~ /GNU.*1\.13/i)};if ($tar &&!$maybe_bad_tar->()){chomp$tar_ver;$self->chat("You have $tar: $tar_ver\n");$self->{_backends}{untar}=sub {my($self,$tarfile)=@_;my$xf=($self->{verbose}? 'v' : '')."xf";my$ar=$tarfile =~ /bz2$/ ? 'j' : 'z';my($root,@others)=`$tar ${ar}tf $tarfile` or return undef;FILE: {chomp$root;$root =~ s!^\./!!;$root =~ s{^(.+?)/.*$}{$1};if (!length($root)){$root=shift(@others);redo FILE if$root}}system "$tar $ar$xf $tarfile";return$root if -d $root;$self->diag_fail("Bad archive: $tarfile");return undef}}elsif ($tar and my$gzip=$self->which('gzip')and my$bzip2=$self->which('bzip2')){$self->chat("You have $tar, $gzip and $bzip2\n");$self->{_backends}{untar}=sub {my($self,$tarfile)=@_;my$x="x" .($self->{verbose}? 'v' : '')."f -";my$ar=$tarfile =~ /bz2$/ ? $bzip2 : $gzip;my($root,@others)=`$ar -dc $tarfile | $tar tf -` or return undef;FILE: {chomp$root;$root =~ s!^\./!!;$root =~ s{^(.+?)/.*$}{$1};if (!length($root)){$root=shift(@others);redo FILE if$root}}system "$ar -dc $tarfile | $tar $x";return$root if -d $root;$self->diag_fail("Bad archive: $tarfile");return undef}}elsif (eval {require Archive::Tar}){$self->chat("Falling back to Archive::Tar $Archive::Tar::VERSION\n");$self->{_backends}{untar}=sub {my$self=shift;my$t=Archive::Tar->new($_[0]);my($root,@others)=$t->list_files;FILE: {$root =~ s!^\./!!;$root =~ s{^(.+?)/.*$}{$1};if (!length($root)){$root=shift(@others);redo FILE if$root}}$t->extract;return -d $root ? $root : undef}}else {$self->{_backends}{untar}=sub {die "Failed to extract $_[1] - You need to have tar or Archive::Tar installed.\n"}}if (my$unzip=$self->which('unzip')){$self->chat("You have $unzip\n");$self->{_backends}{unzip}=sub {my($self,$zipfile)=@_;my$opt=$self->{verbose}? '' : '-q';my(undef,$root,@others)=`$unzip -t $zipfile` or return undef;chomp$root;$root =~ s{^\s+testing:\s+([^/]+)/.*?\s+OK$}{$1};system "$unzip $opt $zipfile";return$root if -d $root;$self->diag_fail("Bad archive: [$root] $zipfile");return undef}}else {$self->{_backends}{unzip}=sub {eval {require Archive::Zip}or die "Failed to extract $_[1] - You need to have unzip or Archive::Zip installed.\n";my($self,$file)=@_;my$zip=Archive::Zip->new();my$status;$status=$zip->read($file);$self->diag_fail("Read of file[$file] failed")if$status!=Archive::Zip::AZ_OK();my@members=$zip->members();for my$member (@members){my$af=$member->fileName();next if ($af =~ m!^(/|\.\./)!);$status=$member->extractToFileNamed($af);$self->diag_fail("Extracting of file[$af] from zipfile[$file failed")if$status!=Archive::Zip::AZ_OK()}my ($root)=$zip->membersMatching(qr<^[^/]+/$>);$root &&= $root->fileName;return -d $root ? $root : undef}}}sub safeexec {my$self=shift;my$rdr=$_[0]||= Symbol::gensym();if (WIN32){my$cmd=$self->shell_quote(@_[1..$#_]);return open($rdr,"$cmd |")}if (my$pid=open($rdr,'-|')){return$pid}elsif (defined$pid){exec(@_[1 .. $#_ ]);exit 1}else {return}}sub mask_uri_passwords {my($self,@strings)=@_;s{ (https?://) ([^:/]+) : [^@/]+ @ }{$1$2:********@}gx for@strings;return@strings}1;
+ package App::cpanminus::script;use strict;use Config;use Cwd ();use App::cpanminus;use App::cpanminus::Dependency;use File::Basename ();use File::Find ();use File::Path ();use File::Spec ();use File::Copy ();use File::Temp ();use Getopt::Long ();use Symbol ();use String::ShellQuote ();use version ();use constant WIN32=>$^O eq 'MSWin32';use constant BAD_TAR=>($^O eq 'solaris' || $^O eq 'hpux');use constant CAN_SYMLINK=>eval {symlink("","");1};our$VERSION=$App::cpanminus::VERSION;if ($INC{"App/FatPacker/Trace.pm"}){require version::vpp}my$quote=WIN32 ? q/"/ : q/'/;sub agent {my$self=shift;my$agent="cpanminus/$VERSION";$agent .= " perl/$]" if$self->{report_perl_version};$agent}sub determine_home {my$class=shift;my$homedir=$ENV{HOME}|| eval {require File::HomeDir;File::HomeDir->my_home}|| join('',@ENV{qw(HOMEDRIVE HOMEPATH)});if (WIN32){require Win32;$homedir=Win32::GetShortPathName($homedir)}return "$homedir/.cpanm"}sub new {my$class=shift;bless {home=>$class->determine_home,cmd=>'install',seen=>{},notest=>undef,test_only=>undef,installdeps=>undef,force=>undef,sudo=>undef,make=>undef,verbose=>undef,quiet=>undef,interactive=>undef,log=>undef,mirrors=>[],mirror_only=>undef,mirror_index=>undef,cpanmetadb=>"http://cpanmetadb.plackperl.org/v1.0/",perl=>$^X,argv=>[],local_lib=>undef,self_contained=>undef,exclude_vendor=>undef,prompt_timeout=>0,prompt=>undef,configure_timeout=>60,build_timeout=>3600,test_timeout=>1800,try_lwp=>1,try_wget=>1,try_curl=>1,uninstall_shadows=>($] < 5.012),skip_installed=>1,skip_satisfied=>0,auto_cleanup=>7,pod2man=>1,installed_dists=>0,install_types=>['requires'],with_develop=>0,showdeps=>0,scandeps=>0,scandeps_tree=>[],format=>'tree',save_dists=>undef,skip_configure=>0,verify=>0,report_perl_version=>!$class->maybe_ci,build_args=>{},features=>{},pure_perl=>0,cpanfile_path=>'cpanfile',@_,},$class}sub env {my($self,$key)=@_;$ENV{"PERL_CPANM_" .$key}}sub maybe_ci {my$class=shift;grep$ENV{$_},qw(TRAVIS CI AUTOMATED_TESTING AUTHOR_TESTING)}sub install_type_handlers {my$self=shift;my@handlers;for my$type (qw(recommends suggests)){push@handlers,"with-$type"=>sub {my%uniq;$self->{install_types}=[grep!$uniq{$_}++,@{$self->{install_types}},$type ]};push@handlers,"without-$type"=>sub {$self->{install_types}=[grep $_ ne $type,@{$self->{install_types}}]}}@handlers}sub build_args_handlers {my$self=shift;my@handlers;for my$phase (qw(configure build test install)){push@handlers,"$phase-args=s"=>\($self->{build_args}{$phase})}@handlers}sub parse_options {my$self=shift;local@ARGV=@{$self->{argv}};push@ARGV,grep length,split /\s+/,$self->env('OPT');push@ARGV,@_;Getopt::Long::Configure("bundling");Getopt::Long::GetOptions('f|force'=>sub {$self->{skip_installed}=0;$self->{force}=1},'n|notest!'=>\$self->{notest},'test-only'=>sub {$self->{notest}=0;$self->{skip_installed}=0;$self->{test_only}=1},'S|sudo!'=>\$self->{sudo},'v|verbose'=>\$self->{verbose},'verify!'=>\$self->{verify},'q|quiet!'=>\$self->{quiet},'h|help'=>sub {$self->{action}='show_help'},'V|version'=>sub {$self->{action}='show_version'},'perl=s'=>sub {$self->diag("--perl is deprecated since it's known to be fragile in figuring out dependencies. Run `$_[1] -S cpanm` instead.\n",1);$self->{perl}=$_[1]},'l|local-lib=s'=>sub {$self->{local_lib}=$self->maybe_abs($_[1])},'L|local-lib-contained=s'=>sub {$self->{local_lib}=$self->maybe_abs($_[1]);$self->{self_contained}=1;$self->{pod2man}=undef},'self-contained!'=>\$self->{self_contained},'exclude-vendor!'=>\$self->{exclude_vendor},'mirror=s@'=>$self->{mirrors},'mirror-only!'=>\$self->{mirror_only},'mirror-index=s'=>sub {$self->{mirror_index}=$self->maybe_abs($_[1])},'M|from=s'=>sub {$self->{mirrors}=[$_[1]];$self->{mirror_only}=1},'cpanmetadb=s'=>\$self->{cpanmetadb},'cascade-search!'=>\$self->{cascade_search},'prompt!'=>\$self->{prompt},'installdeps'=>\$self->{installdeps},'skip-installed!'=>\$self->{skip_installed},'skip-satisfied!'=>\$self->{skip_satisfied},'reinstall'=>sub {$self->{skip_installed}=0},'interactive!'=>\$self->{interactive},'i|install'=>sub {$self->{cmd}='install'},'info'=>sub {$self->{cmd}='info'},'look'=>sub {$self->{cmd}='look';$self->{skip_installed}=0},'U|uninstall'=>sub {$self->{cmd}='uninstall'},'self-upgrade'=>sub {$self->{action}='self_upgrade'},'uninst-shadows!'=>\$self->{uninstall_shadows},'lwp!'=>\$self->{try_lwp},'wget!'=>\$self->{try_wget},'curl!'=>\$self->{try_curl},'auto-cleanup=s'=>\$self->{auto_cleanup},'man-pages!'=>\$self->{pod2man},'scandeps'=>\$self->{scandeps},'showdeps'=>sub {$self->{showdeps}=1;$self->{skip_installed}=0},'format=s'=>\$self->{format},'save-dists=s'=>sub {$self->{save_dists}=$self->maybe_abs($_[1])},'skip-configure!'=>\$self->{skip_configure},'dev!'=>\$self->{dev_release},'metacpan!'=>\$self->{metacpan},'report-perl-version!'=>\$self->{report_perl_version},'configure-timeout=i'=>\$self->{configure_timeout},'build-timeout=i'=>\$self->{build_timeout},'test-timeout=i'=>\$self->{test_timeout},'with-develop'=>\$self->{with_develop},'without-develop'=>sub {$self->{with_develop}=0},'with-feature=s'=>sub {$self->{features}{$_[1]}=1},'without-feature=s'=>sub {$self->{features}{$_[1]}=0},'with-all-features'=>sub {$self->{features}{__all}=1},'pp|pureperl!'=>\$self->{pure_perl},"cpanfile=s"=>\$self->{cpanfile_path},$self->install_type_handlers,$self->build_args_handlers,);if (!@ARGV && $0 ne '-' &&!-t STDIN){push@ARGV,$self->load_argv_from_fh(\*STDIN);$self->{load_from_stdin}=1}$self->{argv}=\@ARGV}sub check_upgrade {my$self=shift;my$install_base=$ENV{PERL_LOCAL_LIB_ROOT}? $self->local_lib_target($ENV{PERL_LOCAL_LIB_ROOT}): $Config{installsitebin};if ($0 eq '-'){return}elsif ($0 !~ /^$install_base/){if ($0 =~ m!perlbrew/bin!){die <<DIE}else {die <<DIE}}}sub check_libs {my$self=shift;return if$self->{_checked}++;$self->bootstrap_local_lib;if (@{$self->{bootstrap_deps}|| []}){local$self->{notest}=1;local$self->{scandeps}=0;$self->install_deps(Cwd::cwd,0,@{$self->{bootstrap_deps}})}}sub setup_verify {my$self=shift;my$has_modules=eval {require Module::Signature;require Digest::SHA;1};$self->{cpansign}=$self->which('cpansign');unless ($has_modules && $self->{cpansign}){warn "WARNING: Module::Signature and Digest::SHA is required for distribution verifications.\n";$self->{verify}=0}}sub parse_module_args {my($self,$module)=@_;$module =~ s/^([A-Za-z0-9_:]+)@([v\d\._]+)$/$1~== $2/;if ($module =~ /\~[v\d\._,\!<>= ]+$/){return split /\~/,$module,2}else {return$module,undef}}sub doit {my$self=shift;my$code;eval {$code=($self->_doit==0)};if (my$e=$@){warn$e;$code=1}return$code}sub _doit {my$self=shift;$self->setup_home;$self->init_tools;$self->setup_verify if$self->{verify};if (my$action=$self->{action}){$self->$action()and return 1}return$self->show_help(1)unless @{$self->{argv}}or $self->{load_from_stdin};$self->configure_mirrors;my$cwd=Cwd::cwd;my@fail;for my$module (@{$self->{argv}}){if ($module =~ s/\.pm$//i){my ($volume,$dirs,$file)=File::Spec->splitpath($module);$module=join '::',grep {$_}File::Spec->splitdir($dirs),$file}($module,my$version)=$self->parse_module_args($module);$self->chdir($cwd);if ($self->{cmd}eq 'uninstall'){$self->uninstall_module($module)or push@fail,$module}else {$self->install_module($module,0,$version)or push@fail,$module}}if ($self->{base}&& $self->{auto_cleanup}){$self->cleanup_workdirs}if ($self->{installed_dists}){my$dists=$self->{installed_dists}> 1 ? "distributions" : "distribution";$self->diag("$self->{installed_dists} $dists installed\n",1)}if ($self->{scandeps}){$self->dump_scandeps()}$self->chdir($cwd);return!@fail}sub setup_home {my$self=shift;$self->{home}=$self->env('HOME')if$self->env('HOME');unless (_writable($self->{home})){die "Can't write to cpanm home '$self->{home}': You should fix it with chown/chmod first.\n"}$self->{base}="$self->{home}/work/" .time .".$$";File::Path::mkpath([$self->{base}],0,0777);$self->{log}=File::Spec->catfile($self->{base},"build.log");my$final_log="$self->{home}/build.log";{open my$out,">$self->{log}" or die "$self->{log}: $!"}if (CAN_SYMLINK){my$build_link="$self->{home}/latest-build";unlink$build_link;symlink$self->{base},$build_link;unlink$final_log;symlink$self->{log},$final_log}else {my$log=$self->{log};my$home=$self->{home};$self->{at_exit}=sub {my$self=shift;my$temp_log="$home/build.log." .time .".$$";File::Copy::copy($log,$temp_log)&& unlink($final_log);rename($temp_log,$final_log)}}$self->chat("cpanm (App::cpanminus) $VERSION on perl $] built for $Config{archname}\n" ."Work directory is $self->{base}\n")}sub package_index_for {my ($self,$mirror)=@_;return$self->source_for($mirror)."/02packages.details.txt"}sub generate_mirror_index {my ($self,$mirror)=@_;my$file=$self->package_index_for($mirror);my$gz_file=$file .'.gz';my$index_mtime=(stat$gz_file)[9];unless (-e $file && (stat$file)[9]>= $index_mtime){$self->chat("Uncompressing index file...\n");if (eval {require Compress::Zlib}){my$gz=Compress::Zlib::gzopen($gz_file,"rb")or do {$self->diag_fail("$Compress::Zlib::gzerrno opening compressed index");return};open my$fh,'>',$file or do {$self->diag_fail("$! opening uncompressed index for write");return};my$buffer;while (my$status=$gz->gzread($buffer)){if ($status < 0){$self->diag_fail($gz->gzerror ." reading compressed index");return}print$fh $buffer}}else {if (system("gunzip -c $gz_file > $file")){$self->diag_fail("Cannot uncompress -- please install gunzip or Compress::Zlib");return}}utime$index_mtime,$index_mtime,$file}return 1}sub search_mirror_index {my ($self,$mirror,$module,$version)=@_;$self->search_mirror_index_file($self->package_index_for($mirror),$module,$version)}sub search_mirror_index_file {my($self,$file,$module,$version)=@_;open my$fh,'<',$file or return;my$found;while (<$fh>){if (m!^\Q$module\E\s+([\w\.]+)\s+(\S*)!m){$found=$self->cpan_module($module,$2,$1);last}}return$found unless$self->{cascade_search};if ($found){if ($self->satisfy_version($module,$found->{module_version},$version)){return$found}else {$self->chat("Found $module $found->{module_version} which doesn't satisfy $version.\n")}}return}sub with_version_range {my($self,$version)=@_;defined($version)&& $version =~ /(?:<|!=|==)/}sub encode_json {my($self,$data)=@_;require JSON::PP;my$json=JSON::PP::encode_json($data);$json =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;$json}sub version_to_query {my($self,$module,$version)=@_;require CPAN::Meta::Requirements;my$requirements=CPAN::Meta::Requirements->new;$requirements->add_string_requirement($module,$version || '0');my$req=$requirements->requirements_for_module($module);if ($req =~ s/^==\s*//){return {term=>{'module.version'=>$req },}}elsif ($req !~ /\s/){return {range=>{'module.version_numified'=>{'gte'=>$self->numify_ver_metacpan($req)}},}}else {my%ops=qw(< lt <= lte > gt >= gte);my(%range,@exclusion);my@requirements=split /,\s*/,$req;for my$r (@requirements){if ($r =~ s/^([<>]=?)\s*//){$range{$ops{$1}}=$self->numify_ver_metacpan($r)}elsif ($r =~ s/\!=\s*//){push@exclusion,$self->numify_ver_metacpan($r)}}my@filters=({range=>{'module.version_numified'=>\%range }},);if (@exclusion){push@filters,{not=>{or=>[map {+{term=>{'module.version_numified'=>$self->numify_ver_metacpan($_)}}}@exclusion ]},}}return@filters}}sub numify_ver_metacpan {my($self,$ver)=@_;$ver =~ s/_//g;version->new($ver)->numify}sub numify_ver {my($self,$ver)=@_;eval version->new($ver)->numify}sub maturity_filter {my($self,$module,$version)=@_;if ($version =~ /==/){return}elsif ($self->{dev_release}){return +{not=>{term=>{status=>'backpan' }}}}else {return ({not=>{term=>{status=>'backpan' }}},{term=>{maturity=>'released' }},)}}sub by_version {my%s=qw(latest 3 cpan 2 backpan 1);$b->{_score}<=> $a->{_score}|| $s{$b->{fields}{status}}<=> $s{$a->{fields}{status}}}sub by_first_come {$a->{fields}{date}cmp $b->{fields}{date}}sub by_date {$b->{fields}{date}cmp $a->{fields}{date}}sub find_best_match {my($self,$match,$version)=@_;return unless$match && @{$match->{hits}{hits}|| []};my@hits=$self->{dev_release}? sort {by_version || by_date}@{$match->{hits}{hits}}: sort {by_version || by_first_come}@{$match->{hits}{hits}};$hits[0]->{fields}}sub search_metacpan {my($self,$module,$version)=@_;require JSON::PP;$self->chat("Searching $module ($version) on metacpan ...\n");my$metacpan_uri='http://api.metacpan.org/v0';my@filter=$self->maturity_filter($module,$version);my$query={filtered=>{(@filter ? (filter=>{and=>\@filter }): ()),query=>{nested=>{score_mode=>'max',path=>'module',query=>{custom_score=>{metacpan_script=>"score_version_numified",query=>{constant_score=>{filter=>{and=>[{term=>{'module.authorized'=>JSON::PP::true()}},{term=>{'module.indexed'=>JSON::PP::true()}},{term=>{'module.name'=>$module }},$self->version_to_query($module,$version),]}}},}},}},}};my$module_uri="$metacpan_uri/file/_search?source=";$module_uri .= $self->encode_json({query=>$query,fields=>['date','release','author','module','status' ],});my($release,$author,$module_version);my$module_json=$self->get($module_uri);my$module_meta=eval {JSON::PP::decode_json($module_json)};my$match=$self->find_best_match($module_meta);if ($match){$release=$match->{release};$author=$match->{author};my$module_matched=(grep {$_->{name}eq $module}@{$match->{module}})[0];$module_version=$module_matched->{version}}unless ($release){$self->chat("! Could not find a release matching $module ($version) on MetaCPAN.\n");return}my$dist_uri="$metacpan_uri/release/_search?source=";$dist_uri .= $self->encode_json({filter=>{and=>[{term=>{'release.name'=>$release }},{term=>{'release.author'=>$author }},]},fields=>['download_url','stat','status' ],});my$dist_json=$self->get($dist_uri);my$dist_meta=eval {JSON::PP::decode_json($dist_json)};if ($dist_meta){$dist_meta=$dist_meta->{hits}{hits}[0]{fields}}if ($dist_meta && $dist_meta->{download_url}){(my$distfile=$dist_meta->{download_url})=~ s!.+/authors/id/!!;local$self->{mirrors}=$self->{mirrors};if ($dist_meta->{status}eq 'backpan'){$self->{mirrors}=['http://backpan.perl.org' ]}elsif ($dist_meta->{stat}{mtime}> time()-24*60*60){$self->{mirrors}=['http://cpan.metacpan.org' ]}return$self->cpan_module($module,$distfile,$module_version)}$self->diag_fail("Finding $module on metacpan failed.");return}sub search_database {my($self,$module,$version)=@_;my$found;if ($self->{dev_release}or $self->{metacpan}){$found=$self->search_metacpan($module,$version)and return$found;$found=$self->search_cpanmetadb($module,$version)and return$found}else {$found=$self->search_cpanmetadb($module,$version)and return$found;$found=$self->search_metacpan($module,$version)and return$found}}sub search_cpanmetadb {my($self,$module,$version)=@_;$self->chat("Searching $module ($version) on cpanmetadb ...\n");if ($self->with_version_range($version)){return$self->search_cpanmetadb_history($module,$version)}else {return$self->search_cpanmetadb_package($module,$version)}}sub search_cpanmetadb_package {my($self,$module,$version)=@_;require CPAN::Meta::YAML;(my$uri=$self->{cpanmetadb})=~ s{/?$}{/package/$module};my$yaml=$self->get($uri);my$meta=eval {CPAN::Meta::YAML::Load($yaml)};if ($meta && $meta->{distfile}){return$self->cpan_module($module,$meta->{distfile},$meta->{version})}$self->diag_fail("Finding $module on cpanmetadb failed.");return}sub search_cpanmetadb_history {my($self,$module,$version)=@_;(my$uri=$self->{cpanmetadb})=~ s{/?$}{/history/$module};my$content=$self->get($uri)or return;my@found;for my$line (split /\r?\n/,$content){if ($line =~ /^$module\s+(\S+)\s+(\S+)$/){push@found,{version=>$1,version_obj=>version::->parse($1),distfile=>$2,}}}return unless@found;$found[-1]->{latest}=1;my$match;for my$try (sort {$b->{version_obj}cmp $a->{version_obj}}@found){if ($self->satisfy_version($module,$try->{version_obj},$version)){local$self->{mirrors}=$self->{mirrors};unshift @{$self->{mirrors}},'http://backpan.perl.org' unless$try->{latest};return$self->cpan_module($module,$try->{distfile},$try->{version})}}$self->diag_fail("Finding $module ($version) on cpanmetadb failed.");return}sub search_module {my($self,$module,$version)=@_;if ($self->{mirror_index}){$self->mask_output(chat=>"Searching $module on mirror index $self->{mirror_index} ...\n");my$pkg=$self->search_mirror_index_file($self->{mirror_index},$module,$version);return$pkg if$pkg;unless ($self->{cascade_search}){$self->mask_output(diag_fail=>"Finding $module ($version) on mirror index $self->{mirror_index} failed.");return}}unless ($self->{mirror_only}){my$found=$self->search_database($module,$version);return$found if$found}MIRROR: for my$mirror (@{$self->{mirrors}}){$self->mask_output(chat=>"Searching $module on mirror $mirror ...\n");my$name='02packages.details.txt.gz';my$uri="$mirror/modules/$name";my$gz_file=$self->package_index_for($mirror).'.gz';unless ($self->{pkgs}{$uri}){$self->mask_output(chat=>"Downloading index file $uri ...\n");$self->mirror($uri,$gz_file);$self->generate_mirror_index($mirror)or next MIRROR;$self->{pkgs}{$uri}="!!retrieved!!"}my$pkg=$self->search_mirror_index($mirror,$module,$version);return$pkg if$pkg;$self->mask_output(diag_fail=>"Finding $module ($version) on mirror $mirror failed.")}return}sub source_for {my($self,$mirror)=@_;$mirror =~ s/[^\w\.\-]+/%/g;my$dir="$self->{home}/sources/$mirror";File::Path::mkpath([$dir ],0,0777);return$dir}sub load_argv_from_fh {my($self,$fh)=@_;my@argv;while(defined(my$line=<$fh>)){chomp$line;$line =~ s/#.+$//;$line =~ s/^\s+//;$line =~ s/\s+$//;push@argv,split ' ',$line if$line}return@argv}sub show_version {my$self=shift;print "cpanm (App::cpanminus) version $VERSION ($0)\n";print "perl version $] ($^X)\n\n";print " \%Config:\n";for my$key (qw(archname installsitelib installsitebin installman1dir installman3dir sitearchexp sitelibexp vendorarch vendorlibexp archlibexp privlibexp)){print " $key=$Config{$key}\n" if$Config{$key}}print " \%ENV:\n";for my$key (grep /^PERL/,sort keys%ENV){print " $key=$ENV{$key}\n"}print " \@INC:\n";for my$inc (@INC){print " $inc\n" unless ref($inc)eq 'CODE'}return 1}sub show_help {my$self=shift;if ($_[0]){print <<USAGE;return}print <<HELP;return 1}sub _writable {my$dir=shift;my@dir=File::Spec->splitdir($dir);while (@dir){$dir=File::Spec->catdir(@dir);if (-e $dir){return -w _}pop@dir}return}sub maybe_abs {my($self,$lib)=@_;if ($lib eq '_' or $lib =~ /^~/ or File::Spec->file_name_is_absolute($lib)){return$lib}else {return File::Spec->canonpath(File::Spec->catdir(Cwd::cwd(),$lib))}}sub local_lib_target {my($self,$root)=@_;(grep {$_ ne ''}split /\Q$Config{path_sep}/,$root)[0]}sub bootstrap_local_lib {my$self=shift;if ($self->{local_lib}){return$self->setup_local_lib($self->{local_lib})}if ($ENV{PERL_LOCAL_LIB_ROOT}&& $ENV{PERL_MM_OPT}){return$self->setup_local_lib($self->local_lib_target($ENV{PERL_LOCAL_LIB_ROOT}),1)}return if$self->{sudo}or (_writable($Config{installsitelib})and _writable($Config{installsitebin}));if ($ENV{PERL_MM_OPT}and ($ENV{MODULEBUILDRC}or $ENV{PERL_MB_OPT})){$self->bootstrap_local_lib_deps;return}$self->setup_local_lib;$self->diag(<<DIAG,1);sleep 2}sub _core_only_inc {my($self,$base)=@_;require local::lib;(local::lib->resolve_path(local::lib->install_base_arch_path($base)),local::lib->resolve_path(local::lib->install_base_perl_path($base)),(!$self->{exclude_vendor}? grep {$_}@Config{qw(vendorarch vendorlibexp)}: ()),@Config{qw(archlibexp privlibexp)},)}sub _diff {my($self,$old,$new)=@_;my@diff;my%old=map {$_=>1}@$old;for my$n (@$new){push@diff,$n unless exists$old{$n}}@diff}sub _setup_local_lib_env {my($self,$base)=@_;$self->diag(<<WARN,1)if$base =~ /\s/;local$SIG{__WARN__}=sub {};local::lib->setup_env_hash_for($base,0)}sub setup_local_lib {my($self,$base,$no_env)=@_;$base=undef if$base eq '_';require local::lib;{local $0='cpanm';$base ||= "~/perl5";$base=local::lib->resolve_path($base);if ($self->{self_contained}){my@inc=$self->_core_only_inc($base);$self->{search_inc}=[@inc ]}else {$self->{search_inc}=[local::lib->install_base_arch_path($base),local::lib->install_base_perl_path($base),@INC,]}$self->_setup_local_lib_env($base)unless$no_env;$self->{local_lib}=$base}$self->bootstrap_local_lib_deps}sub bootstrap_local_lib_deps {my$self=shift;push @{$self->{bootstrap_deps}},App::cpanminus::Dependency->new('ExtUtils::MakeMaker'=>6.58),App::cpanminus::Dependency->new('ExtUtils::Install'=>1.46)}sub prompt_bool {my($self,$mess,$def)=@_;my$val=$self->prompt($mess,$def);return lc$val eq 'y'}sub prompt {my($self,$mess,$def)=@_;my$isa_tty=-t STDIN && (-t STDOUT ||!(-f STDOUT || -c STDOUT));my$dispdef=defined$def ? "[$def] " : " ";$def=defined$def ? $def : "";if (!$self->{prompt}|| (!$isa_tty && eof STDIN)){return$def}local $|=1;local $\;my$ans;eval {local$SIG{ALRM}=sub {undef$ans;die "alarm\n"};print STDOUT "$mess $dispdef";alarm$self->{prompt_timeout}if$self->{prompt_timeout};$ans=<STDIN>;alarm 0};if (defined$ans){chomp$ans}else {print STDOUT "\n"}return (!defined$ans || $ans eq '')? $def : $ans}sub diag_ok {my($self,$msg)=@_;chomp$msg;$msg ||= "OK";if ($self->{in_progress}){$self->_diag("$msg\n");$self->{in_progress}=0}$self->log("-> $msg\n")}sub diag_fail {my($self,$msg,$always)=@_;chomp$msg;if ($self->{in_progress}){$self->_diag("FAIL\n");$self->{in_progress}=0}if ($msg){$self->_diag("! $msg\n",$always,1);$self->log("-> FAIL $msg\n")}}sub diag_progress {my($self,$msg)=@_;chomp$msg;$self->{in_progress}=1;$self->_diag("$msg ... ");$self->log("$msg\n")}sub _diag {my($self,$msg,$always,$error)=@_;my$fh=$error ? *STDERR : *STDOUT;print {$fh}$msg if$always or $self->{verbose}or!$self->{quiet}}sub diag {my($self,$msg,$always)=@_;$self->_diag($msg,$always);$self->log($msg)}sub chat {my$self=shift;print STDERR @_ if$self->{verbose};$self->log(@_)}sub mask_output {my$self=shift;my$method=shift;$self->$method($self->mask_uri_passwords(@_))}sub log {my$self=shift;open my$out,">>$self->{log}";print$out @_}sub run {my($self,$cmd)=@_;if (WIN32){$cmd=$self->shell_quote(@$cmd)if ref$cmd eq 'ARRAY';unless ($self->{verbose}){$cmd .= " >> " .$self->shell_quote($self->{log})." 2>&1"}!system$cmd}else {my$pid=fork;if ($pid){waitpid$pid,0;return!$?}else {$self->run_exec($cmd)}}}sub run_exec {my($self,$cmd)=@_;if (ref$cmd eq 'ARRAY'){unless ($self->{verbose}){open my$logfh,">>",$self->{log};open STDERR,'>&',$logfh;open STDOUT,'>&',$logfh;close$logfh}exec @$cmd}else {unless ($self->{verbose}){$cmd .= " >> " .$self->shell_quote($self->{log})." 2>&1"}exec$cmd}}sub run_timeout {my($self,$cmd,$timeout)=@_;return$self->run($cmd)if WIN32 || $self->{verbose}||!$timeout;my$pid=fork;if ($pid){eval {local$SIG{ALRM}=sub {die "alarm\n"};alarm$timeout;waitpid$pid,0;alarm 0};if ($@ && $@ eq "alarm\n"){$self->diag_fail("Timed out (> ${timeout}s). Use --verbose to retry.");local$SIG{TERM}='IGNORE';kill TERM=>0;waitpid$pid,0;return}return!$?}elsif ($pid==0){$self->run_exec($cmd)}else {$self->chat("! fork failed: falling back to system()\n");$self->run($cmd)}}sub append_args {my($self,$cmd,$phase)=@_;if (my$args=$self->{build_args}{$phase}){$cmd=join ' ',$self->shell_quote(@$cmd),$args}$cmd}sub configure {my($self,$cmd,$depth)=@_;local$ENV{PERL5_CPAN_IS_RUNNING}=local$ENV{PERL5_CPANPLUS_IS_RUNNING}=$$;local$ENV{PERL5_CPANM_IS_RUNNING}=$$;my$use_default=!$self->{interactive};local$ENV{PERL_MM_USE_DEFAULT}=$use_default;local$ENV{PERL_MM_OPT}=$ENV{PERL_MM_OPT};local$ENV{PERL_MB_OPT}=$ENV{PERL_MB_OPT};unless ($self->{pod2man}){$ENV{PERL_MM_OPT}.= " INSTALLMAN1DIR=none INSTALLMAN3DIR=none";$ENV{PERL_MB_OPT}.= " --config installman1dir= --config installsiteman1dir= --config installman3dir= --config installsiteman3dir="}if ($self->{pure_perl}){$ENV{PERL_MM_OPT}.= " PUREPERL_ONLY=1";$ENV{PERL_MB_OPT}.= " --pureperl-only"}$cmd=$self->append_args($cmd,'configure')if$depth==0;local$self->{verbose}=$self->{verbose}|| $self->{interactive};$self->run_timeout($cmd,$self->{configure_timeout})}sub build {my($self,$cmd,$distname,$depth)=@_;local$ENV{PERL_MM_USE_DEFAULT}=!$self->{interactive};$cmd=$self->append_args($cmd,'build')if$depth==0;return 1 if$self->run_timeout($cmd,$self->{build_timeout});while (1){my$ans=lc$self->prompt("Building $distname failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?","s");return if$ans eq 's';return$self->build($cmd,$distname,$depth)if$ans eq 'r';$self->show_build_log if$ans eq 'e';$self->look if$ans eq 'l'}}sub test {my($self,$cmd,$distname,$depth)=@_;return 1 if$self->{notest};local$ENV{PERL_MM_USE_DEFAULT}=!$self->{interactive};local$ENV{NONINTERACTIVE_TESTING}=!$self->{interactive};$cmd=$self->append_args($cmd,'test')if$depth==0;return 1 if$self->run_timeout($cmd,$self->{test_timeout});if ($self->{force}){$self->diag_fail("Testing $distname failed but installing it anyway.");return 1}else {$self->diag_fail;while (1){my$ans=lc$self->prompt("Testing $distname failed.\nYou can s)kip, r)etry, f)orce install, e)xamine build log, or l)ook ?","s");return if$ans eq 's';return$self->test($cmd,$distname,$depth)if$ans eq 'r';return 1 if$ans eq 'f';$self->show_build_log if$ans eq 'e';$self->look if$ans eq 'l'}}}sub install {my($self,$cmd,$uninst_opts,$depth)=@_;if ($depth==0 && $self->{test_only}){return 1}if ($self->{sudo}){unshift @$cmd,"sudo"}if ($self->{uninstall_shadows}&&!$ENV{PERL_MM_OPT}){push @$cmd,@$uninst_opts}$cmd=$self->append_args($cmd,'install')if$depth==0;$self->run($cmd)}sub look {my$self=shift;my$shell=$ENV{SHELL};$shell ||= $ENV{COMSPEC}if WIN32;if ($shell){my$cwd=Cwd::cwd;$self->diag("Entering $cwd with $shell\n");system$shell}else {$self->diag_fail("You don't seem to have a SHELL :/")}}sub show_build_log {my$self=shift;my@pagers=($ENV{PAGER},(WIN32 ? (): ('less')),'more');my$pager;while (@pagers){$pager=shift@pagers;next unless$pager;$pager=$self->which($pager);next unless$pager;last}if ($pager){system("$pager < $self->{log}")}else {$self->diag_fail("You don't seem to have a PAGER :/")}}sub chdir {my$self=shift;Cwd::chdir(File::Spec->canonpath($_[0]))or die "$_[0]: $!"}sub configure_mirrors {my$self=shift;unless (@{$self->{mirrors}}){$self->{mirrors}=['http://www.cpan.org' ]}for (@{$self->{mirrors}}){s!^/!file:///!;s!/$!!}}sub self_upgrade {my$self=shift;$self->check_upgrade;$self->{argv}=['App::cpanminus' ];return}sub install_module {my($self,$module,$depth,$version)=@_;$self->check_libs;if ($self->{seen}{$module}++){$self->chat("Already tried $module. Skipping.\n");return 1}if ($self->{skip_satisfied}){my($ok,$local)=$self->check_module($module,$version || 0);if ($ok){$self->diag("You have $module ($local)\n",1);return 1}}my$dist=$self->resolve_name($module,$version);unless ($dist){my$what=$module .($version ? " ($version)" : "");$self->diag_fail("Couldn't find module or a distribution $what",1);return}if ($dist->{distvname}&& $self->{seen}{$dist->{distvname}}++){$self->chat("Already tried $dist->{distvname}. Skipping.\n");return 1}if ($self->{cmd}eq 'info'){print$self->format_dist($dist),"\n";return 1}$dist->{depth}=$depth;if ($dist->{module}){unless ($self->satisfy_version($dist->{module},$dist->{module_version},$version)){$self->diag("Found $dist->{module} $dist->{module_version} which doesn't satisfy $version.\n",1);return}my$cmp=$version ? "==" : "";my$requirement=$dist->{module_version}? "$cmp$dist->{module_version}" : 0;my($ok,$local)=$self->check_module($dist->{module},$requirement);if ($self->{skip_installed}&& $ok){$self->diag("$dist->{module} is up to date. ($local)\n",1);return 1}}if ($dist->{dist}eq 'perl'){$self->diag("skipping $dist->{pathname}\n");return 1}$self->diag("--> Working on $module\n");$dist->{dir}||= $self->fetch_module($dist);unless ($dist->{dir}){$self->diag_fail("Failed to fetch distribution $dist->{distvname}",1);return}$self->chat("Entering $dist->{dir}\n");$self->chdir($self->{base});$self->chdir($dist->{dir});if ($self->{cmd}eq 'look'){$self->look;return 1}return$self->build_stuff($module,$dist,$depth)}sub uninstall_search_path {my$self=shift;$self->{local_lib}? (local::lib->install_base_arch_path($self->{local_lib}),local::lib->install_base_perl_path($self->{local_lib})): @Config{qw(installsitearch installsitelib)}}sub uninstall_module {my ($self,$module)=@_;$self->check_libs;my@inc=$self->uninstall_search_path;my($metadata,$packlist)=$self->packlists_containing($module,\@inc);unless ($packlist){$self->diag_fail(<<DIAG,1);return}my@uninst_files=$self->uninstall_target($metadata,$packlist);$self->ask_permission($module,\@uninst_files)or return;$self->uninstall_files(@uninst_files,$packlist);$self->diag("Successfully uninstalled $module\n",1);return 1}sub packlists_containing {my($self,$module,$inc)=@_;require Module::Metadata;my$metadata=Module::Metadata->new_from_module($module,inc=>$inc)or return;my$packlist;my$wanted=sub {return unless $_ eq '.packlist' && -f $_;for my$file ($self->unpack_packlist($File::Find::name)){$packlist ||= $File::Find::name if$file eq $metadata->filename}};{require File::pushd;my$pushd=File::pushd::pushd();my@search=grep -d $_,map File::Spec->catdir($_,'auto'),@$inc;File::Find::find($wanted,@search)}return$metadata,$packlist}sub uninstall_target {my($self,$metadata,$packlist)=@_;if ($self->has_shadow_install($metadata)or $self->{local_lib}){grep$self->should_unlink($_),$self->unpack_packlist($packlist)}else {$self->unpack_packlist($packlist)}}sub has_shadow_install {my($self,$metadata)=@_;my@shadow=grep defined,map Module::Metadata->new_from_module($metadata->name,inc=>[$_]),@INC;@shadow >= 2}sub should_unlink {my($self,$file)=@_;if ($self->{local_lib}){$file =~ /^\Q$self->{local_lib}\E/}else {!(grep$file =~ /^\Q$_\E/,@Config{qw(installbin installscript installman1dir installman3dir)})}}sub ask_permission {my ($self,$module,$files)=@_;$self->diag("$module contains the following files:\n\n");for my$file (@$files){$self->diag(" $file\n")}$self->diag("\n");return 'force uninstall' if$self->{force};local$self->{prompt}=1;return$self->prompt_bool("Are you sure you want to uninstall $module?",'y')}sub unpack_packlist {my ($self,$packlist)=@_;open my$fh,'<',$packlist or die "$packlist: $!";map {chomp;$_}<$fh>}sub uninstall_files {my ($self,@files)=@_;$self->diag("\n");for my$file (@files){$self->diag("Unlink: $file\n");unlink$file or $self->diag_fail("$!: $file")}$self->diag("\n");return 1}sub format_dist {my($self,$dist)=@_;return "$dist->{cpanid}/$dist->{filename}"}sub trim {local $_=shift;tr/\n/ /d;s/^\s*|\s*$//g;$_}sub fetch_module {my($self,$dist)=@_;$self->chdir($self->{base});for my$uri (@{$dist->{uris}}){$self->mask_output(diag_progress=>"Fetching $uri");my$filename=$dist->{filename}|| $uri;my$name=File::Basename::basename($filename);my$cancelled;my$fetch=sub {my$file;eval {local$SIG{INT}=sub {$cancelled=1;die "SIGINT\n"};$self->mirror($uri,$name);$file=$name if -e $name};$self->diag("ERROR: " .trim("$@")."\n",1)if $@ && $@ ne "SIGINT\n";return$file};my($try,$file);while ($try++ < 3){$file=$fetch->();last if$cancelled or $file;$self->mask_output(diag_fail=>"Download $uri failed. Retrying ... ")}if ($cancelled){$self->diag_fail("Download cancelled.");return}unless ($file){$self->mask_output(diag_fail=>"Failed to download $uri");next}$self->diag_ok;$dist->{local_path}=File::Spec->rel2abs($name);my$dir=$self->unpack($file,$uri,$dist);next unless$dir;if (my$save=$self->{save_dists}){my$path=$dist->{pathname}? "$save/authors/id/$dist->{pathname}" : "$save/vendor/$file";$self->chat("Copying $name to $path\n");File::Path::mkpath([File::Basename::dirname($path)],0,0777);File::Copy::copy($file,$path)or warn $!}return$dist,$dir}}sub unpack {my($self,$file,$uri,$dist)=@_;if ($self->{verify}){$self->verify_archive($file,$uri,$dist)or return}$self->chat("Unpacking $file\n");my$dir=$file =~ /\.zip/i ? $self->unzip($file): $self->untar($file);unless ($dir){$self->diag_fail("Failed to unpack $file: no directory")}return$dir}sub verify_checksums_signature {my($self,$chk_file)=@_;require Module::Signature;$self->chat("Verifying the signature of CHECKSUMS\n");my$rv=eval {local$SIG{__WARN__}=sub {};my$v=Module::Signature::_verify($chk_file);$v==Module::Signature::SIGNATURE_OK()};if ($rv){$self->chat("Verified OK!\n")}else {$self->diag_fail("Verifying CHECKSUMS signature failed: $rv\n");return}return 1}sub verify_archive {my($self,$file,$uri,$dist)=@_;unless ($dist->{cpanid}){$self->chat("Archive '$file' does not seem to be from PAUSE. Skip verification.\n");return 1}(my$mirror=$uri)=~ s!/authors/id.*$!!;(my$chksum_uri=$uri)=~ s!/[^/]*$!/CHECKSUMS!;my$chk_file=$self->source_for($mirror)."/$dist->{cpanid}.CHECKSUMS";$self->mask_output(diag_progress=>"Fetching $chksum_uri");$self->mirror($chksum_uri,$chk_file);unless (-e $chk_file){$self->diag_fail("Fetching $chksum_uri failed.\n");return}$self->diag_ok;$self->verify_checksums_signature($chk_file)or return;$self->verify_checksum($file,$chk_file)}sub verify_checksum {my($self,$file,$chk_file)=@_;$self->chat("Verifying the SHA1 for $file\n");open my$fh,"<$chk_file" or die "$chk_file: $!";my$data=join '',<$fh>;$data =~ s/\015?\012/\n/g;require Safe;my$chksum=Safe->new->reval($data);if (!ref$chksum or ref$chksum ne 'HASH'){$self->diag_fail("! Checksum file downloaded from $chk_file is broken.\n");return}if (my$sha=$chksum->{$file}{sha256}){my$hex=$self->sha1_for($file);if ($hex eq $sha){$self->chat("Checksum for $file: Verified!\n")}else {$self->diag_fail("Checksum mismatch for $file\n");return}}else {$self->chat("Checksum for $file not found in CHECKSUMS.\n");return}}sub sha1_for {my($self,$file)=@_;require Digest::SHA;open my$fh,"<",$file or die "$file: $!";my$dg=Digest::SHA->new(256);my($data);while (read($fh,$data,4096)){$dg->add($data)}return$dg->hexdigest}sub verify_signature {my($self,$dist)=@_;$self->diag_progress("Verifying the SIGNATURE file");my$out=`$self->{cpansign} -v --skip 2>&1`;$self->log($out);if ($out =~ /Signature verified OK/){$self->diag_ok("Verified OK");return 1}else {$self->diag_fail("SIGNATURE verificaion for $dist->{filename} failed\n");return}}sub resolve_name {my($self,$module,$version)=@_;if ($module =~ /^(ftp|https?|file):/){if ($module =~ m!authors/id/(.*)!){return$self->cpan_dist($1,$module)}else {return {uris=>[$module ]}}}if ($module =~ m!^[\./]! && -d $module){return {source=>'local',dir=>Cwd::abs_path($module),}}if (-f $module){return {source=>'local',uris=>["file://" .Cwd::abs_path($module)],}}if ($module =~ /(?:^git:|\.git(?:@.+)?$)/){return$self->git_uri($module)}if ($module =~ s!^cpan:///distfile/!!){return$self->cpan_dist($module)}if ($module =~ m!^(?:[A-Z]/[A-Z]{2}/)?([A-Z]{2}[\-A-Z0-9]*/.*)$!){return$self->cpan_dist($1)}return$self->search_module($module,$version)}sub cpan_module {my($self,$module,$dist,$version)=@_;my$dist=$self->cpan_dist($dist);$dist->{module}=$module;$dist->{module_version}=$version if$version && $version ne 'undef';return$dist}sub cpan_dist {my($self,$dist,$url)=@_;$dist =~ s!^([A-Z]{2})!substr($1,0,1)."/".substr($1,0,2)."/".$1!e;require CPAN::DistnameInfo;my$d=CPAN::DistnameInfo->new($dist);if ($url){$url=[$url ]unless ref$url eq 'ARRAY'}else {my$id=$d->cpanid;my$fn=substr($id,0,1)."/" .substr($id,0,2)."/" .$id ."/" .$d->filename;my@mirrors=@{$self->{mirrors}};my@urls=map "$_/authors/id/$fn",@mirrors;$url=\@urls,}return {$d->properties,source=>'cpan',uris=>$url,}}sub git_uri {my ($self,$uri)=@_;($uri,my$commitish)=split /(?<=\.git)@/i,$uri,2;my$dir=File::Temp::tempdir(CLEANUP=>1);$self->mask_output(diag_progress=>"Cloning $uri");$self->run(['git','clone',$uri,$dir ]);unless (-e "$dir/.git"){$self->diag_fail("Failed cloning git repository $uri",1);return}if ($commitish){require File::pushd;my$dir=File::pushd::pushd($dir);unless ($self->run(['git','checkout',$commitish ])){$self->diag_fail("Failed to checkout '$commitish' in git repository $uri\n");return}}$self->diag_ok;return {source=>'local',dir=>$dir,}}sub setup_module_build_patch {my$self=shift;open my$out,">$self->{base}/ModuleBuildSkipMan.pm" or die $!;print$out <<EOF}sub core_version_for {my($self,$module)=@_;require Module::CoreList;unless (exists$Module::CoreList::version{$]+0}){die sprintf("Module::CoreList %s (loaded from %s) doesn't seem to have entries for perl $]. " ."You're strongly recommended to upgrade Module::CoreList from CPAN.\n",$Module::CoreList::VERSION,$INC{"Module/CoreList.pm"})}unless (exists$Module::CoreList::version{$]+0}{$module}){return -1}return$Module::CoreList::version{$]+0}{$module}}sub search_inc {my$self=shift;$self->{search_inc}||= do {if (defined$::Bin){[grep!/^\Q$::Bin\E\/..\/(?:fat)?lib$/,@INC]}else {[@INC]}}}sub check_module {my($self,$mod,$want_ver)=@_;require Module::Metadata;my$meta=Module::Metadata->new_from_module($mod,inc=>$self->search_inc)or return 0,undef;my$version=$meta->version;if ($self->{self_contained}&& $self->loaded_from_perl_lib($meta)){$version=$self->core_version_for($mod);return 0,undef if$version && $version==-1}$self->{local_versions}{$mod}=$version;if ($self->is_deprecated($meta)){return 0,$version}elsif ($self->satisfy_version($mod,$version,$want_ver)){return 1,($version || 'undef')}else {return 0,$version}}sub satisfy_version {my($self,$mod,$version,$want_ver)=@_;$want_ver='0' unless defined($want_ver)&& length($want_ver);require CPAN::Meta::Requirements;my$requirements=CPAN::Meta::Requirements->new;$requirements->add_string_requirement($mod,$want_ver);$requirements->accepts_module($mod,$version)}sub unsatisfy_how {my($self,$ver,$want_ver)=@_;if ($want_ver =~ /^[v0-9\.\_]+$/){return "$ver < $want_ver"}else {return "$ver doesn't satisfy $want_ver"}}sub is_deprecated {my($self,$meta)=@_;my$deprecated=eval {require Module::CoreList;Module::CoreList::is_deprecated($meta->{module})};return$deprecated && $self->loaded_from_perl_lib($meta)}sub loaded_from_perl_lib {my($self,$meta)=@_;require Config;my@dirs=qw(archlibexp privlibexp);if ($self->{self_contained}&&!$self->{exclude_vendor}&& $Config{vendorarch}){unshift@dirs,qw(vendorarch vendorlibexp)}for my$dir (@dirs){my$confdir=$Config{$dir};if ($confdir eq substr($meta->filename,0,length($confdir))){return 1}}return}sub should_install {my($self,$mod,$ver)=@_;$self->chat("Checking if you have $mod $ver ... ");my($ok,$local)=$self->check_module($mod,$ver);if ($ok){$self->chat("Yes ($local)\n")}elsif ($local){$self->chat("No (" .$self->unsatisfy_how($local,$ver).")\n")}else {$self->chat("No\n")}return$mod unless$ok;return}sub check_perl_version {my($self,$version)=@_;require CPAN::Meta::Requirements;my$req=CPAN::Meta::Requirements->from_string_hash({perl=>$version });$req->accepts_module(perl=>$])}sub install_deps {my($self,$dir,$depth,@deps)=@_;my(@install,%seen,@fail);for my$dep (@deps){next if$seen{$dep->module};if ($dep->module eq 'perl'){if ($dep->is_requirement &&!$self->check_perl_version($dep->version)){$self->diag("Needs perl @{[$dep->version]}, you have $]\n");push@fail,'perl'}}elsif ($self->should_install($dep->module,$dep->version)){push@install,$dep;$seen{$dep->module}=1}}if (@install){$self->diag("==> Found dependencies: " .join(", ",map $_->module,@install)."\n")}for my$dep (@install){$self->install_module($dep->module,$depth + 1,$dep->version)}$self->chdir($self->{base});$self->chdir($dir)if$dir;if ($self->{scandeps}){return 1}my@not_ok=$self->unsatisfied_deps(@deps);if (@not_ok){return 0,\@not_ok}else {return 1}}sub unsatisfied_deps {my($self,@deps)=@_;require CPAN::Meta::Check;require CPAN::Meta::Requirements;my$reqs=CPAN::Meta::Requirements->new;for my$dep (grep $_->is_requirement,@deps){$reqs->add_string_requirement($dep->module=>$dep->requires_version || '0')}my$ret=CPAN::Meta::Check::check_requirements($reqs,'requires',$self->{search_inc});grep defined,values %$ret}sub install_deps_bailout {my($self,$target,$dir,$depth,@deps)=@_;my($ok,$fail)=$self->install_deps($dir,$depth,@deps);if (!$ok){$self->diag_fail("Installing the dependencies failed: " .join(", ",@$fail),1);unless ($self->prompt_bool("Do you want to continue building $target anyway?","n")){$self->diag_fail("Bailing out the installation for $target.",1);return}}return 1}sub build_stuff {my($self,$stuff,$dist,$depth)=@_;if ($self->{verify}&& -e 'SIGNATURE'){$self->verify_signature($dist)or return}require CPAN::Meta;my($meta_file)=grep -f,qw(META.json META.yml);if ($meta_file){$self->chat("Checking configure dependencies from $meta_file\n");$dist->{cpanmeta}=eval {CPAN::Meta->load_file($meta_file)}}elsif ($dist->{dist}&& $dist->{version}){$self->chat("META.yml/json not found. Creating skeleton for it.\n");$dist->{cpanmeta}=CPAN::Meta->new({name=>$dist->{dist},version=>$dist->{version}})}$dist->{meta}=$dist->{cpanmeta}? $dist->{cpanmeta}->as_struct : {};my@config_deps;if ($dist->{cpanmeta}){push@config_deps,App::cpanminus::Dependency->from_prereqs($dist->{cpanmeta}->effective_prereqs,['configure'],$self->{install_types},)}if (-e 'Build.PL' &&!$self->should_use_mm($dist->{dist})&&!@config_deps){push@config_deps,App::cpanminus::Dependency->from_versions({'Module::Build'=>'0.36' },'configure',)}my$target=$dist->{meta}{name}? "$dist->{meta}{name}-$dist->{meta}{version}" : $dist->{dir};$self->install_deps_bailout($target,$dist->{dir},$depth,@config_deps)or return;$self->diag_progress("Configuring $target");my$configure_state=$self->configure_this($dist,$depth);$self->diag_ok($configure_state->{configured_ok}? "OK" : "N/A");if ($dist->{cpanmeta}&& $dist->{source}eq 'cpan'){$dist->{provides}=$dist->{cpanmeta}{provides}|| $self->extract_packages($dist->{cpanmeta},".")}my$root_target=(($self->{installdeps}or $self->{showdeps})and $depth==0);$dist->{want_phases}=$self->{notest}&&!$root_target ? [qw(build runtime)]: [qw(build test runtime)];push @{$dist->{want_phases}},'develop' if$self->{with_develop}&& $depth==0;my@deps=$self->find_prereqs($dist);my$module_name=$self->find_module_name($configure_state)|| $dist->{meta}{name};$module_name =~ s/-/::/g;if ($self->{showdeps}){for my$dep (@config_deps,@deps){print$dep->module,($dep->version ? ("~".$dep->version): ""),"\n"}return 1}my$distname=$dist->{meta}{name}? "$dist->{meta}{name}-$dist->{meta}{version}" : $stuff;my$walkup;if ($self->{scandeps}){$walkup=$self->scandeps_append_child($dist)}$self->install_deps_bailout($distname,$dist->{dir},$depth,@deps)or return;if ($self->{scandeps}){unless ($configure_state->{configured_ok}){my$diag=<<DIAG;if (@config_deps){my@tree=@{$self->{scandeps_tree}};$diag .= "!\n" .join("",map "! * $_->[0]{module}\n",@tree[0..$#tree-1])if@tree}$self->diag("!\n$diag!\n",1)}$walkup->();return 1}if ($self->{installdeps}&& $depth==0){if ($configure_state->{configured_ok}){$self->diag("<== Installed dependencies for $stuff. Finishing.\n");return 1}else {$self->diag("! Configuring $distname failed. See $self->{log} for details.\n",1);return}}my$installed;if ($configure_state->{use_module_build}&& -e 'Build' && -f _){$self->diag_progress("Building " .($self->{notest}? "" : "and testing ").$distname);$self->build([$self->{perl},"./Build" ],$distname,$depth)&& $self->test([$self->{perl},"./Build","test" ],$distname,$depth)&& $self->install([$self->{perl},"./Build","install" ],["--uninst",1 ],$depth)&& $installed++}elsif ($self->{make}&& -e 'Makefile'){$self->diag_progress("Building " .($self->{notest}? "" : "and testing ").$distname);$self->build([$self->{make}],$distname,$depth)&& $self->test([$self->{make},"test" ],$distname,$depth)&& $self->install([$self->{make},"install" ],["UNINST=1" ],$depth)&& $installed++}else {my$why;my$configure_failed=$configure_state->{configured}&&!$configure_state->{configured_ok};if ($configure_failed){$why="Configure failed for $distname."}elsif ($self->{make}){$why="The distribution doesn't have a proper Makefile.PL/Build.PL"}else {$why="Can't configure the distribution. You probably need to have 'make'."}$self->diag_fail("$why See $self->{log} for details.",1);return}if ($installed && $self->{test_only}){$self->diag_ok;$self->diag("Successfully tested $distname\n",1)}elsif ($installed){my$local=$self->{local_versions}{$dist->{module}|| ''};my$version=$dist->{module_version}|| $dist->{meta}{version}|| $dist->{version};my$reinstall=$local && ($local eq $version);my$action=$local &&!$reinstall ? $self->numify_ver($version)< $self->numify_ver($local)? "downgraded" : "upgraded" : undef;my$how=$reinstall ? "reinstalled $distname" : $local ? "installed $distname ($action from $local)" : "installed $distname" ;my$msg="Successfully $how";$self->diag_ok;$self->diag("$msg\n",1);$self->{installed_dists}++;$self->save_meta($stuff,$dist,$module_name,\@config_deps,\@deps);return 1}else {my$what=$self->{test_only}? "Testing" : "Installing";$self->diag_fail("$what $stuff failed. See $self->{log} for details. Retry with --force to force install it.",1);return}}sub perl_requirements {my($self,@requires)=@_;my@perl;for my$requires (grep defined,@requires){if (exists$requires->{perl}){push@perl,App::cpanminus::Dependency->new(perl=>$requires->{perl})}}return@perl}sub should_use_mm {my($self,$dist)=@_;my%should_use_mm=map {$_=>1}qw(version ExtUtils-ParseXS ExtUtils-Install ExtUtils-Manifest);$should_use_mm{$dist}}sub configure_this {my($self,$dist,$depth)=@_;if (-e $self->{cpanfile_path}&& $self->{installdeps}&& $depth==0){require Module::CPANfile;$dist->{cpanfile}=eval {Module::CPANfile->load($self->{cpanfile_path})};$self->diag_fail($@,1)if $@;return {configured=>1,configured_ok=>!!$dist->{cpanfile},use_module_build=>0,}}if ($self->{skip_configure}){my$eumm=-e 'Makefile';my$mb=-e 'Build' && -f _;return {configured=>1,configured_ok=>$eumm || $mb,use_module_build=>$mb,}}my$state={};my$try_eumm=sub {if (-e 'Makefile.PL'){$self->chat("Running Makefile.PL\n");if ($self->configure([$self->{perl},"Makefile.PL" ],$depth)){$state->{configured_ok}=-e 'Makefile'}$state->{configured}++}};my$try_mb=sub {if (-e 'Build.PL'){$self->chat("Running Build.PL\n");if ($self->configure([$self->{perl},"Build.PL" ],$depth)){$state->{configured_ok}=-e 'Build' && -f _}$state->{use_module_build}++;$state->{configured}++}};my@try;if ($dist->{dist}&& $self->should_use_mm($dist->{dist})){@try=($try_eumm,$try_mb)}else {@try=($try_mb,$try_eumm)}for my$try (@try){$try->();last if$state->{configured_ok}}unless ($state->{configured_ok}){while (1){my$ans=lc$self->prompt("Configuring $dist->{dist} failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?","s");last if$ans eq 's';return$self->configure_this($dist,$depth)if$ans eq 'r';$self->show_build_log if$ans eq 'e';$self->look if$ans eq 'l'}}return$state}sub find_module_name {my($self,$state)=@_;return unless$state->{configured_ok};if ($state->{use_module_build}&& -e "_build/build_params"){my$params=do {open my$in,"_build/build_params";$self->safe_eval(join "",<$in>)};return eval {$params->[2]{module_name}}|| undef}elsif (-e "Makefile"){open my$mf,"Makefile";while (<$mf>){if (/^\#\s+NAME\s+=>\s+(.*)/){return$self->safe_eval($1)}}}return}sub list_files {my$self=shift;if (-e 'MANIFEST'){require ExtUtils::Manifest;my$manifest=eval {ExtUtils::Manifest::manifind()}|| {};return sort {lc$a cmp lc$b}keys %$manifest}else {require File::Find;my@files;my$finder=sub {my$name=$File::Find::name;$name =~ s!\.[/\\]!!;push@files,$name};File::Find::find($finder,".");return sort {lc$a cmp lc$b}@files}}sub extract_packages {my($self,$meta,$dir)=@_;my$try=sub {my$file=shift;return 0 if$file =~ m!^(?:x?t|inc|local|perl5|fatlib|_build)/!;return 1 unless$meta->{no_index};return 0 if grep {$file =~ m!^$_/!}@{$meta->{no_index}{directory}|| []};return 0 if grep {$file eq $_}@{$meta->{no_index}{file}|| []};return 1};require Parse::PMFile;my@files=grep {/\.pm(?:\.PL)?$/ && $try->($_)}$self->list_files;my$provides={};for my$file (@files){my$parser=Parse::PMFile->new($meta,{UNSAFE=>1,ALLOW_DEV_VERSION=>1 });my$packages=$parser->parse($file);while (my($package,$meta)=each %$packages){$provides->{$package}||= {file=>$meta->{infile},($meta->{version}eq 'undef')? (): (version=>$meta->{version}),}}}return$provides}sub save_meta {my($self,$module,$dist,$module_name,$config_deps,$build_deps)=@_;return unless$dist->{distvname}&& $dist->{source}eq 'cpan';my$base=($ENV{PERL_MM_OPT}|| '')=~ /INSTALL_BASE=/ ? ($self->install_base($ENV{PERL_MM_OPT})."/lib/perl5"): $Config{sitelibexp};my$provides=$dist->{provides};File::Path::mkpath("blib/meta",0,0777);my$local={name=>$module_name,target=>$module,version=>exists$provides->{$module_name}? ($provides->{$module_name}{version}|| $dist->{version}): $dist->{version},dist=>$dist->{distvname},pathname=>$dist->{pathname},provides=>$provides,};require JSON::PP;open my$fh,">","blib/meta/install.json" or die $!;print$fh JSON::PP::encode_json($local);if (-e "MYMETA.json"){File::Copy::copy("MYMETA.json","blib/meta/MYMETA.json")}my@cmd=(($self->{sudo}? 'sudo' : ()),$^X,'-MExtUtils::Install=install','-e',qq[install({ 'blib/meta' => '$base/$Config{archname}/.meta/$dist->{distvname}' })],);$self->run(\@cmd)}sub _merge_hashref {my($self,@hashrefs)=@_;my%hash;for my$h (@hashrefs){%hash=(%hash,%$h)}return \%hash}sub install_base {my($self,$mm_opt)=@_;$mm_opt =~ /INSTALL_BASE=(\S+)/ and return $1;die "Your PERL_MM_OPT doesn't contain INSTALL_BASE"}sub safe_eval {my($self,$code)=@_;eval$code}sub configure_features {my($self,$dist,@features)=@_;map $_->identifier,grep {$self->effective_feature($dist,$_)}@features}sub effective_feature {my($self,$dist,$feature)=@_;if ($dist->{depth}==0){my$value=$self->{features}{$feature->identifier};return$value if defined$value;return 1 if$self->{features}{__all}}if ($self->{interactive}){require CPAN::Meta::Requirements;$self->diag("[@{[ $feature->description ]}]\n",1);my$req=CPAN::Meta::Requirements->new;for my$phase (@{$dist->{want_phases}}){for my$type (@{$self->{install_types}}){$req->add_requirements($feature->prereqs->requirements_for($phase,$type))}}my$reqs=$req->as_string_hash;my@missing;for my$module (keys %$reqs){if ($self->should_install($module,$req->{$module})){push@missing,$module}}if (@missing){my$howmany=@missing;$self->diag("==> Found missing dependencies: " .join(", ",@missing)."\n",1);local$self->{prompt}=1;return$self->prompt_bool("Install the $howmany optional module(s)?","y")}}return}sub find_prereqs {my($self,$dist)=@_;my@deps=$self->extract_meta_prereqs($dist);if ($dist->{module}=~ /^Bundle::/i){push@deps,$self->bundle_deps($dist)}if ($self->{cpanfile_requirements}&&!$dist->{cpanfile}){for my$dep (@deps){$dep->merge_with($self->{cpanfile_requirements})}}return@deps}sub extract_meta_prereqs {my($self,$dist)=@_;if ($dist->{cpanfile}){my@features=$self->configure_features($dist,$dist->{cpanfile}->features);my$prereqs=$dist->{cpanfile}->prereqs_with(@features);$self->{cpanfile_requirements}=$prereqs->merged_requirements($dist->{want_phases},['requires']);return App::cpanminus::Dependency->from_prereqs($prereqs,$dist->{want_phases},$self->{install_types})}require CPAN::Meta;my@deps;my($meta_file)=grep -f,qw(MYMETA.json MYMETA.yml);if ($meta_file){$self->chat("Checking dependencies from $meta_file ...\n");my$mymeta=eval {CPAN::Meta->load_file($meta_file,{lazy_validation=>1 })};if ($mymeta){$dist->{meta}{name}=$mymeta->name;$dist->{meta}{version}=$mymeta->version;return$self->extract_prereqs($mymeta,$dist)}}if (-e '_build/prereqs'){$self->chat("Checking dependencies from _build/prereqs ...\n");my$prereqs=do {open my$in,"_build/prereqs";$self->safe_eval(join "",<$in>)};my$meta=CPAN::Meta->new({name=>$dist->{meta}{name},version=>$dist->{meta}{version},%$prereqs },{lazy_validation=>1 },);@deps=$self->extract_prereqs($meta,$dist)}elsif (-e 'Makefile'){$self->chat("Finding PREREQ from Makefile ...\n");open my$mf,"Makefile";while (<$mf>){if (/^\#\s+PREREQ_PM => \{\s*(.*?)\s*\}/){my@all;my@pairs=split ', ',$1;for (@pairs){my ($pkg,$v)=split '=>',$_;push@all,[$pkg,$v ]}my$list=join ", ",map {"'$_->[0]' => $_->[1]"}@all;my$prereq=$self->safe_eval("no strict; +{ $list }");push@deps,App::cpanminus::Dependency->from_versions($prereq)if$prereq;last}}}return@deps}sub bundle_deps {my($self,$dist)=@_;my@files;File::Find::find({wanted=>sub {push@files,File::Spec->rel2abs($_)if /\.pm/i},no_chdir=>1,},'.');my@deps;for my$file (@files){open my$pod,"<",$file or next;my$in_contents;while (<$pod>){if (/^=head\d\s+CONTENTS/){$in_contents=1}elsif (/^=/){$in_contents=0}elsif ($in_contents){/^(\S+)\s*(\S+)?/ and push@deps,App::cpanminus::Dependency->new($1,$self->maybe_version($2))}}}return@deps}sub maybe_version {my($self,$string)=@_;return$string && $string =~ /^\.?\d/ ? $string : undef}sub extract_prereqs {my($self,$meta,$dist)=@_;my@features=$self->configure_features($dist,$meta->features);return App::cpanminus::Dependency->from_prereqs($meta->effective_prereqs(\@features),$dist->{want_phases},$self->{install_types})}sub cleanup_workdirs {my$self=shift;my$expire=time - 24 * 60 * 60 * $self->{auto_cleanup};my@targets;opendir my$dh,"$self->{home}/work";while (my$e=readdir$dh){next if$e !~ /^(\d+)\.\d+$/;my$time=$1;if ($time < $expire){push@targets,"$self->{home}/work/$e"}}if (@targets){if (@targets >= 64){$self->diag("Expiring " .scalar(@targets)." work directories. This might take a while...\n")}else {$self->chat("Expiring " .scalar(@targets)." work directories.\n")}File::Path::rmtree(\@targets,0,0)}}sub scandeps_append_child {my($self,$dist)=@_;my$new_node=[$dist,[]];my$curr_node=$self->{scandeps_current}|| [undef,$self->{scandeps_tree}];push @{$curr_node->[1]},$new_node;$self->{scandeps_current}=$new_node;return sub {$self->{scandeps_current}=$curr_node}}sub dump_scandeps {my$self=shift;if ($self->{format}eq 'tree'){$self->walk_down(sub {my($dist,$depth)=@_;if ($depth==0){print "$dist->{distvname}\n"}else {print " " x ($depth - 1);print "\\_ $dist->{distvname}\n"}},1)}elsif ($self->{format}=~ /^dists?$/){$self->walk_down(sub {my($dist,$depth)=@_;print$self->format_dist($dist),"\n"},0)}elsif ($self->{format}eq 'json'){require JSON::PP;print JSON::PP::encode_json($self->{scandeps_tree})}elsif ($self->{format}eq 'yaml'){require YAML;print YAML::Dump($self->{scandeps_tree})}else {$self->diag("Unknown format: $self->{format}\n")}}sub walk_down {my($self,$cb,$pre)=@_;$self->_do_walk_down($self->{scandeps_tree},$cb,0,$pre)}sub _do_walk_down {my($self,$children,$cb,$depth,$pre)=@_;for my$node (@$children){$cb->($node->[0],$depth)if$pre;$self->_do_walk_down($node->[1],$cb,$depth + 1,$pre);$cb->($node->[0],$depth)unless$pre}}sub DESTROY {my$self=shift;$self->{at_exit}->($self)if$self->{at_exit}}sub shell_quote {my($self,@stuff)=@_;if (WIN32){join ' ',map {/^${quote}.+${quote}$/ ? $_ : ($quote .$_ .$quote)}@stuff}else {String::ShellQuote::shell_quote_best_effort(@stuff)}}sub which {my($self,$name)=@_;if (File::Spec->file_name_is_absolute($name)){if (-x $name &&!-d _){return$name}}my$exe_ext=$Config{_exe};for my$dir (File::Spec->path){my$fullpath=File::Spec->catfile($dir,$name);if ((-x $fullpath || -x ($fullpath .= $exe_ext))&&!-d _){if ($fullpath =~ /\s/){$fullpath=$self->shell_quote($fullpath)}return$fullpath}}return}sub get {my($self,$uri)=@_;if ($uri =~ /^file:/){$self->file_get($uri)}else {$self->{_backends}{get}->(@_)}}sub mirror {my($self,$uri,$local)=@_;if ($uri =~ /^file:/){$self->file_mirror($uri,$local)}else {$self->{_backends}{mirror}->(@_)}}sub untar {$_[0]->{_backends}{untar}->(@_)};sub unzip {$_[0]->{_backends}{unzip}->(@_)};sub uri_to_file {my($self,$uri)=@_;if ($uri =~ s!file:/+!!){$uri="/$uri" unless$uri =~ m![a-zA-Z]:!}return$uri}sub file_get {my($self,$uri)=@_;my$file=$self->uri_to_file($uri);open my$fh,"<$file" or return;join '',<$fh>}sub file_mirror {my($self,$uri,$path)=@_;my$file=$self->uri_to_file($uri);File::Copy::copy($file,$path)}sub has_working_lwp {my($self,$mirrors)=@_;my$https=grep /^https:/,@$mirrors;eval {require LWP::UserAgent;LWP::UserAgent->VERSION(5.802);require LWP::Protocol::https if$https;1}}sub init_tools {my$self=shift;return if$self->{initialized}++;if ($self->{make}=$self->which($Config{make})){$self->chat("You have make $self->{make}\n")}if ($self->{try_lwp}&& $self->has_working_lwp($self->{mirrors})){$self->chat("You have LWP $LWP::VERSION\n");my$ua=sub {LWP::UserAgent->new(parse_head=>0,env_proxy=>1,agent=>$self->agent,timeout=>30,@_,)};$self->{_backends}{get}=sub {my$self=shift;my$res=$ua->()->request(HTTP::Request->new(GET=>$_[0]));return unless$res->is_success;return$res->decoded_content};$self->{_backends}{mirror}=sub {my$self=shift;my$res=$ua->()->mirror(@_);die$res->content if$res->code==501;$res->code}}elsif ($self->{try_wget}and my$wget=$self->which('wget')){$self->chat("You have $wget\n");my@common=('--user-agent',$self->agent,'--retry-connrefused',($self->{verbose}? (): ('-q')),);$self->{_backends}{get}=sub {my($self,$uri)=@_;$self->safeexec(my$fh,$wget,$uri,@common,'-O','-')or die "wget $uri: $!";local $/;<$fh>};$self->{_backends}{mirror}=sub {my($self,$uri,$path)=@_;$self->safeexec(my$fh,$wget,$uri,@common,'-O',$path)or die "wget $uri: $!";local $/;<$fh>}}elsif ($self->{try_curl}and my$curl=$self->which('curl')){$self->chat("You have $curl\n");my@common=('--location','--user-agent',$self->agent,($self->{verbose}? (): '-s'),);$self->{_backends}{get}=sub {my($self,$uri)=@_;$self->safeexec(my$fh,$curl,@common,$uri)or die "curl $uri: $!";local $/;<$fh>};$self->{_backends}{mirror}=sub {my($self,$uri,$path)=@_;$self->safeexec(my$fh,$curl,@common,$uri,'-#','-o',$path)or die "curl $uri: $!";local $/;<$fh>}}else {require HTTP::Tiny;$self->chat("Falling back to HTTP::Tiny $HTTP::Tiny::VERSION\n");my%common=(agent=>$self->agent,);$self->{_backends}{get}=sub {my$self=shift;my$res=HTTP::Tiny->new(%common)->get($_[0]);return unless$res->{success};return$res->{content}};$self->{_backends}{mirror}=sub {my$self=shift;my$res=HTTP::Tiny->new(%common)->mirror(@_);return$res->{status}}}my$tar=$self->which('tar');my$tar_ver;my$maybe_bad_tar=sub {WIN32 || BAD_TAR || (($tar_ver=`$tar --version 2>/dev/null`)=~ /GNU.*1\.13/i)};if ($tar &&!$maybe_bad_tar->()){chomp$tar_ver;$self->chat("You have $tar: $tar_ver\n");$self->{_backends}{untar}=sub {my($self,$tarfile)=@_;my$xf=($self->{verbose}? 'v' : '')."xf";my$ar=$tarfile =~ /bz2$/ ? 'j' : 'z';my($root,@others)=`$tar ${ar}tf $tarfile` or return undef;FILE: {chomp$root;$root =~ s!^\./!!;$root =~ s{^(.+?)/.*$}{$1};if (!length($root)){$root=shift(@others);redo FILE if$root}}system "$tar $ar$xf $tarfile";return$root if -d $root;$self->diag_fail("Bad archive: $tarfile");return undef}}elsif ($tar and my$gzip=$self->which('gzip')and my$bzip2=$self->which('bzip2')){$self->chat("You have $tar, $gzip and $bzip2\n");$self->{_backends}{untar}=sub {my($self,$tarfile)=@_;my$x="x" .($self->{verbose}? 'v' : '')."f -";my$ar=$tarfile =~ /bz2$/ ? $bzip2 : $gzip;my($root,@others)=`$ar -dc $tarfile | $tar tf -` or return undef;FILE: {chomp$root;$root =~ s!^\./!!;$root =~ s{^(.+?)/.*$}{$1};if (!length($root)){$root=shift(@others);redo FILE if$root}}system "$ar -dc $tarfile | $tar $x";return$root if -d $root;$self->diag_fail("Bad archive: $tarfile");return undef}}elsif (eval {require Archive::Tar}){$self->chat("Falling back to Archive::Tar $Archive::Tar::VERSION\n");$self->{_backends}{untar}=sub {my$self=shift;my$t=Archive::Tar->new($_[0]);my($root,@others)=$t->list_files;FILE: {$root =~ s!^\./!!;$root =~ s{^(.+?)/.*$}{$1};if (!length($root)){$root=shift(@others);redo FILE if$root}}$t->extract;return -d $root ? $root : undef}}else {$self->{_backends}{untar}=sub {die "Failed to extract $_[1] - You need to have tar or Archive::Tar installed.\n"}}if (my$unzip=$self->which('unzip')){$self->chat("You have $unzip\n");$self->{_backends}{unzip}=sub {my($self,$zipfile)=@_;my$opt=$self->{verbose}? '' : '-q';my(undef,$root,@others)=`$unzip -t $zipfile` or return undef;chomp$root;$root =~ s{^\s+testing:\s+([^/]+)/.*?\s+OK$}{$1};system "$unzip $opt $zipfile";return$root if -d $root;$self->diag_fail("Bad archive: [$root] $zipfile");return undef}}else {$self->{_backends}{unzip}=sub {eval {require Archive::Zip}or die "Failed to extract $_[1] - You need to have unzip or Archive::Zip installed.\n";my($self,$file)=@_;my$zip=Archive::Zip->new();my$status;$status=$zip->read($file);$self->diag_fail("Read of file[$file] failed")if$status!=Archive::Zip::AZ_OK();my@members=$zip->members();for my$member (@members){my$af=$member->fileName();next if ($af =~ m!^(/|\.\./)!);$status=$member->extractToFileNamed($af);$self->diag_fail("Extracting of file[$af] from zipfile[$file failed")if$status!=Archive::Zip::AZ_OK()}my ($root)=$zip->membersMatching(qr<^[^/]+/$>);$root &&= $root->fileName;return -d $root ? $root : undef}}}sub safeexec {my$self=shift;my$rdr=$_[0]||= Symbol::gensym();if (WIN32){my$cmd=$self->shell_quote(@_[1..$#_]);return open($rdr,"$cmd |")}if (my$pid=open($rdr,'-|')){return$pid}elsif (defined$pid){exec(@_[1 .. $#_ ]);exit 1}else {return}}sub mask_uri_passwords {my($self,@strings)=@_;s{ (https?://) ([^:/]+) : [^@/]+ @ }{$1$2:********@}gx for@strings;return@strings}1;
It appears your cpanm executable was installed via `perlbrew install-cpanm`.
cpanm --self-upgrade won't upgrade the version of cpanm you're running.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/lib/App/cpanminus/fatscript.pm new/App-cpanminus-1.7032/lib/App/cpanminus/fatscript.pm
--- old/App-cpanminus-1.7031/lib/App/cpanminus/fatscript.pm 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/lib/App/cpanminus/fatscript.pm 2015-04-30 03:51:42.000000000 +0200
@@ -22,7 +22,7 @@
$fatpacked{"App/cpanminus.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS';
package App::cpanminus;
- our $VERSION = "1.7031";
+ our $VERSION = "1.7032";
=encoding utf8
@@ -67,10 +67,10 @@
C</usr/local/bin> and you'll need the C<--sudo> option to write to
the directory, unless you configured C<INSTALL_BASE> with L<local::lib>.
- =head2 Installing to local perl (perlbrew)
+ =head2 Installing to local perl (perlbrew, plenv etc.)
If you have perl in your home directory, which is the case if you use
- tools like L<perlbrew>, you don't need the C<--sudo> option, since
+ tools like L<perlbrew> or plenv, you don't need the C<--sudo> option, since
you're most likely to have a write permission to the perl's library
path. You can just do:
@@ -97,8 +97,9 @@
(curl) being old, or SSL certificates installed on your system needs
to be updated.
- You might need to update the software or system if you can, or
- use the C<-k> option with curl.
+ You're recommended to update the software or system if you can. If
+ that is impossible or difficult, use the C<-k> option with curl or an
+ alternative URL, C<https://git.io/cpanm>
=head1 DEPENDENCIES
@@ -1000,7 +1001,7 @@
sub with_version_range {
my($self, $version) = @_;
- defined($version) && $version =~ /[<>=]/;
+ defined($version) && $version =~ /(?:<|!=|==)/;
}
sub encode_json {
@@ -1073,19 +1074,18 @@
sub maturity_filter {
my($self, $module, $version) = @_;
- my @filters;
-
- # TODO: dev release should be enabled per dist
- if (!$self->with_version_range($version) or $self->{dev_release}) {
- # backpan'ed dev release are considered "cancelled"
- push @filters, { not => { term => { status => 'backpan' } } };
- }
-
- unless ($self->{dev_release} or $version =~ /==/) {
- push @filters, { term => { maturity => 'released' } };
+ if ($version =~ /==/) {
+ # specific version: allow dev release
+ return;
+ } elsif ($self->{dev_release}) {
+ # backpan'ed dev releases are considered cancelled
+ return +{ not => { term => { status => 'backpan' } } };
+ } else {
+ return (
+ { not => { term => { status => 'backpan' } } },
+ { term => { maturity => 'released' } },
+ );
}
-
- return @filters;
}
sub by_version {
@@ -1198,9 +1198,8 @@
my($self, $module, $version) = @_;
my $found;
- my $range = ($self->with_version_range($version) || $self->{dev_release});
- if ($range or $self->{metacpan}) {
+ if ($self->{dev_release} or $self->{metacpan}) {
$found = $self->search_metacpan($module, $version) and return $found;
$found = $self->search_cpanmetadb($module, $version) and return $found;
} else {
@@ -1212,9 +1211,20 @@
sub search_cpanmetadb {
my($self, $module, $version) = @_;
- require CPAN::Meta::YAML;
- $self->chat("Searching $module on cpanmetadb ...\n");
+ $self->chat("Searching $module ($version) on cpanmetadb ...\n");
+
+ if ($self->with_version_range($version)) {
+ return $self->search_cpanmetadb_history($module, $version);
+ } else {
+ return $self->search_cpanmetadb_package($module, $version);
+ }
+ }
+
+ sub search_cpanmetadb_package {
+ my($self, $module, $version) = @_;
+
+ require CPAN::Meta::YAML;
(my $uri = $self->{cpanmetadb}) =~ s{/?$}{/package/$module};
my $yaml = $self->get($uri);
@@ -1227,6 +1237,42 @@
return;
}
+ sub search_cpanmetadb_history {
+ my($self, $module, $version) = @_;
+
+ (my $uri = $self->{cpanmetadb}) =~ s{/?$}{/history/$module};
+ my $content = $self->get($uri) or return;
+
+ my @found;
+ for my $line (split /\r?\n/, $content) {
+ if ($line =~ /^$module\s+(\S+)\s+(\S+)$/) {
+ push @found, {
+ version => $1,
+ version_obj => version::->parse($1),
+ distfile => $2,
+ };
+ }
+ }
+
+ return unless @found;
+
+ $found[-1]->{latest} = 1;
+
+ my $match;
+ for my $try (sort { $b->{version_obj} cmp $a->{version_obj} } @found) {
+ if ($self->satisfy_version($module, $try->{version_obj}, $version)) {
+ local $self->{mirrors} = $self->{mirrors};
+ unshift @{$self->{mirrors}}, 'http://backpan.perl.org'
+ unless $try->{latest};
+ return $self->cpan_module($module, $try->{distfile}, $try->{version});
+ }
+ }
+
+ $self->diag_fail("Finding $module ($version) on cpanmetadb failed.");
+ return;
+ }
+
+
sub search_module {
my($self, $module, $version) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-cpanminus-1.7031/lib/App/cpanminus.pm new/App-cpanminus-1.7032/lib/App/cpanminus.pm
--- old/App-cpanminus-1.7031/lib/App/cpanminus.pm 2015-04-22 23:13:42.000000000 +0200
+++ new/App-cpanminus-1.7032/lib/App/cpanminus.pm 2015-04-30 03:51:42.000000000 +0200
@@ -1,5 +1,5 @@
package App::cpanminus;
-our $VERSION = "1.7031";
+our $VERSION = "1.7032";
=encoding utf8
@@ -44,10 +44,10 @@
C</usr/local/bin> and you'll need the C<--sudo> option to write to
the directory, unless you configured C<INSTALL_BASE> with L<local::lib>.
-=head2 Installing to local perl (perlbrew)
+=head2 Installing to local perl (perlbrew, plenv etc.)
If you have perl in your home directory, which is the case if you use
-tools like L<perlbrew>, you don't need the C<--sudo> option, since
+tools like L<perlbrew> or plenv, you don't need the C<--sudo> option, since
you're most likely to have a write permission to the perl's library
path. You can just do:
@@ -74,8 +74,9 @@
(curl) being old, or SSL certificates installed on your system needs
to be updated.
-You might need to update the software or system if you can, or
-use the C<-k> option with curl.
+You're recommended to update the software or system if you can. If
+that is impossible or difficult, use the C<-k> option with curl or an
+alternative URL, C<https://git.io/cpanm>
=head1 DEPENDENCIES
1
0
Hello community,
here is the log from the commit of package perl-Config-Any for openSUSE:Factory checked in at 2015-04-30 11:51:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Config-Any (Old)
and /work/SRC/openSUSE:Factory/.perl-Config-Any.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Config-Any"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Config-Any/perl-Config-Any.changes 2015-04-27 13:04:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Config-Any.new/perl-Config-Any.changes 2015-04-30 11:51:34.000000000 +0200
@@ -1,0 +2,9 @@
+Thu Apr 30 05:45:15 UTC 2015 - coolo(a)suse.com
+
+- updated to 0.26
+ see /usr/share/doc/packages/perl-Config-Any/Changes
+
+ 0.26 2015-04-29
+ - fix error reporting from code applied in 0.25 (RT #104079)
+
+-------------------------------------------------------------------
Old:
----
Config-Any-0.25.tar.gz
New:
----
Config-Any-0.26.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Config-Any.spec ++++++
--- /var/tmp/diff_new_pack.FNbcpr/_old 2015-04-30 11:51:35.000000000 +0200
+++ /var/tmp/diff_new_pack.FNbcpr/_new 2015-04-30 11:51:35.000000000 +0200
@@ -17,7 +17,7 @@
Name: perl-Config-Any
-Version: 0.25
+Version: 0.26
Release: 0
%define cpan_name Config-Any
Summary: Load configuration from different file formats, transparently
++++++ Config-Any-0.25.tar.gz -> Config-Any-0.26.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/Changes new/Config-Any-0.26/Changes
--- old/Config-Any-0.25/Changes 2015-04-24 03:33:10.000000000 +0200
+++ new/Config-Any-0.26/Changes 2015-04-30 01:04:47.000000000 +0200
@@ -1,5 +1,8 @@
Revision history for Config-Any
+0.26 2015-04-29
+ - fix error reporting from code applied in 0.25 (RT #104079)
+
0.25 2015-04-23
- do not clobber $@ (RT #103061)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/META.yml new/Config-Any-0.26/META.yml
--- old/Config-Any-0.25/META.yml 2015-04-24 03:38:18.000000000 +0200
+++ new/Config-Any-0.26/META.yml 2015-04-30 01:07:42.000000000 +0200
@@ -25,4 +25,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: git://git.shadowcat.co.uk/p5sagit/Config-Any.git
-version: 0.25
+version: 0.26
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/lib/Config/Any.pm new/Config-Any-0.26/lib/Config/Any.pm
--- old/Config-Any-0.25/lib/Config/Any.pm 2015-04-24 03:33:19.000000000 +0200
+++ new/Config-Any-0.26/lib/Config/Any.pm 2015-04-30 01:05:15.000000000 +0200
@@ -6,7 +6,7 @@
use Carp;
use Module::Pluggable::Object ();
-our $VERSION = '0.25';
+our $VERSION = '0.26';
=head1 NAME
@@ -195,15 +195,15 @@
next unless $loader->is_supported;
$supported = 1;
my @configs;
- my $ok = do {
+ my $err = do {
local $@;
@configs = eval { $loader->load( $filename, $loader_args{ $loader } ); };
- 1;
+ $@;
};
# fatal error if we used extension matching
- croak "Error parsing $filename: $@" if !$ok and $use_ext_lut;
- next if !$ok or !@configs;
+ croak "Error parsing $filename: $err" if $err and $use_ext_lut;
+ next if $err or !@configs;
# post-process config with a filter callback
if ( $args->{ filter } ) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/t/50-general.t new/Config-Any-0.26/t/50-general.t
--- old/Config-Any-0.25/t/50-general.t 2013-08-15 03:12:36.000000000 +0200
+++ new/Config-Any-0.26/t/50-general.t 2015-04-30 01:03:29.000000000 +0200
@@ -2,13 +2,14 @@
use warnings;
use Test::More;
+use Config::Any;
use Config::Any::General;
if ( !Config::Any::General->is_supported ) {
plan skip_all => 'Config::General format not supported';
}
else {
- plan tests => 7;
+ plan tests => 9;
}
{
@@ -37,4 +38,13 @@
ok( !$config, 'config load failed' );
ok( $@, "error thrown ($@)" );
+}
+
+# parse error generated on invalid config
+{
+ my $file = 't/invalid/conf.conf';
+ my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/t/51-ini.t new/Config-Any-0.26/t/51-ini.t
--- old/Config-Any-0.25/t/51-ini.t 2013-08-15 03:12:36.000000000 +0200
+++ new/Config-Any-0.26/t/51-ini.t 2015-04-30 01:03:29.000000000 +0200
@@ -2,13 +2,14 @@
use warnings;
use Test::More;
+use Config::Any;
use Config::Any::INI;
if ( !Config::Any::INI->is_supported ) {
plan skip_all => 'INI format not supported';
}
else {
- plan tests => 13;
+ plan tests => 15;
}
{
@@ -54,4 +55,13 @@
ok( !$config, 'config load failed' );
ok( $@, "error thrown ($@)" );
+}
+
+# parse error generated on invalid config
+{
+ my $file = 't/invalid/conf.ini';
+ my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/t/52-json.t new/Config-Any-0.26/t/52-json.t
--- old/Config-Any-0.25/t/52-json.t 2013-08-15 03:12:36.000000000 +0200
+++ new/Config-Any-0.26/t/52-json.t 2015-04-30 01:03:29.000000000 +0200
@@ -2,13 +2,14 @@
use warnings;
use Test::More;
+use Config::Any;
use Config::Any::JSON;
if ( !Config::Any::JSON->is_supported ) {
plan skip_all => 'JSON format not supported';
}
else {
- plan tests => 4;
+ plan tests => 6;
}
{
@@ -24,4 +25,13 @@
ok( !$config, 'config load failed' );
ok( $@, "error thrown ($@)" );
+}
+
+# parse error generated on invalid config
+{
+ my $file = 't/invalid/conf.json';
+ my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/t/53-perl.t new/Config-Any-0.26/t/53-perl.t
--- old/Config-Any-0.25/t/53-perl.t 2013-08-15 03:12:36.000000000 +0200
+++ new/Config-Any-0.26/t/53-perl.t 2015-04-30 01:03:29.000000000 +0200
@@ -1,8 +1,8 @@
use strict;
use warnings;
-use Test::More tests => 5;
-
+use Test::More tests => 7;
+use Config::Any;
use Config::Any::Perl;
{
@@ -23,4 +23,13 @@
ok( !$config, 'config load failed' );
ok( $@, "error thrown ($@)" );
+}
+
+# parse error generated on invalid config
+{
+ my $file = 't/invalid/conf.pl';
+ my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/t/54-xml.t new/Config-Any-0.26/t/54-xml.t
--- old/Config-Any-0.25/t/54-xml.t 2013-08-15 03:12:36.000000000 +0200
+++ new/Config-Any-0.26/t/54-xml.t 2015-04-30 01:03:29.000000000 +0200
@@ -2,13 +2,14 @@
use warnings;
use Test::More;
+use Config::Any;
use Config::Any::XML;
if ( !Config::Any::XML->is_supported ) {
plan skip_all => 'XML format not supported';
}
else {
- plan tests => 6;
+ plan tests => 8;
}
{
@@ -39,3 +40,13 @@
ok( $config, 'config loaded' );
ok( !$@, 'no error thrown' );
}
+
+# parse error generated on invalid config
+{
+ my $file = 't/invalid/conf.xml';
+ my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Config-Any-0.25/t/55-yaml.t new/Config-Any-0.26/t/55-yaml.t
--- old/Config-Any-0.25/t/55-yaml.t 2013-09-10 20:41:34.000000000 +0200
+++ new/Config-Any-0.26/t/55-yaml.t 2015-04-30 01:03:29.000000000 +0200
@@ -3,13 +3,14 @@
no warnings 'once';
use Test::More;
+use Config::Any;
use Config::Any::YAML;
if ( !Config::Any::YAML->is_supported ) {
plan skip_all => 'YAML format not supported';
}
else {
- plan tests => 4;
+ plan tests => 6;
}
{
@@ -25,4 +26,13 @@
ok( !$config, 'config load failed' );
ok( $@, "error thrown ($@)" );
+}
+
+# parse error generated on invalid config
+{
+ my $file = 't/invalid/conf.yml';
+ my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
+
+ ok( !$config, 'config load failed' );
+ ok( $@, "error thrown ($@)" );
}
1
0
Hello community,
here is the log from the commit of package kmymoney for openSUSE:Factory checked in at 2015-04-30 11:51:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kmymoney (Old)
and /work/SRC/openSUSE:Factory/.kmymoney.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kmymoney"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kmymoney/kmymoney.changes 2014-11-13 09:18:09.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kmymoney.new/kmymoney.changes 2015-04-30 11:51:33.000000000 +0200
@@ -1,0 +2,9 @@
+Wed Apr 29 22:38:21 UTC 2015 - nico.kruber(a)gmail.com
+
+- Update to 4.7.2:
+ * fix a crash in the transaction split editor
+ * added the monetary symbol of the Turkish lira
+ * matching restrictions on an already imported transaction
+ were removed
+
+-------------------------------------------------------------------
Old:
----
kmymoney-4.7.1.tar.xz
New:
----
kmymoney-4.7.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kmymoney.spec ++++++
--- /var/tmp/diff_new_pack.MJk2rn/_old 2015-04-30 11:51:34.000000000 +0200
+++ /var/tmp/diff_new_pack.MJk2rn/_new 2015-04-30 11:51:34.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package kmymoney
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: kmymoney
-Version: 4.7.1
+Version: 4.7.2
Release: 0
Summary: A Personal Finance Manager for KDE 4
License: GPL-2.0 or GPL-3.0
++++++ kmymoney-4.7.1.tar.xz -> kmymoney-4.7.2.tar.xz ++++++
/work/SRC/openSUSE:Factory/kmymoney/kmymoney-4.7.1.tar.xz /work/SRC/openSUSE:Factory/.kmymoney.new/kmymoney-4.7.2.tar.xz differ: char 26, line 1
1
0
Hello community,
here is the log from the commit of package nf3d for openSUSE:Factory checked in at 2015-04-30 11:51:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nf3d (Old)
and /work/SRC/openSUSE:Factory/.nf3d.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nf3d"
Changes:
--------
--- /work/SRC/openSUSE:Factory/nf3d/nf3d.changes 2014-10-06 22:05:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nf3d.new/nf3d.changes 2015-04-30 11:51:30.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Apr 22 21:58:11 UTC 2015 - jengelh(a)inai.de
+
+- Update to upstream release 0.8
+* Replace "env python" by just python
+
+-------------------------------------------------------------------
Old:
----
nf3d-0.7.tar.xz
New:
----
nf3d-0.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nf3d.spec ++++++
--- /var/tmp/diff_new_pack.PlsqJ0/_old 2015-04-30 11:51:30.000000000 +0200
+++ /var/tmp/diff_new_pack.PlsqJ0/_new 2015-04-30 11:51:30.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package nf3d
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,19 +17,17 @@
Name: nf3d
-Version: 0.7
+Version: 0.8
Release: 0
Summary: GANTT-style visualization for Netfilter connections and logged packets
License: GPL-3.0
Group: Productivity/Networking/Security
-Url: http://netfilter.org/projects/nf3d/
+Url: https://home.regit.org/software/nf3d/
#Git-Clone: git://github.com/regit/nf3d
-#DL-URL: http://home.regit.org/wp-content/uploads/2013/02/nf3d-0.7.tar.gz
-Source: %name-%version.tar.xz
+Source: https://home.regit.org/wp-content/uploads/2013/02/nf3d-0.8.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-setuptools
-BuildRequires: xz
%description
nf3d is a Netfilter visualization tool. It displays connections and
1
0
Hello community,
here is the log from the commit of package ghc-scientific for openSUSE:Factory checked in at 2015-04-30 11:51:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-scientific (Old)
and /work/SRC/openSUSE:Factory/.ghc-scientific.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-scientific"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-scientific/ghc-scientific.changes 2015-04-10 09:50:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-scientific.new/ghc-scientific.changes 2015-04-30 11:51:27.000000000 +0200
@@ -1,0 +2,5 @@
+Sun Apr 12 18:49:55 UTC 2015 - mimi.vx(a)gmail.com
+
+- update to 0.3.3.8
+
+-------------------------------------------------------------------
Old:
----
scientific-0.3.3.7.tar.gz
New:
----
scientific-0.3.3.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-scientific.spec ++++++
--- /var/tmp/diff_new_pack.0Gmw0i/_old 2015-04-30 11:51:27.000000000 +0200
+++ /var/tmp/diff_new_pack.0Gmw0i/_new 2015-04-30 11:51:27.000000000 +0200
@@ -19,7 +19,7 @@
%global pkg_name scientific
Name: ghc-%{pkg_name}
-Version: 0.3.3.7
+Version: 0.3.3.8
Release: 0
Summary: Numbers represented using scientific notation
License: BSD-3-Clause
++++++ scientific-0.3.3.7.tar.gz -> scientific-0.3.3.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scientific-0.3.3.7/changelog new/scientific-0.3.3.8/changelog
--- old/scientific-0.3.3.7/changelog 2015-01-21 19:53:38.000000000 +0100
+++ new/scientific-0.3.3.8/changelog 2015-03-19 09:26:29.000000000 +0100
@@ -1,3 +1,6 @@
+0.3.3.8
+ * Support QuickCheck-2.8.
+
0.3.3.7
* Fixed both the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scientific-0.3.3.7/scientific.cabal new/scientific-0.3.3.8/scientific.cabal
--- old/scientific-0.3.3.7/scientific.cabal 2015-01-21 19:53:38.000000000 +0100
+++ new/scientific-0.3.3.8/scientific.cabal 2015-03-19 09:26:29.000000000 +0100
@@ -1,5 +1,5 @@
name: scientific
-version: 0.3.3.7
+version: 0.3.3.8
synopsis: Numbers represented using scientific notation
description:
@Data.Scientific@ provides a space efficient and arbitrary precision
@@ -99,7 +99,7 @@
, tasty-smallcheck >= 0.2 && < 0.9
, tasty-quickcheck >= 0.8 && < 0.9
, smallcheck >= 1.0 && < 1.2
- , QuickCheck >= 2.5 && < 2.8
+ , QuickCheck >= 2.5 && < 2.9
, text >= 0.8 && < 1.3
, bytestring >= 0.10 && < 0.11
1
0