create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pythonmodules
def setup():
pisitools.flags.add("-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC")
autotools.configure("--datadir=/usr/share/misc \
--disable-static \
--enable-fsect-man5")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
shelltools.cd("python")
pythonmodules.install()
shelltools.cd("..")
pisitools.dodoc("ChangeLog", "MAINT", "README")
+66
View File
@@ -0,0 +1,66 @@
diff -aur file-5.18/ChangeLog file.git/ChangeLog
--- file-5.18/ChangeLog 2014-03-26 16:27:39.000000000 +0100
+++ file.git/ChangeLog 2014-04-03 18:50:06.066659023 +0200
@@ -1,3 +1,7 @@
+2014-04-01 15:25 Christos Zoulas <christos@zoulas.com>
+
+ * PR/341: Jan Kaluza, fix memory leak
+ * PR/342: Jan Kaluza, fix out of bounds read
2014-03-26 11:25 Christos Zoulas <christos@zoulas.com>
* release 5.18
diff -aur file-5.18/src/apprentice.c file.git/src/apprentice.c
--- file-5.18/src/apprentice.c 2014-03-14 19:48:11.000000000 +0100
+++ file.git/src/apprentice.c 2014-04-03 18:50:06.086659024 +0200
@@ -517,14 +517,18 @@
{
if (map == NULL)
return;
- if (map->p == NULL)
- return;
+ if (map->p != NULL) {
#ifdef QUICK
- if (map->len)
- (void)munmap(map->p, map->len);
- else
+ if (map->len)
+ (void)munmap(map->p, map->len);
+ else
#endif
free(map->p);
+ } else {
+ uint32_t j;
+ for (j = 0; j < MAGIC_SETS; j++)
+ free(map->magic[j]);
+ }
free(map);
}
@@ -1290,11 +1294,7 @@
magic_entry_free(mset[j].me, mset[j].count);
if (errs) {
- for (j = 0; j < MAGIC_SETS; j++) {
- if (map->magic[j])
- free(map->magic[j]);
- }
- free(map);
+ apprentice_unmap(map);
return NULL;
}
return map;
diff -aur file-5.18/python/magic.py file.git/python/magic.py
--- file-5.18/python/magic.py 2014-04-04 20:34:38.086623965 +0200
+++ file.git/python/magic.py 2014-04-04 20:35:42.886623752 +0200
@@ -116,7 +116,10 @@
is set. A call to errno() will return the numeric error code.
"""
try: # attempt python3 approach first
- bi = bytes(filename, 'utf-8')
+ if isinstance(filename, bytes):
+ bi = filename
+ else:
+ bi = bytes(filename, 'utf-8')
return str(_file(self._magic_t, bi), 'utf-8')
except:
return _file(self._magic_t, filename.encode('utf-8'))
+87
View File
@@ -0,0 +1,87 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>file</Name>
<Homepage>http://www.darwinsys.com/file/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>as-is</License>
<IsA>app:console</IsA>
<Summary>Program to identify a file's format by scanning binary data for patterns</Summary>
<Description>Program to identify a file's format by scanning binary data for patterns.</Description>
<Archive sha1sum="8753e72097f2cc935608e3b1c57c4c4e31bd8d21" type="targz">ftp://ftp.astron.com/pub/file/file-5.18.tar.gz</Archive>
<!-- An update to this package can easily break pisi, pay attention! -->
<BuildDependencies>
<Dependency>zlib</Dependency>
<!-- remove python dependencies while bootstrap -->
<Dependency>python-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">git_fixes.patch</Patch>
</Patches>
</Source>
<Package>
<Name>file</Name>
<RuntimeDependencies>
<Dependency>zlib</Dependency>
<Dependency>python</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="data">/usr/share/misc</Path>
<Path fileType="header">/usr/include</Path>
</Files>
</Package>
<History>
<Update release="6">
<Date>2014-05-11</Date>
<Version>5.18</Version>
<Comment>Release bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2014-03-29</Date>
<Version>5.18</Version>
<Comment>Version bump</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2013-10-22</Date>
<Version>5.15</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-03-04</Date>
<Version>5.13</Version>
<Comment>Version bump</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-02-16</Date>
<Version>5.12</Version>
<Comment>New Release</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-11-22</Date>
<Version>5.11</Version>
<Comment>First release</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
</History>
</PISI>
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>file</Name>
<Summary xml:lang="tr">Dosya tipini belirlemek için kullanılan bir uygulamadır</Summary>
<Description xml:lang="tr">İkili veri taraması kullanarak (dosya uzantısına bakmadan) dosya biçimini tanımlamaya yarayan bir uygulamadır.</Description>
<Description xml:lang="fr">Programme servant à identifiant le format d'un fichier en analysant les données binaires en cherchant des patrons connus.</Description>
</Source>
</PISI>