summaryrefslogtreecommitdiffstats
path: root/source/a/file/file.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/file/file.SlackBuild')
-rwxr-xr-xsource/a/file/file.SlackBuild47
1 files changed, 29 insertions, 18 deletions
diff --git a/source/a/file/file.SlackBuild b/source/a/file/file.SlackBuild
index 04c47856b..2435c5f02 100755
--- a/source/a/file/file.SlackBuild
+++ b/source/a/file/file.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005-2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -71,9 +71,15 @@ zcat $CWD/file.etc.file.diff.gz | patch -p1 --verbose || exit 1
# This is needed after the patch above:
autoreconf || exit 1
-# Don't spew warnings about using the flat text files
-zcat $CWD/file.quiet.diff.gz | patch -p1 -E --verbose || exit 1
-# I don't know what this one does
+# Since we're going to include the compiled magic database now (otherwise
+# there seem to be libmagic related crashes), this patch probably doesn't
+# need to be applied.
+#
+## Don't spew warnings about using the flat text files
+#zcat $CWD/file.quiet.diff.gz | patch -p1 -E --verbose || exit 1
+
+# Keep the output format for ELF binaries the same as it was in earlier
+# versions of file to avoid breaking existing scripts:
zcat $CWD/file.short.diff.gz | patch -p1 -E --verbose || exit 1
# Add zisofs and crda regulatory bin detection
@@ -103,22 +109,27 @@ make install DESTDIR=$PKG || exit 1
# Seems --disable-static has been ignored lately:
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmagic.a
-# Is file really this much of a processing bottleneck? Doubtful.
+# Update: We're going to use magic.mgc now as the flat files cause
+# libmagic crashes with versions newer than file-5.11. Maybe that
+# wasn't being tested as well... in any case, using magic.mgc works.
#
-# NOTE: Benchmarked flat files vs. .mgc June 2009, found no measurable
-# difference on 3000+ files.
#
-# If you really need these (let's say you're doing virus scanning
-# and this *would* speed things up quite a bit) you can create
-# the pre-parsed file yourself using file's -C option.
-rm -f $PKG/etc/file/magic.mgc
-mkdir -p $PKG/etc/file/magic
-cp -a magic/Magdir/* $PKG/etc/file/magic
-# After building, this works fine. /etc/file/magic/ takes up 1.2M,
-# while the magic.mgc file is 1.7M. Considering a difference of 500k,
-# and the potential speedup, I'm not sure it's worth the effort...
-# but it does make it easier for an admin to add a small chunk of
-# new magic.
+## Is file really this much of a processing bottleneck? Doubtful.
+##
+## NOTE: Benchmarked flat files vs. .mgc June 2009, found no measurable
+## difference on 3000+ files.
+##
+## If you really need these (let's say you're doing virus scanning
+## and this *would* speed things up quite a bit) you can create
+## the pre-parsed file yourself using file's -C option.
+#rm -f $PKG/etc/file/magic.mgc
+#mkdir -p $PKG/etc/file/magic
+#cp -a magic/Magdir/* $PKG/etc/file/magic
+## After building, this works fine. /etc/file/magic/ takes up 1.2M,
+## while the magic.mgc file is 1.7M. Considering a difference of 500k,
+## and the potential speedup, I'm not sure it's worth the effort...
+## but it does make it easier for an admin to add a small chunk of
+## new magic.
# IMHO, moving this sort of thing does not make sense.
# We'll support both the traditional and new locations.