# # spec file for package perl-IO-AIO # # Copyright (c) 2018 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 https://bugs.opensuse.org/ # Name: perl-IO-AIO Version: 4.6 Release: 1.30 %define cpan_name IO-AIO Summary: Asynchronous/Advanced Input/Output License: GPL-1.0-or-later OR Artistic-1.0 Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Canary::Stability) >= 2001 BuildRequires: perl(common::sense) Requires: perl(common::sense) %{perl_requires} %description This module implements asynchronous I/O using whatever means your operating system supports. It is implemented as an interface to 'libeio' (http://software.schmorp.de/pkg/libeio.html). Asynchronous means that operations that can normally block your program (e.g. reading from disk) will be done asynchronously: the operation will still block, but you can do something else in the meantime. This is extremely useful for programs that need to stay interactive even when doing heavy I/O (GUI programs, high performance network servers etc.), but can also be used to easily do operations in parallel that are normally done sequentially, e.g. stat'ing many files, which is much faster on a RAID volume or over NFS when you do a number of stat operations concurrently. While most of this works on all types of file descriptors (for example sockets), using these functions on file descriptors that support nonblocking operation (again, sockets, pipes etc.) is very inefficient. Use an event loop for that (such as the EV module): IO::AIO will naturally fit into such an event loop itself. In this version, a number of threads are started that execute your requests and signal their completion. You don't need thread support in perl, and the threads created by this module will not be visible to perl. In the future, this module might make use of the native aio functions available on many operating systems. However, they are often not well-supported or restricted (GNU/Linux doesn't allow them on normal files currently, for example), and they would only support aio_read and aio_write, so the remaining functionality would have to be implemented using threads anyway. In addition to asynchronous I/O, this module also exports some rather arcane interfaces, such as 'madvise' or linux's 'splice' system call, which is why the 'A' in 'AIO' can also mean _advanced_. Although the module will work in the presence of other (Perl-) threads, it is currently not reentrant in any way, so use appropriate locking yourself, always call 'poll_cb' from within the same thread, or never call 'poll_cb' (or other 'aio_' functions) recursively. %package -n treescan-aio Summary: File Tree Scanner that uses Asynchronous I/O Group: System/Base Requires: perl(IO::AIO) = %{version} %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif %description -n treescan-aio Scans a tree of files for changes, using AIO (Asynchronous I/O). %prep %setup -q -n %{cpan_name}-%{version} %build export PERL_CANARY_STABILITY_NOPROMPT=1 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes README %license COPYING %exclude %{_bindir}/treescan %files -n treescan-aio %defattr(-,root,root) %{_bindir}/treescan %changelog * Tue Oct 9 2018 Dirk Stoecker - Fix autogenerated changes * Sun Aug 26 2018 coolo@suse.com - updated to 4.6 see /usr/share/doc/packages/perl-IO-AIO/Changes TODO: dump config.log when automated testign and configure fails 4.6 Sat Aug 25 21:58:36 CEST 2018 - add st_btime, st_btimesec, st_btimensec and st_gen accessors, mostly for bsds which expose birthtime and st_gen members (netbsd, freebsd but only st_gen on openbsd because they compiled their perl without support for birthtimes). - fix madvise and munlock to properly support negative offsets. - allocate fd for the aio_close at boot time, to guarantee it working later, rather than calling abort when it fails. also avoids close-on-exec race issues after module load. - #undef utime on win32, maybe this helps some reports of utime hangs. - minor doc improvements. - minor configure cleanups. - use $Config{perllibs} instead of libs for configure. might help people who didn'T install all perl dependencies (might break things as well). * Wed Aug 15 2018 coolo@suse.com - updated to 4.54 see /usr/share/doc/packages/perl-IO-AIO/Changes 4.54 Tue Aug 14 13:54:48 CEST 2018 - include sys/mkdev.h or sys/sysmacros.h if available. - further tweaks to configure invocation for systems requiring --rpath. - no longer rely on custom paths on win32 platforms. - try to work around buggy PAGESIZE macro on solaris. 4.53 Tue Aug 14 11:27:50 CEST 2018 - add $Config{libs} to LIBS for configure, to work around systems with broken library dependencies (... openbsd). * Tue Aug 14 2018 coolo@suse.com - updated to 4.52 see /usr/share/doc/packages/perl-IO-AIO/Changes * Thu Aug 2 2018 coolo@suse.com - updated to 4.5 see /usr/share/doc/packages/perl-IO-AIO/Changes * Wed Feb 21 2018 coolo@suse.com - updated to 4.4 see /usr/share/doc/packages/perl-IO-AIO/Changes * Wed Feb 7 2018 coolo@suse.com - updated to 4.34 see /usr/share/doc/packages/perl-IO-AIO/Changes TODO: lchown * Sun May 3 2015 mardnh@gmx.de - ran spec-cleaner - update to version 4.32 - 4.32 Wed Feb 11 20:32:11 CET 2015 - replace off_t by STRLEN where appropriate, should not result in user-visible changes. - update ecb.h for C11 compatibility. - 4.31 Tue Jun 3 03:29:27 CEST 2014 - work around more 5.20 bugs. backwards compatibility my ass. - 4.3 Fri Apr 11 06:22:38 CEST 2014 - perl5porters broke Async::Interrupt, BDB, EV, IO::AIO, OpenCL without warning by switching the meaning of USE_SOCKETS_AS_HANDLES in 5.18. What's so attractive about giving a shit about backwards compatibility - I will never understand. - 4.2 Sat Jan 25 01:13:14 CET 2014 - aio_group could corrupt memory because it didn't restore the stack after req_submit. - be more careful on (e.g. permission) errors in bin/treescan. - work around changes in ExtUtils::MakeMaker. - (libeio) implement aio_realpath for win32. - (xthread) work around compile time bugs in ptw32. - added IO::AIO::pipesize. - (libecb) insignificant update. - 4.19 Sun Jan 6 12:47:26 CET 2013 - avoid endless loop in fiemap with some XFS files. - in aio_rename and aio_rmdir, specialcase the case of [$wd, "."] and call rename/rmdir instead of renameat/unlinkat. - 4.18 Thu Oct 11 07:01:26 CEST 2012 - fix unintended xthread_create by intentionalising it :) - 4.17 Thu Oct 11 05:19:47 CEST 2012 - rename aio_fallocate to aio_allocate, to match documentation. - add list of linux fsid values to aio_statvfs docs. - work around a bug in btrfs' FIEMAP ioctl implementation. - work around AIX bug: statvfs.f_fsid is a struct, not unsigned long as per unix spec. - 4.16 Tue Aug 14 05:39:03 CEST 2012 - aio_statvfs was wromgly marked for wd emulation, causing it to malfunction for paths. - fix a crash in aio_fiemap, when used on ranges without any extents. - work around linux kernel bug (at least in 3.2): kernel might trash fiemap input arguments. - work around linux kernel bug (at least in 3.2): kernel does not set FIEMAP_EXTENT_LAST on last segment. - work around linux kernel bug (at least in 3.2): kernel silently truncates segment count if a file. - make fh argument of IO::AIO::mmap optional, also add mmap/munmap to quick overview. - splice can corrupt data. - (libeio) remove pread/pwrite emulation. - do not grow mmaped scalars in aio_read. - add FALLOC_FL_PUNCH_HOLE and document fallocate. - provide pread/pwrite for win32, making it link again on native win32. - 4.15 Tue Apr 10 06:59:00 CEST 2012 - always include linux/types.h for fiemap, for compatibility to ancient systems (Paul Howarth). - experimental support for IO::AIO::splice and ::tee (no aio_...). - provide SEEK_HOLE and SEEK_DATA, if available. - work around (again!) an immensely stupid bug in RHEL, defining autoconf macros in linux system headers (analysed by Paul Howarth). - 4.14 Sat Apr 7 02:45:18 CEST 2012 - fix stat structure usage on windows, which caused bogus stat results. - (libeio) make readahead emulation behave more like actual readahead by never failing. - new request aio_seek. - new request aio_fiemap. - autogenerate the #ifdef/#define 0 blocks for symbols we export. - 4.12 Fri Dec 30 08:51:25 CET 2011 - realpath would return a random value if the name was too long, instead of -1. - port to c89. - 4.11 Mon Oct 10 00:24:11 CEST 2011 - libeio didn't compile on !linux (Paul Howarth). - 4.1 Sun Oct 9 10:24:11 CEST 2011 - IO::AIO did access uninitialised memory on unsuccessful stats. - (libeio) added syncfs syscall wrapper. - (libeio) set thread name on linux (ps -L/Hcx, top, gdb). - (libeio) support multiple indepenent working directories. - applied speling corrections by Nicholas Bamber. - tune treescan #threads and #outstanding requests a bit. - reduce the number of file descriptors in use at any one time in treescan, to avoid running out of them (and using too much ram). - take advantage of working directoriy abstractions in aio_scandir and treescan. - reduce compiled size by ~10%% by not inlining some key functionality. - added --progress switch to treescan. - 4.0 Mon Jul 18 05:01:10 CEST 2011 - INCOMPATIBLE CHANGE: fork is no longer supported (indeed, it never was), see FORK BEHAVIOUR in manpage for details. - passes testsuite on win32 now and may actually work (activestate 5.10.1 / MSVC6, YMMV). - (libeio) fix a deadlock where a wakeup signal could be missed when a timeout occured at the same time. - (libeio) added realpath. - (libeio) added fallocate. - (libeio) disabling sendfile on darwin unfortunately broke the emulation. - (libeio) do not acquire any locks when forking. - (libeio) use fewer time() syscalls when waiting for new requests. - 3.93 Wed Jun 29 23:44:18 CEST 2011 - ECB.H WAS MISSING. - 3.92 Wed Jun 29 14:45:41 CEST 2011 - ecb.h was missing. - 3.91 Wed Jun 29 13:24:42 CEST 2011 - (libeio) work around a Linux (and likely FreeBSD and other kernels) bug where sendfile would not transfer all the requested bytes on large transfers, using a heuristic. - buggy sendfile caused aio_move/copy to sometimes fail for big files (fortunately it checks that the whole file has been transferred...) - use libecb for higher performance and higher portability. - (libeio) disable sendfile on darwin, it's too broken. - disable fork tests on !linux, as only linux supports mixing pthread and fork in perl. - document the fact that fork doesn't work anymore when using this module, on anything !GNU/Linux. - increase timeout in t/04_fork.t, as too many CPAN-tester setups run on a 0.1MHz cpu. Or so. - 3.9 Fri May 27 02:43:47 CEST 2011 - (libeio) fix memory corruption in aio_readdirx for the flags combination READDIR_STAT_ORDER | READDIR_DIRS_FIRST. - add lots of newer POSIX and GNU/Linux-specific open flags. - 3.8 Sun Mar 27 12:25:33 CEST 2011 - use nonstandard but maybe-working-on-bsd fork technique. - support a max_idle value of 0. - support setting of idle timeout value (IO::AIO::idle_timeout). - 3.72 Fri Feb 11 04:25:38 CET 2011 - use _POSIX_MEMLOCK_RANGE to detect mlock/munlock. - aio_mknod always used a dev_t value of 0. - new treescan option: --grep. - add more S_IF macros, and major/minor/makedev "macros". * Thu Dec 30 2010 pascal.bleser@opensuse.org - update to 3.71: * the numerical result value passed to callbacks did not stringify correctly, due to internal reuse and failure to reset the sv flags * actually test for posix_[mf]advise, as at least uClibc defines _POSIX_ADVISORY_INFO without actually having any of the required funcitonality * Wed Dec 22 2010 pascal.bleser@opensuse.org - initial package (3.7)