* Switch to Standards-Version 4.6.2 (no changes needed).
* Do not trim debian/changelog.
* Update debian/patches metadata.
[dgit import unpatched libaio 0.3.113-4]
--- /dev/null
--- /dev/null
++libaio (0.3.113-4) unstable; urgency=medium
++
++ * Switch to Standards-Version 4.6.2 (no changes needed).
++ * Do not trim debian/changelog.
++ * Update debian/patches metadata.
++
++ -- Guillem Jover <guillem@debian.org> Wed, 18 Jan 2023 01:35:12 +0100
++
++libaio (0.3.113-3) unstable; urgency=medium
++
++ * Add upstream/metadata fields for bug submitting and database.
++ * Update lintian overrides.
++ * Switch to Standards-Version 4.6.1 (no changes needed).
++ * Move debian/copyright Source field immediately after Format field.
++ * Export DEB_BUILD_MAINT_OPTIONS and DEB_CFLAGS_MAINT_PREPEND.
++ * Switch from hardening=+bindnow to hardening=+all.
++ * Enable future=+lfs build feature as it does not affect the shared library
++ ABI, but affects the test harness.
++
++ -- Guillem Jover <guillem@debian.org> Sun, 04 Dec 2022 18:06:09 +0100
++
++libaio (0.3.113-2) unstable; urgency=medium
++
++ * Skip new test case 23, which was added upstream for a kernel regression,
++ so we are not worse off than before. Its failure was known and being
++ looked at upstream.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 19 Apr 2022 15:57:07 +0200
++
++libaio (0.3.113-1) unstable; urgency=medium
++
++ * New upstream release.
++ - Remove patches taken from upstream, now unneeded.
++ - Remove -Werror removal patch, as we override CFLAGS.
++ - Refresh patches.
++ - Update copyright years.
++ * Add support for the noudeb build profile.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 19 Apr 2022 03:22:49 +0200
++
++libaio (0.3.112-13) unstable; urgency=medium
++
++ * Pass CPPFLAGS to linker command, which as a side effect makes the
++ build reproducible on differing build pathnames.
++
++ -- Guillem Jover <guillem@debian.org> Thu, 11 Nov 2021 04:56:01 +0100
++
++libaio (0.3.112-12) unstable; urgency=medium
++
++ * Add patch from upstream to fix test suite warning with gcc-11.
++ * Fix LTO build by using symver function attribute instead of .symver
++ __asm__ statement. (Closes: #998309)
++
++ -- Guillem Jover <guillem@debian.org> Wed, 03 Nov 2021 00:56:45 +0100
++
++libaio (0.3.112-11) unstable; urgency=medium
++
++ * Use CC as a shell variable instead of a make one in autopkgtests.
++ * Fix typos in io(3) man page.
++
++ -- Guillem Jover <guillem@debian.org> Sun, 10 Oct 2021 06:34:12 +0200
++
++libaio (0.3.112-10) unstable; urgency=medium
++
++ * Add autopkgtests.
++ * Switch to Standards-Version 4.6.0 (no changes needed).
++ * Ship all man pages again, now that the redundant ones are no longer
++ present, and the ones that describe the interfaces in the library live
++ in section 3 which do not conflict with the ones in manpages-dev.
++ (Closes: #995110)
++ * Stop shipping upstream TODO file in libaio-dev.
++ * List pathnames explicitly in debhelper .install fragment files, instead
++ of using over matching globs.
++
++ -- Guillem Jover <guillem@debian.org> Sat, 09 Oct 2021 17:31:09 +0200
++
++libaio (0.3.112-9) unstable; urgency=medium
++
++ * Remove Build-Depends on dpkg-dev, satisfied in stable.
++ * Switch to debhelper compatibility level 13.
++ * Do not pass ChangeLog to dh_installchangelogs, now handled by default.
++ * Switch to Standards-Version 4.5.1 (no changes needed).
++ * Switch to the dh sequencer.
++ * Add debian/upstream/metadata file.
++
++ -- Guillem Jover <guillem@debian.org> Thu, 24 Dec 2020 15:41:17 +0100
++
++libaio (0.3.112-8) unstable; urgency=medium
++
++ * Add a comment with the reason for each architecture being in the flaky
++ test suite mode.
++ * Remove temporary forced flaky test suite run on architectures built under
++ an emulator, and move them to the permanent flaky list.
++ * Add x32 to the flaky test suite mode list, it's still failing on the build
++ daemons, even though it worked locally.
++ * Remove no longer needed TESTS_RUN logic, and inline the nocheck condition.
++
++ -- Guillem Jover <guillem@debian.org> Mon, 13 Apr 2020 02:58:47 +0200
++
++libaio (0.3.112-7) unstable; urgency=medium
++
++ * Cleanup patches:
++ - Move upstream patches under debian/patches/upstream/.
++ - Fix syscall definitions for ARM and ia64 to match the kernel exactly.
++ Otherwise the preprocessor emits warnings about redefinitions.
++ - Split the architecture support patches into one per arch support.
++ - Fix syscall definitions for hppa to match the kernel exactly.
++ - Make __X32_SYSCALL_BIT an unsigned long constant to match the kernel.
++ - Fix x32 structures padding.
++ - Rework build system patches to ready them for upstream submission,
++ and drop libdevdir support which we do not use anymore.
++ * Fix logic inversion in test suite flaky handling.
++ * Remove trailing closing parenthesis from TESTS_RUN conditional.
++ * Print a message when we run the test suite in flaky mode.
++ * Remove armhf from the test suite flaky mode.
++
++ -- Guillem Jover <guillem@debian.org> Sun, 12 Apr 2020 04:49:39 +0200
++
++libaio (0.3.112-6) unstable; urgency=medium
++
++ * Sync with upstream commits:
++ - Rebase against latest upstream git master.
++ - Skip the test if io_pgetevents() is not implemented.
++ * Switch to Standards-Version 4.5.0 (no changes needed).
++ * Do not pass --add-udeb to dh_makeshlibs anymore, it's autodetected since
++ debhelper 12.3, for which we add an explicit versioned Build-Depends.
++ * Use correct syscall numbers for x32 port.
++ * Make the testsuite fatal on architectures known to pass it, to avoid
++ future regressions.
++ * Temporarily force a flaky test suite run on architectures built under
++ and emulator, to get test results.
++
++ -- Guillem Jover <guillem@debian.org> Sat, 11 Apr 2020 19:06:49 +0200
++
++libaio (0.3.112-5) unstable; urgency=medium
++
++ * Sync with upstream commits:
++ - Make test suite failures fatal, so we ignore errors for now, until it
++ passes at least in all release architectures.
++ - Add support for SKIPable tests.
++ - Allow running tests against the installed library, which will make
++ possible to add autopkgtests.
++ - Fix test case 5.t, by using a write() instead of a read() to force the
++ kernel to read from the unreadable buffer.
++ * Add a workaround to io_pgetevents() for 32-bit userland running on
++ 64-bit kernels to cope with the broken compat kernel syscall, which uses
++ a 64-bit pointer instead of a 32-bit one, and eats the sigset_t size
++ member which makes it then fail a consistency check and return -EINVAL.
++ This fixes test case 22.t. The kernel fix is being prepared as well.
++ * Add more detailed error messages to test case 22.t.
++
++ -- Guillem Jover <guillem@debian.org> Fri, 16 Aug 2019 05:11:10 +0200
++
++libaio (0.3.112-4) unstable; urgency=medium
++
++ * Switch to Standards-Version 4.4.0 (no changes needed).
++ * Switch to debhelper compatibility level 12.
++ * Switch from debian/compat to debhelper-compat in Build-Depends.
++ * Test suite fixes:
++ - Fix the attempt_rw READ call to be arch-dependent instead of making
++ it the WRITE call. Thanks to Jeff Moyer <jmoyer@redhat.com>.
++
++ -- Guillem Jover <guillem@debian.org> Fri, 02 Aug 2019 05:33:44 +0200
++
++libaio (0.3.112-3) unstable; urgency=medium
++
++ * Test suite fixes:
++ - Fix logic inversion in EINVAL check.
++ - Revert making the test suite fatal on failures, as the Debian buildd
++ setup is peculiar enough to make at least two tests fail. This will
++ need further work.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 26 Feb 2019 05:26:21 +0100
++
++libaio (0.3.112-2) unstable; urgency=medium
++
++ * Test suite fixes:
++ - Make RISC-V use SYS_eventfd2 instead of unavailable SYS_eventfd.
++ - Add fallback code for filesystems not supporting O_DIRECT.
++ - Handle -ENOTSUP in addition to -EINVAL from io_submit() with RWF_NOWAIT.
++ - The WRITE call does not change across different arches anymore.
++ - Make the test exit with a code matching the pass/fail state.
++ This will turn test suite errors into fatal build problems.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 26 Feb 2019 03:14:38 +0100
++
++libaio (0.3.112-1) unstable; urgency=medium
++
++ * New upstream release.
++ - Refresh patches.
++ - Remove patches merged upstream.
++ - Add new patch to fix error due to -Werror=sizeof-pointer-memaccess.
++ - Split man page cleanup into logic changes, and further improve the
++ formatting, markup, typo fixes, etc.
++ * Use expanded symbol file instead of matching on symver. Even though
++ upstream manages versioned symbols correctly, being explicit makes it
++ safer against accidental changes.
++ * Add a Build-Depends-Package field to the symbols file.
++ * Only install upstream TODO into libaio-dev.
++ * Remove support for old debug symbol package migration.
++ * Add comment for dpkg-dev versioned Build-Depends.
++ * Perform a proper and correct /usr-merge transition by moving the package
++ contents from / to /usr.
++ * Now using Standards-Version 4.3.0 (no changes needed).
++ * Remove unused make variables from debian/rules.
++
++ -- Guillem Jover <guillem@debian.org> Mon, 25 Feb 2019 02:56:55 +0100
++
++libaio (0.3.111-1) unstable; urgency=medium
++
++ * New upstream release.
++ - Refresh patches.
++ - Fix x32 support. (Closes: #883904)
++ - Add riscv64 support. (Closes: #893003)
++ * Fix cross-building by not invoking getconf for PAGESIZE, and instead
++ getting the value at run-time.
++ * Do not pass -fomit-frame-pointer as part of the required compiler flags.
++ * Remove now always unused lintian override, as upstream requires linking
++ against libc everywhere for its syscall(3) usage.
++ * Mark libaio-dev as Multi-Arch same.
++ * Now using Standards-Version 4.1.3 (no changes needed).
++ * Switch to debhelper compatibility level 11.
++
++ -- Guillem Jover <guillem@debian.org> Sun, 18 Mar 2018 02:58:44 +0100
++
++libaio (0.3.110-5) unstable; urgency=medium
++
++ * Line-wrap and sort debian/control fields.
++ * Now using Standards-Version 4.1.1 (no changes needed).
++ * Use dpkg buildtools.mk fragment to set a correct CC.
++ * Set Rules-Requires-Root to no.
++ * Switch to debian/watch format version 4.
++ * Fix regex in debian/watch file to not include extension in the version.
++
++ -- Guillem Jover <guillem@debian.org> Sun, 05 Nov 2017 16:26:47 +0100
++
++libaio (0.3.110-4) unstable; urgency=medium
++
++ * Update upstream URLs to point to pagure.io instead of obsolete
++ fedorahosted.org site.
++ * Switch to debhelper compatibility level 10.
++ * Now using Standards-Version 4.0.1 (no changes needed).
++ * Move location of LGPL in Debian systems into a Comment field in
++ debian/copyright.
++ * Use -a instead of deprecated -s in debhelper commands.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 08 Aug 2017 00:29:32 +0200
++
++libaio (0.3.110-3) unstable; urgency=medium
++
++ * Use https for hadrons.org and debian.org URLs.
++ * Switch debug package to a ddeb.
++ * Switch to the dpkg makefile fragments in debian/rules.
++ * Enable hardening bindnow feature.
++ * Update URL in debian/watch.
++ * Fix typos in man pages, reported by lintian.
++ * Now using Standards-Version 3.9.8 (no changes needed).
++
++ -- Guillem Jover <guillem@debian.org> Tue, 31 May 2016 20:38:08 +0200
++
++libaio (0.3.110-2) unstable; urgency=medium
++
++ * Use https for the debian/copyright Format URL.
++ * Switch Vcs-Browser to a cgit URL.
++ * Update Homepage URL to new release site.
++ Prompted by Sedat Dilek <sedat.dilek@gmail.com>.
++ * Use https in debian/watch URL.
++ * Add a small note on each long package description explaining what is
++ contained on each package.
++ * Document each patch.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 29 Sep 2015 16:48:30 +0200
++
++libaio (0.3.110-1) unstable; urgency=low
++
++ * New upstream release.
++ - Refresh patches.
++ * Link against -lc and -Wl,--as-needed so that we pull the required
++ fortified functions from the internal libc_nonshared.a, but do not link
++ against the shared library because we do not use any of its symbols.
++ (Closes: #764509)
++ * Switch debian/copyright to machine-readable format 1.0.
++ * Now using Standards-Version 3.9.6 (no changes needed).
++ * Switch to debhelper compatibility level 9.
++ * Fix mips/mipsel syscall wrappers to return correct error values.
++ Thanks to Jurica Stanojkovic <Jurica.Stanojkovic@rt-rk.com>.
++ * Add mips64 support. Reported by Jeremy Fitzhardinge <jeremy@exablox.com>.
++
++ -- Guillem Jover <guillem@debian.org> Thu, 09 Oct 2014 05:44:48 +0200
++
++libaio (0.3.109-4) unstable; urgency=low
++
++ * Now using Standards-Version 3.9.4 (no changes needed).
++ * Remove package creation information from debian/copyright.
++ * Update upstream git URL in debian/copyright.
++ * Add support for x32 (from the Yocto project). (Closes: #702183)
++ Thanks to Daniel Schepler <dschepler@gmail.com>.
++ * Add support for arm64 (stolen from upstream). (Closes: #702409)
++ Thanks to Ian Campbell <ijc@hellion.org.uk>.
++ * Add cross-compilation support.
++ Based on a patch by Ian Campbell <ijc@hellion.org.uk>.
++ * Update debian/watch file to a working URL.
++
++ -- Guillem Jover <guillem@debian.org> Mon, 06 May 2013 18:56:19 +0200
++
++libaio (0.3.109-3) unstable; urgency=low
++
++ * Escape backslash in man pages. (Closes: #651833)
++ Thanks to Stephan Springl <springl-libaio@bfw-online.de>.
++ * Do not install man pages now provided by manpages-dev. (Closes: #650108)
++ * Use dpkg-buildflags to set CPPFLAGS, CFLAGS and LDFLAGS.
++ * Now using Standards-Version 3.9.3 (no changes needed).
++
++ -- Guillem Jover <guillem@debian.org> Thu, 21 Jun 2012 09:21:59 +0200
++
++libaio (0.3.109-2) unstable; urgency=low
++
++ * Add a symbols file for libaio1.
++ * Remove heading ‘./’ from lintian-override tag.
++ * Fix FTBFS with newer gcc 4.6: (Closes: #638848)
++ - Do not build the test-suite with -Werror.
++ - Use unused waitpid() return code variables to assert valid values.
++ * Make shared library packages multiarch:
++ - Build-Depend on debhelper 8.1.3.
++ - Add misc:Pre-Depends substvar to Pre-Depends field in libaio1.
++ - Add “Multi-Arch: same” field to libaio1 and libaio1-dbg.
++ - Change paths from lib/ to lib/* in install and lintian-override files.
++ - Define DEB_HOST_MULTIARCH and use it to set libdir and libdevdir.
++ * Install all libaio io*.3 man pages. (Closes: #418048)
++ * Do not install man pages for functions coming from libc, the aio*
++ and lio_listio* man pages are already shipped by manpages-dev.
++ * Merge adapted changes from Ubuntu. (Closes: #588112)
++ - Change Priority from extra to optional.
++ - Add support for sparc64 and hppa 64-bit architectures.
++ * Set libaio1-dbg Priority back to extra.
++ * Now using Standards-Version 3.9.2 (no changes needed).
++
++ -- Guillem Jover <guillem@debian.org> Tue, 30 Aug 2011 16:54:22 +0200
++
++libaio (0.3.109-1) unstable; urgency=low
++
++ * New upstream release.
++ - Refresh patches.
++ * Switch to source format “3.0 (quilt)”:
++ - Remove quilt from Build-Depends.
++ - Remove quilt.make include from debian/rules.
++ - Remove patch and unpatch targets from debian/rules.
++ - Remove now unneeded debian/README.source.
++ * Update watch file to point to the new upstream URL at kernel.org.
++ * Now using Standards-Version 3.9.1 (no changes needed).
++ * Add missing ${misc:Depends} to eveyr package Depends fields.
++ * Switch Architecture field list to just linux-any, and although the
++ code will not automatically support new Linux architectures, as it
++ will miss the syscall-<arch>.h header support among others, it just
++ needs to be ported, and this way it's easier to spot. This implicitly
++ adds amrhf support. (Closes: #596996)
++ * Add a Homepage field. (Closes: #566338)
++
++ -- Guillem Jover <guillem@debian.org> Sun, 27 Feb 2011 05:22:27 +0100
++
++libaio (0.3.107-7) unstable; urgency=low
++
++ * Add support for sh3 and sh4. (Closes: #535288)
++ Thanks to Nobuhiro Iwamatsu <iwamatsu@nigauri.org>.
++ * Now using Standards-Version 3.8.3 (no changes needed).
++
++ -- Guillem Jover <guillem@debian.org> Thu, 10 Sep 2009 13:02:34 +0200
++
++libaio (0.3.107-6) unstable; urgency=low
++
++ * Workaround debhelper compat v7 bug (#534565) in dh_install which makes
++ files end up under /debian/tmp/ in the binary package, by not passing
++ --sourcedir to dh_install. (Closes: #533359, #532644)
++ * Pass -s to arch dependent debhelper commands.
++ * Now using Standards-Version 3.8.2 (no changes needed).
++
++ -- Guillem Jover <guillem@debian.org> Thu, 25 Jun 2009 14:11:25 +0200
++
++libaio (0.3.107-5) unstable; urgency=low
++
++ * Change libaio1-dbg section to debug.
++ * Fix build failure in test suite on non-i386 32 bit architectures.
++ * Fix man pages errors and warnings.
++
++ -- Guillem Jover <guillem@debian.org> Wed, 10 Jun 2009 06:09:52 +0200
++
++libaio (0.3.107-4) unstable; urgency=low
++
++ * Switch to debhelper compatibility level 7.
++ * Use dh_prep instead of “dh_clean -k”.
++ * Remove libaio1.dirs, unneeded due to dh_lintian taking care of it.
++ * Run the test suite on all architectures and not only on i386.
++ * Now using Standards-Version 3.8.1 (no changes needed).
++ * Switch the upstream repository reference from CVS to git.
++
++ -- Guillem Jover <guillem@debian.org> Mon, 08 Jun 2009 19:40:54 +0200
++
++libaio (0.3.107-3) unstable; urgency=low
++
++ * Fix the Vcs-Git URL.
++ * Remove XB- from the Package-Type field.
++ * Fix watch file URL. (Closes: #502884)
++ Thanks to Jiří Paleček <jpalecek@web.de>.
++
++ -- Guillem Jover <guillem@debian.org> Mon, 20 Oct 2008 20:36:43 +0300
++
++libaio (0.3.107-2) unstable; urgency=low
++
++ * Only run the test suite on i386 as it has not been ported for other
++ architectures. (Closes: #488812)
++ * Use $(filter ...) instead of $(findstring ...) to extract space separated
++ options from DEB_BUILD_OPTIONS in debian/rules.
++ * Do not check for the existence of the Makefile on clean, it's always
++ there.
++ * Switch to use dh_lintian instead of manually installing the overrides.
++ - Bump the versioned debhelper Build-Depends to 6.0.7.
++
++ -- Guillem Jover <guillem@debian.org> Wed, 09 Jul 2008 05:32:30 +0300
++
++libaio (0.3.107-1) unstable; urgency=low
++
++ * New upstream release.
++ * Run the test suite on install, and support nocheck DEB_BUILD_OPTIONS
++ to disable it.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 24 Jun 2008 09:03:54 +0300
++
++libaio (0.3.106-9) unstable; urgency=low
++
++ * Fix misspelled words (linux -> Linux and aio -> AIO).
++ * Update packaging Vcs fields to the new URL.
++ * Improve debian/copyright:
++ - Change 'Copyright Holder' to 'Copyright Holders'.
++ - Use UTF-8 copyright sign.
++ - Update upstream download url.
++ - Refer to LGPL-2.1 from common-licenses instead of just LGPL.
++ * Add a debian/README.source file.
++ * Now using Standards-Version 3.8.0.
++ * Refresh patches with -pab. (Closes: #484962)
++ * Update watch file URL. (Closes: #450017)
++
++ -- Guillem Jover <guillem@debian.org> Sun, 22 Jun 2008 07:42:52 +0300
++
++libaio (0.3.106-8) unstable; urgency=low
++
++ * Install shared library under /lib, needed by multipath binaries which
++ reside under /sbin. (Closes: #441244)
++ - debian/patches/02_libdevdir.patch: New file.
++ * Add a debugging symbols library package.
++ * Add Vcs-Browser and Vcs-Git fields.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 11 Sep 2007 04:29:22 +0300
++
++libaio (0.3.106-7) unstable; urgency=low
++
++ * Add a new library udeb needed for multipath support. (Closes: #440320)
++
++ -- Guillem Jover <guillem@debian.org> Thu, 06 Sep 2007 03:11:08 +0300
++
++libaio (0.3.106-6) unstable; urgency=low
++
++ * Link against libgcc to avoid unresolved symbols on at least hppa.
++ - debian/01_link_libgcc.patch: New file.
++ Thanks to Steve Langasek <vorlon@debian.org> for the analysis.
++ * Add shlibs:Depends substvar back into libaio1 Depends, since we link
++ against an external library now (although it might not be used on any
++ architecture).
++
++ -- Guillem Jover <guillem@debian.org> Mon, 06 Aug 2007 04:50:18 +0300
++
++libaio (0.3.106-5) unstable; urgency=low
++
++ * Do not ignore 'make clean' errors on clean.
++ * Support build-arch and build-indep in debian/rules:
++ - Rename install to install-arch.
++ - Rename build to build-arch.
++ - Add an empty build target that depends on build-arch and build-indep.
++ * Switch directory variables to simply expanded ones in debian/rules.
++ * Use binary:Version instead of the deprecated Source-Version substvar.
++ * Remove Tag field as it does not seem to make much sense to include it
++ in the packages.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 17 Jul 2007 09:19:26 +0300
++
++libaio (0.3.106-4) unstable; urgency=low
++
++ * Add armeb and armel to the Architecture fields.
++
++ -- Guillem Jover <guillem@debian.org> Fri, 19 Jan 2007 06:48:26 +0200
++
++libaio (0.3.106-3) unstable; urgency=low
++
++ * Fix a typo in the arm io_syscall5 macro, making the library end up
++ with unresolvable symbols. (Closes: #393156)
++ Thanks to Marcin Juszkiewicz <debian-bugs@hrw.one.pl>.
++
++ -- Guillem Jover <guillem@debian.org> Mon, 16 Oct 2006 10:44:02 +0300
++
++libaio (0.3.106-2) unstable; urgency=low
++
++ * Use quilt for patching:
++ - Add new debian/patches/series file.
++ - Add Build-Depends on 'quilt (>= 0.40)'.
++ - Include quilt.make from debian/rules.
++ * Add support for arm, hppa, m68k, mips, mipsel and sparc. Those have yet
++ to be tested with the harness test suite and pass it.
++ * Add a Tag: field to all binary packages.
++
++ -- Guillem Jover <guillem@debian.org> Tue, 19 Sep 2006 00:48:10 +0300
++
++libaio (0.3.106-1) unstable; urgency=low
++
++ * New Upstream Release. (Closes: #384268)
++ - Fix .endp being outside of procedure on ia64 with new binutils.
++ (Closes: #385373)
++
++ -- Guillem Jover <guillem@debian.org> Fri, 1 Sep 2006 05:51:36 +0300
++
++libaio (0.3.104-2) unstable; urgency=low
++
++ * New Maintainer.
++ * Provide a new binary package libaio-dev, with the static library
++ the .so symlink and the manpages. (Closes: #318795)
++ * Add debian/libaio-dev.install.
++ * Add debian/libaio-dev.manpages.
++ * Rename the binary package libaio to libaio1 to match the soname, no
++ transition package as no one depends on it.
++ * Rename debian/lintian.override to debian/libaio1.lintian.
++ * Remove shlib-missing-in-control-file lintian override as we provide
++ now the shlibs file.
++ * Only put "usr/share/lintian/override" in libaio1.dirs.
++ * Remove temporal debhelper leftover files:
++ - debian/libaio-0.3.104.postinst.debhelper
++ - debian/libaio-0.3.104.postrm.debhelper
++ * Add amd64 to the Architecture fields. (Closes: #335352)
++ * Switch to debhelper compat level 5.
++ * Now using Standards-Version 3.7.2.
++ * Change Priority from optional to extra.
++ * Specify in the package description that this library is for Linux.
++ * Remove unneeded debian/dirs file.
++ * Remove debian/debianize.patch, we actually want the .so symlink
++ and the .a library when doing "make install".
++ * Clean up debian/rules:
++ - Do not use stamp files.
++ - Remove unused comments.
++ - Remove unused configure target.
++ - Do not pass DESTDIR to make as it is not using it.
++ * Complete debian/copyright:
++ - Add copyright holder information.
++ - Add the LGPL license snippet.
++ - Specify a download url which actually works.
++ * Add a watch file.
++
++ -- Guillem Jover <guillem@debian.org> Thu, 24 Aug 2006 05:45:36 +0300
++
++libaio (0.3.104-1) unstable; urgency=low
++
++ * Initial Release.
++
++ -- William Lee Irwin III <wli@holomorphy.com> Fri, 22 Apr 2005 14:49:28 -0700
--- /dev/null
--- /dev/null
++Source: libaio
++Maintainer: Guillem Jover <guillem@debian.org>
++Priority: optional
++Section: libs
++Vcs-Browser: https://git.hadrons.org/cgit/debian/pkgs/libaio.git
++Vcs-Git: https://git.hadrons.org/git/debian/pkgs/libaio.git
++Homepage: https://pagure.io/libaio
++Standards-Version: 4.6.2
++Rules-Requires-Root: no
++Build-Depends:
++ debhelper-compat (= 13),
++ debhelper (>= 13.10),
++
++Package: libaio1
++Architecture: linux-any
++Multi-Arch: same
++Pre-Depends:
++ ${misc:Pre-Depends},
++Depends:
++ ${misc:Depends},
++ ${shlibs:Depends},
++Description: Linux kernel AIO access library - shared library
++ This library enables userspace to use Linux kernel asynchronous I/O
++ system calls, important for the performance of databases and other
++ advanced applications.
++ .
++ This package contains the shared library.
++
++Package: libaio1-udeb
++Package-Type: udeb
++Section: debian-installer
++Architecture: linux-any
++Build-Profiles: <!noudeb>
++Depends:
++ ${misc:Depends},
++ ${shlibs:Depends},
++Description: Linux kernel AIO access library - shared library
++ This library enables userspace to use Linux kernel asynchronous I/O
++ system calls, important for the performance of databases and other
++ advanced applications.
++ .
++ This package contains the udeb shared library.
++
++Package: libaio-dev
++Section: libdevel
++Architecture: linux-any
++Multi-Arch: same
++Depends:
++ ${misc:Depends},
++ libaio1 (= ${binary:Version}),
++Description: Linux kernel AIO access library - development files
++ This library enables userspace to use Linux kernel asynchronous I/O
++ system calls, important for the performance of databases and other
++ advanced applications.
++ .
++ This package contains the static library and the header files.
--- /dev/null
--- /dev/null
++Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
++Source: https://pagure.io/libaio.git
++Upstream-Name: libaio
++Upstream-Contact: Jeff Moyer <jmoyer@redhat.com>
++
++Files: *
++Copyright:
++ Copyright © 2002-2003 Benjamin LaHaise <bcrl@redhat.com>
++ Copyright © 2003-2022 Jeff Moyer <jmoyer@redhat.com>
++License: LGPL-2.1+
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++ .
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++ .
++ You should have received a copy of the GNU Lesser General Public License
++ along with this library. If not, see <https://www.gnu.org/licenses/>.
++Comment:
++ On Debian systems, the complete text of the GNU Lesser General
++ Public License can be found in '/usr/share/common-licenses/LGPL-2.1'.
--- /dev/null
--- /dev/null
++usr/include
++usr/lib/*/libaio.so
++usr/lib/*/libaio.a
--- /dev/null
--- /dev/null
++man/io.3
++man/io_cancel.3
++man/io_fsync.3
++man/io_getevents.3
++man/io_prep_fsync.3
++man/io_prep_pread.3
++man/io_prep_pwrite.3
++man/io_queue_init.3
++man/io_queue_release.3
++man/io_queue_run.3
++man/io_queue_wait.3
++man/io_set_callback.3
++man/io_submit.3
--- /dev/null
--- /dev/null
++usr/lib/*/libaio.so.1
++usr/lib/*/libaio.so.1.*
--- /dev/null
--- /dev/null
++usr/lib/*/libaio.so.1
++usr/lib/*/libaio.so.1.*
--- /dev/null
--- /dev/null
++libaio.so.1 libaio1 #MINVER#
++* Build-Depends-Package: libaio-dev
++ LIBAIO_0.1@LIBAIO_0.1 0.3.9
++ LIBAIO_0.4@LIBAIO_0.4 0.3.93
++ LIBAIO_0.5@LIBAIO_0.5 0.3.112
++ io_cancel@LIBAIO_0.1 0.3.9
++ io_cancel@LIBAIO_0.4 0.3.93
++ io_destroy@LIBAIO_0.4 0.3.93
++ io_getevents@LIBAIO_0.1 0.3.9
++ io_getevents@LIBAIO_0.4 0.3.93
++ io_pgetevents@LIBAIO_0.5 0.3.112
++ io_queue_init@LIBAIO_0.1 0.3.9
++ io_queue_release@LIBAIO_0.1 0.3.9
++ io_queue_run@LIBAIO_0.1 0.3.9
++ io_queue_wait@LIBAIO_0.1 0.3.9
++ io_queue_wait@LIBAIO_0.4 0.3.93
++ io_setup@LIBAIO_0.4 0.3.93
++ io_submit@LIBAIO_0.1 0.3.9
--- /dev/null
--- /dev/null
++From 90fde4fb458fbf1d497c427c3f945f3d7ee11684 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Tue, 19 Apr 2022 15:45:39 +0200
++Subject: [PATCH libaio] harness: Disable failing test 23
++Origin: vendor
++Forwarded: not-needed
++
++This new test fails on several architectures. But it is a new test
++intended to check for a Linux kernel regression, so we are not worse
++off than were before. Add it to the EXTRACASES variables, which has
++currently the side effect of disabling it, as it is not handled
++explicitly in the make target responsible for that variable.
++
++Sent-Upstream: not-relevant
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/Makefile | 2 +-
++ 1 file changed, 1 insertion(+), 1 deletion(-)
++
++diff --git a/harness/Makefile b/harness/Makefile
++index 8cb27fa..01613e7 100644
++--- a/harness/Makefile
+++++ b/harness/Makefile
++@@ -1,6 +1,6 @@
++ # foo.
++ TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2)
++-EXTRAPROGS:=cases/8.p cases/10.p
+++EXTRAPROGS:=cases/8.p cases/10.p cases/23.p
++ PARTPROGS:=$(filter-out $(EXTRAPROGS), $(patsubst %.t,%.p,$(TEST_SRCS)))
++ PROGS:=$(PARTPROGS) $(EXTRAPROGS)
++ HARNESS_SRCS:=main.c
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From f95e1898b6efd3eaf50273bd1c5a8a40816b5160 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Sun, 10 Oct 2021 06:14:51 +0200
++Subject: [PATCH libaio 01/14] man: Fix typos
++Origin: vendor
++Forwarded: https://marc.info/?l=linux-aio&m=164999309220532
++
++Warned-by: lintian
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ man/io.3 | 4 ++--
++ 1 file changed, 2 insertions(+), 2 deletions(-)
++
++diff --git a/man/io.3 b/man/io.3
++index bfa9836..c4554a5 100644
++--- a/man/io.3
+++++ b/man/io.3
++@@ -147,7 +147,7 @@ This is experimental.
++ * 3. When write completes decrement counter and free resources
++ *
++ *
++- * Usage: aiocp file(s) desination
+++ * Usage: aiocp file(s) destination
++ */
++
++ #include <unistd.h>
++@@ -271,7 +271,7 @@ int main(int argc, char *const *argv)
++
++ while (tocopy > 0) {
++ int i, rc;
++- /* Submit as many reads as once as possible upto AIO_MAXIO */
+++ /* Submit as many reads as once as possible up to AIO_MAXIO */
++ int n = MIN(MIN(AIO_MAXIO - busy, AIO_MAXIO / 2),
++ howmany(length - offset, AIO_BLKSIZE));
++ if (n > 0) {
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From 67a28d3c066465668ebffb9ebfb71e89f0e5c19c Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Sun, 12 Apr 2020 03:58:12 +0200
++Subject: [PATCH libaio 02/14] build: Fix DESTDIR and pathname variables
++ handling
++
++The convention for DESTDIR is that it is only prefixed during the
++install target. In this case we postpone that to the inner Makefile
++so that it can be invoked directly while preserving the expected
++semantics. We should also prefer the user specified pathname variables
++if already set in any way, and do not need to pass them explicitly
++to the sub-make.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ Makefile | 6 +-----
++ src/Makefile | 16 ++++++++--------
++ 2 files changed, 9 insertions(+), 13 deletions(-)
++
++diff --git a/Makefile b/Makefile
++index c1fb831..c194d9e 100644
++--- a/Makefile
+++++ b/Makefile
++@@ -4,17 +4,13 @@ VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
++ TAG = $(NAME)-$(VERSION)
++ RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
++
++-prefix=/usr
++-includedir=$(prefix)/include
++-libdir=$(prefix)/lib
++-
++ default: all
++
++ all:
++ @$(MAKE) -C src
++
++ install:
++- @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir)
+++ @$(MAKE) -C src install
++
++ check:
++ @$(MAKE) -C harness check
++diff --git a/src/Makefile b/src/Makefile
++index d080a1b..9a36d0d 100644
++--- a/src/Makefile
+++++ b/src/Makefile
++@@ -1,6 +1,6 @@
++-prefix=/usr
++-includedir=$(prefix)/include
++-libdir=$(prefix)/lib
+++prefix ?= /usr
+++includedir ?= $(prefix)/include
+++libdir ?= $(prefix)/lib
++
++ CFLAGS ?= -g -fomit-frame-pointer -O2
++ CFLAGS += -Wall -I. -fPIC
++@@ -59,12 +59,12 @@ $(libname): $(libaio_sobjs) libaio.map
++ $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
++
++ install: $(all_targets)
++- install -D -m 644 libaio.h $(includedir)/libaio.h
++- install -D -m 644 libaio.a $(libdir)/libaio.a
+++ install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h
+++ install -D -m 644 libaio.a $(DESTDIR)$(libdir)/libaio.a
++ ifeq ($(ENABLE_SHARED),1)
++- install -D -m 755 $(libname) $(libdir)/$(libname)
++- ln -sf $(libname) $(libdir)/$(soname)
++- ln -sf $(libname) $(libdir)/libaio.so
+++ install -D -m 755 $(libname) $(DESTDIR)$(libdir)/$(libname)
+++ ln -sf $(libname) $(DESTDIR)$(libdir)/$(soname)
+++ ln -sf $(libname) $(DESTDIR)$(libdir)/libaio.so
++ endif
++
++ $(libaio_objs): libaio.h
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From dd2a4c0d176b82781040c08a39fa4c75ccca63f5 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Sun, 12 Apr 2020 04:01:27 +0200
++Subject: [PATCH libaio 03/14] build: Honor user build flags
++MIME-Version: 1.0
++Content-Type: text/plain; charset=UTF-8
++Content-Transfer-Encoding: 8bit
++
++CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
++regardless of the user passing them over the environment or the
++command-line. Any required flag that the build system needs, has to be
++set in some other flag (which we will namespace with «MK_») so that the
++build will use even if the user flags are passed, even though the user
++should be able to override by appending after them. We pass CPPFLAGS to
++any compilation command that missed them.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/Makefile | 9 ++++++---
++ src/Makefile | 20 ++++++++++----------
++ 2 files changed, 16 insertions(+), 13 deletions(-)
++
++diff --git a/harness/Makefile b/harness/Makefile
++index 4f225d3..8cb27fa 100644
++--- a/harness/Makefile
+++++ b/harness/Makefile
++@@ -6,13 +6,16 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS)
++ HARNESS_SRCS:=main.c
++ # io_queue.c
++
++-CFLAGS+=-Wall -Werror -I../src -g -O2
+++MK_CPPFLAGS = -I../src $(CPPFLAGS)
+++CFLAGS ?= -Wall -Werror -g -O2
+++MK_CFLAGS = $(CFLAGS)
++ #-lpthread -lrt
+++MK_LDFLAGS = main.c $(LIBAIO) -lpthread $(LDFLAGS)
++
++ # gcc-11 does not like the test case in 3.t that
++ # passes an invalid pointer (-1) to the kernel, so
++ # tell the compiler we do not need a warning here
++-cases/3.p: CFLAGS+=-Wno-stringop-overflow
+++cases/3.p: MK_CFLAGS+=-Wno-stringop-overflow
++
++ # Change this on the build line to run tests against the installed libraries:
++ # make LIBAIO=-laio partcheck
++@@ -21,7 +24,7 @@ LIBAIO?=../src/libaio.a
++ all: $(PROGS)
++
++ $(PROGS): %.p: %.t $(HARNESS_SRCS)
++- $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c $(LIBAIO) -lpthread
+++ $(CC) $(MK_CPPFLAGS) $(MK_CFLAGS) -DTEST_NAME=\"$<\" -o $@ $(MK_LDFLAGS)
++
++ clean:
++ rm -f $(PROGS) *.o runtests.out rofile wofile rwfile
++diff --git a/src/Makefile b/src/Makefile
++index 9a36d0d..9a1ba51 100644
++--- a/src/Makefile
+++++ b/src/Makefile
++@@ -2,12 +2,12 @@ prefix ?= /usr
++ includedir ?= $(prefix)/include
++ libdir ?= $(prefix)/lib
++
++-CFLAGS ?= -g -fomit-frame-pointer -O2
++-CFLAGS += -Wall -I. -fPIC
++-SO_CFLAGS=-shared $(CFLAGS)
++-L_CFLAGS=$(CFLAGS)
++-LINK_FLAGS=
++-LINK_FLAGS+=$(LDFLAGS)
+++MK_CPPFLAGS = -I. $(CPPFLAGS)
+++CFLAGS ?= -Wall -g -fomit-frame-pointer -O2
+++MK_CFLAGS = -fPIC $(CFLAGS)
+++SO_CFLAGS = -shared $(MK_CFLAGS)
+++L_CFLAGS = $(MK_CFLAGS)
+++MK_LDFLAGS = $(LDFLAGS)
++ ENABLE_SHARED ?= 1
++
++ soname=libaio.so.1
++@@ -42,10 +42,10 @@ libaio_sobjs := $(patsubst %.c,%.os,$(libaio_srcs))
++ $(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h
++
++ %.os: %.c
++- $(CC) $(SO_CFLAGS) -c -o $@ $<
+++ $(CC) $(MK_CPPFLAGS) $(SO_CFLAGS) -c -o $@ $<
++
++ %.ol: %.c
++- $(CC) $(L_CFLAGS) -c -o $@ $<
+++ $(CC) $(MK_CPPFLAGS) $(L_CFLAGS) -c -o $@ $<
++
++ AR ?= ar
++ RANLIB ?= ranlib
++@@ -55,8 +55,8 @@ libaio.a: $(libaio_objs)
++ $(RANLIB) libaio.a
++
++ $(libname): $(libaio_sobjs) libaio.map
++- $(CC) $(CFLAGS) -c struct_offsets.c
++- $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
+++ $(CC) $(MK_CPPFLAGS) $(MK_CFLAGS) -c struct_offsets.c
+++ $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(MK_LDFLAGS)
++
++ install: $(all_targets)
++ install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From fa00b019422170118b5b4086b84e2dfd1a50811e Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Wed, 3 Nov 2021 00:20:50 +0100
++Subject: [PATCH libaio 04/14] Move semicolon to SYMVER and DEFSYMVER call
++ sites
++Origin: vendor
++Forwarded: https://marc.info/?l=linux-aio&m=164999309420541
++
++These look like function macros, so let's unify their call sites to use
++function syntax with a final semicolon.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ src/io_cancel.c | 2 +-
++ src/io_getevents.c | 2 +-
++ src/io_queue_wait.c | 2 +-
++ src/syscall.h | 4 ++--
++ 4 files changed, 5 insertions(+), 5 deletions(-)
++
++diff --git a/src/io_cancel.c b/src/io_cancel.c
++index 2f0f5f4..441806d 100644
++--- a/src/io_cancel.c
+++++ b/src/io_cancel.c
++@@ -20,4 +20,4 @@
++ #include "syscall.h"
++
++ io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, struct iocb *, iocb, struct io_event *, event)
++-DEFSYMVER(io_cancel_0_4, io_cancel, 0.4)
+++DEFSYMVER(io_cancel_0_4, io_cancel, 0.4);
++diff --git a/src/io_getevents.c b/src/io_getevents.c
++index 90d6081..88d285a 100644
++--- a/src/io_getevents.c
+++++ b/src/io_getevents.c
++@@ -32,4 +32,4 @@ int io_getevents_0_4(io_context_t ctx, long min_nr, long nr, struct io_event * e
++ return __io_getevents_0_4(ctx, min_nr, nr, events, timeout);
++ }
++
++-DEFSYMVER(io_getevents_0_4, io_getevents, 0.4)
+++DEFSYMVER(io_getevents_0_4, io_getevents, 0.4);
++diff --git a/src/io_queue_wait.c b/src/io_queue_wait.c
++index 538d2f3..6f69a51 100644
++--- a/src/io_queue_wait.c
+++++ b/src/io_queue_wait.c
++@@ -28,4 +28,4 @@ int io_queue_wait_0_4(io_context_t ctx, struct timespec *timeout)
++ {
++ return io_getevents(ctx, 0, 0, NULL, timeout);
++ }
++-DEFSYMVER(io_queue_wait_0_4, io_queue_wait, 0.4)
+++DEFSYMVER(io_queue_wait_0_4, io_queue_wait, 0.4);
++diff --git a/src/syscall.h b/src/syscall.h
++index d2a117b..f7ce979 100644
++--- a/src/syscall.h
+++++ b/src/syscall.h
++@@ -6,10 +6,10 @@
++ #define SYMSTR(str) _SYMSTR(str)
++
++ #define SYMVER(compat_sym, orig_sym, ver_sym) \
++- __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym));
+++ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym))
++
++ #define DEFSYMVER(compat_sym, orig_sym, ver_sym) \
++- __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym));
+++ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym))
++
++ #if defined(__i386__)
++ #include "syscall-i386.h"
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From 3ec8be29fc945238788f1fc7f0d998b145a761c7 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Tue, 2 Nov 2021 22:37:32 +0100
++Subject: [PATCH libaio 05/14] Use new symver function attribute to support LTO
++ builds
++Origin: vendor
++Forwarded: https://marc.info/?l=linux-aio&m=164999309520544
++
++The LTO support cannot work properly when there are versioned symbols
++via asm statements, as those are not seen by the compiler. Use the new
++function attributes if supported instead of the asm statements.
++
++We need to move the SYMVER calls after the function definitions
++otherwise it will reference symbols not yet seen.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ src/compat-0_1.c | 7 +++----
++ src/syscall.h | 13 +++++++++++++
++ 2 files changed, 16 insertions(+), 4 deletions(-)
++
++diff --git a/src/compat-0_1.c b/src/compat-0_1.c
++index 722e107..ac40fcc 100644
++--- a/src/compat-0_1.c
+++++ b/src/compat-0_1.c
++@@ -28,7 +28,6 @@
++
++
++ /* ABI change. Provide partial compatibility on this one for now. */
++-SYMVER(compat0_1_io_cancel, io_cancel, 0.1);
++ int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb)
++ {
++ struct io_event event;
++@@ -36,8 +35,8 @@ int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb)
++ /* FIXME: the old ABI would return the event on the completion queue */
++ return io_cancel(ctx, iocb, &event);
++ }
+++SYMVER(compat0_1_io_cancel, io_cancel, 0.1);
++
++-SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1);
++ int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when)
++ {
++ struct timespec timeout;
++@@ -45,10 +44,10 @@ int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when)
++ timeout = *when;
++ return io_getevents(ctx, 0, 0, NULL, when ? &timeout : NULL);
++ }
+++SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1);
++
++
++ /* ABI change. Provide backwards compatibility for this one. */
++-SYMVER(compat0_1_io_getevents, io_getevents, 0.1);
++ int compat0_1_io_getevents(io_context_t ctx, long nr,
++ struct io_event *events,
++ const struct timespec *const_timeout)
++@@ -59,4 +58,4 @@ int compat0_1_io_getevents(io_context_t ctx, long nr,
++ return io_getevents(ctx, 1, nr, events,
++ const_timeout ? &timeout : NULL);
++ }
++-
+++SYMVER(compat0_1_io_getevents, io_getevents, 0.1);
++diff --git a/src/syscall.h b/src/syscall.h
++index f7ce979..59e0bb3 100644
++--- a/src/syscall.h
+++++ b/src/syscall.h
++@@ -2,14 +2,27 @@
++ #include <unistd.h>
++ #include <errno.h>
++
+++#ifndef __has_attribute
+++#define __has_attribute(x) 0
+++#endif
+++
++ #define _SYMSTR(str) #str
++ #define SYMSTR(str) _SYMSTR(str)
++
+++#if __has_attribute(__symver__)
+++#define SYMVER(compat_sym, orig_sym, ver_sym) \
+++ extern __typeof(compat_sym) compat_sym \
+++ __attribute__((__symver__(SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym))))
+++#define DEFSYMVER(compat_sym, orig_sym, ver_sym) \
+++ extern __typeof(compat_sym) compat_sym \
+++ __attribute__((__symver__(SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym))))
+++#else
++ #define SYMVER(compat_sym, orig_sym, ver_sym) \
++ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym))
++
++ #define DEFSYMVER(compat_sym, orig_sym, ver_sym) \
++ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym))
+++#endif
++
++ #if defined(__i386__)
++ #include "syscall-i386.h"
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From a045661b84fd5aa7177fa445d22cee3e5ab39ed9 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Sun, 12 Apr 2020 03:39:47 +0200
++Subject: [PATCH libaio 06/14] syscall: Fix ARM definitions to match exactly
++ the kernel
++
++Otherwise we get preprocessor warnings due to the redefinitions.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ src/syscall-arm.h | 10 +++++-----
++ 1 file changed, 5 insertions(+), 5 deletions(-)
++
++diff --git a/src/syscall-arm.h b/src/syscall-arm.h
++index 556852b..315a37b 100644
++--- a/src/syscall-arm.h
+++++ b/src/syscall-arm.h
++@@ -19,8 +19,8 @@
++ #define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
++ #endif
++
++-#define __NR_io_setup (__NR_SYSCALL_BASE+243)
++-#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
++-#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
++-#define __NR_io_submit (__NR_SYSCALL_BASE+246)
++-#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
+++#define __NR_io_setup (__NR_SYSCALL_BASE + 243)
+++#define __NR_io_destroy (__NR_SYSCALL_BASE + 244)
+++#define __NR_io_getevents (__NR_SYSCALL_BASE + 245)
+++#define __NR_io_submit (__NR_SYSCALL_BASE + 246)
+++#define __NR_io_cancel (__NR_SYSCALL_BASE + 247)
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From 588df950b1867d224a6227b5d64a0186c8a5c5f5 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Sun, 12 Apr 2020 03:44:43 +0200
++Subject: [PATCH libaio 07/14] syscall: Fix ia64 definitions to match exactly
++ the kernel
++
++Otherwise we get preprocessor warnings due to the redefinitions.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ src/syscall-ia64.h | 11 ++++++-----
++ 1 file changed, 6 insertions(+), 5 deletions(-)
++
++diff --git a/src/syscall-ia64.h b/src/syscall-ia64.h
++index a21e93b..765c423 100644
++--- a/src/syscall-ia64.h
+++++ b/src/syscall-ia64.h
++@@ -1,5 +1,6 @@
++-#define __NR_io_setup 1238
++-#define __NR_io_destroy 1239
++-#define __NR_io_getevents 1240
++-#define __NR_io_submit 1241
++-#define __NR_io_cancel 1242
+++#define __NR_Linux 1024
+++#define __NR_io_setup (__NR_Linux + 214)
+++#define __NR_io_destroy (__NR_Linux + 215)
+++#define __NR_io_getevents (__NR_Linux + 216)
+++#define __NR_io_submit (__NR_Linux + 217)
+++#define __NR_io_cancel (__NR_Linux + 218)
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From 046d978cd399324cb3bca3bb2e1b72fb0bd8d9c3 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Wed, 14 Aug 2019 03:30:09 +0200
++Subject: [PATCH libaio 08/14] harness: Add KERNEL_RW_POINTER for various
++ 32-bit architectures
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/main.c | 9 +++++++++
++ 1 file changed, 9 insertions(+)
++
++diff --git a/harness/main.c b/harness/main.c
++index 82e9c69..0eed7bd 100644
++--- a/harness/main.c
+++++ b/harness/main.c
++@@ -12,7 +12,16 @@
++ #include <libaio.h>
++
++ #if __LP64__ == 0
+++#if defined(__i386__) || defined(__powerpc__)
++ #define KERNEL_RW_POINTER ((void *)0xc0010000)
+++#elif defined(__arm__) || defined(__s390__)
+++#define KERNEL_RW_POINTER ((void *)0x00010000)
+++#elif defined(__sparc__)
+++#define KERNEL_RW_POINTER ((void *)0xf0010000)
+++#else
+++#warning Not really sure where kernel memory is. Guessing.
+++#define KERNEL_RW_POINTER ((void *)0xc0010000)
+++#endif
++ #else
++ //#warning Not really sure where kernel memory is. Guessing.
++ #define KERNEL_RW_POINTER ((void *)0xffffffff81000000)
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From cf9ef834c4e15c546808b6100a4d95343cf02e9b Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Wed, 14 Aug 2019 03:18:50 +0200
++Subject: [PATCH libaio 09/14] Fix and improve MIPS support
++
++Fix structure padding for MIPS 64, add syscall definitions, and the
++kernel R/W pointer.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/main.c | 2 +-
++ src/libaio.h | 6 +++++-
++ src/syscall-mips.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++
++ src/syscall.h | 2 ++
++ 4 files changed, 62 insertions(+), 2 deletions(-)
++ create mode 100644 src/syscall-mips.h
++
++diff --git a/harness/main.c b/harness/main.c
++index 0eed7bd..33d8e46 100644
++--- a/harness/main.c
+++++ b/harness/main.c
++@@ -12,7 +12,7 @@
++ #include <libaio.h>
++
++ #if __LP64__ == 0
++-#if defined(__i386__) || defined(__powerpc__)
+++#if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
++ #define KERNEL_RW_POINTER ((void *)0xc0010000)
++ #elif defined(__arm__) || defined(__s390__)
++ #define KERNEL_RW_POINTER ((void *)0x00010000)
++diff --git a/src/libaio.h b/src/libaio.h
++index 24b4b8a..570ef2b 100644
++--- a/src/libaio.h
+++++ b/src/libaio.h
++@@ -52,7 +52,9 @@ typedef enum io_iocb_cmd {
++
++ /* little endian, 32 bits */
++ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
++- defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
+++ defined(__sh__) || \
+++ defined(__bfin__) || \
+++ (defined(__MIPSEL__) && !defined(__mips64)) || \
++ defined(__cris__) || defined(__loongarch32) || \
++ (defined(__riscv) && __riscv_xlen == 32) || \
++ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++@@ -63,6 +65,7 @@ typedef enum io_iocb_cmd {
++
++ /* little endian, 64 bits */
++ #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
+++ (defined(__mips64) && defined(__MIPSEL__)) || \
++ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
++ defined(__loongarch64) || \
++ (defined(__riscv) && __riscv_xlen == 64) || \
++@@ -75,6 +78,7 @@ typedef enum io_iocb_cmd {
++ /* big endian, 64 bits */
++ #elif defined(__powerpc64__) || defined(__s390x__) || \
++ (defined(__sparc__) && defined(__arch64__)) || \
+++ (defined(__mips64) && defined(__MIPSEB__)) || \
++ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
++ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
++diff --git a/src/syscall-mips.h b/src/syscall-mips.h
++new file mode 100644
++index 0000000..2c4245e
++--- /dev/null
+++++ b/src/syscall-mips.h
++@@ -0,0 +1,54 @@
+++/*
+++ * This file is subject to the terms and conditions of the GNU General Public
+++ * License. See the file "COPYING" in the main directory of this archive
+++ * for more details.
+++ *
+++ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
+++ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
+++ */
+++
+++#ifndef _MIPS_SIM_ABI32
+++#define _MIPS_SIM_ABI32 1
+++#define _MIPS_SIM_NABI32 2
+++#define _MIPS_SIM_ABI64 3
+++#endif
+++
+++#if _MIPS_SIM == _MIPS_SIM_ABI32
+++
+++/*
+++ * Linux o32 style syscalls are in the range from 4000 to 4999.
+++ */
+++#define __NR_Linux 4000
+++#define __NR_io_setup (__NR_Linux + 241)
+++#define __NR_io_destroy (__NR_Linux + 242)
+++#define __NR_io_getevents (__NR_Linux + 243)
+++#define __NR_io_submit (__NR_Linux + 244)
+++#define __NR_io_cancel (__NR_Linux + 245)
+++
+++#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
+++
+++#if _MIPS_SIM == _MIPS_SIM_ABI64
+++
+++/*
+++ * Linux 64-bit syscalls are in the range from 5000 to 5999.
+++ */
+++#define __NR_Linux 5000
+++#define __NR_io_setup (__NR_Linux + 200)
+++#define __NR_io_destroy (__NR_Linux + 201)
+++#define __NR_io_getevents (__NR_Linux + 202)
+++#define __NR_io_submit (__NR_Linux + 203)
+++#define __NR_io_cancel (__NR_Linux + 204)
+++#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
+++
+++#if _MIPS_SIM == _MIPS_SIM_NABI32
+++
+++/*
+++ * Linux N32 syscalls are in the range from 6000 to 6999.
+++ */
+++#define __NR_Linux 6000
+++#define __NR_io_setup (__NR_Linux + 200)
+++#define __NR_io_destroy (__NR_Linux + 201)
+++#define __NR_io_getevents (__NR_Linux + 202)
+++#define __NR_io_submit (__NR_Linux + 203)
+++#define __NR_io_cancel (__NR_Linux + 204)
+++#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
++diff --git a/src/syscall.h b/src/syscall.h
++index 59e0bb3..4e56894 100644
++--- a/src/syscall.h
+++++ b/src/syscall.h
++@@ -40,6 +40,8 @@
++ #include "syscall-arm.h"
++ #elif defined(__sparc__)
++ #include "syscall-sparc.h"
+++#elif defined(__mips__)
+++#include "syscall-mips.h"
++ #elif defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
++ #include "syscall-generic.h"
++ #else
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From a7cb322acddb2ab595a51beffb74942e45bb54f2 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Wed, 14 Aug 2019 03:22:10 +0200
++Subject: [PATCH libaio 10/14] Add PARISC support
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/main.c | 2 ++
++ src/libaio.h | 1 +
++ src/syscall-parisc.h | 5 +++++
++ src/syscall.h | 2 ++
++ 4 files changed, 10 insertions(+)
++ create mode 100644 src/syscall-parisc.h
++
++diff --git a/harness/main.c b/harness/main.c
++index 33d8e46..01c81aa 100644
++--- a/harness/main.c
+++++ b/harness/main.c
++@@ -16,6 +16,8 @@
++ #define KERNEL_RW_POINTER ((void *)0xc0010000)
++ #elif defined(__arm__) || defined(__s390__)
++ #define KERNEL_RW_POINTER ((void *)0x00010000)
+++#elif defined(__hppa__)
+++#define KERNEL_RW_POINTER ((void *)0x10100000)
++ #elif defined(__sparc__)
++ #define KERNEL_RW_POINTER ((void *)0xf0010000)
++ #else
++diff --git a/src/libaio.h b/src/libaio.h
++index 570ef2b..af02ec0 100644
++--- a/src/libaio.h
+++++ b/src/libaio.h
++@@ -77,6 +77,7 @@ typedef enum io_iocb_cmd {
++
++ /* big endian, 64 bits */
++ #elif defined(__powerpc64__) || defined(__s390x__) || \
+++ (defined(__hppa__) && defined(__arch64__)) || \
++ (defined(__sparc__) && defined(__arch64__)) || \
++ (defined(__mips64) && defined(__MIPSEB__)) || \
++ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
++diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h
++new file mode 100644
++index 0000000..1738075
++--- /dev/null
+++++ b/src/syscall-parisc.h
++@@ -0,0 +1,5 @@
+++#define __NR_io_setup 215
+++#define __NR_io_destroy 216
+++#define __NR_io_getevents 217
+++#define __NR_io_submit 218
+++#define __NR_io_cancel 219
++diff --git a/src/syscall.h b/src/syscall.h
++index 4e56894..3a6c85e 100644
++--- a/src/syscall.h
+++++ b/src/syscall.h
++@@ -40,6 +40,8 @@
++ #include "syscall-arm.h"
++ #elif defined(__sparc__)
++ #include "syscall-sparc.h"
+++#elif defined(__hppa__)
+++#include "syscall-parisc.h"
++ #elif defined(__mips__)
++ #include "syscall-mips.h"
++ #elif defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From bfbe6653ef0a9bac41ea54f1f3a12c21d5ff0a57 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Wed, 14 Aug 2019 03:25:22 +0200
++Subject: [PATCH libaio 11/14] Add m68k support
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/main.c | 2 +-
++ src/syscall-m68k.h | 5 +++++
++ src/syscall.h | 2 ++
++ 3 files changed, 8 insertions(+), 1 deletion(-)
++ create mode 100644 src/syscall-m68k.h
++
++diff --git a/harness/main.c b/harness/main.c
++index 01c81aa..99d393f 100644
++--- a/harness/main.c
+++++ b/harness/main.c
++@@ -14,7 +14,7 @@
++ #if __LP64__ == 0
++ #if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
++ #define KERNEL_RW_POINTER ((void *)0xc0010000)
++-#elif defined(__arm__) || defined(__s390__)
+++#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
++ #define KERNEL_RW_POINTER ((void *)0x00010000)
++ #elif defined(__hppa__)
++ #define KERNEL_RW_POINTER ((void *)0x10100000)
++diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h
++new file mode 100644
++index 0000000..2dd4a9b
++--- /dev/null
+++++ b/src/syscall-m68k.h
++@@ -0,0 +1,5 @@
+++#define __NR_io_setup 241
+++#define __NR_io_destroy 242
+++#define __NR_io_getevents 243
+++#define __NR_io_submit 244
+++#define __NR_io_cancel 245
++diff --git a/src/syscall.h b/src/syscall.h
++index 3a6c85e..e3825df 100644
++--- a/src/syscall.h
+++++ b/src/syscall.h
++@@ -40,6 +40,8 @@
++ #include "syscall-arm.h"
++ #elif defined(__sparc__)
++ #include "syscall-sparc.h"
+++#elif defined(__m68k__)
+++#include "syscall-m68k.h"
++ #elif defined(__hppa__)
++ #include "syscall-parisc.h"
++ #elif defined(__mips__)
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From 76fb6fa924bda8c8ce669633ba89271e0c2e268d Mon Sep 17 00:00:00 2001
++From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
++Date: Sun, 12 Apr 2020 03:30:41 +0200
++Subject: [PATCH libaio 12/14] Add SH support
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/main.c | 2 +-
++ src/libaio.h | 3 ++-
++ src/syscall-sh.h | 6 ++++++
++ src/syscall.h | 2 ++
++ 4 files changed, 11 insertions(+), 2 deletions(-)
++ create mode 100644 src/syscall-sh.h
++
++diff --git a/harness/main.c b/harness/main.c
++index 99d393f..ac0fba2 100644
++--- a/harness/main.c
+++++ b/harness/main.c
++@@ -14,7 +14,7 @@
++ #if __LP64__ == 0
++ #if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
++ #define KERNEL_RW_POINTER ((void *)0xc0010000)
++-#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
+++#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__)
++ #define KERNEL_RW_POINTER ((void *)0x00010000)
++ #elif defined(__hppa__)
++ #define KERNEL_RW_POINTER ((void *)0x10100000)
++diff --git a/src/libaio.h b/src/libaio.h
++index af02ec0..2dbb6bb 100644
++--- a/src/libaio.h
+++++ b/src/libaio.h
++@@ -52,7 +52,7 @@ typedef enum io_iocb_cmd {
++
++ /* little endian, 32 bits */
++ #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
++- defined(__sh__) || \
+++ (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
++ defined(__bfin__) || \
++ (defined(__MIPSEL__) && !defined(__mips64)) || \
++ defined(__cris__) || defined(__loongarch32) || \
++@@ -90,6 +90,7 @@ typedef enum io_iocb_cmd {
++ /* big endian, 32 bits */
++ #elif defined(__PPC__) || defined(__s390__) || \
++ (defined(__arm__) && defined(__ARMEB__)) || \
+++ (defined(__sh__) && defined (__BIG_ENDIAN__)) || \
++ defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
++ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
++ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
++diff --git a/src/syscall-sh.h b/src/syscall-sh.h
++new file mode 100644
++index 0000000..6c00573
++--- /dev/null
+++++ b/src/syscall-sh.h
++@@ -0,0 +1,6 @@
+++/* Copy from ./arch/sh/include/asm/unistd_32.h */
+++#define __NR_io_setup 245
+++#define __NR_io_destroy 246
+++#define __NR_io_getevents 247
+++#define __NR_io_submit 248
+++#define __NR_io_cancel 249
++diff --git a/src/syscall.h b/src/syscall.h
++index e3825df..57dd1fa 100644
++--- a/src/syscall.h
+++++ b/src/syscall.h
++@@ -46,6 +46,8 @@
++ #include "syscall-parisc.h"
++ #elif defined(__mips__)
++ #include "syscall-mips.h"
+++#elif defined(__sh__)
+++#include "syscall-sh.h"
++ #elif defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
++ #include "syscall-generic.h"
++ #else
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From a70f29d317a02a7cf5c0c1cbacc8f020c52cdea9 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Sun, 12 Apr 2020 03:36:39 +0200
++Subject: [PATCH libaio 13/14] Add x32 support
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ harness/main.c | 2 +-
++ src/libaio.h | 4 +++-
++ src/syscall-x86_64.h | 10 ++++++++++
++ 3 files changed, 14 insertions(+), 2 deletions(-)
++
++diff --git a/harness/main.c b/harness/main.c
++index ac0fba2..db42a18 100644
++--- a/harness/main.c
+++++ b/harness/main.c
++@@ -14,7 +14,7 @@
++ #if __LP64__ == 0
++ #if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
++ #define KERNEL_RW_POINTER ((void *)0xc0010000)
++-#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__)
+++#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__) || defined(__x86_64__)
++ #define KERNEL_RW_POINTER ((void *)0x00010000)
++ #elif defined(__hppa__)
++ #define KERNEL_RW_POINTER ((void *)0x10100000)
++diff --git a/src/libaio.h b/src/libaio.h
++index 2dbb6bb..c731298 100644
++--- a/src/libaio.h
+++++ b/src/libaio.h
++@@ -51,7 +51,9 @@ typedef enum io_iocb_cmd {
++ } io_iocb_cmd_t;
++
++ /* little endian, 32 bits */
++-#if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
+++#if defined(__i386__) || \
+++ (defined(__x86_64__) && defined(__ILP32__)) || \
+++ (defined(__arm__) && !defined(__ARMEB__)) || \
++ (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
++ defined(__bfin__) || \
++ (defined(__MIPSEL__) && !defined(__mips64)) || \
++diff --git a/src/syscall-x86_64.h b/src/syscall-x86_64.h
++index 0eccef3..6a44d53 100644
++--- a/src/syscall-x86_64.h
+++++ b/src/syscall-x86_64.h
++@@ -1,6 +1,16 @@
+++#if __ILP32__
+++#define __X32_SYSCALL_BIT 0x40000000UL
+++#define __NR_io_setup (__X32_SYSCALL_BIT + 543)
+++#define __NR_io_destroy (__X32_SYSCALL_BIT + 207)
+++#define __NR_io_submit (__X32_SYSCALL_BIT + 544)
+++#define __NR_io_cancel (__X32_SYSCALL_BIT + 210)
+++#define __NR_io_getevents (__X32_SYSCALL_BIT + 208)
+++#define __NR_io_pgetevents (__X32_SYSCALL_BIT + 333)
+++#else
++ #define __NR_io_setup 206
++ #define __NR_io_destroy 207
++ #define __NR_io_getevents 208
++ #define __NR_io_submit 209
++ #define __NR_io_cancel 210
++ #define __NR_io_pgetevents 333
+++#endif
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++From 97daff5b92530896f9ea6e89ed2d1ec6df264944 Mon Sep 17 00:00:00 2001
++From: Guillem Jover <guillem@hadrons.org>
++Date: Fri, 16 Aug 2019 02:33:46 +0200
++Subject: [PATCH libaio 14/14] Fix io_pgetevents() syscall wrapper on 32-bit
++ userland on 64-bit kernels
++Origin: vendor
++Forwarded: not-needed
++
++The kernel compat syscall in the kernel got introduced with a broken
++layout, which requires a pointer to the actual sigset_t variable but
++with the size of the running kernel, not the size of the compat code.
++
++This means that when the wrapper sends the expected compat (32-bit)
++pointer, the kernel reads a 64-bit pointer, eating with it also the
++sigset size member. And then proceeds to fail the comparison of the
++sigset_t size and returns EINVAL.
++
++This really needs to be fixed in the kernel, as there's no apparent
++user of the broken compat layout (from codesearch.debian.org, nor a
++quick github.com search). But we have to workaround it in libaio so
++that we can use kernels that have not yet been fixed.
++
++We do that, by trying the non-broken layout (that would be used with
++a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
++we retry with a structure padded to what the kernel expects.
++
++Signed-off-by: Guillem Jover <guillem@hadrons.org>
++---
++ src/io_pgetevents.c | 38 +++++++++++++++++++++++++++++++-------
++ src/libaio.h | 10 ++++++++++
++ 2 files changed, 41 insertions(+), 7 deletions(-)
++
++diff --git a/src/io_pgetevents.c b/src/io_pgetevents.c
++index e6b0614..b2515f2 100644
++--- a/src/io_pgetevents.c
+++++ b/src/io_pgetevents.c
++@@ -33,17 +33,41 @@ int io_pgetevents(io_context_t ctx, long min_nr, long nr,
++ struct io_event *events, struct timespec *timeout,
++ sigset_t *sigmask)
++ {
++- struct {
++- unsigned long ss;
++- unsigned long ss_len;
++- } data;
+++ struct io_sigset aio_sigset;
+++#ifndef __LP64__
+++ struct io_sigset_compat aio_sigset_compat = { 0 };
+++#endif
+++ int ret;
++
++ if (aio_ring_is_empty(ctx, timeout))
++ return 0;
++
++- data.ss = (unsigned long)sigmask;
++- data.ss_len = _NSIG / 8;
++- return __io_pgetevents(ctx, min_nr, nr, events, timeout, &data);
+++ aio_sigset.ss = (unsigned long)sigmask;
+++ aio_sigset.ss_len = _NSIG / 8;
+++ ret = __io_pgetevents(ctx, min_nr, nr, events, timeout, &aio_sigset);
+++
+++#ifndef __LP64__
+++ /*
+++ * The compat kernel syscall got introduced with an broken layout for
+++ * its sigset argument, expecting it to contain a pointer for the
+++ * non-compat pointer size.
+++ *
+++ * To cope with this on unfixed kernels, in case we are built as a
+++ * 32-bit library (which could run on a kernel with compat code) and
+++ * when the syscall returns EINVAL due to the kernel not finding the
+++ * sigset size member when unpacking the structure, we retry with
+++ * the fixed up compat layout, which requires the padding to be
+++ * zero-filled, otherwise the 64-bit pointer will contain garbage.
+++ */
+++ if (ret != -EINVAL)
+++ return ret;
+++
+++ aio_sigset_compat.ss = (unsigned long)sigmask;
+++ aio_sigset_compat.ss_len = _NSIG / 8;
+++ ret = __io_pgetevents(ctx, min_nr, nr, events, timeout, &aio_sigset_compat);
+++#endif
+++
+++ return ret;
++ }
++ #else
++ int io_pgetevents(io_context_t ctx, long min_nr, long nr,
++diff --git a/src/libaio.h b/src/libaio.h
++index c731298..fc3118c 100644
++--- a/src/libaio.h
+++++ b/src/libaio.h
++@@ -154,6 +154,16 @@ struct io_event {
++ PADDEDul(res2, __pad4);
++ };
++
+++struct io_sigset {
+++ unsigned long ss;
+++ unsigned long ss_len;
+++};
+++
+++struct io_sigset_compat {
+++ PADDEDptr(unsigned long ss, __ss_pad);
+++ unsigned long ss_len;
+++};
+++
++ #undef PADDED
++ #undef PADDEDptr
++ #undef PADDEDul
++--
++2.35.2
++
--- /dev/null
--- /dev/null
++# Local changes, pending submission
++0001-man-Fix-typos.patch
++0002-build-Fix-DESTDIR-and-pathname-variables-handling.patch
++0003-build-Honor-user-build-flags.patch
++0004-Move-semicolon-to-SYMVER-and-DEFSYMVER-call-sites.patch
++0005-Use-new-symver-function-attribute-to-support-LTO-bui.patch
++0006-syscall-Fix-ARM-definitions-to-match-exactly-the-ker.patch
++0007-syscall-Fix-ia64-definitions-to-match-exactly-the-ke.patch
++0008-harness-Add-KERNEL_RW_POINTER-for-various-32-bit-arc.patch
++0009-Fix-and-improve-MIPS-support.patch
++0010-Add-PARISC-support.patch
++0011-Add-m68k-support.patch
++0012-Add-SH-support.patch
++0013-Add-x32-support.patch
++# Local changes, not for upstream
++0014-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
++0001-harness-Disable-failing-test-23.patch
--- /dev/null
--- /dev/null
++#!/usr/bin/make -f
++
++# Uncomment this to turn on verbose mode.
++#export DH_VERBOSE=1
++
++export DEB_BUILD_MAINT_OPTIONS = hardening=+all future=+lfs
++export DEB_CFLAGS_MAINT_PREPEND = -Wall
++
++include /usr/share/dpkg/default.mk
++include /usr/share/dpkg/buildtools.mk
++
++# The following architectures still fail the test suite:
++# m68k
++# (emulated, no proper test results)
++# sh4
++# (emulated, no proper test results)
++# x32
++# (20: io_setup failed)
++# riscv64
++# (5: 512 instead of EFAULT on write)
++# sparc64
++# (5: 512 instead of EFAULT on write)
++# (19: mremap EINVAL)
++# hppa
++# (5: 512 instead of EFAULT on write)
++# (19: mremap EINVAL)
++# (17: looping, timeout?)
++ifneq (,$(filter $(DEB_HOST_ARCH),m68k sh4 x32 riscv64 sparc64 hppa))
++ TESTS_FLAKY = yes
++endif
++
++export CC
++
++%:
++ dh $@
++
++override_dh_auto_test:
++ifeq ($(TESTS_FLAKY),yes)
++ @echo "Notice: Running tests in flaky mode, errors will be ignored."
++endif
++ $(if $(TESTS_FLAKY),-)$(MAKE) partcheck \
++ CPPFLAGS="$(CPPFLAGS)" \
++ CFLAGS="$(CFLAGS)" \
++ LDFLAGS="$(LDFLAGS)"
++
++override_dh_auto_install:
++ dh_auto_install -- \
++ libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
++
++override_dh_installchangelogs:
++ dh_installchangelogs --no-trim
--- /dev/null
--- /dev/null
++3.0 (quilt)
--- /dev/null
--- /dev/null
++# These are binary filesystem images.
++libaio: very-long-line-length-in-source-file * > * [harness/*.img:*]
++# Upstream does not sign releases.
++libaio: debian-watch-does-not-check-openpgp-signature [debian/watch]
++# debhelper handles this automatically, false positive.
++libaio: override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS [debian/rules:*]
--- /dev/null
--- /dev/null
++Tests: test-unit
++Restrictions: flaky rw-build-tree
++Depends: build-essential, libaio-dev
++
++Tests: test-unit-root
++Restrictions: flaky rw-build-tree needs-root
++Depends: build-essential, libaio-dev
--- /dev/null
--- /dev/null
++#!/bin/sh
++
++set -e
++exec 2>&1
++set -u
++set -x
++
++if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
++ CC="$DEB_HOST_GNU_TYPE-gcc"
++else
++ CC=gcc
++fi
++
++make partcheck CC="$CC" LIBAIO=-laio
--- /dev/null
--- /dev/null
++#!/bin/sh
++
++set -e
++exec 2>&1
++set -u
++set -x
++
++if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
++ CC="$DEB_HOST_GNU_TYPE-gcc"
++else
++ CC=gcc
++fi
++
++make check CC="$CC" LIBAIO=-laio
--- /dev/null
--- /dev/null
++Repository: https://pagure.io/libaio.git
++Repository-Browse: https://pagure.io/libaio
++Bug-Database: https://pagure.io/libaio/issues
++Bug-Submit: https://pagure.io/libaio/new_issue
--- /dev/null
--- /dev/null
++# Site Directory Pattern Version Script
++version=4
++https://releases.pagure.org/libaio/libaio-([\d\.]+)\.tar\.(?:gz|xz) debian uupdate