rpms/torrentzip/devel patch-src-trrntzip.c, NONE, 1.1 torrentzip.spec, NONE, 1.1 trrntzip-0.2-help.patch, NONE, 1.1 trrntzip-0.2-warningfixes.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Thorsten Leemhuis thl at rpmfusion.org
Sat Oct 18 16:05:15 CEST 2008


Author: thl

Update of /cvs/free/rpms/torrentzip/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv30631

Modified Files:
	.cvsignore sources 
Added Files:
	patch-src-trrntzip.c torrentzip.spec trrntzip-0.2-help.patch 
	trrntzip-0.2-warningfixes.patch 
Log Message:
import from freshrpms


--- NEW FILE patch-src-trrntzip.c ---
--- src/trrntzip.c-orig	Mon May  2 08:38:40 2005
+++ src/trrntzip.c	Sat May  7 02:51:55 2005
@@ -716,7 +716,7 @@
   
     if (dirp)
     {
-      // First set all the files to read-only. This is so we can skip
+      // First set the sticky bit on all files. This is so we can skip
       // our new zipfiles if they are returned by readdir() a second time.
       while (direntp = readdir (dirp))
       {
@@ -732,7 +732,7 @@
   
           if (strstr (szTmpBuf, ".zip\0"))
           {
-            chmod (direntp->d_name, S_IRUSR);
+            chmod (direntp->d_name, istat.st_mode | S_ISUID);
           }
         }
         // Zip file is actually a dir
@@ -780,9 +780,9 @@
           sprintf (szTmpBuf, "%s", direntp->d_name);
           strlwr (szTmpBuf);
   
-          if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR))
+          if (strstr (szTmpBuf, ".zip\0") && (istat.st_mode & S_ISUID))
           {            
-            chmod (direntp->d_name, S_IWUSR);
+            chmod (direntp->d_name, istat.st_mode & ~S_ISUID);
             mig.cEncounteredZips++;
   
             if (!mig.fProcessLog)

 	  	 


***** Error reading new file: [Errno 2] No such file or directory: 'torrentzip.spec'
trrntzip-0.2-help.patch:

--- NEW FILE trrntzip-0.2-help.patch ---
diff -Naupr trrntzip.orig/src/trrntzip.c trrntzip/src/trrntzip.c
--- trrntzip.orig/src/trrntzip.c	2005-05-02 15:38:40.000000000 +0200
+++ trrntzip/src/trrntzip.c	2007-01-10 13:41:47.000000000 +0100
@@ -900,16 +900,17 @@ main (int argc, char **argv)
 
       switch (argv[iCount][1])
       {
-      case '?':
-        fprintf (stdout, "\nTorrentZip v%s\n\n", TZ_VERSION);
+      case 'h':
+        fprintf (stdout, "TorrentZip v%s\n", TZ_VERSION);
         fprintf (stdout, "Copyright (C) 2005 TorrentZip Team :\n");
-        fprintf (stdout, "StatMat, shindakun, Ultrasubmarine, r3nh03k and goosecreature\n");
+        fprintf (stdout, "StatMat, shindakun, Ultrasubmarine, r3nh03k and goosecreature.\n");
         fprintf (stdout, "Homepage : http://sourceforge.net/projects/trrntzip\n\n");
         fprintf (stdout, "Usage: trrntzip [OPTIONS] [PATH/ZIP FILE]\n\n");
-        fprintf (stdout, "Options:\n\n");
+        fprintf (stdout, "Options:\n");
         fprintf (stdout, "-d : strip sub-directories from zips\n");
         fprintf (stdout, "-s : prevent sub-directory recursion\n");
         fprintf (stdout, "-v : show version\n");
+        fprintf (stdout, "-h : show this help\n");
         return TZ_OK;
 
       case 'd':
@@ -940,8 +941,9 @@ main (int argc, char **argv)
 
   if (argc < 2 || iOptionsFound == (argc - 1))
   {
-    fprintf (stderr, "\ntrrntzip: missing path\n");
+    fprintf (stderr, "trrntzip: missing path\n");
     fprintf (stderr, "Usage: trrntzip [OPTIONS] [PATH/ZIP FILE]\n");
+    fprintf (stderr, "Try `trrntzip -h' for help.\n");
     return TZ_ERR;
   }
 

trrntzip-0.2-warningfixes.patch:

--- NEW FILE trrntzip-0.2-warningfixes.patch ---
diff -Naupr trrntzip.orig/src/logging.c trrntzip/src/logging.c
--- trrntzip.orig/src/logging.c	2005-05-01 19:25:54.000000000 +0200
+++ trrntzip/src/logging.c	2007-01-10 12:37:18.000000000 +0100
@@ -18,6 +18,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include <time.h>
 #include <stdarg.h>
diff -Naupr trrntzip.orig/src/trrntzip.c trrntzip/src/trrntzip.c
--- trrntzip.orig/src/trrntzip.c	2005-05-02 15:38:40.000000000 +0200
+++ trrntzip/src/trrntzip.c	2007-01-10 12:42:47.000000000 +0100
@@ -692,7 +692,7 @@ RecursiveMigrate (const char *pszPath, W
     // We need to change to the dir of the zipfile if there is one.
     // This is because the logging will pick up the current dir for
     // the filename
-    if (pDir = strrchr (pszPath, DIRSEP))
+    if ((pDir = strrchr (pszPath, DIRSEP)))
     {
       *pDir = 0;
       chdir (pszPath);
@@ -718,7 +718,7 @@ RecursiveMigrate (const char *pszPath, W
     {
       // First set all the files to read-only. This is so we can skip
       // our new zipfiles if they are returned by readdir() a second time.
-      while (direntp = readdir (dirp))
+      while ((direntp = readdir (dirp)))
       {
         // Quick fudge to make the code below work
         if (qZipFile) strcpy (direntp->d_name, pszPath);
@@ -889,7 +889,9 @@ main (int argc, char **argv)
   int iCount = 0;
   int iOptionsFound = 0;
   int rc = 0;
+#ifdef WIN32
   char *ptr = NULL;
+#endif
 
   for (iCount = 1 ; iCount < argc ; iCount++)
   { 
diff -Naupr trrntzip.orig/src/unzip.c trrntzip/src/unzip.c
--- trrntzip.orig/src/unzip.c	2005-04-21 08:27:42.000000000 +0200
+++ trrntzip/src/unzip.c	2007-01-10 12:49:52.000000000 +0100
@@ -562,10 +562,12 @@ unzlocal_GetCurrentFileInfoInternal (fil
 
   /* we check the magic */
   if (err == UNZ_OK)
+  {
     if (unzlocal_getLong (&s->z_filefunc, s->filestream, &uMagic) != UNZ_OK)
       err = UNZ_ERRNO;
     else if (uMagic != 0x02014b50)
       err = UNZ_BADZIPFILE;
+  }
 
   if (unzlocal_getShort (&s->z_filefunc, s->filestream, &file_info.version) !=
       UNZ_OK)
@@ -660,11 +662,13 @@ unzlocal_GetCurrentFileInfoInternal (fil
       uSizeRead = extraFieldBufferSize;
 
     if (lSeek != 0)
+    {
       if (ZSEEK (s->z_filefunc, s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR)
           == 0)
         lSeek = 0;
       else
         err = UNZ_ERRNO;
+    }
     if ((file_info.size_file_extra > 0) && (extraFieldBufferSize > 0))
       if (ZREAD (s->z_filefunc, s->filestream, extraField, uSizeRead) !=
           uSizeRead)
@@ -687,11 +691,13 @@ unzlocal_GetCurrentFileInfoInternal (fil
       uSizeRead = commentBufferSize;
 
     if (lSeek != 0)
+    {
       if (ZSEEK (s->z_filefunc, s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR)
           == 0)
         lSeek = 0;
       else
         err = UNZ_ERRNO;
+    }
     if ((file_info.size_file_comment > 0) && (commentBufferSize > 0))
       if (ZREAD (s->z_filefunc, s->filestream, szComment, uSizeRead) !=
           uSizeRead)
@@ -962,10 +968,12 @@ unzlocal_CheckCurrentFileCoherencyHeader
 
 
   if (err == UNZ_OK)
+  {
     if (unzlocal_getLong (&s->z_filefunc, s->filestream, &uMagic) != UNZ_OK)
       err = UNZ_ERRNO;
     else if (uMagic != 0x04034b50)
       err = UNZ_BADZIPFILE;
+  }
 
   if (unzlocal_getShort (&s->z_filefunc, s->filestream, &uData) != UNZ_OK)
     err = UNZ_ERRNO;
@@ -1550,7 +1558,10 @@ unzGetGlobalComment (file, szComment, uS
      char *szComment;
      uLong uSizeBuf;
 {
+/* Not used as of 0.2 */
+/*
   int err = UNZ_OK;
+*/
   unz_s *s;
   uLong uReadThis;
   if (file == NULL)
diff -Naupr trrntzip.orig/src/zip.c trrntzip/src/zip.c
--- trrntzip.orig/src/zip.c	2005-04-17 10:36:15.000000000 +0200
+++ trrntzip/src/zip.c	2007-01-10 12:48:18.000000000 +0100
@@ -117,6 +117,8 @@ init_linkedlist (ll)
   ll->first_block = ll->last_block = NULL;
 }
 
+/* Not used as of 0.2 */
+/*
 local void
 free_linkedlist (ll)
      linkedlist_data *ll;
@@ -124,6 +126,7 @@ free_linkedlist (ll)
   free_datablock (ll->first_block);
   ll->first_block = ll->last_block = NULL;
 }
+*/
 
 
 local int


Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/torrentzip/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	18 Oct 2008 13:45:06 -0000	1.1
+++ .cvsignore	18 Oct 2008 14:05:14 -0000	1.2
@@ -0,0 +1 @@
+trrntzip_v02_src.tar.gz


Index: sources
===================================================================
RCS file: /cvs/free/rpms/torrentzip/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	18 Oct 2008 13:45:06 -0000	1.1
+++ sources	18 Oct 2008 14:05:14 -0000	1.2
@@ -0,0 +1 @@
+2635a4042b3cf5611ffdffb4019ec8b7  trrntzip_v02_src.tar.gz



More information about the rpmfusion-commits mailing list