[mmv] sync to debian mmv_1.01b-18

Zing Zing Shishak shishz at fedoraproject.org
Fri Nov 22 18:32:05 UTC 2013


commit c6197008ef54a6349a493e191333fcdf48966f76
Author: Zing Shishak <zing at fastmail.fm>
Date:   Fri Nov 22 13:30:08 2013 -0500

    sync to debian mmv_1.01b-18

 changelog                                          |   44 +++
 copyright                                          |    9 +-
 mmv-1.01b-debian-14.patch                          |  178 ----------
 mmv-1.01b-debian.patch                             |  201 -----------
 mmv-1.01b-makefile.patch                           |   22 +-
 ...better-diagnostics-for-directories-584850.patch |   22 ++
 mmv-debian-format-security.patch                   |   17 +
 mmv-debian-man-page-examples.patch                 |   54 +++
 ...ian-15.patch => mmv-debian-man-page-fixes.patch |  115 +++----
 mmv-debian-man-page-warning-149873.patch           |   45 +++
 mmv-debian-patches-as-of-mmv-1.01b-15.patch        |  368 ++++++++++++++++++++
 mmv.spec                                           |   23 +-
 12 files changed, 632 insertions(+), 466 deletions(-)
---
diff --git a/changelog b/changelog
index fd8adb6..14f2618 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,47 @@
+mmv (1.01b-18) unstable; urgency=low
+
+  * Make LFS support working on 32-bit (again?) by adding the output of
+    "getconf LFS_CFLAGS" to CFLAGS.
+    + Fixes lintian warning binary-file-built-without-LFS-support
+    + Closes: #722709
+  * Switch to a dh7 style debian/rules file
+  * Bump Standards-Version to 3.9.4 (no changes)
+  * Apply wrap-and-sort
+
+ -- Axel Beckert <abe at debian.org>  Fri, 13 Sep 2013 21:42:25 +0200
+
+mmv (1.01b-17) unstable; urgency=low
+
+  * Fix lintian warning malformed-override
+  * Fix blhc warning dpkg-buildflags-missing by passing CFLAGS explicitly.
+  * Fix double build by calling "touch build-stamp" after the build.
+  * Add Vcs-* headers
+
+ -- Axel Beckert <abe at debian.org>  Sat, 29 Dec 2012 17:14:25 +0100
+
+mmv (1.01b-16) unstable; urgency=low
+
+  * Add myself as Uploader.
+  * Bump Standards-Version to 3.9.3 (no other changes necessary)
+  * Switch to source format "3.0 (quilt)"
+  * Add slightly modified patch by Ulrich Eckhardt to provide better
+    diagnostics for directory renaming (Closes: #584850)
+  * Add examples section to man page (Closes: #380327)
+  * Add warnings about blanks in patterns and file names when reading
+    patterns from STDIN (Mitigates: #149873)
+  * Rewrite debian/rules with oldstyle debhelper utilities
+    + Use compat-level 9
+    + Add build-dependency on debhelper >= 9~
+  * Fix lintian-warnings debian-rules-missing-recommended-target
+  * Use hardening build flags
+    + Add build-dependency on dpkg-dev >= 1.16.1~
+    + Add patch to fix FTBFS with -Werror=format-security
+  * Fix wrong license reference in debian/copyright
+  * Add some lintian overrides related to non-existent upstream web page
+    or upstream changelog.
+
+ -- Axel Beckert <abe at debian.org>  Sat, 29 Dec 2012 03:37:29 +0100
+
 mmv (1.01b-15) unstable; urgency=low
 
   * New Maintainer (closes: #485999)
diff --git a/copyright b/copyright
index 5a6643e..556f722 100644
--- a/copyright
+++ b/copyright
@@ -7,7 +7,8 @@ It was maintained by Bernd Eckenfels <ecki at debian.org> with some
 enhancements (NLS Char Support, glibc compiles) from Bernd and kind
 contributions from Hartmut Koptein <koptein at et-inf.fho-emden.de>.
 
-At the moment it is maintained by Gerfried Fuchs <rhonda at debian.at>.
+At the moment it is maintained by Gerfried Fuchs <rhonda at debian.at>
+and Axel Beckert <abe at debian.org>.
 
 Copyright (c) 1989 Vladimir Lanin
 
@@ -43,6 +44,6 @@ vlad at brm.com
 
 Thanks to Joost for getting into touch with him.
 
-On Debian systems, the complete text of the GNU Library General
-Public License can be found in /usr/share/common-licenses/LGPL-2 file,
-later versions can be found in the same directory.
+On Debian systems, the complete text of the GNU General Public License
+can be found in /usr/share/common-licenses/GPL-2 file, later versions
+can be found in the same directory.
diff --git a/mmv-1.01b-makefile.patch b/mmv-1.01b-makefile.patch
index a0123a5..c6ecb42 100644
--- a/mmv-1.01b-makefile.patch
+++ b/mmv-1.01b-makefile.patch
@@ -1,27 +1,15 @@
---- mmv-1.01b.orig/Makefile	1994-11-04 19:24:55.000000000 -0500
-+++ mmv-1.01b/Makefile	2005-08-23 21:52:47.000000000 -0400
-@@ -1,16 +1,16 @@
- # Possible defines in CONF:
- #	IS_MSDOS IS_SYSV IS_V7 IS_BSD HAS_DIRENT HAS_RENAME MV_DIR
- 
--CC		=gcc -traditional
-+CC		=gcc
+--- mmv-1.01b.orig/Makefile.orig	2013-11-22 13:06:59.131102286 -0500
++++ mmv-1.01b.orig/Makefile	2013-11-22 13:11:00.571134047 -0500
+@@ -5,7 +5,7 @@ CC		=gcc
  LD		=$(CC)
  CONF		=-DIS_SYSV -DHAS_DIRENT -DHAS_RENAME
--CFLAGS		=-O2 -m486 $(CONF)
+ CFLAGS		=-O2 $(CONF)
 -LDFLAGS		=-s -N
-+CFLAGS		=-O2 $(CONF)
 +LDFLAGS		=$(LDCONF)
  
  #IBIN		=$(LOCAL)$(ARCH)/bin
  #IMAN		=$(LOCAL)$(ANY)/man
- IBIN=$(DESTDIR)/usr/bin/
--IMAN=$(DESTDIR)/usr/man/
-+IMAN=$(DESTDIR)/usr/share/man/
- 
- mmv:		mmv.o
- 
-@@ -20,5 +20,5 @@
+@@ -20,5 +20,5 @@ clean:
  install:	$(DEST)$(IBIN)/mmv
  install:	$(DEST)$(IMAN)/man1/mmv.1
  
diff --git a/mmv-debian-better-diagnostics-for-directories-584850.patch b/mmv-debian-better-diagnostics-for-directories-584850.patch
new file mode 100644
index 0000000..57044a7
--- /dev/null
+++ b/mmv-debian-better-diagnostics-for-directories-584850.patch
@@ -0,0 +1,22 @@
+Description: Provide better diagnostic for directories
+ Provides better diagnostic when renaming directories. Based on patch
+ by Ulrich Eckhardt <doomster at knuut.de>.
+Debian-Bug: 584850
+Author: Axel Beckert <abe at debian.org>
+
+Index: mmv/mmv.c
+===================================================================
+--- mmv.orig/mmv.c	2012-09-16 20:03:04.269626454 +0200
++++ mmv/mmv.c	2012-09-16 20:06:18.220733497 +0200
+@@ -1215,7 +1215,11 @@
+ 	getstat(pathbuf, ffrom);
+ 	if ((ffrom->fi_stflags & FI_ISDIR) ? !dirs : !fils)
+ #endif
++	{
++		if (verbose)
++			printf("ignoring directory %s\n", ffrom->fi_name);
+ 		return(0);
++	}
+ 
+ 	if (needslash) {
+ 		strcpy(pathend + *pk, SLASHSTR);
diff --git a/mmv-debian-format-security.patch b/mmv-debian-format-security.patch
new file mode 100644
index 0000000..3b813f1
--- /dev/null
+++ b/mmv-debian-format-security.patch
@@ -0,0 +1,17 @@
+Description: Fixes build failure with -Werror=format-security
+ ("format not a string literal and no format arguments")
+Author: Axel Beckert <abe at debian.org>
+
+Index: mmv/mmv.c
+===================================================================
+--- mmv.orig/mmv.c	2012-09-16 18:51:28.000000000 +0200
++++ mmv/mmv.c	2012-09-16 18:59:20.600733584 +0200
+@@ -2828,7 +2828,7 @@
+ 	static FILE *tty = NULL;
+ 	int c, r;
+ 
+-	fprintf(stderr, m);
++	fprintf(stderr, "%s", m);
+ 	if (tty == NULL && (tty = fopen(TTY, "r")) == NULL) {
+ 		fprintf(stderr, "Can not open %s to get reply.\n", TTY);
+ 		if (failact == -1)
diff --git a/mmv-debian-man-page-examples.patch b/mmv-debian-man-page-examples.patch
new file mode 100644
index 0000000..706f88a
--- /dev/null
+++ b/mmv-debian-man-page-examples.patch
@@ -0,0 +1,54 @@
+Description: Add examples section to man page
+ This patch adds several examples of common mmv usage to the man page
+Debian-Bug: 380327
+Author: Axel Beckert <abe at debian.org>
+Last-Update: 2012-12-29
+
+Index: mmv/mmv.1
+===================================================================
+--- mmv.orig/mmv.1	2012-12-29 02:20:59.510075480 +0100
++++ mmv/mmv.1	2012-12-29 02:39:33.591699513 +0100
+@@ -35,6 +35,43 @@
+ .B mmvpatch
+ [\fBexecutable\fP]
+ \}
++.SH "EXAMPLES"
++Rename all
++.I *.jpeg
++files in the current directory to
++\fI*.jpg\fR:
++
++.in +3
++mmv '*.jpeg' '#1.jpg'
++.in -3
++
++Replace the first occurrence of
++.I abc
++with
++.I xyz
++in all files in the current directory:
++
++.in +3
++mmv '*abc*' '#1xyz#2'
++.in -3
++
++Rename files ending in \fI.html.en\fR, \fI.html.de\fR, etc. to ending
++in \fI.en.html\fR, \fI.de.html\fR, etc. in the current directory:
++
++.in +3
++mmv '*.html.??' '#1.#2#3.html'
++.in -3
++
++Rename music files from
++.I <track no.> - <interpreter> - <song title>.ogg
++to
++.I <interpreter> - <track no.> - <song title>.ogg
++in the current directory:
++
++.in +3
++mmv '* - * - *.ogg' '#2 - #1 - #3.ogg'
++.in -3
++
+ .SH "DESCRIPTION"
+ .I Mmv
+ moves (or copies,
diff --git a/mmv-1.01b-debian-15.patch b/mmv-debian-man-page-fixes.patch
similarity index 80%
rename from mmv-1.01b-debian-15.patch
rename to mmv-debian-man-page-fixes.patch
index 98d2d2e..55696ba 100644
--- a/mmv-1.01b-debian-15.patch
+++ b/mmv-debian-man-page-fixes.patch
@@ -1,8 +1,22 @@
-diff -up mmv-1.01b.orig/ mmv-1.01b.orig/
-diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
---- mmv-1.01b.orig/mmv.1.orig	2009-06-01 22:21:12.000000000 -0400
-+++ mmv-1.01b.orig/mmv.1	2009-06-01 22:27:19.000000000 -0400
-@@ -21,14 +21,14 @@ mmv \- move/copy/append multiple files b
+Description: Man page fixes as of mmv 1.01b-15
+ This patch contains the man-page fixes as of mmv 1.01b-15 when it has
+ been converted to the source format "3.0 (quilt)"
+Author: Multiple Authors. See changelog for details.
+Reviewed-By: Axel Beckert <abe at debian.org>
+Last-Update: 2012-12-29
+
+--- mmv-1.01b.orig/mmv.1
++++ mmv-1.01b/mmv.1
+@@ -2,7 +2,7 @@
+ .\" To print the MS-DOS version, use option -rO2.
+ .\" Under System V, take out the '.\"  ' from the next line.
+ .\" .nr O 1
+-.TH MMV 1 "November 20, 1989 (v1.0)"
++.TH MMV 1 "November 20, 2001 (v1.0lfs)"
+ .ie !'\nO'2' \{\
+ .SH NAME
+ mmv \- move/copy/append/link multiple files by wildcard patterns
+@@ -21,13 +21,14 @@ mmv \- move/copy/append multiple files b
  \}
  .SH SYNOPSIS
  .B mmv
@@ -13,7 +27,6 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
 -[\fB-d\fP|\fBp\fP]
 -[\fB-g\fP|\fBt\fP]
 -[\fB-v\fP|\fBn\fP]
--[\fB--\fP]
 +.if '\nO'2' [\fB\-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBz\fP]
 +.if '\nO'0' [\fB\-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBl\fP|\fBs\fP]
 +.if '\nO'1' [\fB\-m\fP|\fBx\fP|\fBr\fP|\fBc\fP|\fBo\fP|\fBa\fP|\fBl\fP]
@@ -25,19 +38,17 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  [\fBfrom to\fP]
  .if '\nO'2' \{\
  .br
-@@ -57,8 +57,10 @@ from the entire set of actions specified
+@@ -56,6 +57,9 @@ from the entire set of actions specified
  and gives the user the choice of either
  proceeding by avoiding the offending parts
  or aborting.
--.I mmv does support large files (LFS) but it does *NOT* support 
 +.I mmv
 +does support large files (LFS) but it does *NOT* support 
- sparse files (i.e. it explodes them).
-+
++sparse files (i.e. it explodes them).
+ 
  .ce
  The Task Options
- .PP
-@@ -73,7 +75,7 @@ If none of these are specified,
+@@ -71,7 +75,7 @@ If none of these are specified,
  .ie '\nO'2' \{\
  a default (patchable by
  .IR mmvpatch ,
@@ -46,7 +57,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  determines the task.
  \}
  .el \{\
-@@ -83,18 +85,18 @@ was invoked (argv[0]):
+@@ -81,18 +85,18 @@ was invoked (argv[0]):
  
  	command name	default task
  
@@ -70,7 +81,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  move source file to target name.
  Both must be on the same device.
  Will not move directories.
-@@ -104,8 +106,8 @@ moves the link without checking if the l
+@@ -102,8 +106,8 @@ moves the link without checking if the l
  directory is different than the old.
  \}
  .TP
@@ -81,7 +92,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  by copying, then deleting source.
  When copying, sets the
  .ie !'\nO'2' permission bits
-@@ -113,7 +115,7 @@ When copying, sets the
+@@ -111,7 +115,7 @@ When copying, sets the
  and file modification time
  of the target file to that of the source file.
  .TP
@@ -90,7 +101,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  rename source file or directory to target name.
  The target name must not include a path:
  the file remains in the same directory in all cases.
-@@ -121,7 +123,7 @@ This option is the only way of renaming 
+@@ -119,7 +123,7 @@ This option is the only way of renaming
  .IR mmv .
  .if '\nO'2' It is only available under DOS version 3.0 or higher.
  .TP
@@ -99,7 +110,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  copy source file to target name.
  Sets the file modification time and
  .ie !'\nO'2' permission bits
-@@ -130,7 +132,7 @@ of the target file to that of the source
+@@ -128,7 +132,7 @@ of the target file to that of the source
  regardless of whether the target file already exists.
  Chains and cycles (to be explained below) are not allowed.
  .TP
@@ -108,7 +119,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  overwrite target name with source file.
  .ie '\nO'2' \{\
  If target file exists, its attributes are left unchanged.
-@@ -148,38 +150,38 @@ and the execute permission bits copied f
+@@ -146,38 +150,38 @@ and the execute permission bits copied f
  In either case, the file modification time is set to the current time.
  \}
  .TP
@@ -157,7 +168,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  For the resulting link to aim back at the source,
  either the source name must begin with a '/',
  or the target must reside in either the current or the source directory.
-@@ -192,7 +194,7 @@ and the source can be a directory.
+@@ -190,7 +194,7 @@ and the source can be a directory.
  Only one of these option may be given,
  and it applies to all matching files.
  Remaining options need not be given separately,
@@ -166,7 +177,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  
  .ce
  Multiple Pattern Pairs
-@@ -234,7 +236,7 @@ a b
+@@ -232,7 +236,7 @@ a b
  a c
  .in -3
  
@@ -175,7 +186,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  (even if it exists)
  was already matched by the first pattern pair.
  
-@@ -257,10 +259,10 @@ matching any single character,
+@@ -255,10 +259,10 @@ matching any single character,
  and matching any one of a set of characters.
  .PP
  Between the '[' and ']', a range from character 'a' through character 'z'
@@ -188,7 +199,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  will match any character but 'b' through 'e', '2' through '5', and '_'.
  .if '\nO'2' \{\
  .PP
-@@ -307,13 +309,13 @@ However, the '~' is not treated as a wil
+@@ -305,13 +309,13 @@ However, the '~' is not treated as a wil
  in the sense that it is not assigned a wildcard index (see below).
  \}
  .PP
@@ -205,7 +216,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  .PP
  .ie '\nO'2' \{\
  Hidden and system files are also only matched
-@@ -326,7 +328,7 @@ Files beginning with '.' are only matche
+@@ -324,7 +328,7 @@ Files beginning with '.' are only matche
  .I from
  patterns that begin with an explicit '.'.
  \}
@@ -214,7 +225,19 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  .if !'\nO'2' \{\
  .PP
  Warning: since the shell normally expands wildcards
-@@ -366,7 +368,7 @@ pattern is "abc*.*" and the
+@@ -332,8 +336,9 @@ before passing the command-line argument
+ .IR mmv ,
+ it is usually necessary to enclose the command-line
+ .I from
+-pattern
+-in quotes.
++and
++.I to
++patterns in quotes.
+ \}
+ 
+ .ce
+@@ -363,7 +368,7 @@ pattern is "abc*.*" and the
  pattern is "xyz#2.#1",
  then "abc.txt" is targeted to "xyztxt.".
  (The first '*' matched "", and the second matched "txt".)
