summaryrefslogtreecommitdiff
path: root/sys-fs/mtools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sys-fs/mtools
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sys-fs/mtools')
-rw-r--r--sys-fs/mtools/Manifest9
-rw-r--r--sys-fs/mtools/files/mtools-4.0.18-attr.patch51
-rw-r--r--sys-fs/mtools/files/mtools-4.0.18-locking.patch163
-rw-r--r--sys-fs/mtools/files/mtools-4.0.18-memset.patch27
-rw-r--r--sys-fs/mtools/mtools-4.0.18-r2.ebuild56
-rw-r--r--sys-fs/mtools/mtools-4.0.25.ebuild (renamed from sys-fs/mtools/mtools-4.0.23.ebuild)13
6 files changed, 5 insertions, 314 deletions
diff --git a/sys-fs/mtools/Manifest b/sys-fs/mtools/Manifest
index 631cb48d36db..db655eac52c7 100644
--- a/sys-fs/mtools/Manifest
+++ b/sys-fs/mtools/Manifest
@@ -1,10 +1,5 @@
-AUX mtools-4.0.18-attr.patch 1804 BLAKE2B dee4d21870fd9f633ef8966513960b74a1fdaf61b23e38e10b77a6ccb5240ca31cf985f56becd05f1880b5389b77476a432937e00dc04b0d9478b6d85df73f60 SHA512 45bc3d5baa37c634b8f97d55251a7dec2f7062515529c0dec65572826ff2d7673f189c544fa73d164156823cd3ae78bcb664b3fb22e5eac34198fdfe45c9e244
-AUX mtools-4.0.18-locking.patch 5744 BLAKE2B 509462f40e2a832d1a04358972d606d29d6a0b5d7d095438d1c17bb8b7636aac382f9bb0055e669aed661a89bd6e018f1d88a588f0bddf701e5c0eb88449f94e SHA512 0698b5c5f5d4c22f3439a835c3bb6f73a90c3030073f3497fa04a8e29241af867f664f253b37299d69ca043858b55e7290aaab1fa6f751084a52e7812cae4170
-AUX mtools-4.0.18-memset.patch 877 BLAKE2B 5a331eb50cca56c64c135974b56bcc651e6f7498740cad8dc4c5121efe23802a228bb73e5f18ee20b0e3ef81ea6ebd78cc19e037556f0294519b54a84697f993 SHA512 1e8d697c1cd98a7fedaed96e6019b6af96bf5ed6633f50f7c45649555a27727d93ba828e2852f23fb633832902bdb93c23afacd7022c72adf5c4a146f5b8a1a8
-DIST mtools-4.0.18.tar.bz2 420190 BLAKE2B 92fdf8b054287e3cb4eddb40c98f5ac4229a38473b633c25ab74a07a8a72d38c2767ae648a35cf0dac9dedfa2f7789afc4904a50e1328e2baa0a289d93b094fb SHA512 3981a4727aa4e2ec5c931201b236f52fcd1c9d55f888cb2fbdc5c4172402e2b229ede9a5005b972ffdad59bcb861e2fcc01404845e521116419079ae78239090
-DIST mtools-4.0.23.tar.bz2 418592 BLAKE2B 442f552087a5d53ef0ead6161cdad7997dc45a3e210c2cb442a8b2ba42866152f93e4a1f5b58df8d68316168374ea034b390bcf4c607ac3a1c477c4ec5e7842c SHA512 c8c48adedc3f3e4eeafead27ce80172c9cb9690b575618842001ed16aa0011dcd2bc517882ea4bf01a73810ba151aa4b86f8ce2f97d6e8a0177d09be71a6d1ed
DIST mtools-4.0.24.tar.bz2 418178 BLAKE2B 96ccbde0e5ed5e304c73c7faaeb495751c43ae37970e5c2329299e0f7bf90f3a810f4ca95faea10a00e5af110be579a3b083043314e980bb0128226caffb5608 SHA512 b74becc4f696315cfabc016d1746e744b43e366de73bf1bffeec4fbab1e4815967594de8acb4af01f89d36a925f93672efbac205b89540161bd53ab7edebcf04
-EBUILD mtools-4.0.18-r2.ebuild 1440 BLAKE2B db5974fd44a2d94c73ff4a255f58b06daba7fd25479ed48357d06e5bf8592bebc6d7ab6add898b1537e500ef1b1531658525cf29d8a0cbe8f7476c0bed769faa SHA512 074e1aad4fba2b1533f8abf7bce994fb34004838f7be900abd81bf0574a278584ec3fc5e53357044a5f92a241eacd55d9b1b97b0efabde4b721a9b7f082387e2
-EBUILD mtools-4.0.23.ebuild 1171 BLAKE2B 7b5603db7542d25f187158aae1bc5cc798368ca25059e4bbf5a3dd7217b049f47bae48de397d4a675a2f2128ec311a582cccb8cff0596ded00a637cd5da4a9e7 SHA512 632df381993fc2622ac64ab296c6d0b5249ec3f1e02a4c2db91f5157524b74265f1f1254d88a6398c49d9eec8f2f597bb447d4e0a40f7d408a792ecdf4ab4354
+DIST mtools-4.0.25.tar.bz2 421807 BLAKE2B 54b0de421d5de003c6dff9a524af2a37d7fe0fb88361e195b000b8c8637ed894ec01ca295ea71ed0df781e9503d609f5e21b987a79c7e9d2c2e0c7176d5eb825 SHA512 91b879de6b41bf9fd6d9282d846e21fe58dbcd3461d97d2d6cae752a309a5129091a0e6ffda5b28ef062c33970a1c0a43ff1cf19106232866bdbdb762c64a143
EBUILD mtools-4.0.24.ebuild 1045 BLAKE2B 2861833d297fdaf906239a2a52a5c922e0a195116ae73548c6d47212faa682b7b12f7bd20b68a167d86ecebfd2f6561236ff53bffcf093686bbf7c2c1893d6fa SHA512 dcb73024498715f8173c65076fa02a78873d01f22849fa568a6757384fc93e47981f1c95125a56646612f7dc4af39b4995ba0ef1ef41467f51eb60a99ee2b030
+EBUILD mtools-4.0.25.ebuild 1051 BLAKE2B 8bace5704234712bffd3c88ffce51534a6a141caa283501cf6599a96d0e6b99ae7bc40543ea064bb8385900e4bb6623c0005b8bde0b9a3beec510bd9cbbd8f01 SHA512 4ed910c39dd8683b28a2238e46bf015329a36f516761c486f9dfc987c919e8e3780270de173885b97eb9455232639d5dc1d83da5a24bfcffdeedb2bc637700c4
MISC metadata.xml 327 BLAKE2B 24ec22d469778c0c13d9bf96aed3214f59598b5ddf6a6bdf7dbe971e014396e8075c62059b1033ccdca6c5acca1af0fa2c1f377b006471358238402b40d7fec5 SHA512 9b9c5a4a88cf046ad30bf9764d7d865d692c73477220cc871e7e727fe3f718302c9ff1a8492b165270a88049e2bdebe68923415e52da1257971d887d8f808f7d
diff --git a/sys-fs/mtools/files/mtools-4.0.18-attr.patch b/sys-fs/mtools/files/mtools-4.0.18-attr.patch
deleted file mode 100644
index 3cd770be8bde..000000000000
--- a/sys-fs/mtools/files/mtools-4.0.18-attr.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From e8437f906ca86fd5b1cac20d240a0e114c5df7a9 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 9 Mar 2017 16:06:54 -0800
-Subject: [PATCH] fix unused attribute in func definition
-
-UNUSED is for wrapping variable decls, not for variables in a function
-definition. It will insert a semi-colon into the mix which makes clang
-upset:
-x86_64-cros-linux-gnu-clang -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc/mtools\" \
- -DCPU_x86_64 -DVENDOR_cros -DOS_linux_gnu -O2 -pipe -O2 -pipe \
- -march=x86-64 -msse3 -g -fno-exceptions -fno-unwind-tables \
- -fno-asynchronous-unwind-tables -clang-syntax -Wall \
- -fno-strict-aliasing -I. -I. -c mainloop.c
-mainloop.c:89:15: error: expected ')'
-int unix_loop(UNUSED(Stream_t *Stream), MainParam_t *mp, char *arg,
- ^
-./sysincludes.h:106:47: note: expanded from macro 'UNUSED'
- ^
-
-Arguably this should fail on gcc too, but it doesn't today.
-
-URL: https://crbug.com/644387
----
- mainloop.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/mainloop.c b/mainloop.c
-index f5f8349f1472..69af9a80c3e4 100644
---- a/mainloop.c
-+++ b/mainloop.c
-@@ -86,7 +86,7 @@ static const char *fix_mcwd(char *ans)
- }
-
- int unix_dir_loop(Stream_t *Stream, MainParam_t *mp);
--int unix_loop(UNUSED(Stream_t *Stream), MainParam_t *mp, char *arg,
-+int unix_loop(Stream_t *Stream UNUSEDP, MainParam_t *mp, char *arg,
- int follow_dir_link);
-
- static int _unix_loop(Stream_t *Dir, MainParam_t *mp,
-@@ -95,7 +95,7 @@ static int _unix_loop(Stream_t *Dir, MainParam_t *mp,
- return unix_dir_loop(Dir, mp);
- }
-
--int unix_loop(UNUSED(Stream_t *Stream), MainParam_t *mp,
-+int unix_loop(Stream_t *Stream UNUSEDP, MainParam_t *mp,
- char *arg, int follow_dir_link)
- {
- int ret;
---
-2.12.0
-
diff --git a/sys-fs/mtools/files/mtools-4.0.18-locking.patch b/sys-fs/mtools/files/mtools-4.0.18-locking.patch
deleted file mode 100644
index 3b53c73c645c..000000000000
--- a/sys-fs/mtools/files/mtools-4.0.18-locking.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-https://crbug.com/508713
-https://lists.gnu.org/archive/html/info-mtools/2016-11/msg00000.html
-
-From 04df65ed797e47da5b423c7f9aec99d82dfde400 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@chromium.org>
-Date: Wed, 7 Sep 2016 12:33:42 -0400
-Subject: [PATCH] add support for retrying device locking
-
-When running syslinux's install phase, it will run a bunch of mtools
-commands in quick succession. If you're on a fast enough machine, it
-can often fail with errors like:
-plain floppy: device "/proc/2908/fd/3" busy (Resource temporarily unavailable):
-Cannot initialize 'S:'
-Bad target s:/ldlinux.sys
-syslinux: failed to create ldlinux.sys
-
-The issue is that after some of the mtools calls, the kernel notices
-that the fs image has changed, so it notifies userspace. This wakes
-up udev which grabs a lock on the device to rescan it for changes
-(e.g. updated fs metadata like UUID). The udev phase does not finish
-before syslinux fires off another mtools call which means mtools now
-fails with a locking error.
-
-You can recreate this with a simple test:
-- loop mount a fat fs image
-- open the loop device for writing
-- generate a mtools.conf pointing the file to /proc/$pid/fd/$fd
-- run mattrib && mcopy
-- see udev open/lock the loop device after mattrib runs to probe it
-- see mcopy fail because udev is still holding the lock
-
-To fix things, we teach mtools to retry its locking calls temporarily.
-If it still fails after a timeout, we abort like normal. We also make
-this behavior configurable by adding a new global timeout option.
----
- config.c | 2 ++
- mtools.h | 1 +
- mtools.texi | 7 +++++++
- mtools.tmpl.5 | 4 ++++
- plain_io.c | 10 ++++++++++
- xdf_io.c | 11 +++++++++++
- 6 files changed, 35 insertions(+)
-
-diff --git a/config.c b/config.c
-index f08688399d1d..ea4178452f6a 100644
---- a/config.c
-+++ b/config.c
-@@ -63,6 +63,7 @@ unsigned int mtools_no_vfat=0;
- unsigned int mtools_numeric_tail=1;
- unsigned int mtools_dotted_dir=0;
- unsigned int mtools_twenty_four_hour_clock=1;
-+unsigned int mtools_lock_timeout=30;
- unsigned int mtools_default_codepage=850;
- const char *mtools_date_string="yyyy-mm-dd";
- char *country_string=0;
-@@ -90,6 +91,7 @@ static switches_t global_switches[] = {
- (caddr_t) &mtools_twenty_four_hour_clock, T_UINT },
- { "MTOOLS_DATE_STRING",
- (caddr_t) &mtools_date_string, T_STRING },
-+ { "MTOOLS_LOCK_TIMEOUT", (caddr_t) &mtools_lock_timeout, T_UINT },
- { "DEFAULT_CODEPAGE", (caddr_t) &mtools_default_codepage, T_UINT }
- };
-
-diff --git a/mtools.h b/mtools.h
-index ef98e942ee2c..fa8c1bdc8a1b 100644
---- a/mtools.h
-+++ b/mtools.h
-@@ -188,6 +188,7 @@ extern unsigned int mtools_ignore_short_case;
- extern unsigned int mtools_no_vfat;
- extern unsigned int mtools_numeric_tail;
- extern unsigned int mtools_dotted_dir;
-+extern unsigned int mtools_lock_timeout;
- extern unsigned int mtools_twenty_four_hour_clock;
- extern const char *mtools_date_string;
- extern unsigned int mtools_rate_0, mtools_rate_any;
-diff --git a/mtools.texi b/mtools.texi
-index 1085789c1cb6..1c7ad94d40f9 100644
---- a/mtools.texi
-+++ b/mtools.texi
-@@ -658,6 +658,10 @@ DOSEMU image files.
- @vindex MTOOLS_FAT_COMPATIBILITY
- @vindex MTOOLS_LOWER_CASE
- @vindex MTOOLS_NO_VFAT
-+@vindex MTOOLS_DOTTED_DIR
-+@vindex MTOOLS_NAME_NUMERIC_TAIL
-+@vindex MTOOLS_TWENTY_FOUR_HOUR_CLOCK
-+@vindex MTOOLS_LOCK_TIMEOUT
- @cindex FreeDOS
-
- Global flags may be set to 1 or to 0.
-@@ -692,6 +696,9 @@ clash would have happened.
- @item MTOOLS_TWENTY_FOUR_HOUR_CLOCK
- If 1, uses the European notation for times (twenty four hour clock),
- else uses the UK/US notation (am/pm)
-+@item MTOOLS_LOCK_TIMEOUT
-+How long, in seconds, to wait for a locked device to become free.
-+Defaults to 30.
- @end table
-
- Example:
-diff --git a/mtools.tmpl.5 b/mtools.tmpl.5
-index 565fdd7513aa..8cdaaf2ba929 100644
---- a/mtools.tmpl.5
-+++ b/mtools.tmpl.5
-@@ -106,6 +106,10 @@ clash would have happened.
- \&\fR\&\f(CWMTOOLS_TWENTY_FOUR_HOUR_CLOCK\fR\
- If 1, uses the European notation for times (twenty four hour clock),
- else uses the UK/US notation (am/pm)
-+.TP
-+\&\fR\&\f(CWMTOOLS_LOCK_TIMEOUT\fR\
-+How long, in seconds, to wait for a locked device to become free.
-+Defaults to 30.
- .PP
- Example:
- Inserting the following line into your configuration file instructs
-diff --git a/plain_io.c b/plain_io.c
-index c9d8418b8b4d..3dc035c9ce92 100644
---- a/plain_io.c
-+++ b/plain_io.c
-@@ -632,7 +632,17 @@ APIRET rc;
- #ifndef __CYGWIN__
- #ifndef OS_mingw32msvc
- /* lock the device on writes */
-+ retry:
- if (locked && lock_dev(This->fd, mode == O_RDWR, dev)) {
-+ /* retry the lock in case another system process (e.g. udev)
-+ * has temporarily locked the device. this happens when you
-+ * run multiple mtools commands at once which triggers the
-+ * system to lock/rescan/unlock. */
-+ static int retries = 0;
-+ if (errno == EAGAIN && retries++ < mtools_lock_timeout * 10) {
-+ usleep(100);
-+ goto retry;
-+ }
- if(errmsg)
- #ifdef HAVE_SNPRINTF
- snprintf(errmsg,199,
-diff --git a/xdf_io.c b/xdf_io.c
-index f0db3b3d9f38..8f64f6348f0c 100644
---- a/xdf_io.c
-+++ b/xdf_io.c
-@@ -638,7 +638,18 @@ Stream_t *XdfOpen(struct device *dev, char *name,
- goto exit_2;
-
- /* lock the device on writes */
-+ retry:
- if (lock_dev(This->fd, mode == O_RDWR, dev)) {
-+ /* retry the lock in case another system process (e.g. udev)
-+ * has temporarily locked the device. this happens when you
-+ * run multiple mtools commands at once which triggers the
-+ * system to lock/rescan/unlock. */
-+ static int retries = 0;
-+ if (errno == EAGAIN && retries++ < mtools_lock_timeout * 10) {
-+ usleep(100);
-+ goto retry;
-+ }
-+
- #ifdef HAVE_SNPRINTF
- snprintf(errmsg,199,"xdf floppy: device \"%s\" busy:",
- dev->name);
---
-2.9.0
-
diff --git a/sys-fs/mtools/files/mtools-4.0.18-memset.patch b/sys-fs/mtools/files/mtools-4.0.18-memset.patch
deleted file mode 100644
index cf8d724406df..000000000000
--- a/sys-fs/mtools/files/mtools-4.0.18-memset.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From bafeabbc474a98314e8cecf42c8339e1da21fea2 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Thu, 9 Mar 2017 16:23:19 -0800
-Subject: [PATCH] fix typo in scsi_cmd setup
-
-The memset call ends up referring to the function scsi_cmd and
-clearing its memory instead of the local my_scsi_cmd variable.
----
- scsi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scsi.c b/scsi.c
-index 7510edcefe95..85ff3bc3dc55 100644
---- a/scsi.c
-+++ b/scsi.c
-@@ -170,7 +170,7 @@ int scsi_cmd(int fd, unsigned char *cdb, int cmdlen, scsi_io_mode_t mode,
- /*
- ** Init the command
- */
-- memset(&scsi_cmd,0,sizeof(scsi_cmd));
-+ memset(&my_scsi_cmd,0,sizeof(my_scsi_cmd));
- my_scsi_cmd.interface_id = 'S';
- my_scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(SG_DXFER_FROM_DEV):(SG_DXFER_TO_DEV);
- my_scsi_cmd.cmd_len = cmdlen;
---
-2.12.0
-
diff --git a/sys-fs/mtools/mtools-4.0.18-r2.ebuild b/sys-fs/mtools/mtools-4.0.18-r2.ebuild
deleted file mode 100644
index 92c1a95bfe13..000000000000
--- a/sys-fs/mtools/mtools-4.0.18-r2.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit flag-o-matic eutils
-
-DESCRIPTION="utilities to access MS-DOS disks from Unix without mounting them"
-HOMEPAGE="https://www.gnu.org/software/mtools/ https://savannah.gnu.org/projects/mtools"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~hppa ppc ppc64 sparc x86 ~x64-macos ~x64-solaris"
-IUSE="X elibc_glibc"
-
-RDEPEND="
- !elibc_glibc? ( virtual/libiconv )
- X? (
- x11-libs/libICE
- x11-libs/libXau
- x11-libs/libSM
- x11-libs/libX11
- x11-libs/libXt
- )"
-DEPEND="${RDEPEND}
- sys-apps/texinfo"
-# texinfo is required because we patch mtools.texi
-# drop it when mtools-4.0.18-locking.patch is no longer applied
-
-src_prepare() {
- # Don't throw errors on existing directories
- sed -i -e "s:mkdir:mkdir -p:" mkinstalldirs || die
-
- epatch "${FILESDIR}"/${P}-locking.patch # https://crbug.com/508713
- epatch "${FILESDIR}"/${P}-attr.patch # https://crbug.com/644387
- epatch "${FILESDIR}"/${P}-memset.patch
-}
-
-src_configure() {
- # 447688
- use !elibc_glibc && use !elibc_musl && append-libs "-liconv"
- econf \
- --sysconfdir="${EPREFIX}"/etc/mtools \
- $(use_with X x)
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc README* Release.notes
-
- insinto /etc/mtools
- doins mtools.conf
- # default is fine
- sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED}"/etc/mtools/mtools.conf || die
-}
diff --git a/sys-fs/mtools/mtools-4.0.23.ebuild b/sys-fs/mtools/mtools-4.0.25.ebuild
index 03496c70b5bc..a10154dee9ba 100644
--- a/sys-fs/mtools/mtools-4.0.23.ebuild
+++ b/sys-fs/mtools/mtools-4.0.25.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=7
inherit flag-o-matic
@@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 arm ~hppa ppc ppc64 ~sparc x86 ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos ~x64-solaris"
IUSE="X elibc_glibc"
RDEPEND="
@@ -25,13 +25,6 @@ RDEPEND="
)"
DEPEND="${RDEPEND}"
-src_prepare() {
- default
-
- # Don't throw errors on existing directories
- sed -i -e "s:mkdir:mkdir -p:" mkinstalldirs || die
-}
-
src_configure() {
# 447688
use !elibc_glibc && use !elibc_musl && append-libs "-liconv"
@@ -50,5 +43,5 @@ src_install() {
doins mtools.conf
# default is fine
- sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED%/}"/etc/mtools/mtools.conf || die
+ sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED}"/etc/mtools/mtools.conf || die
}