patchSamizdat - Patches: patch #6585, HOW TO install...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6585: HOW TO install samizdat-0.6.1.080703-2 on etch howto-version-0.3

Submitter:  Boud Roukema <boud>
Submitted:  Sat 19 Jul 2008 05:24:17 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Mon 21 Jul 2008 02:40:14 AM UTC, comment #1: 

(4) update to previous step (4) below.

The mahoro library fails on certain types of jpg files (e.g. some of those created by gimp or convert), when all of these are the stable versions on etch. This is in addition to failing to detect flv files.

For this reason, it's probably easiest to fall back to the pre-mahoro method of recognising files, since otherwise many users will get annoyed and have their files (unjustifiably) rejected.

See the patch file 080721_content_type_etch-0.2.patch attached.


(file #16165)

Boud Roukema <boud>
Group Member
Sat 19 Jul 2008 05:24:17 PM UTC, original submission:  

(1) Use this script to override the dependence on libruby1.8 >= 1.8.6.36-1. The idea is to recreate the debian package with an override of the dependency.
http://lists.gnu.org/archive/html/samizdat-devel/2008-07/msg00001.html

(2) Fix the sync.rb bug if you haven't already done it:

--- /usr/lib/ruby/1.8/sync.rb~  2001-06-06 16:19:33.000000000 +0200
+++ /usr/lib/ruby/1.8/sync.rb   2008-06-22 16:15:57.000000000 +0200
@@ -54,6 +54,7 @@
   # exceptions
   class Err < StandardError
     def Err.Fail(*opt)
+      Thread.critical = false   # hack for samizdat-0.6.0.20070509-1
       fail self, sprintf(self::Message, *opt)
     end

@@ -129,10 +130,12 @@

   # locking methods.
   def sync_try_lock(mode = EX)
-    return unlock if sync_mode == UN
+#    return unlock if sync_mode == UN
+    return unlock if mode == UN   # samizdat hack

     Thread.critical = true
-    ret = sync_try_lock_sub(sync_mode)
+#    ret = sync_try_lock_sub(sync_mode)
+    ret = sync_try_lock_sub(mode)    # samizdat hack
     Thread.critical = false
     ret
   end


(3) Fix (one line fix) bug 23848:
https://savannah.nongnu.org/bugs/?23848

(4) On etch, something fails for the mahoro front end + the magic file detection library + ruby in detecting flv files. Here is a hack to fix this:


--- s080703/samizdat/lib/samizdat/models/content.rb     2008-06-01 20:38:34.000000000 +0200
+++ /usr/lib/ruby/1.8/samizdat/models/content.rb        2008-07-15 22:45:28.000000000 +0200
@@ -285,6 +285,14 @@
       format = @@mahoro.file(file.path)
     end

+    # etch hack
+    if format == 'application/octet-stream' and
+        file.methods.include? 'content_type' and file.size > 0
+      f = file.content_type.strip   # won't work with FastCGI?
+      format = f if f == 'video/x-flv'
+    end
+
+
     format.nil? and raise RuntimeError,
       _('Failed to detect content type of the uploaded file')


(5) If you wish to apply patches on https://savannah.nongnu.org/patch/?group=samizdat which remain open, then those with [080703-2] or [080703] in the title should work.

Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by boud (Submitted the item)
  •  

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-07-21 boud Attached File- Added 080721_content_type_etch-0.2.patch, #16165

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code