SHA256
3
0
forked from pool/fdupes

Accepting request 320399 from utilities

- By default relink hardlinks too, should fix bnc#940296

- Update to upstream git repo on github
- Refresh patches:
  * fdupes-makefile.patch
  * 0008-speedup-the-file-compare.patch
  * 0010-add-permissions-mode.patch
  * 0011-add-an-option-to-sort-duplicate-files-by-name.patch
  * 50_bts284274_hardlinkreplace.dpatch
- Upstreamed patch:
  * 0004-Large-file-support-for-2GB-files-bts447601.patch
- Remove whitespace from fdupes.macros file
- Cleanup with spec-cleaner
  - Obey rpm-opt-flags
  - run test phase

OBS-URL: https://build.opensuse.org/request/show/320399
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fdupes?expand=0&rev=25
This commit is contained in:
Stephan Kulow 2015-09-19 05:56:23 +00:00 committed by Git OBS Bridge
commit 005154cff2
11 changed files with 101 additions and 142 deletions

View File

@ -1,48 +0,0 @@
From 9024d0c1bbbb323ae30b3b025705b076094e2c6c Mon Sep 17 00:00:00 2001
From: Andrew Vaughan <ajv-lists@netspace.net.au>
Date: Fri, 12 Oct 2012 15:00:30 +0200
Subject: [PATCH 04/10] Large file support for >2GB files (bts447601)
---
Makefile | 2 +-
fdupes.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 0c968a8..4d50924 100644
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@ MKDIR = mkdir -p
CC = gcc
COMPILER_OPTIONS = -Wall -O -g
-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG)
+CFLAGS= $(COMPILER_OPTIONS) -I. -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG)
INSTALL_PROGRAM = $(INSTALL) -c -m 0755
INSTALL_DATA = $(INSTALL) -c -m 0644
diff --git a/fdupes.c b/fdupes.c
index f16e4e0..4ecf51b 100644
--- a/fdupes.c
+++ b/fdupes.c
@@ -648,7 +648,7 @@ void printmatches(file_t *files)
while (files != NULL) {
if (files->hasdupes) {
if (!ISFLAG(flags, F_OMITFIRST)) {
- if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", files->size,
+ if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", files->size,
(files->size != 1) ? "s " : " ");
if (ISFLAG(flags, F_DSAMELINE)) escapefilename("\\ ", &files->d_name);
printf("%s%c", files->d_name, ISFLAG(flags, F_DSAMELINE)?' ':'\n');
@@ -801,7 +801,7 @@ void deletefiles(file_t *files, int prompt)
do {
printf("Set %d of %d, preserve files [1 - %d, all]",
curgroup, groups, counter);
- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", files->size,
+ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", files->size,
(files->size != 1) ? "s " : " ");
printf(": ");
fflush(stdout);
--
1.7.11.5

View File

@ -10,11 +10,11 @@ https://bugzilla.novell.com/show_bug.cgi?id=406825
fdupes.c | 6 +++--- fdupes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-) 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fdupes.c b/fdupes.c Index: fdupes-fdupes-1.51/fdupes.c
index 1e9e620..678f31f 100644 ===================================================================
--- a/fdupes.c --- fdupes-fdupes-1.51.orig/fdupes.c
+++ b/fdupes.c +++ fdupes-fdupes-1.51/fdupes.c
@@ -370,7 +370,7 @@ char *getcrcsignatureuntil(char *filename, off_t max_read) @@ -370,7 +370,7 @@ char *getcrcsignatureuntil(char *filenam
} }
while (fsize > 0) { while (fsize > 0) {
@ -22,8 +22,8 @@ index 1e9e620..678f31f 100644
+ toread = (fsize >= CHUNK_SIZE) ? CHUNK_SIZE : fsize; + toread = (fsize >= CHUNK_SIZE) ? CHUNK_SIZE : fsize;
if (fread(chunk, toread, 1, file) != 1) { if (fread(chunk, toread, 1, file) != 1) {
errormsg("error reading from file %s\n", filename); errormsg("error reading from file %s\n", filename);
fclose(file); // bugfix fclose(file);
@@ -606,8 +606,8 @@ int confirmmatch(FILE *file1, FILE *file2) @@ -606,8 +606,8 @@ int confirmmatch(FILE *file1, FILE *file
fseek(file2, 0, SEEK_SET); fseek(file2, 0, SEEK_SET);
do { do {
@ -34,6 +34,3 @@ index 1e9e620..678f31f 100644
if (r1 != r2) return 0; /* file lengths are different */ if (r1 != r2) return 0; /* file lengths are different */
if (memcmp (c1, c2, r1)) return 0; /* file contents are different */ if (memcmp (c1, c2, r1)) return 0; /* file contents are different */
--
1.7.11.5

View File

@ -13,10 +13,10 @@ Requested-in: https://bugzilla.novell.com/show_bug.cgi?id=784670
fdupes.c | 25 ++++++++++++++++++++++++- fdupes.c | 25 ++++++++++++++++++++++++-
2 files changed, 27 insertions(+), 1 deletion(-) 2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/fdupes.1 b/fdupes.1 Index: fdupes-fdupes-1.51/fdupes.1
index 9263adc..e0516f1 100644 ===================================================================
--- a/fdupes.1 --- fdupes-fdupes-1.51.orig/fdupes.1
+++ b/fdupes.1 +++ fdupes-fdupes-1.51/fdupes.1
@@ -63,6 +63,9 @@ below) @@ -63,6 +63,9 @@ below)
when used together with \-\-delete, preserve the first file in each when used together with \-\-delete, preserve the first file in each
set of duplicates and delete the others without prompting the user set of duplicates and delete the others without prompting the user
@ -27,10 +27,10 @@ index 9263adc..e0516f1 100644
.B -v --version .B -v --version
display fdupes version display fdupes version
.TP .TP
diff --git a/fdupes.c b/fdupes.c Index: fdupes-fdupes-1.51/fdupes.c
index 678f31f..b3275a9 100644 ===================================================================
--- a/fdupes.c --- fdupes-fdupes-1.51.orig/fdupes.c
+++ b/fdupes.c +++ fdupes-fdupes-1.51/fdupes.c
@@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
#define F_NOPROMPT 0x0400 #define F_NOPROMPT 0x0400
#define F_SUMMARIZEMATCHES 0x0800 #define F_SUMMARIZEMATCHES 0x0800
@ -39,7 +39,7 @@ index 678f31f..b3275a9 100644
char *program_name; char *program_name;
@@ -481,6 +482,19 @@ int registerfile(filetree_t **branch, file_t *file) @@ -481,6 +482,19 @@ int registerfile(filetree_t **branch, fi
return 1; return 1;
} }
@ -59,7 +59,7 @@ index 678f31f..b3275a9 100644
file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file) file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file)
{ {
int cmpresult; int cmpresult;
@@ -503,6 +517,10 @@ file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file) @@ -503,6 +517,10 @@ file_t **checkmatch(filetree_t **root, f
cmpresult = -1; cmpresult = -1;
else else
if (fsize > checktree->file->size) cmpresult = 1; if (fsize > checktree->file->size) cmpresult = 1;
@ -70,15 +70,15 @@ index 678f31f..b3275a9 100644
else { else {
if (checktree->file->crcpartial == NULL) { if (checktree->file->crcpartial == NULL) {
crcsignature = getcrcpartialsignature(checktree->file->d_name); crcsignature = getcrcpartialsignature(checktree->file->d_name);
@@ -976,6 +994,7 @@ void help_text() @@ -979,6 +997,7 @@ void help_text()
printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n");
printf(" \teach set of duplicates and delete the rest without\n"); printf(" \teach set of duplicates and delete the rest without\n");
printf(" \twithout prompting the user\n"); printf(" \tprompting the user\n");
+ printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); + printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n");
printf(" -v --version \tdisplay fdupes version\n"); printf(" -v --version \tdisplay fdupes version\n");
printf(" -h --help \tdisplay this help message\n\n"); printf(" -h --help \tdisplay this help message\n\n");
#ifdef OMIT_GETOPT_LONG #ifdef OMIT_GETOPT_LONG
@@ -1019,6 +1038,7 @@ int main(int argc, char **argv) { @@ -1022,6 +1041,7 @@ int main(int argc, char **argv) {
{ "noprompt", 0, 0, 'N' }, { "noprompt", 0, 0, 'N' },
{ "summarize", 0, 0, 'm'}, { "summarize", 0, 0, 'm'},
{ "summary", 0, 0, 'm' }, { "summary", 0, 0, 'm' },
@ -86,7 +86,7 @@ index 678f31f..b3275a9 100644
{ 0, 0, 0, 0 } { 0, 0, 0, 0 }
}; };
#define GETOPT getopt_long #define GETOPT getopt_long
@@ -1030,7 +1050,7 @@ int main(int argc, char **argv) { @@ -1033,7 +1053,7 @@ int main(int argc, char **argv) {
oldargv = cloneargs(argc, argv); oldargv = cloneargs(argc, argv);
@ -95,7 +95,7 @@ index 678f31f..b3275a9 100644
#ifndef OMIT_GETOPT_LONG #ifndef OMIT_GETOPT_LONG
, long_options, NULL , long_options, NULL
#endif #endif
@@ -1081,6 +1101,9 @@ int main(int argc, char **argv) { @@ -1084,6 +1104,9 @@ int main(int argc, char **argv) {
case 'm': case 'm':
SETFLAG(flags, F_SUMMARIZEMATCHES); SETFLAG(flags, F_SUMMARIZEMATCHES);
break; break;
@ -105,6 +105,3 @@ index 678f31f..b3275a9 100644
default: default:
fprintf(stderr, "Try `fdupes --help' for more information.\n"); fprintf(stderr, "Try `fdupes --help' for more information.\n");
--
1.7.11.5

View File

@ -12,11 +12,11 @@ Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
fdupes.c | 30 ++++++++++++++++++++++++++++-- fdupes.c | 30 ++++++++++++++++++++++++++++--
2 files changed, 32 insertions(+), 2 deletions(-) 2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/fdupes.1 b/fdupes.1 Index: fdupes-fdupes-1.51/fdupes.1
index e0516f1..b5fb0f6 100644 ===================================================================
--- a/fdupes.1 --- fdupes-fdupes-1.51.orig/fdupes.1
+++ b/fdupes.1 +++ fdupes-fdupes-1.51/fdupes.1
@@ -66,6 +66,10 @@ set of duplicates and delete the others without prompting the user @@ -66,6 +66,10 @@ set of duplicates and delete the others
.B -p --permissions .B -p --permissions
don't consider files with different owner/group or permission bits as duplicates don't consider files with different owner/group or permission bits as duplicates
.TP .TP
@ -27,10 +27,10 @@ index e0516f1..b5fb0f6 100644
.B -v --version .B -v --version
display fdupes version display fdupes version
.TP .TP
diff --git a/fdupes.c b/fdupes.c Index: fdupes-fdupes-1.51/fdupes.c
index b6aeaa7..08f9e2c 100644 ===================================================================
--- a/fdupes.c --- fdupes-fdupes-1.51.orig/fdupes.c
+++ b/fdupes.c +++ fdupes-fdupes-1.51/fdupes.c
@@ -55,6 +55,11 @@ @@ -55,6 +55,11 @@
#define F_EXCLUDEHIDDEN 0x1000 #define F_EXCLUDEHIDDEN 0x1000
#define F_PERMISSIONS 0x2000 #define F_PERMISSIONS 0x2000
@ -43,7 +43,7 @@ index b6aeaa7..08f9e2c 100644
char *program_name; char *program_name;
unsigned long flags = 0; unsigned long flags = 0;
@@ -918,6 +923,11 @@ int sort_pairs_by_mtime(file_t *f1, file_t *f2) @@ -921,6 +926,11 @@ int sort_pairs_by_mtime(file_t *f1, file
return 0; return 0;
} }
@ -55,9 +55,9 @@ index b6aeaa7..08f9e2c 100644
void registerpair(file_t **matchlist, file_t *newmatch, void registerpair(file_t **matchlist, file_t *newmatch,
int (*comparef)(file_t *f1, file_t *f2)) int (*comparef)(file_t *f1, file_t *f2))
{ {
@@ -995,6 +1005,9 @@ void help_text() @@ -998,6 +1008,9 @@ void help_text()
printf(" \teach set of duplicates and delete the rest without\n"); printf(" \teach set of duplicates and delete the rest without\n");
printf(" \twithout prompting the user\n"); printf(" \tprompting the user\n");
printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n");
+ printf(" -o --order \tselect sort order for output, linking and deleting. One of:\n"); + printf(" -o --order \tselect sort order for output, linking and deleting. One of:\n");
+ printf(" time \torder by mtime (default)\n"); + printf(" time \torder by mtime (default)\n");
@ -65,7 +65,7 @@ index b6aeaa7..08f9e2c 100644
printf(" -v --version \tdisplay fdupes version\n"); printf(" -v --version \tdisplay fdupes version\n");
printf(" -h --help \tdisplay this help message\n\n"); printf(" -h --help \tdisplay this help message\n\n");
#ifdef OMIT_GETOPT_LONG #ifdef OMIT_GETOPT_LONG
@@ -1015,6 +1028,7 @@ int main(int argc, char **argv) { @@ -1018,6 +1031,7 @@ int main(int argc, char **argv) {
int progress = 0; int progress = 0;
char **oldargv; char **oldargv;
int firstrecurse; int firstrecurse;
@ -73,7 +73,7 @@ index b6aeaa7..08f9e2c 100644
#ifndef OMIT_GETOPT_LONG #ifndef OMIT_GETOPT_LONG
static struct option long_options[] = static struct option long_options[] =
@@ -1039,6 +1053,7 @@ int main(int argc, char **argv) { @@ -1042,6 +1056,7 @@ int main(int argc, char **argv) {
{ "summarize", 0, 0, 'm'}, { "summarize", 0, 0, 'm'},
{ "summary", 0, 0, 'm' }, { "summary", 0, 0, 'm' },
{ "permissions", 0, 0, 'p' }, { "permissions", 0, 0, 'p' },
@ -81,7 +81,7 @@ index b6aeaa7..08f9e2c 100644
{ 0, 0, 0, 0 } { 0, 0, 0, 0 }
}; };
#define GETOPT getopt_long #define GETOPT getopt_long
@@ -1050,7 +1065,7 @@ int main(int argc, char **argv) { @@ -1053,7 +1068,7 @@ int main(int argc, char **argv) {
oldargv = cloneargs(argc, argv); oldargv = cloneargs(argc, argv);
@ -90,7 +90,7 @@ index b6aeaa7..08f9e2c 100644
#ifndef OMIT_GETOPT_LONG #ifndef OMIT_GETOPT_LONG
, long_options, NULL , long_options, NULL
#endif #endif
@@ -1104,6 +1119,16 @@ int main(int argc, char **argv) { @@ -1107,6 +1122,16 @@ int main(int argc, char **argv) {
case 'p': case 'p':
SETFLAG(flags, F_PERMISSIONS); SETFLAG(flags, F_PERMISSIONS);
break; break;
@ -107,7 +107,7 @@ index b6aeaa7..08f9e2c 100644
default: default:
fprintf(stderr, "Try `fdupes --help' for more information.\n"); fprintf(stderr, "Try `fdupes --help' for more information.\n");
@@ -1179,7 +1204,8 @@ int main(int argc, char **argv) { @@ -1182,7 +1207,8 @@ int main(int argc, char **argv) {
} }
if (confirmmatch(file1, file2)) { if (confirmmatch(file1, file2)) {
@ -115,8 +115,5 @@ index b6aeaa7..08f9e2c 100644
+ registerpair(match, curfile, + registerpair(match, curfile,
+ (ordertype == ORDER_TIME) ? sort_pairs_by_mtime : sort_pairs_by_filename ); + (ordertype == ORDER_TIME) ? sort_pairs_by_mtime : sort_pairs_by_filename );
//match->hasdupes = 1; /*match->hasdupes = 1;
//curfile->duplicates = match->duplicates; curfile->duplicates = match->duplicates;
--
1.8.4.5

View File

@ -5,10 +5,10 @@
## DP: Replace duplicate files with hardlinks ## DP: Replace duplicate files with hardlinks
@DPATCH@ @DPATCH@
Index: fdupes-1.50-PR2/fdupes.c Index: fdupes-fdupes-1.51/fdupes.c
=================================================================== ===================================================================
--- fdupes-1.50-PR2.orig/fdupes.c --- fdupes-fdupes-1.51.orig/fdupes.c
+++ fdupes-1.50-PR2/fdupes.c +++ fdupes-fdupes-1.51/fdupes.c
@@ -54,6 +54,8 @@ @@ -54,6 +54,8 @@
#define F_SUMMARIZEMATCHES 0x0800 #define F_SUMMARIZEMATCHES 0x0800
#define F_EXCLUDEHIDDEN 0x1000 #define F_EXCLUDEHIDDEN 0x1000
@ -18,7 +18,7 @@ Index: fdupes-1.50-PR2/fdupes.c
typedef enum { typedef enum {
ORDER_TIME = 0, ORDER_TIME = 0,
@@ -904,6 +906,88 @@ void deletefiles(file_t *files, int prom @@ -908,6 +910,88 @@ void deletefiles(file_t *files, int prom
free(preservestr); free(preservestr);
} }
@ -107,21 +107,21 @@ Index: fdupes-1.50-PR2/fdupes.c
int sort_pairs_by_arrival(file_t *f1, file_t *f2) int sort_pairs_by_arrival(file_t *f1, file_t *f2)
{ {
if (f2->duplicates != 0) if (f2->duplicates != 0)
@@ -1000,10 +1084,12 @@ void help_text() @@ -1003,10 +1087,12 @@ void help_text()
printf(" \twith -s or --symlinks, or when specifying a\n"); printf(" \twith -s or --symlinks, or when specifying a\n");
printf(" \tparticular directory more than once; refer to the\n"); printf(" \tparticular directory more than once; refer to the\n");
printf(" \tfdupes documentation for additional information\n"); printf(" \tfdupes documentation for additional information\n");
- //printf(" -l --relink \t(description)\n"); - /*printf(" -l --relink \t(description)\n");*/
+ printf(" -L --linkhard \thardlink duplicate files to the first file in\n"); + printf(" -L --linkhard \thardlink duplicate files to the first file in\n");
+ printf(" \teach set of duplicates without prompting the user\n"); + printf(" \teach set of duplicates without prompting the user\n");
printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n");
printf(" \teach set of duplicates and delete the rest without\n"); printf(" \teach set of duplicates and delete the rest without\n");
printf(" \twithout prompting the user\n"); printf(" \tprompting the user\n");
+ printf(" -D --debug \tenable debugging information\n"); + printf(" -D --debug \tenable debugging information\n");
printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n");
printf(" -o --order \tselect sort order for output, linking and deleting. One of:\n"); printf(" -o --order \tselect sort order for output, linking and deleting. One of:\n");
printf(" time \torder by mtime (default)\n"); printf(" time \torder by mtime (default)\n");
@@ -1044,12 +1130,14 @@ int main(int argc, char **argv) { @@ -1047,12 +1133,14 @@ int main(int argc, char **argv) {
{ "symlinks", 0, 0, 's' }, { "symlinks", 0, 0, 's' },
{ "hardlinks", 0, 0, 'H' }, { "hardlinks", 0, 0, 'H' },
{ "relink", 0, 0, 'l' }, { "relink", 0, 0, 'l' },
@ -136,7 +136,7 @@ Index: fdupes-1.50-PR2/fdupes.c
{ "summarize", 0, 0, 'm'}, { "summarize", 0, 0, 'm'},
{ "summary", 0, 0, 'm' }, { "summary", 0, 0, 'm' },
{ "permissions", 0, 0, 'p' }, { "permissions", 0, 0, 'p' },
@@ -1065,7 +1153,7 @@ int main(int argc, char **argv) { @@ -1068,7 +1156,7 @@ int main(int argc, char **argv) {
oldargv = cloneargs(argc, argv); oldargv = cloneargs(argc, argv);
@ -145,7 +145,7 @@ Index: fdupes-1.50-PR2/fdupes.c
#ifndef OMIT_GETOPT_LONG #ifndef OMIT_GETOPT_LONG
, long_options, NULL , long_options, NULL
#endif #endif
@@ -1104,6 +1192,12 @@ int main(int argc, char **argv) { @@ -1107,6 +1195,12 @@ int main(int argc, char **argv) {
case 'd': case 'd':
SETFLAG(flags, F_DELETEFILES); SETFLAG(flags, F_DELETEFILES);
break; break;
@ -158,7 +158,7 @@ Index: fdupes-1.50-PR2/fdupes.c
case 'v': case 'v':
printf("fdupes %s\n", VERSION); printf("fdupes %s\n", VERSION);
exit(0); exit(0);
@@ -1151,6 +1245,16 @@ int main(int argc, char **argv) { @@ -1154,6 +1248,16 @@ int main(int argc, char **argv) {
exit(1); exit(1);
} }
@ -175,7 +175,7 @@ Index: fdupes-1.50-PR2/fdupes.c
if (ISFLAG(flags, F_RECURSEAFTER)) { if (ISFLAG(flags, F_RECURSEAFTER)) {
firstrecurse = nonoptafter("--recurse:", argc, oldargv, argv, optind); firstrecurse = nonoptafter("--recurse:", argc, oldargv, argv, optind);
@@ -1237,12 +1341,23 @@ int main(int argc, char **argv) { @@ -1245,12 +1349,23 @@ int main(int argc, char **argv) {
else else
@ -204,10 +204,10 @@ Index: fdupes-1.50-PR2/fdupes.c
while (files) { while (files) {
curfile = files->next; curfile = files->next;
Index: fdupes-1.50-PR2/fdupes.1 Index: fdupes-fdupes-1.51/fdupes.1
=================================================================== ===================================================================
--- fdupes-1.50-PR2.orig/fdupes.1 --- fdupes-fdupes-1.51.orig/fdupes.1
+++ fdupes-1.50-PR2/fdupes.1 +++ fdupes-fdupes-1.51/fdupes.1
@@ -59,10 +59,17 @@ prompt user for files to preserve, delet @@ -59,10 +59,17 @@ prompt user for files to preserve, delet
.B CAVEATS .B CAVEATS
below) below)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5af2c71206fece42e0f9554427e323bef96653a4dceb5130bc8ac63e2ceb1619
size 19436

3
fdupes-1.51.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:761e16d4ecfef7302c62fe7ef1e181cd34f5c6ce5377dcad96e3ed44fb364986
size 18930

View File

@ -1,7 +1,7 @@
Index: Makefile Index: Makefile
=================================================================== ===================================================================
--- Makefile.orig 2002-05-31 09:31:45.000000000 +0200 --- Makefile.orig
+++ Makefile 2012-10-12 11:46:35.152408642 +0200 +++ Makefile
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
# determination of the actual installation directories. # determination of the actual installation directories.
# Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)" # Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)"
@ -10,8 +10,8 @@ Index: Makefile
+PREFIX = /usr +PREFIX = /usr
# #
# Certain platforms do not support long options (command line options). # When compiling for 32-bit systems, FILEOFFSET_64BIT must be enabled
@@ -50,7 +50,7 @@ @@ -56,7 +56,7 @@ BIN_DIR = $(PREFIX)/bin
# MAN_DIR indicates directory where the fdupes man page is to be # MAN_DIR indicates directory where the fdupes man page is to be
# installed. Suggested value is "$(PREFIX)/man/man1" # installed. Suggested value is "$(PREFIX)/man/man1"
# #

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Tue Aug 4 13:01:47 UTC 2015 - tchvatal@suse.com
- By default relink hardlinks too, should fix bnc#940296
-------------------------------------------------------------------
Mon Aug 3 19:26:55 UTC 2015 - tchvatal@suse.com
- Update to upstream git repo on github
- Refresh patches:
* fdupes-makefile.patch
* 0008-speedup-the-file-compare.patch
* 0010-add-permissions-mode.patch
* 0011-add-an-option-to-sort-duplicate-files-by-name.patch
* 50_bts284274_hardlinkreplace.dpatch
- Upstreamed patch:
* 0004-Large-file-support-for-2GB-files-bts447601.patch
- Remove whitespace from fdupes.macros file
- Cleanup with spec-cleaner
- Obey rpm-opt-flags
- run test phase
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Dec 21 19:58:41 UTC 2014 - bwiedemann@suse.com Sun Dec 21 19:58:41 UTC 2014 - bwiedemann@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package fdupes (Version 1.40) # spec file for package fdupes
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,14 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: fdupes Name: fdupes
Version: 1.50 Version: 1.51
Release: 0 Release: 0
Summary: Identifying or deleting duplicate files Summary: Identifying or deleting duplicate files
Url: http://code.google.com/p/fdupes/
Group: Productivity/Archiving/Compression
License: MIT License: MIT
Source0: http://fdupes.googlecode.com/files/fdupes-1.50-PR2.tar.gz Group: Productivity/Archiving/Compression
Url: https://github.com/adrianlopezroche/fdupes
Source0: https://github.com/adrianlopezroche/%{name}/archive/%{name}-%{version}.tar.gz
Source1: macros.fdupes Source1: macros.fdupes
#PATCH-FIX-SUSE: fix patch according distro's needs #PATCH-FIX-SUSE: fix patch according distro's needs
Patch0: fdupes-makefile.patch Patch0: fdupes-makefile.patch
@ -35,8 +36,6 @@ Patch1: 0001-restore-pristine-code.patch
Patch2: 0002-Added-to-escape-minus-signs-in-manpage-lintian-warni.patch Patch2: 0002-Added-to-escape-minus-signs-in-manpage-lintian-warni.patch
#PATCH-FIX-DEBIAN: dtto #PATCH-FIX-DEBIAN: dtto
Patch3: 0003-Fix-a-typo-in-a-manpage-bts353789.patch Patch3: 0003-Fix-a-typo-in-a-manpage-bts353789.patch
#PATCH-FIX-DEBIAN: support for large files
Patch4: 0004-Large-file-support-for-2GB-files-bts447601.patch
#PATCH-FIX-DEBIAN: manpage fix #PATCH-FIX-DEBIAN: manpage fix
Patch5: 0005-add-summarize-to-manpage-bts481809.patch Patch5: 0005-add-summarize-to-manpage-bts481809.patch
#PATCH-FIX-DEBIAN: dtto #PATCH-FIX-DEBIAN: dtto
@ -53,24 +52,18 @@ Patch10: 0010-add-permissions-mode.patch
Patch11: 0011-add-an-option-to-sort-duplicate-files-by-name.patch Patch11: 0011-add-an-option-to-sort-duplicate-files-by-name.patch
#PATCH-FIX-DEBIAN: add -L/--linkhard #PATCH-FIX-DEBIAN: add -L/--linkhard
Patch20: 50_bts284274_hardlinkreplace.dpatch Patch20: 50_bts284274_hardlinkreplace.dpatch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version}
BuildRequires: which
%endif
%description %description
FDUPES is a program for identifying or deleting duplicate files FDUPES is a program for identifying or deleting duplicate files
residing within specified directories residing within specified directories
%prep %prep
%setup -q -n %name-%{version}-PR2 %setup -q -n %{name}-%{name}-%{version}
%patch0 %patch0
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
@ -81,16 +74,19 @@ residing within specified directories
%patch20 -p1 %patch20 -p1
%build %build
echo -e "#!/bin/bash\n`which %__cc` \"\$@\"" >gcc make %{?_smp_mflags} COMPILER_OPTIONS="%{optflags}"
chmod 755 gcc
export PATH=`pwd`:$PATH
make %{?_smp_mflags}
%install %install
install -D -m755 %{name} %{buildroot}%{_bindir}/%{name} install -D -m755 %{name} %{buildroot}%{_bindir}/%{name}
install -D -m644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 install -D -m644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.%{name} install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
%check
./%{name} testdir
./%{name} --omitfirst testdir
./%{name} --recurse testdir
./%{name} --size testdir
%files %files
%defattr(-, root, root) %defattr(-, root, root)
%doc CHANGES %doc CHANGES

View File

@ -1,9 +1,8 @@
%fdupes(s) \ %fdupes(s) \
_target=""; \ _target=""; \
_symlinks=0; \ _symlinks=0; \
%{-s:_symlinks=1;} \ %{-s:_symlinks=1;} \
fdupes -q -p -n -o name -r %1 | \ fdupes -q -p -n -H -o name -r %1 | \
while read _file; do \ while read _file; do \
if test -z "$_target" ; then \ if test -z "$_target" ; then \
_target="$_file"; \ _target="$_file"; \
@ -20,4 +19,3 @@
fi ; \ fi ; \
done \ done \
%{nil} %{nil}