@@ -223,7 +246,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  "foo1\*(SLfoo2\*(SLprog.c" is targeted to "foo1\*(SLfoo2\*(SLc\*(SLprog".
  Note that there is no '\*(SL' following the "#1" in the
  .I to
-@@ -400,7 +402,7 @@ expands the '~' in the exact same manner
+@@ -397,7 +402,7 @@ expands the '~' in the exact same manner
  does not expand it at all).
  \}
  .PP
@@ -232,7 +255,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  the real target name is formed by appending
  a '\*(SL' followed by the last component
  of the source file name.
-@@ -437,7 +439,7 @@ a b
+@@ -434,7 +439,7 @@ a b
  .br
  b c
  
@@ -241,7 +264,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  A cycle is a chain where the last target name
  refers back to the first source file,
  e.g. "mmv a a".
-@@ -464,9 +466,9 @@ Furthermore,
+@@ -461,9 +466,9 @@ Furthermore,
  .I mmv
  checks if any of its actions will result
  in the destruction of existing files.
@@ -253,7 +276,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  (except those specified with "(*)" on the standard input, see below)
  are treated as errors.
  And if neither option is specified,
-@@ -490,16 +492,16 @@ Once all errors are detected,
+@@ -487,16 +492,16 @@ Once all errors are detected,
  queries the user whether he wishes
  to continue by avoiding the erroneous actions or to abort altogether.
  This and all other queries may be avoided by specifying either the
