Kaydet (Commit) 46e7409f authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Will rewrite tests. Now maked little changes.

üst c8dc779a
......@@ -15,7 +15,7 @@ import inary
class FilesDBTestCase(testcase.TestCase):
filesdb = inary.db.filesldb.FilesLDB()
filesdb = inary.db.filesdb.FilesDB()
def testHasFile(self):
assert not self.filesdb.has_file("bin/bash")
......
......@@ -180,8 +180,8 @@ class Repository:
obsoletes = ""
for obs in self.obsoletes:
obsoletes += " <Package>%s</Package>\n" % obs
return distributionTemplate % {"sourcename": "Pardus",
return distributionTemplate % {"sourcename": "Sulin",
"version": self.version,
"description":self.name,
"obsoletes":obsoletes}
......@@ -191,7 +191,7 @@ class Repository:
os.makedirs(self.name)
os.chdir(self.name)
open("distribution.xml", "w").write(self.get_dist_template())
for pkg in self.packages:
pkg.create()
......@@ -216,39 +216,48 @@ class Repository:
open("components.xml", "w").write(xml_content)
class MainRepo(Repository):
class Repo1(Repository):
def __init__(self):
Repository.__init__(self, "main-2018", "2018", [], ["wengophone", "rar"])
Repository.__init__(self, "repo1", "2018", [], ["wengophone", "rar"])
def create(self):
pf = PackageFactory()
self.packages = [
# system.base
pf.getPackage("liblouis", [], "desktop.accessibility"),
pf.getPackage("bash"),
pf.getPackage("curl", ["libidn", "zlib", "openssl"]),
pf.getPackage("shadow", ["db4","pam", "cracklib"]),
pf.getPackage("jpeg"),
# applications.network
pf.getPackage("ncftp", [], "applications.network"),
pf.getPackage("bogofilter", ["gsl"], "applications.network"),
pf.getPackage("gsl", [], "applications.network"),
# multimedia
pf.getPackage("uif2iso", [], "multimedia.converter"),
pf.getPackage("jpeg", [], "multimedia.graphics"),
pf.getPackage("dialog", [], "util"),
pf.getPackage("vlock", [], "util"),
pf.getPackage("pv", [], "util"),
pf.getPackage("tidy", [], "util")
]
# system.base
self.packages.extend(pf.getPackageBundle("system.base", "libidn", "zlib", "openssl", "db4", "pam", "cracklib"))
self.packages.extend(pf.getPackageBundle("system.base", "ca-certificates", "libidn", "zlib", "openssl", "db4", "pam", "run-parts" "cracklib", "ncurses", "zlib"))
# applications.network
self.packages.extend(pf.getPackageBundle("applications.network", "ethtool", "nfdump"))
Repository.create(self)
class ContribRepo(Repository):
class Repo2(Repository):
def __init__(self):
Repository.__init__(self, "contrib-2018", "2018", [], ["xara"])
Repository.__init__(self, "repo2", "2018", [], ["xara"])
def create(self):
pf = PackageFactory()
......@@ -259,8 +268,14 @@ class ContribRepo(Repository):
pf.getPackage("ctorrent", ["openssl"], "applications.network"),
pf.getPackage("lft", ["libpcap"], "applications.network"),
pf.getPackage("libpcap", [], "applications.network"),
pf.getPackage("inxi", [], "util.admin"),
pf.getPackage("dialog", [], "util.misc"),
pf.getPackage("lsof", [], "util.misc"),
pf.getPackage("most", [], "util.misc")
]
# applications.util
self.packages.extend(pf.getPackageBundle("applications.util", "iat", "rpl", "cpulimit"))
......@@ -270,8 +285,8 @@ class BuildFarm:
def create_index(self, repo):
binrepo = "%s-bin" % repo
shutil.copy("%s/distribution.xml" % repo, binrepo)
os.system("inary index %s --skip-signing -o %s/spam-index.xml" % (repo, repo))
os.system("inary index --skip-sources --skip-signing -o %s/spam-index.xml %s %s" % (binrepo, binrepo, repo))
os.system("inary-cli index %s --skip-signing -o %s/inary-index.xml" % (repo, repo))
os.system("inary-cli index --skip-sources --skip-signing -o %s/inary-index.xml %s %s" % (binrepo, binrepo, repo))
def build(self, repos):
for repo in repos:
......@@ -279,10 +294,10 @@ class BuildFarm:
os.mkdir(binrepo)
for root, dirs, files in os.walk(repo):
if "pspec.xml" in files:
os.system("inary build %s/%s -O %s" % (root, "pspec.xml", binrepo))
os.system("inary-cli build %s/%s -O %s" % (root, "pspec.xml", binrepo))
self.create_index(repo)
if __name__ == "__main__":
MainRepo().create()
ContribRepo().create()
BuildFarm().build(["main-2018", "contrib-2018", "repo1", "repo2"])
Repo1().create()
Repo2().create()
BuildFarm().build(["repo1", "repo2"])
<INARY>
<Components>
<Component>
<Name>system</Name>
<LocalName>System</LocalName>
<Summary>System component</Summary>
<Description>System packages</Description>
<Group>system</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>system.devel</Name>
<LocalName>System Devel</LocalName>
<Summary>System Devel component</Summary>
<Description>System devel packages</Description>
<Group>system</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>system.base</Name>
<LocalName>Base System</LocalName>
<Summary>Sample Base System</Summary>
<Description>Base System Packages</Description>
<Group>system</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>util</Name>
<LocalName>Util packages</LocalName>
<Summary>Util Packages</Summary>
<Description>Util Packages</Description>
<Group>accessories</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>multimedia</Name>
<LocalName>multimedia packages</LocalName>
<Summary>multimedia packages collection</Summary>
<Description>Multimedia Packages</Description>
<Group>accessories</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>multimedia.converter</Name>
<LocalName>multimedia converter packages</LocalName>
<Summary>multimedia packages collection</Summary>
<Description>Converter Packages</Description>
<Group>accessories</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>multimedia.graphics</Name>
<LocalName>graphic library-applications packages</LocalName>
<Summary>packages for graphics</Summary>
<Description>Graphic Packages</Description>
<Group>accessories</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>desktop</Name>
<LocalName>desktop packages</LocalName>
<Summary>desktop packages collection</Summary>
<Description>Desktop Packages</Description>
<Group>accessories</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
<Component>
<Name>desktop.accessibility</Name>
<LocalName>desktop applications packages</LocalName>
<Summary>Accesbilities</Summary>
<Description>Accesbility Packages</Description>
<Group>accessories</Group>
<Maintainer>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Maintainer>
</Component>
</Components>
</INARY>
<INARY>
<Name>desktop.accessibility</Name>
</INARY>
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt
from inary.actionsapi import autotools
from inary.actionsapi import get
from inary.actionsapi import inarytools
from inary.actionsapi import shelltools
from inary.actionsapi import pythonmodules
def setup():
# autotools.autoreconf("-vfi")
autotools.configure("--disable-static")
def build():
autotools.make("-j1")
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
inarytools.dodoc("AUTHORS", "COPYING", "ChangeLog")
shelltools.export("LD_PRELOAD","%s/liblouis/.libs/liblouis.so.12" % get.curDIR())
shelltools.cd("python")
pythonmodules.install("--prefix=/usr --optimize=1")
pythonmodules.install("--prefix=/usr --optimize=1",pyVer = "3")
<?xml version="1.0" ?>
<!DOCTYPE INARY SYSTEM "www.sulin.com/standard/inary-spec.dtd">
<INARY>
<Source>
<Name>liblouis</Name>
<Homepage>http://liblouis.org/</Homepage>
<Packager>
<Name>Inary Testers</Name>
<Email>admin@sulin.com</Email>
</Packager>
<License>GPLv3</License>
<Summary>Open-source braille translator and back-translator</Summary>
<Description>Open-source braille translator and back-translator</Description>
<Archive sha1sum="b692e4ee37fb898a53e4fd5bdc86cd2f7b3be2e1" type="targz">https://github.com/liblouis/liblouis/releases/download/v3.0.0/liblouis-3.0.0.tar.gz</Archive>
</Source>
<Package>
<Name>liblouis</Name>
<Files>
<Path fileType="config">/etc</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="data">/usr/share</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2018-01-21</Date>
<Version>3.0.0</Version>
<Comment>First release</Comment>
<Name>Inary Testers</Name>
<Email>admin@sulin.com</Email>
</Update>
</History>
</INARY>
<INARY>
<SourceName>Sulin</SourceName>
<Version>2018</Version>
<Description>Sample Repository 1</Description>
<Type>Core</Type>
<Obsoletes>
<Package>live-streams</Package>
<Package>live-system</Package>
</Obsoletes>
</INARY>
<INARY>
<Name>multimedia.converter</Name>
</INARY>
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from inary.actionsapi import autotools
from inary.actionsapi import inarytools
from inary.actionsapi import shelltools
WorkDir = "."
def build():
shelltools.cd("src")
autotools.make()
def install():
inarytools.dobin("src/uif2iso")
inarytools.dodoc("uif2iso.txt", "README")
--- src/Makefile.orig 2010-05-15 17:40:47.543224269 +0300
+++ src/Makefile 2010-05-15 17:40:56.477222825 +0300
@@ -27,7 +27,7 @@
all:
# $(CC) $(SRC) $(CFLAGS) -o $(EXE) $(LIBS)
- $(CC) $(SRC) $(CFLAGS) -o $(EXE) $(LIBS) $(LIBSNEW) -DMAGICISO_IS_SHIT
+ $(CC) $(SRC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(LIBS) $(LIBSNEW) -DMAGICISO_IS_SHIT
install:
install -m 755 -d $(BINDIR)
.TH UIF2ISO "1" "January 2009" "uif2iso " "User Commands"
.SH NAME
uif2iso \- converts uif files to iso or other formats.
.SH SYNOPSIS
.B uif2iso
\fI<input.UIF> <output>\fR
.SH DESCRIPTION
.PP
UIF2ISO converts single and multipart UIF (Universal Image Format) images
(generated by the MagicISO program) to their original format.
.PP
The output format (iso, cue/bin, mds/mdf, ccd, nrg) and corresponding
extension are automatically chosen by the tool, depending on what the
original format of the input file was.
.SH KNOWN ISSUES
When extracting a NRG image, the resulting file might be invalid. However,
in these cases, an additional valid CUE file is created. So if the NRG file
were to not work, the CUE file can be used instead.
.SH SEE ALSO
For more information regarding why this tool is needed and what the output
formats are, see the uif2iso.txt file provided along with this program.
.SH AUTHOR
uif2iso was written by Luigi Auriemma
.br
e\-mail: aluigi@autistici.org
.br
web: http://www.aluigi.org
.PP
This manual page was written by Margarita Manterola <marga@debian.org>,
for the Debian project (and may be used by others).
<?xml version="1.0" ?>
<!DOCTYPE INARY SYSTEM "http://www.sulin.org.tr/projeler/inary/inary-spec.dtd">
<INARY>
<Source>
<Name>uif2iso</Name>
<Homepage>http://aluigi.org/mytoolz.htm#uif2iso</Homepage>
<Packager>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Packager>
<License>GPLv3</License>
<Icon>uif2iso</Icon>
<IsA>app:console</IsA>
<Summary>Converts UIF images to other formats</Summary>
<Description>uif2iso is a command-line tool for converting single and multipart UIF files (Universal Image Format, used by MagicISO) to uncompressed images: ISO, BIN/CUE, MDS/MDF, CCD/IMG/SUB and NRG.</Description>
<Archive sha1sum="30590093219119c0f1bff22898b38c64323c9387" type="zip">http://aluigi.org/mytoolz/uif2iso.zip</Archive>
<Patches>
<Patch>ldflags.patch</Patch>
</Patches>
</Source>
<Package>
<Name>uif2iso</Name>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="man">/usr/share/man</Path>
<Path fileType="doc">/usr/share/doc/uif2iso</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/share/man/man1/uif2iso.1">uif2iso.1</AdditionalFile>
</AdditionalFiles>
</Package>
<History>
<Update release="1">
<Date>2010-05-15</Date>
<Version>0.1.7c</Version>
<Comment>First release</Comment>
<Name>Inary Testers</Name>
<Email>admins@sulin.org</Email>
</Update>
</History>
</INARY>
<?xml version="1.0" ?>
<INARY>
<Source>
<Name>uif2iso</Name>
<Summary xml:lang="tr">UIF kalıplarını diğer biçemlere çevirir</Summary>
<Description xml:lang="tr">uif2iso, tek ya da çok bölümlü UIF dosyalarını (Universal Image Format, MagicISO tarafından kullanılır) sıkıştırılmamış ISO, BIN/CUE, MDS/MDF, CCD/IMG/SUB ve NRG kalıplarına çeviren bir komut satırı aracıdır.</Description>
</Source>
</INARY>
<INARY>
<Name>multimedia.graphics</Name>
</INARY>
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Suleyman POYRAZ (Zaryob)
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from inary.actionsapi import autotools
from inary.actionsapi import inarytools
from inary.actionsapi import libtools
from inary.actionsapi import get
from inary.actionsapi import shelltools
def setup():
autotools.autoreconf("-vfi")
options = "--enable-shared \
--disable-static \
--enable-maxmem=64 \
--disable-dependency-tracking"
if get.buildTYPE() == "emul32":
options += " --prefix=/emul32 --libdir=/usr/lib32"
shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
autotools.configure(options)
def build():
autotools.make()
def install():
autotools.rawInstall('DESTDIR="%s"' % get.installDIR())
if get.buildTYPE() == "emul32":
inarytools.removeDir("/emul32")
return
# they say some programs use this
inarytools.insinto("/usr/include", "jpegint.h")
inarytools.insinto("/usr/include", "jinclude.h")
inarytools.dodoc("change.log", "example.c", "README","*.txt")
CC = @CC@
EXEEXT = @EXEEXT@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datarootdir = @datarootdir@
mandir = @mandir@
man1dir = $(mandir)/man1
MKDIR_P = @MKDIR_P@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
SCRIPTS = exifautotran
PROGRAMS = jpegexiforient$(EXEEXT)
all: $(SCRIPTS) $(PROGRAMS)
jpegexiforient$(EXEEXT): jpegexiforient.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
clean:
rm -f $(PROGRAMS) *.o
install: all
$(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) $(SCRIPTS) $(DESTDIR)$(bindir)
$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
.PHONY: all clean install
Dike out a section of code that has no usefulness on Unix-like systems,
and will crash if fed a comment string exceeding 64K. Per report from
Lubomir Kundrak, RH bug #226965
diff -Naur jpeg-6b.orig/wrjpgcom.c jpeg-6b/wrjpgcom.c
--- jpeg-6b.orig/wrjpgcom.c 1997-10-23 00:47:03.000000000 -0400
+++ jpeg-6b/wrjpgcom.c 2007-06-25 22:26:42.000000000 -0400
@@ -446,6 +446,8 @@
} else if (keymatch(arg, "comment", 1)) {
if (++argn >= argc) usage();
comment_arg = argv[argn];
+#if 0
+#error "There is a buffer overflow in the code below"
/* If the comment text starts with '"', then we are probably running
* under MS-DOG and must parse out the quoted string ourselves. Sigh.
*/
@@ -466,6 +468,7 @@
strcat(comment_arg, argv[argn]);
}
}
+#endif
comment_length = (unsigned int) strlen(comment_arg);
} else
usage();
Force usage of our Makefile
sed -i '/all:/s:$:\n\t./config.status --file debian/extra/Makefile\n\t$(MAKE) -C debian/extra $@:' Makefile.in
diff -Nur jpeg-8b-old/Makefile.in jpeg-8b/Makefile.in
--- jpeg-8b-old/Makefile.in 2010-08-16 15:46:30.310000994 +0300
+++ jpeg-8b/Makefile.in 2010-08-16 15:46:32.308000941 +0300
@@ -391,6 +391,8 @@
testoutt.jpg
all: jconfig.h
+ ./config.status --file debian/extra/Makefile
+ $(MAKE) -C debian/extra $@
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
@@ -936,9 +938,13 @@
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
+ ./config.status --file debian/extra/Makefile
+ $(MAKE) -C debian/extra $@
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
+ ./config.status --file debian/extra/Makefile
+ $(MAKE) -C debian/extra $@
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
# Make a reasonable guess about memory limits using sysconf().
# includes 5% slop factor as suggested in documentation.
--- jpeg-7/jmemansi.c
+++ jpeg-7/jmemansi.c
@@ -12,6 +12,15 @@
* is shoved onto the user.
*/
+#include <unistd.h>
+
+#ifdef __FreeBSD__
+# include <sys/types.h>
+# include <sys/sysctl.h>
+# include <sys/vmmeter.h>
+# include <vm/vm_param.h>
+#endif
+
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
@@ -157,7 +166,26 @@
GLOBAL(long)
jpeg_mem_init (j_common_ptr cinfo)
{
- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+#ifdef _SC_AVPHYS_PAGES
+ long phys_size;
+
+ if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
+ return DEFAUL