rpms/e2tools/devel e2cp.1, NONE, 1.1 e2ln.1, NONE, 1.1 e2ls.1, NONE, 1.1 e2mkdir.1, NONE, 1.1 e2mv.1, NONE, 1.1 e2rm.1, NONE, 1.1 e2tail.1, NONE, 1.1 e2tools-fedora-fixes.patch, NONE, 1.1 e2tools-test.sh, NONE, 1.1 e2tools.7, NONE, 1.1 e2tools.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Andreas Thienemann (ixs) fedora-extras-commits at redhat.com
Wed Nov 1 13:52:26 UTC 2006


Author: ixs

Update of /cvs/extras/rpms/e2tools/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18446/devel

Modified Files:
	.cvsignore sources 
Added Files:
	e2cp.1 e2ln.1 e2ls.1 e2mkdir.1 e2mv.1 e2rm.1 e2tail.1 
	e2tools-fedora-fixes.patch e2tools-test.sh e2tools.7 
	e2tools.spec 
Log Message:
auto-import e2tools-0.0.16-5 on branch devel from e2tools-0.0.16-5.src.rpm


--- NEW FILE e2cp.1 ---
.TH E2CP 1 "March 2, 2005"
.\"
.SH NAME
e2cp \- copies files from/to an e2fs filesystem
.\"
.SH SYNOPSIS
.B e2cp
.RI [ options ] " files... dest"
.\"
.SH DESCRIPTION
The \fBe2cp\fP command copies files to/from an e2fs filesystem from/to the
machine's filesystem.
.\"
.SH OPTIONS
A single `-' (dash) can be used instead of a file name to indicate standard
input/output.
.TP
.B \-0
Input lines terminated by a null character.
.TP
.B \-a
Absolute directory names - create directories instead of just copying
into the destination. Only valid for copying into an ext2fs filesystem.
.TP
.B \-d \fIdest_dir\fP
Destination of files to be copied. May be in the ext2fs filesystem or
the host filesystem.
.TP
.B \-G \fIgid\fP
Set the default group to gid.
.TP
.B \-O \fIuid\fP
Set the default file owner to uid.
.TP
.B \-p
Preserve host file attributes (permissions, times, etc.) when copying
files.
.TP
.B \-P \fImode\fP
Set the file permissions (ie 755, 666).
.TP
.B \-s \fIsrc_dir\fP
The source of the files to be copied.
.TP
.B \-v
Be verbose.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2ln (1),
.BR e2ls (1),
.BR e2mkdir (1),
.BR e2mv (1),
.BR e2rm (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2ln.1 ---
.TH E2LN 1 "March 2, 2005"
.\"
.SH NAME
e2ln \- create hard links on an ext2 filesystem
.\"
.SH SYNOPSIS
.B e2ln
.RI [ options ] " source destination"
.\"
.SH DESCRIPTION
The \fBe2ln\fP command is used to create hard links on an ext2 filesystem.
.\"
.SH OPTIONS
.TP
.B \-f
Force the operation to remove any existing files.
.TP
.B \-s
Create a symlink.
.TP
.B \-v
Be verbose.
.PP
Note: creating symlinks is not operational at this time.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2mv (1),
.BR e2ls (1),
.BR e2mkdir (1),
.BR e2cp (1),
.BR e2rm (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2ls.1 ---
.TH E2LS 1 "March 2, 2005"
.\"
.SH NAME
e2ls \- list files and directories on an ext2 filesystem
.\"
.SH SYNOPSIS
.B e2ls
.RI [ options ] " file_specification"
.\"
.SH DESCRIPTION
The \fBe2ls\fP command is used to list files and directories on an ext2
filesystem.
.PP
Note: Files deleted via e2rm sometimes will show up even without the -D
option. It is being investigated.
.\"
.SH OPTIONS
.TP
.B \-a
Show hidden directories.
.TP
.B \-c
Sort by creation time (must include -t when using -l).
.TP
.B \-d \fIdir\fP
Open the ext2 filesystem specified by dir.
.TP
.B \-D
Show deleted files bracketed with ><.
.TP
.B \-f
No sorting of the file list.
.TP
.B \-i
Show the inodes (very useful for the -l option).
.TP
.B \-l
Long listing.
.TP
.B \-r
Reverse the sort order.
.TP
.B \-t
Sort by time.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2ln (1),
.BR e2mv (1),
.BR e2mkdir (1),
.BR e2cp (1),
.BR e2rm (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2mkdir.1 ---
.TH E2MKDIR 1 "March 2, 2005"
.\"
.SH NAME
e2mkdir \- creates a directory on an ext2 filesystem
.\"
.SH SYNOPSIS
.B e2mkdir
.RI [ options ] " directory..."
.\"
.SH DESCRIPTION
The \fBe2mkdir\fP command creates directories on an ext2 filesystem. It
behaves similar to `mkdir -p'.
.\"
.SH OPTIONS
.TP
.B \-G \fIgid\fP
Set the default group to gid.
.TP
.B \-O \fIuid\fP
Set the default file owner to uid.
.TP
.B \-P \fImode\fP
Set the file permissions (ie 755, 666).
.TP
.B \-v
Be verbose.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2ln (1),
.BR e2ls (1),
.BR e2mv (1),
.BR e2cp (1),
.BR e2rm (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2mv.1 ---
.TH E2MV 1 "March 2, 2005"
.\"
.SH NAME
e2mv \- moves or renames files on an ext2fs filesystem
.\"
.SH SYNOPSIS
.B e2mv
.RI [ options ] " files... dest"
.\"
.SH DESCRIPTION
The \fBe2mv\fP command moves or renames files on an ext2fs filesystem. The
source files must be explicitly stated. It does not use regular expressions,
yet.
.\"
.SH OPTIONS
.TP
.B \-f
Force the operation to remove any existing files.
.TP
.B \-s
Swap names of the two files.
.TP
.B \-v
Be verbose.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2ln (1),
.BR e2ls (1),
.BR e2mkdir (1),
.BR e2cp (1),
.BR e2rm (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2rm.1 ---
.TH E2RM 1 "March 2, 2005"
.\"
.SH NAME
e2rm \- removes files and directories on an ext2 filesystem
.\"
.SH SYNOPSIS
.B e2rm
.RI [ options ] " files..."
.\"
.SH DESCRIPTION
The \fBe2rm\fP command removes files and directories on an ext2 filesystem.
.\"
.SH OPTIONS
.TP
.B \-r
Recursively delete files if a directory name is given.
.TP
.B \-v
Be verbose.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2ln (1),
.BR e2ls (1),
.BR e2mkdir (1),
.BR e2cp (1),
.BR e2mv (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2tail.1 ---
.TH E2TAIL 1 "March 2, 2005"
.\"
.SH NAME
e2tail \- a basic version of the tail command for an ext2 filesystem
.\"
.SH SYNOPSIS
.B e2tail
.RI [ options ] " file"
.\"
.SH DESCRIPTION
The \fBe2tail\fP command implements a basic version of the tail command.
.\"
.SH OPTIONS
.TP
.B \-n \fInum_lines\fP
The number of lines to display
.TP
.B \-f
Output appended data as the file grows.  This is inode dependent, so if the
file is renamed, it will keep checking it.
.TP
.B \-F
Output appended data as the file grows.  This is file name dependent, so if
the file is renamed, it will check on any new files with the same name as the
original.  This is useful for watching log files that may be rotated out
occasionally.  This was requested by a person in the computer security field
for monitoring 'honeypot' type machines.
.TP
.B \-s \fIsleep_interval\fP
The number of seconds to sleep before checking if the file has grown while
in 'follow' mode.  The default is 1.
.\"
.SH SEE ALSO
.BR e2tools (7),
.BR e2ln (1),
.BR e2ls (1),
.BR e2mkdir (1),
.BR e2cp (1),
.BR e2rm (1),
.BR e2mv (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).

e2tools-fedora-fixes.patch:

--- NEW FILE e2tools-fedora-fixes.patch ---
Only in e2tools-0.0.16.fedora: _b
Only in e2tools-0.0.16.fedora: configure.in~
diff -rup e2tools-0.0.16.orig/copy.c e2tools-0.0.16.fedora/copy.c
--- e2tools-0.0.16.orig/copy.c	2004-04-07 03:15:20.000000000 +0200
+++ e2tools-0.0.16.fedora/copy.c	2006-07-17 11:55:48.000000000 +0200
@@ -239,11 +239,10 @@ copy(int argc, char *argv[])
 {
   ext2_filsys fs = NULL;
   ext2_ino_t root;
-  ext2_ino_t orig_cwd;
+  ext2_ino_t orig_cwd = -1;
   ext2_ino_t cwd;
   char tmpbuf[BUF_SIZE];
   char outpath[BUF_SIZE];
-  char *last_filesys = NULL;
   char *cur_filesys = NULL;
   int retval;
   int c;
@@ -251,7 +250,7 @@ copy(int argc, char *argv[])
   char *dest_dir = NULL;
   char *in_file = NULL;
   char *out_file = NULL;
-  int max_out_len;
+  int max_out_len = -1;
   int keep = 0;
   int absolute = 0;
   int verbose = 0;
@@ -1054,7 +1053,6 @@ read_string(char *inbuf)
   char *ptr;
   char *boundary;
   int c;
-  int cnt;
 
   boundary = inbuf + BUF_SIZE - 1;
   ptr = inbuf;
Only in e2tools-0.0.16.fedora: copy.c~
diff -rup e2tools-0.0.16.orig/e2tools.h e2tools-0.0.16.fedora/e2tools.h
--- e2tools-0.0.16.orig/e2tools.h	2004-04-07 03:15:55.000000000 +0200
+++ e2tools-0.0.16.fedora/e2tools.h	2006-07-17 12:02:16.000000000 +0200
@@ -57,44 +57,45 @@ extern int optreset;		/* defined by BSD,
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <regex.h>
 #include "ext2fs/ext2_fs.h"
 #include "ext2fs/ext2fs.h"
 
 #define E2T_FORCE 1
 #define E2T_DO_MV 2
 
-#ifndef COPY_C
+/* from copy.c */
 extern long copy(int argc, char *argv[]);
 extern int my_strcmp(const void *n1, const void *n2);
-#endif
 
-#ifdef LN_C
+
+/* from ln.c */
 extern long do_ln(int argc, char *argv[]);
 
 extern long create_hard_link(ext2_filsys fs, ext2_ino_t cwd, ext2_ino_t
                              new_file_ino, char *newfile, int ln_flags);
-#endif
 
-#ifndef LS_C
+
+/* from ls.c */
 extern long do_list_dir(int argc, char *argv[]);
-#endif
 
-#ifndef MKDIR_C
+
+/* from mkdir.c */
 extern long e2mkdir(int argc, char *argv[]);
 extern long create_dir(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd,
                        char *dirname, struct stat *def_stat);
-#endif
+extern long change_cwd(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd,
+		       char *dirname);
 
-#ifdef MV_C
+
+/* from mv.c */
 extern long do_mv(int argc, char *argv[]);
 extern long get_file_parts(ext2_filsys fs, ext2_ino_t root, char *pathname,
                            ext2_ino_t *dir_ino, char **dir_name,
                            char **base_name);
 
-#endif
-
 
-#ifndef READ_C
+/* from read.c */
 extern long get_file(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
                      char *infile, char *outfile, int keep);
 extern long retrieve_data(ext2_filsys fs, ext2_ino_t src, int dest_fd,
@@ -102,17 +103,17 @@ extern long retrieve_data(ext2_filsys fs
                           ext2_off_t *ret_pos);
 extern long read_to_eof(ext2_file_t infile, int dest_fd, ext2_off_t offset,
                         ext2_off_t *ret_pos);
-#endif
 
-#ifndef RM_C
+
+/* from rm.c */
 extern long e2rm(int argc, char *argv[]);
 #endif
 
-#ifndef TAIL_C
+/* from tail.c */
 extern long do_tail(int argc, char *argv[]);
-#endif
 
-#ifndef UTIL_C
+
+/* from util.c */
 extern mode_t ext2_mode_xlate(__u16 lmode);
 extern __u16 host_mode_xlate(mode_t hmode);
 extern long open_filesystem(char *name, ext2_filsys *fs, ext2_ino_t *root, int
@@ -125,14 +126,12 @@ extern long rm_file(ext2_filsys fs, ext2
                     delfile); 
 extern long delete_file(ext2_filsys fs, ext2_ino_t inode);
 extern void init_stat_buf(struct stat *buf);
-#endif
+extern int  is_file_regexp(char *ptr);
+extern regex_t *make_regexp(char *shell);
 
-#ifndef WRITE_C
+/* from write.c */
 extern long
 put_file(ext2_filsys fs, ext2_ino_t cwd, char *infile, char *outfile,
          ext2_ino_t *outfile_ino, int keep, struct stat *def_stat);
-#endif
-
-#endif
 
 
Only in e2tools-0.0.16.fedora: e2tools.h~
Only in e2tools-0.0.16.fedora: e2tools-test.sh
Only in e2tools-0.0.16.fedora: e2tools-test.sh~
diff -rup e2tools-0.0.16.orig/elist.c e2tools-0.0.16.fedora/elist.c
--- e2tools-0.0.16.orig/elist.c	2004-04-06 22:00:16.000000000 +0200
+++ e2tools-0.0.16.fedora/elist.c	2006-07-17 11:44:07.000000000 +0200
@@ -41,6 +41,7 @@
 /* Feature Test Switches */
 /* Headers */
 #include <memory.h>
+#include <stdlib.h>
 #include "elist.h"
 
 #ifndef NULL
@@ -79,8 +80,6 @@ elist_delete(elist_t *l, void (*data_fre
 void
 elist_free(elist_t *l, void (*data_free)(void *))
 {
-  elist_t *n;
-  
   if (l)
     {
       do
@@ -136,7 +135,7 @@ elist_insert(elist_t *l, void *data)
   return(l);
 }
 
-void elist_sort(elist_t *l, int (sort_func)(void *, void *), int reverse)
+void elist_sort(elist_t *l, int (*sort_func)(const void *, const void *), int reverse)
 {
   int c=0;
   elist_t *tl;
Only in e2tools-0.0.16.fedora: elist.c~
Only in e2tools-0.0.16.fedora: _i
diff -rup e2tools-0.0.16.orig/ln.c e2tools-0.0.16.fedora/ln.c
--- e2tools-0.0.16.orig/ln.c	2002-06-30 07:54:02.000000000 +0200
+++ e2tools-0.0.16.fedora/ln.c	2006-07-17 11:44:27.000000000 +0200
@@ -95,7 +95,6 @@ do_ln(int argc, char *argv[])
   int verbose=0;
   int force=0;
   int symlink=0;
-  int num_files;
   int errcnt=0;
   char *cur_filesys = NULL;
   ext2_filsys fs = NULL;
Only in e2tools-0.0.16.fedora: ln.c~
diff -rup e2tools-0.0.16.orig/ls.c e2tools-0.0.16.fedora/ls.c
--- e2tools-0.0.16.orig/ls.c	2004-04-07 05:31:39.000000000 +0200
+++ e2tools-0.0.16.fedora/ls.c	2006-07-17 11:48:12.000000000 +0200
@@ -143,7 +143,6 @@ static int
 list_dir_proc(ext2_ino_t dir, int entry, struct ext2_dir_entry *dirent,
               int offset, int blocksize, char *buf, void *private)
 {
-  struct ext2_inode	inode;
   char			name[EXT2_NAME_LEN];
   struct list_dir_struct *ls = (struct list_dir_struct *) private;
   int thislen;
@@ -485,7 +484,7 @@ do_list_dir(int argc, char *argv[])
       if (ls.options & DELETED_OPT)
         flags |= DIRENT_FLAG_INCLUDE_REMOVED;
             
-      if (retval = ext2fs_check_directory(fs, inode))
+      if ((retval = ext2fs_check_directory(fs, inode)))
         {
         if (retval != EXT2_ET_NO_DIRECTORY)
             {
@@ -703,7 +702,7 @@ void short_disp(ls_file_t *info, int *co
   char lbr, rbr;
   char tmp[300];
   int thislen;
-  static max_col_size = 0;
+  static int max_col_size = 0;
 
   if (max_col_size == 0)
     {
@@ -1023,9 +1022,7 @@ int creat_time_sort(void *n1, void *n2)
 elist_t * remove_ls_dups(elist_t *list)
 {
   elist_t *start = list;
-  elist_t *next;
   ls_file_t *cd;
-  ls_file_t *nd;
   int cnt=0;
 
   while(list != NULL)
Only in e2tools-0.0.16.fedora: ls.c~
diff -rup e2tools-0.0.16.orig/Makefile.am e2tools-0.0.16.fedora/Makefile.am
--- e2tools-0.0.16.orig/Makefile.am	2003-07-12 19:06:54.000000000 +0200
+++ e2tools-0.0.16.fedora/Makefile.am	2006-07-17 12:22:28.000000000 +0200
@@ -27,3 +27,11 @@ install-exec-hook:
 	$(LN_S) -f e2cp $(DESTDIR)$(bindir)/e2mv
 	$(LN_S) -f e2cp $(DESTDIR)$(bindir)/e2rm
 	$(LN_S) -f e2cp $(DESTDIR)$(bindir)/e2tail
+
+uninstall-exec-hook:
+	$(RM) -f $(DESTDIR)$(bindir)/e2ln
+	$(RM) -f $(DESTDIR)$(bindir)/e2ls
+	$(RM) -f $(DESTDIR)$(bindir)/e2mkdir
+	$(RM) -f $(DESTDIR)$(bindir)/e2mv
+	$(RM) -f $(DESTDIR)$(bindir)/e2rm
+	$(RM) -f $(DESTDIR)$(bindir)/e2tail
Only in e2tools-0.0.16.fedora: Makefile.am~
Only in e2tools-0.0.16.fedora: Makefile.in~
diff -rup e2tools-0.0.16.orig/mkdir.c e2tools-0.0.16.fedora/mkdir.c
--- e2tools-0.0.16.orig/mkdir.c	2004-04-07 05:19:32.000000000 +0200
+++ e2tools-0.0.16.fedora/mkdir.c	2006-07-17 12:06:33.000000000 +0200
@@ -281,7 +281,6 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
   ext2_ino_t parent;          /* the parent directory inode number*/
   ext2_ino_t child;           /* the inode number of the new directory */
   struct ext2_inode inode;    /* inode of file/directory dirname */
-  char *name;                 /* basename of the new directory */
   long retval;                /* function return value */
   char *buf;
   int len;
@@ -315,7 +314,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
         parent = *cwd;
 
       /* allocate memory for the lookups */
-      if ((retval = ext2fs_get_mem(fs->blocksize, (void **) &buf)))
+      if ((retval = ext2fs_get_mem(fs->blocksize, (void *) &buf)))
         {
           fprintf(stderr, "%s\n", error_message(retval));
           return retval;
@@ -357,16 +356,16 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
                                               def_stat)))
                     {
                       fprintf(stderr,
-                              "create_dir: error creating directory %s/%s:%d\n",
+                              "create_dir: error creating directory %s/%s:%ld\n",
                               dirname, dname, retval);
-                      ext2fs_free_mem((void **) &buf);
+                      ext2fs_free_mem((void *) &buf);
                       return(retval);
                     }
                 }
               else
                 {
                   fprintf(stderr, "%s\n", error_message(retval));
-                  ext2fs_free_mem((void **) &buf);
+                  ext2fs_free_mem((void *) &buf);
                   return retval;
                 }
             }
@@ -380,7 +379,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
                                                &parent)))
                 {
                   fprintf(stderr, "%s\n", error_message(retval));
-                  ext2fs_free_mem((void **) &buf);
+                  ext2fs_free_mem((void *) &buf);
                   return retval;
                 }
 
@@ -388,7 +387,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
               if ((retval = ext2fs_read_inode(fs, parent, &inode)))
                 {
                   fprintf(stderr, "%s\n", error_message(retval));
-                  ext2fs_free_mem((void **) &buf);
+                  ext2fs_free_mem((void *) &buf);
                   return retval;
                 }
 
@@ -397,7 +396,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
                 {
                   fprintf(stderr, "create_dir: %s/%s is not a directory: %o\n",
                           dirname, dname, inode.i_mode);
-                  ext2fs_free_mem((void **) &buf);
+                  ext2fs_free_mem((void *) &buf);
                   return(-1);
                 }
             }
@@ -407,7 +406,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
             *--dname = '/';
           dname = ptr;
         }
-      ext2fs_free_mem((void **) &buf);
+      ext2fs_free_mem((void *) &buf);
       *cwd = parent;
     }
   else
@@ -415,7 +414,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
       if ((retval = create_subdir(fs, root, cwd, dirname, def_stat)))
         {
           fprintf(stderr,
-                  "create_dir: error creating directory %s:%d\n",
+                  "create_dir: error creating directory %s:%ld\n",
                   dirname, retval);
           return(retval);
         }
@@ -493,7 +492,7 @@ long create_subdir(ext2_filsys fs, ext2_
       return(0);
     }
   
-  /* ok, the directory doesn't exist
+  /* ok, the directory doesn't exist */
   /* get a new inode number */
   if ((retval = ext2fs_new_inode(fs, parent, LINUX_S_IFDIR | 0755, 0, &child)))
     {
Only in e2tools-0.0.16.fedora: mkdir.c~
diff -rup e2tools-0.0.16.orig/mv.c e2tools-0.0.16.fedora/mv.c
--- e2tools-0.0.16.orig/mv.c	2002-06-09 23:30:25.000000000 +0200
+++ e2tools-0.0.16.fedora/mv.c	2006-07-17 11:58:30.000000000 +0200
@@ -84,7 +84,6 @@ do_mv(int argc, char *argv[])
   int verbose=0;
   int force=0;
   int swap_files=0;
-  int num_files;
   int errcnt=0;
   char *cur_filesys = NULL;
   ext2_filsys fs = NULL;
Only in e2tools-0.0.16.fedora: mv.c~
Only in e2tools-0.0.16.fedora: mv.h
Only in e2tools-0.0.16.fedora: mv.h~
diff -rup e2tools-0.0.16.orig/progress.c e2tools-0.0.16.fedora/progress.c
--- e2tools-0.0.16.orig/progress.c	2002-06-26 13:18:07.000000000 +0200
+++ e2tools-0.0.16.fedora/progress.c	2006-07-17 11:46:38.000000000 +0200
@@ -27,6 +27,7 @@
 /* System Headers */
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 
@@ -154,7 +155,7 @@ void update_progress(unsigned long num_b
   if (prog_sbuf != NULL && prog_time != tv.tv_sec)
     {
       prog_time = tv.tv_sec;
-      fprintf(stderr, "%s %10d / %10d\r", prog_file, num_bytes,
+      fprintf(stderr, "%s %10ld / %10ld\r", prog_file, num_bytes,
               prog_sbuf->st_size);
       fflush(stderr);
     }
Only in e2tools-0.0.16.fedora: progress.c~
diff -rup e2tools-0.0.16.orig/read.c e2tools-0.0.16.fedora/read.c
--- e2tools-0.0.16.orig/read.c	2002-08-08 09:58:35.000000000 +0200
+++ e2tools-0.0.16.fedora/read.c	2006-07-17 11:52:12.000000000 +0200
@@ -9,9 +9,7 @@
  *
  */
 
-static char rcsid[] = "$Id: read.c,v 0.2 2002/08/08 07:58:35 ksheff Exp $";
-
-static char copyright[] = "Copyright 2002 Keith W Sheffield";
+static char __attribute__ ((used)) copyright[] = "Copyright 2002 Keith W Sheffield";
 
 #ifndef READ_C
 #define READ_C
@@ -106,7 +104,6 @@ long
 get_file(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
          char *infile, char *outfile, int keep)
 {
-  int fd;
   ext2_ino_t src;
   int dest;
   int retval;
Only in e2tools-0.0.16.fedora: read.c~
Only in e2tools-0.0.16.fedora: README~
diff -rup e2tools-0.0.16.orig/rm.c e2tools-0.0.16.fedora/rm.c
--- e2tools-0.0.16.orig/rm.c	2004-04-07 04:00:43.000000000 +0200
+++ e2tools-0.0.16.fedora/rm.c	2006-07-21 16:13:25.000000000 +0200
@@ -244,8 +244,8 @@ e2rm(int argc, char *argv[])
                   retval = ext2fs_dir_iterate2(gbl_fs, curr_ino,
                                                DIRENT_FLAG_INCLUDE_EMPTY, 0,
                                                rm_dir_proc,
-                                               (void *)
-                                               (verbose) ? &verbose : NULL);
+                                               (void *) 
+                                               ((verbose) ? &verbose : NULL));
                 }
               else
                 {
Only in e2tools-0.0.16.fedora: rm.c~
diff -rup e2tools-0.0.16.orig/tail.c e2tools-0.0.16.fedora/tail.c
--- e2tools-0.0.16.orig/tail.c	2003-07-12 18:33:11.000000000 +0200
+++ e2tools-0.0.16.fedora/tail.c	2006-07-17 12:39:06.000000000 +0200
@@ -251,7 +251,6 @@ tail(ext2_filsys *fs_ptr, ext2_ino_t roo
   unsigned int bytes_to_read;
   unsigned int bytes_read;
   char *ptr;
-  off_t pos;
   struct ext2_inode inode;
   ext2_file_t tail_fd;    
   ext2_off_t offset;
@@ -320,7 +319,11 @@ tail(ext2_filsys *fs_ptr, ext2_ino_t roo
               if (bytes_to_read != bytes_read - 1)
                 {
                   ptr++;
-                  write(1, ptr, bytes_read - bytes_to_read - 1);
+		  if (0 > write(1, ptr, bytes_read - bytes_to_read - 1))
+		    {
+		      perror("writing bytes to stdout");
+		      return -1;
+		    }
                 }
               offset = 0;       /* make sure we break out of the main loop */
               break;
@@ -338,7 +341,12 @@ tail(ext2_filsys *fs_ptr, ext2_ino_t roo
    */
   
   if (num_lines > 0)
-    write(1, buf, bytes_read);
+    {
+      if (0 > write(1, buf, bytes_read)) {
+	perror("writing bytes to stdout");
+	return -1;
+      }
+    }
     
   /* retreive the current position in the file */
   if ((retval = ext2fs_file_lseek(tail_fd, 0, EXT2_SEEK_CUR, &cur_pos)))
Only in e2tools-0.0.16.fedora: tail.c~
diff -rup e2tools-0.0.16.orig/util.c e2tools-0.0.16.fedora/util.c
--- e2tools-0.0.16.orig/util.c	2002-06-09 23:30:26.000000000 +0200
+++ e2tools-0.0.16.fedora/util.c	2006-07-17 11:45:25.000000000 +0200
@@ -276,10 +276,9 @@ make_regexp(char *shell)
   char *tmpstr;
   char *ptr;
   static regex_t reg;
-  int l;
   char c;
 
-  if (NULL == (tmpstr = alloca((strlen(shell)) << 1 + 3)))
+  if (NULL == (tmpstr = alloca(((strlen(shell)) << 1) + 3)))
     {
       perror("make_regexp");
       return(NULL);
Only in e2tools-0.0.16.fedora: util.c~
diff -rup e2tools-0.0.16.orig/write.c e2tools-0.0.16.fedora/write.c
--- e2tools-0.0.16.orig/write.c	2004-04-07 03:12:30.000000000 +0200
+++ e2tools-0.0.16.fedora/write.c	2006-07-17 11:44:42.000000000 +0200
@@ -9,8 +9,6 @@
  * and modified by Robert Sanders <gt8134b at prism.gatech.edu>
  */
 
-static char rcsid[] = "$Id: write.c,v 0.5 2004/04/07 01:12:30 ksheff Exp $";
-
 #ifndef WRITE_C
 #define WRITE_C
 #endif
Only in e2tools-0.0.16.fedora: write.c~


--- NEW FILE e2tools-test.sh ---
#!/bin/sh
# Simple test for est e2tools <URL:http://home.earthlink.net/~k_sheff/sw/e2tools/>
# Copyright (C) 2006 Hans Ulrich Niedermann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

set -ex

# Caution: An image of 100G size needs 1.6GB on disk just to be formatted!
for imgsize in 1M; do
    testimg="test-${imgsize}.img"
    trap "" EXIT
    # create sparse image file full of zeros
    rm -f "${testimg}"
    /bin/dd if=/dev/null of="${testimg}" bs=1 count=1 seek="$imgsize"
    # create file system on image file
    /sbin/mkfs.ext2 -F "${testimg}"
    # check a few things
    ./e2mkdir "${testimg}:/foo"
    ./e2ls -l "${testimg}:"

    ./e2mkdir "${testimg}:/bar"
    ./e2mkdir "${testimg}:/bla"
    ./e2ls -l "${testimg}:"

    for file in README configure; do

	./e2cp "${file}" "${testimg}:/foo"
	./e2ls -l "${testimg}:/foo"

	trap "rm -f ${file}.test-c" EXIT
	./e2cp "${testimg}:/foo/${file}" "${file}.test-c"

	./e2rm ${testimg}:/foo/${file}
	./e2ls -l "${testimg}:/foo"

	cmp ${file} ${file}.test-c
	rm -f ${file}.test-c
    done

    # remove the test image
    rm -f "${testimg}"
    trap "" EXIT
done

exit 0


--- NEW FILE e2tools.7 ---
.TH E2TOOLS 7 "March 2, 2005"
.\"
.SH NAME
e2tools \-  utilities to manipulate files in an ext2/ext3 filesystem
.\"
.SH DESCRIPTION
E2tools is a simple set of GPL'ed utilities to read, write, and
manipulate files in an ext2/ext3 filesystem. These utilities access a
filesystem directly using the ext2fs library. I wrote these tools in order
to copy files into a linux filesystem on a machine that does not have ext2
support. Of course, they can also be used on a linux machine to read/write
to disk images or floppies without having to mount them or have root
access.
.PP
Supported functionality:
.TP
.B e2cp
copy files
.TP
.B e2mv
move files
.TP
.B e2rm
remove files
.TP
.B e2mkdir
create directory
.TP
.B e2ln
create hard links
.TP
.B e2ls
list files/directories
.TP
.B e2tail
output the last part of a file
.PP
In general, to specify a directory or file on an ext2 filesystem for the
e2tools utilities, use the following form:
.IP
filesystem:directory_path
.PP
The filesystem can be an unmounted partition or a regular file that's been
formatted to contain an ext2 filesystem.  In general, if a command takes
multiple file names on the command line, if the first one contains an ext2
file specification, the rest of the files are assumed to be on the same
filesystem until another one is explicitly stated:
.IP
/tmp/boot.img:/tmp/file1
.IP
/tmp/file2
.IP
/tmp/file3
.IP
/tmp/boot2.img:/tmp/file4
.PP
Files 1-3 are on /tmp/boot.img and the last file is on /tmp/boot2.img
.\"
.SH SEE ALSO
.BR e2cp (1),
.BR e2ln (1),
.BR e2ls (1),
.BR e2mkdir (1),
.BR e2mv (1),
.BR e2rm (1),
.BR e2tail (1).
.\"
.SH AUTHOR
The \fBe2tools\fP were written by Keith Sheffield <sheff at pobox.com>.
.PP
This manual page was written by Lucas Wall <lwall at debian.org>,
for the Debian project (but may be used by others).


--- NEW FILE e2tools.spec ---
Name:           e2tools
Version:        0.0.16
Release:        5%{?dist}
Summary:        Manipulate files in unmounted ext2/ext3 filesystems

Group:          Applications/System
License:        GPL
URL:            http://home.earthlink.net/~k_sheff/sw/e2tools/
Source0:        http://home.earthlink.net/~k_sheff/sw/e2tools/e2tools-0.0.16.tar.gz
Source1:        e2tools-test.sh
# Thank you very much for the man pages from Debian package.
Source2:        e2cp.1
Source3:        e2ln.1
Source4:        e2ls.1
Source5:        e2mkdir.1
Source6:        e2mv.1
Source7:        e2rm.1
Source8:        e2tail.1
Source9:        e2tools.7
Patch1:         e2tools-fedora-fixes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  e2fsprogs-devel >= 1.27

# For e2tools-test.sh
BuildRequires:  e2fsprogs, diffutils
#Requires:       


%description
A simple set of utilities to read, write, and manipulate files in an
ext2/ext3 filesystem directly using the ext2fs library. This works

  - without root access
  - without the filesystem being mounted
  - without kernel ext2/ext3 support

The utilities are: e2cp e2ln e2ls e2mkdir e2mv e2rm e2tail


%prep
%setup -q
%patch1 -p1


%build
%configure
make %{?_smp_mflags} CPPFLAGS="-Wall -Werror"


%check
# Run tests
for e in e2ln e2ls e2mkdir e2mv e2rm e2tail; do
    ln -s e2cp $e
done
sh %{SOURCE1}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%{__install} -d $RPM_BUILD_ROOT%{_mandir}/man1/
%{__install} \
    %{SOURCE2} \
    %{SOURCE3} \
    %{SOURCE4} \
    %{SOURCE5} \
    %{SOURCE6} \
    %{SOURCE7} \
    %{SOURCE8} \
    $RPM_BUILD_ROOT%{_mandir}/man1/
%{__install} -D %{SOURCE9} $RPM_BUILD_ROOT%{_mandir}/man7/e2tools.7


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README COPYING ChangeLog TODO AUTHORS
%{_bindir}/e2cp
%{_bindir}/e2ln
%{_bindir}/e2ls
%{_bindir}/e2mkdir
%{_bindir}/e2mv
%{_bindir}/e2rm
%{_bindir}/e2tail
%doc %{_mandir}/man1/e2cp.1.gz
%doc %{_mandir}/man1/e2ln.1.gz
%doc %{_mandir}/man1/e2ls.1.gz
%doc %{_mandir}/man1/e2mkdir.1.gz
%doc %{_mandir}/man1/e2mv.1.gz
%doc %{_mandir}/man1/e2rm.1.gz
%doc %{_mandir}/man1/e2tail.1.gz
%doc %{_mandir}/man7/e2tools.7.gz


%changelog
* Mon Jul 31 2006 Andreas Thienemann <andreas at bawue.net> - 0.0.16-5
- fix broken cast in rm.c:248 (exhibited on x86_64, but buggy everywhere) from Hans Ulrich Niedermann

* Mon Jul 17 2006 Andreas Thienemann <andreas at bawue.net> - 0.0.16-4
- Introduced %%check

* Mon Jul 17 2006 Hans Ulrich Niedermann <hun at n-dimensional.de> - 0.0.16-3
- initial package for fedora extras



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/e2tools/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	1 Nov 2006 13:50:19 -0000	1.1
+++ .cvsignore	1 Nov 2006 13:51:56 -0000	1.2
@@ -0,0 +1 @@
+e2tools-0.0.16.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/e2tools/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	1 Nov 2006 13:50:19 -0000	1.1
+++ sources	1 Nov 2006 13:51:56 -0000	1.2
@@ -0,0 +1 @@
+1829b2b261e0e0d07566066769b5b28b  e2tools-0.0.16.tar.gz




More information about the fedora-extras-commits mailing list