@@ -273,7 +296,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  .I mmv
  in the background or in
  a shell script,
-@@ -511,28 +513,28 @@ Reports
+@@ -508,28 +513,28 @@ Reports
  Once the actions to be performed are determined,
  .I mmv
  performs them silently,
@@ -308,7 +331,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  be fed back to
  .I mmv
  on the standard input
-@@ -548,9 +550,9 @@ To facilitate this,
+@@ -545,9 +550,9 @@ To facilitate this,
  ignores lines on the standard input that look
  like its own error and "done" messages,
  as well as all lines beginning with white space,
@@ -321,7 +344,7 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  for the files matching this pattern only,
  so that such deletions are done silently.
  When feeding
-@@ -599,11 +601,11 @@ on a copy of
+@@ -596,11 +601,11 @@ on a copy of
  .I mmv
  named as follows:
  
@@ -336,33 +359,3 @@ diff -up mmv-1.01b.orig/mmv.1.orig mmv-1.01b.orig/mmv.1
  .PP
  .I Mmvpatch
  also determines the best way to uniquely identify directories.
-diff -up mmv-1.01b.orig/mmv.c.orig mmv-1.01b.orig/mmv.c
---- mmv-1.01b.orig/mmv.c.orig	2009-06-01 22:21:21.000000000 -0400
-+++ mmv-1.01b.orig/mmv.c	2009-06-01 22:27:19.000000000 -0400
-@@ -124,6 +124,7 @@ extern unsigned _stklen = 10000;
- #else
- /* for various flavors of UN*X */
- 
-+#include <libgen.h>
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -565,7 +566,7 @@ static void procargs(argc, argv, pfrompa
- 	char **pfrompat, **ptopat;
- {
- 	char *p, c;
--	char *cmdname = argv[0];
-+	char *cmdname = basename(argv[0]);
- 
- #ifdef IS_MSDOS
- #define CMDNAME (patch.ph_name)
-@@ -2727,7 +2728,9 @@ static int copy(ff, len)
- 				tim.modtime = fstat.st_mtime,
- #else
- 				tim[0].tv_sec = fstat.st_atime,
-+				tim[0].tv_usec = 0,
- 				tim[1].tv_sec = fstat.st_mtime,
-+				tim[1].tv_usec = 0,
- #endif
- 				utimes(fullrep, tim)
- 			)
diff --git a/mmv-debian-man-page-warning-149873.patch b/mmv-debian-man-page-warning-149873.patch
new file mode 100644
index 0000000..4f4815e
--- /dev/null
+++ b/mmv-debian-man-page-warning-149873.patch
@@ -0,0 +1,45 @@
+Description: Add warnings about #149873 to man page
+ This patch adds warnings about issues with spaces in patterns and
+ files when patterns are read from STDIN to the man page
+Debian-Bug: 149873
+Author: Axel Beckert <abe at debian.org>
+Last-Update: 2012-12-29
+
+Index: mmv/mmv.1
+===================================================================
+--- mmv.orig/mmv.1	2012-12-29 02:44:07.591288928 +0100
++++ mmv/mmv.1	2012-12-29 02:56:01.425012596 +0100
+@@ -234,7 +234,7 @@
+ i.e. "mmv \-mk" is allowed.
+ 
+ .ce
+-Multiple Pattern Pairs
++Multiple Pattern Pairs / Reading Patterns from STDIN
+ .PP
+ Multiple
+ .I from
+@@ -277,6 +277,11 @@
+ (even if it exists)
+ was already matched by the first pattern pair.
+ 
++\fBWARNING:\fR This operation mode does \fBnot\fR work if the patterns
++itself contain \fBspaces\fR.  See
++.I http://bugs.debian.org/149873
++for details.
++
+ .ce
+ The \fIFrom\fP Pattern
+ .PP
+@@ -592,6 +597,12 @@
+ Lines with "(*)" after the target pattern have the effect of enabling \-d
+ for the files matching this pattern only,
+ so that such deletions are done silently.
++
++\fBWARNING:\fR This means that \fBunexpected things\fR may happen if
++\fBfiles\fR matched by the patterns contain \fBspaces\fR. See
++.I http://bugs.debian.org/149873
++for details.
++
+ When feeding
+ .I mmv
+ its own output,
diff --git a/mmv-debian-patches-as-of-mmv-1.01b-15.patch b/mmv-debian-patches-as-of-mmv-1.01b-15.patch
new file mode 100644
index 0000000..1c186b2
--- /dev/null
+++ b/mmv-debian-patches-as-of-mmv-1.01b-15.patch
@@ -0,0 +1,368 @@
+Description: Patches as of mmv 1.01b-15
+ This patch contains the functional patches as of mmv 1.01b-15 when it
+ has been converted to the source format "3.0 (quilt)"
+Author: Multiple Authors. See changelog for details.
+Reviewed-By: Axel Beckert <abe at debian.org>
+Last-Update: 2012-12-29
+
+--- mmv-1.01b.orig/mmv.c
++++ mmv-1.01b/mmv.c
+@@ -62,7 +62,8 @@ static char USAGE[] =
+ %s [-m|x%s|c|o|a|z] [-h] [-d|p] [-g|t] [-v|n] [from to]\n\
+ \n\
+ Use #N in the ``to'' pattern to get the string matched\n\
+-by the N'th ``from'' pattern wildcard.\n";
++by the N'th ``from'' pattern wildcard.\n\
++Use -- as the end of options.\n";
+ 
+ #define OTHEROPT (_osmajor < 3 ? "" : "|r")
+ 
+@@ -75,7 +76,9 @@ Use #[l|u]N in the ``to'' pattern to get
+ string matched by the N'th ``from'' pattern wildcard.\n\
+ \n\
+ A ``from'' pattern containing wildcards should be quoted when given\n\
+-on the command line.\n";
++on the command line. Also you may need to quote ``to'' pattern.\n\
++\n\
++Use -- as the end of options.\n";
+ 
+ #ifdef IS_SYSV
+ #define OTHEROPT ""
+@@ -85,6 +88,7 @@ on the command line.\n";
+ 
+ #endif
+ 
++#include <unistd.h>
+ #include <stdio.h>
+ #include <ctype.h>
+ 
+@@ -120,14 +124,12 @@ extern unsigned _stklen = 10000;
+ #else
+ /* for various flavors of UN*X */
+ 
++#include <libgen.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ 
+-extern char *getenv();
+-extern long lseek();
+-extern char *malloc();
+-
+ #ifdef HAS_DIRENT
+ #include <dirent.h>
+ typedef struct dirent DIRENTRY;
+@@ -390,7 +392,7 @@ static int movealias(/* REP *first, REP
+ static int snap(/* REP *first, REP *p */);
+ static void showdone(/* REP *fin */);
+ static void breakout(/*  */);
+-static int breakrep(/* */);
++static void breakrep(int);
+ static void breakstat(/* */);
+ static void quit(/*  */);
+ static int copymove(/* REP *p */);
+@@ -436,9 +438,11 @@ static CHUNK *freechunks = NULL;
+ static SLICER slicer[2] = {{NULL, NULL, 0}, {NULL, NULL, 0}};
+ 
+ static int badreps = 0, paterr = 0, direrr, failed = 0, gotsig = 0, repbad;
+-static FILE *outfile = stdout;
++static FILE *outfile;
+ 
++#ifdef IS_MSDOS
+ static char IDF[] = "$$mmvdid.";
++#endif
+ static char TEMP[] = "$$mmvtmp.";
+ static char TOOLONG[] = "(too long)";
+ static char EMPTY[] = "(empty)";
+@@ -456,12 +460,12 @@ char pathbuf[MAXPATH];
+ char fullrep[MAXPATH + 1];
+ static char *(start[MAXWILD]);
+ static int len[MAXWILD];
+-static char hasdot[MAXWILD];
+ static REP mistake;
+ #define MISTAKE (&mistake)
+ 
+ #ifdef IS_MSDOS
+ 
++static char hasdot[MAXWILD];
+ static int olddevflag, curdisk, maxdisk;
+ static struct {
+ 	char ph_banner[30];
+@@ -497,6 +501,8 @@ int main(argc, argv)
+ {
+ 	char *frompat, *topat;
+ 
++	outfile = stdout;
++
+ 	init();
+ 	procargs(argc, argv, &frompat, &topat);
+ 	domatch(frompat, topat);
+@@ -560,7 +566,7 @@ static void procargs(argc, argv, pfrompa
+ 	char **pfrompat, **ptopat;
+ {
+ 	char *p, c;
+-	char *cmdname = argv[0];
++	char *cmdname = basename(argv[0]);
+ 
+ #ifdef IS_MSDOS
+ #define CMDNAME (patch.ph_name)
+@@ -575,6 +581,11 @@ static void procargs(argc, argv, pfrompa
+ 	for (argc--, argv++; argc > 0 && **argv == '-'; argc--, argv++)
+ 		for (p = *argv + 1; *p != '\0'; p++) {
+ 			c = mylower(*p);
++			if (c == '-') {
++				argc--;
++				argv++;
++				goto endargs;
++			}
+ 			if (c == 'v' && !noex)
+ 				verbose = 1;
+ 			else if (c == 'n' && !verbose)
+@@ -618,7 +629,8 @@ static void procargs(argc, argv, pfrompa
+ 			}
+ 		}
+ 
+-	if (op == DFLT)
++endargs:
++	if (op == DFLT) {
+ 		if (strcmp(cmdname, MOVENAME) == 0)
+ 			op = XMOVE;
+ 		else if (strcmp(cmdname, COPYNAME) == 0)
+@@ -629,6 +641,8 @@ static void procargs(argc, argv, pfrompa
+ 			op = HARDLINK;
+ 		else
+ 			op = DFLTOP;
++	}
++	
+ 	if (
+ 		op & DIRMOVE &&
+ #ifdef IS_MSDOS
+@@ -775,7 +789,7 @@ static void matchpat()
+ static int parsepat()
+ {
+ 	char *p, *lastname, c;
+-	int totwilds, instage, x, havedot;
++	int totwilds, instage, x;
+ 	static char TRAILESC[] = "%s -> %s : trailing %c is superfluous.\n";
+ 
+ 	lastname = from;
+@@ -999,20 +1013,16 @@ static int parsepat()
+ 				printf(TRAILESC, from, to, ESC);
+ 				return(-1);
+ 			}
++#ifdef IS_MSDOS
+ 		default:
+ 			if (
+-#ifdef IS_MSDOS
+ 				c <= ' ' || c >= 127 ||
+ 				strchr(":/\\*?[]=+;,\"|<>", c) != NULL
+-#else
+-				c & 0x80
+-#endif
+ 			) {
+ 				printf("%s -> %s : illegal character '%c' (0x%02X).\n",
+ 					from, to, c, c);
+ 				return(-1);
+ 			}
+-#ifdef IS_MSDOS
+ 			if (isupper(c))
+ 				*p = c + ('a' - 'A');
+ #endif
+@@ -1042,7 +1052,7 @@ static int dostage(lastend, pathend, sta
+ 	DIRINFO *di;
+ 	HANDLE *h, *hto;
+ 	int prelen, litlen, nfils, i, k, flags, try;
+-	FILEINFO **pf, *fdel;
++	FILEINFO **pf, *fdel = NULL;
+ 	char *nto, *firstesc;
+ 	REP *p;
+ 	int wantdirs, ret = 1, laststage = (stage + 1 == nstages);
+@@ -1172,11 +1182,12 @@ static int trymatch(ffrom, pat)
+ 	if (*p == '.' || (!matchall && ffrom->fi_attrib & (FA_HIDDEN | FA_SYSTEM)))
+ 		return(strcmp(pat, p) == 0);
+ #else
+-	if (*p == '.')
++	if (*p == '.') {
+ 		if (p[1] == '\0' || (p[1] == '.' && p[2] == '\0'))
+ 			return(strcmp(pat, p) == 0);
+ 		else if (!matchall && *pat != '.')
+ 			return(0);
++	}
+ #endif
+ 	return(-1);
+ }
+@@ -1312,7 +1323,7 @@ static int checkto(hfrom, f, phto, pnto,
+ {
+ 	char tpath[MAXPATH + 1];
+ 	char *pathend;
+-	FILEINFO *fdel;
++	FILEINFO *fdel = NULL;
+ 	int hlen, tlen;
+ 
+ 	if (op & DIRMOVE) {
+@@ -1405,7 +1416,9 @@ static char *getpath(tpath)
+ static int badname(s)
+ 	char *s;
+ {
++#ifdef IS_MSDOS
+ 	char *ext;
++#endif
+ 
+ 	return (
+ #ifdef IS_MSDOS
+@@ -1715,20 +1728,19 @@ static HANDLE *checkdir(p, pathend, whic
+ 	struct stat dstat;
+ 	DIRID d;
+ 	DEVID v;
+-	DIRINFO **newdirs, *di;
+-	int nfils;
+-	FILEINFO **fils;
++	DIRINFO *di = NULL;
+ 	char *myp, *lastslash = NULL;
+ 	int sticky;
+ 	HANDLE *h;
+ 
+-	if (hsearch(p, which, &h))
++	if (hsearch(p, which, &h)) {
+ 		if (h->h_di == NULL) {
+ 			direrr = h->h_err;
+ 			return(NULL);
+ 		}
+ 		else
+ 			return(h);
++	}
+ 
+ 	if (*p == '\0')
+ 		myp = ".";
+@@ -1899,7 +1911,10 @@ static int match(pat, s, start1, len1)
+ 	char *pat, *s, **start1;
+ 	int *len1;
+ {
+-	char c, *olds;
++	char c;
++#ifdef IS_MSDOS
++	char *olds;
++#endif
+ 
+ 	*start1 = 0;
+ 	for(;;)
+@@ -2376,9 +2391,9 @@ static void goonordie()
+ static void doreps()
+ {
+ 	char *fstart;
+-	int k, printaliased = 0, alias;
++	int k, printaliased = 0, alias = 0;
+ 	REP *first, *p;
+-	long aliaslen;
++	long aliaslen = 0l;
+ 
+ #ifdef IS_MSDOS
+ 	ctrlbrk(breakrep);
+@@ -2396,11 +2411,12 @@ static void doreps()
+ 			}
+ 			strcpy(fullrep, p->r_hto->h_name);
+ 			strcat(fullrep, p->r_nto);
+-			if (!noex && (p->r_flags & R_ISCYCLE))
++			if (!noex && (p->r_flags & R_ISCYCLE)) {
+ 				if (op & APPEND)
+ 					aliaslen = appendalias(first, p, &printaliased);
+ 				else
+ 					alias = movealias(first, p, &printaliased);
++			}
+ 			strcpy(pathbuf, p->r_hfrom->h_name);
+ 			fstart = pathbuf + strlen(pathbuf);
+ 			if ((p->r_flags & R_ISALIASED) && !(op & APPEND))
+@@ -2459,7 +2475,7 @@ static long appendalias(first, p, pprint
+ 	REP *first, *p;
+ 	int *pprintaliased;
+ {
+-	long ret;
++	long ret = 0l;
+ 
+ #ifdef IS_MSDOS
+ 	int fd;
+@@ -2578,10 +2594,10 @@ static void breakout()
+ }
+ 
+ 
+-static int breakrep()
++static void breakrep(int signum)
+ {
+ 	gotsig = 1;
+-	return(1);
++	return;
+ }
+ 
+ 
+@@ -2624,11 +2640,12 @@ static int copymove(p)
+ 
+ static int copy(ff, len)
+ 	FILEINFO *ff;
+-	long len;
++	off_t len;
+ {
+-	char buf[BUFSIZE], c;
++	char buf[BUFSIZE];
+ 	int f, t, k, mode, perm;
+ #ifdef IS_MSDOS
++        char c;
+ 	struct ftime tim;
+ #else
+ #ifdef IS_SYSV
+@@ -2672,7 +2689,7 @@ static int copy(ff, len)
+ 		return(-1);
+ 	}
+ 	if (op & APPEND)
+-		lseek(t, 0L, 2);
++		lseek(t, (off_t)0, SEEK_END);
+ #ifdef IS_MSDOS
+ 	if (op & ZAPPEND && filelength(t) != 0) {
+ 		if (lseek(t, -1L, 1) == -1L || read(t, &c, 1) != 1) {
+@@ -2684,10 +2701,10 @@ static int copy(ff, len)
+ 			lseek(t, -1L, 1);
+ 	}
+ #endif
+-	if ((op & APPEND) && len != -1L) {
++	if ((op & APPEND) && len != (off_t)-1) {
+ 		while (
+ 			len != 0 &&
+-			(k = read(f, buf, len > BUFSIZE ? BUFSIZE : (unsigned)len)) > 0 &&
++			(k = read(f, buf, (len > BUFSIZE) ? BUFSIZE : (size_t)len)) > 0 &&
+ 			write(t, buf, k) == k
+ 		)
+ 			len -= k;
+@@ -2711,7 +2728,9 @@ static int copy(ff, len)
+ 				tim.modtime = fstat.st_mtime,
+ #else
+ 				tim[0].tv_sec = fstat.st_atime,
++				tim[0].tv_usec = 0,
+ 				tim[1].tv_sec = fstat.st_mtime,
++				tim[1].tv_usec = 0,
+ #endif
+ 				utimes(fullrep, tim)
+ 			)
+Index: mmv/Makefile
+===================================================================
+--- mmv.orig/Makefile	2012-09-16 18:24:31.375886230 +0200
++++ mmv/Makefile	2012-09-16 18:24:46.260122528 +0200
+@@ -1,16 +1,16 @@
+ # Possible defines in CONF:
+ #	IS_MSDOS IS_SYSV IS_V7 IS_BSD HAS_DIRENT HAS_RENAME MV_DIR
+ 
+-CC		=gcc -traditional
++CC		=gcc
+ LD		=$(CC)
+ CONF		=-DIS_SYSV -DHAS_DIRENT -DHAS_RENAME
+-CFLAGS		=-O2 -m486 $(CONF)
++CFLAGS		=-O2 $(CONF)
+ LDFLAGS		=-s -N
+ 
+ #IBIN		=$(LOCAL)$(ARCH)/bin
+ #IMAN		=$(LOCAL)$(ANY)/man
+ IBIN=$(DESTDIR)/usr/bin/
+-IMAN=$(DESTDIR)/usr/man/
++IMAN=$(DESTDIR)/usr/share/man/
+ 
+ mmv:		mmv.o
+ 
diff --git a/mmv.spec b/mmv.spec
index 39b0422..7e3fb15 100644
--- a/mmv.spec
+++ b/mmv.spec
@@ -1,6 +1,6 @@
 Name:		mmv
 Version:	1.01b
-Release:	19%{?dist}
+Release:	20%{?dist}
 Summary:	Move/copy/append/link multiple files
 
 Group:          Applications/File
@@ -9,10 +9,13 @@ URL:		http://packages.qa.debian.org/m/mmv.html
 Source0:	http://ftp.debian.org/debian/pool/main/m/mmv/mmv_1.01b.orig.tar.gz
 Source1:	copyright
 Source2:	changelog
-Patch0:		mmv-1.01b-debian.patch
-Patch1:		mmv-1.01b-makefile.patch
-Patch2:		mmv-1.01b-debian-14.patch
-Patch3:		mmv-1.01b-debian-15.patch
+Patch0:		mmv-debian-patches-as-of-mmv-1.01b-15.patch
+Patch1:		mmv-debian-man-page-fixes.patch
+Patch2:		mmv-debian-format-security.patch
+Patch3:		mmv-debian-better-diagnostics-for-directories-584850.patch
+Patch4:		mmv-debian-man-page-examples.patch
+Patch5:		mmv-debian-man-page-warning-149873.patch
+Patch6:		mmv-1.01b-makefile.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -31,6 +34,9 @@ beginning, or proceeding by avoiding the offending parts.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
 cp -p %{SOURCE1} . 
 cp -p %{SOURCE2} .
 
@@ -62,6 +68,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/*
 
 %changelog
+* Fri Nov 22 2013 Zing <zing at fastmail.fm> - 1.01b-20
+- sync with debian mmv_1.01b-18
+-     deb pkg format switch to 3.0
+-     format-security fix
+-     added diagnostic for directories
+-     man page improvements
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.01b-19
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list