Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
af1472aa
Kaydet (Commit)
af1472aa
authored
Ara 07, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
New Fixes.
* Fixed archiving problem. Added file compression level. * Fixed util module errors.
üst
26c8c68a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
27 deletions
+24
-27
ChangeLog
ChangeLog
+3
-1
archive.py
inary/archive.py
+11
-4
build.py
inary/cli/build.py
+3
-17
configfile.py
inary/configfile.py
+5
-5
file_utils.py
inary/util/file_utils.py
+2
-0
No files found.
ChangeLog
Dosyayı görüntüle @
af1472aa
2018-12-07 Suleyman POyraz <zaryob.dev@gmail.com>
* inary.operations.operations isimli modül hem saçma hem gereksizdi. Silindi.
* clean command was a useless command. And it was deleted.
* Fixed archiving problem. Added file compression level.
* Fixed util module errors.
2018-12-03 Suleyman POyraz <zaryob.dev@gmail.com>
* Preprocess module added into inary/libraries until when I rewrite xmlfile
...
...
inary/archive.py
Dosyayı görüntüle @
af1472aa
...
...
@@ -121,12 +121,15 @@ class TarFile(tarfile.TarFile):
name
=
None
,
mode
=
"r"
,
fileobj
=
None
,
compresslevel
=
9
,
compresslevel
=
None
,
**
kwargs
):
"""Open lzma/xz compressed tar archive name for reading or writing.
Appending is not allowed.
"""
if
not
compresslevel
:
compresslevel
=
ctx
.
config
.
values
.
build
.
compressionlevel
if
len
(
mode
)
>
1
or
mode
not
in
"rw"
:
raise
ValueError
(
"mode must be 'r' or 'w'."
)
...
...
@@ -136,11 +139,12 @@ class TarFile(tarfile.TarFile):
try
:
from
backports
import
lzma
except
ImportError
:
raise
tarfile
.
CompressionError
(
"
l
zma module is not available"
)
raise
tarfile
.
CompressionError
(
"
L
zma module is not available"
)
if
fileobj
is
not
None
:
fileobj
=
_LZMAProxy
(
fileobj
,
mode
)
else
:
fileobj
=
lzma
.
LZMAFile
(
name
,
mode
,
preset
=
compresslevel
)
try
:
...
...
@@ -475,9 +479,11 @@ class ArchiveTar(ArchiveBase):
try
:
if
oldwd
:
os
.
chdir
(
oldwd
)
# Bug #6748
except
OSError
:
pass
self
.
close
()
def
add_to_archive
(
self
,
file_name
,
arc_name
=
None
):
...
...
@@ -491,10 +497,11 @@ class ArchiveTar(ArchiveBase):
wmode
=
'w:bz2'
elif
self
.
type
in
(
'tarlzma'
,
'tarxz'
):
format
=
"xz"
if
self
.
type
==
"tarxz"
else
"alone"
level
=
int
(
ctx
.
config
.
values
.
build
.
compressionlevel
)
compress
level
=
int
(
ctx
.
config
.
values
.
build
.
compressionlevel
)
self
.
tar
=
TarFile
.
lzmaopen
(
self
.
file_path
,
"w"
,
fileobj
=
self
.
fileobj
,
compressformat
=
format
)
compresslevel
=
compresslevel
)
else
:
raise
UnknownArchiveType
...
...
inary/cli/build.py
Dosyayı görüntüle @
af1472aa
...
...
@@ -99,18 +99,13 @@ class Build(command.Command, metaclass=command.autocommand):
help
=
_
(
"Use quilt patch management system "
"instead of GNU patch"
))
group
.
add_option
(
"--home-build"
,
action
=
"store_true"
,
default
=
False
,
help
=
_
(
"Do not use root user when packaging, "
"make building under home folder"
))
group
.
add_option
(
"--ignore-sandbox"
,
action
=
"store_true"
,
default
=
False
,
help
=
_
(
"Do not constrain build process inside "
"the build folder"
))
self
.
parser
.
add_option_group
(
group
)
group
=
optparse
.
OptionGroup
(
self
.
parser
,
_
(
"build steps"
))
group
.
add_option
(
"--fetch"
,
...
...
@@ -158,8 +153,7 @@ class Build(command.Command, metaclass=command.autocommand):
const
=
"package"
,
help
=
_
(
"Create INARY package"
))
self
.
parser
.
add_option_group
(
group
)
self
.
add_options
(
group
)
self
.
parser
.
add_option_group
(
group
)
def
run
(
self
):
...
...
@@ -181,14 +175,6 @@ class Build(command.Command, metaclass=command.autocommand):
if
not
ctx
.
get_option
(
'output_dir'
):
ctx
.
config
.
options
.
output_dir
=
'.'
# IDEA: A little hack :)
if
ctx
.
get_option
(
'home_build'
):
if
os
.
environ
[
'USER'
]
==
'root'
:
# For idiots
pass
else
:
dest_dir
=
util
.
join_path
(
os
.
environ
[
'HOME'
],
'.inary'
)
ctx
.
config
.
set_option
(
'destdir'
,
dest_dir
)
for
x
in
self
.
args
or
[
"pspec.xml"
]:
if
ctx
.
get_option
(
'until'
):
inary
.
operations
.
build
.
build_until
(
x
,
ctx
.
get_option
(
'until'
))
...
...
inary/configfile.py
Dosyayı görüntüle @
af1472aa
...
...
@@ -89,15 +89,15 @@ class GeneralDefaults:
class
BuildDefaults
:
"""Default values for [build] section"""
build_host
=
"localhost"
host
=
"x86_64-
sulin-linux
"
jobs
=
"-j
3
"
host
=
"x86_64-
linux-gnu
"
jobs
=
"-j
1
"
generateDebug
=
False
enableSandbox
=
True
cflags
=
"-mtune=generic -
march=x86_64 -
O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2"
cxxflags
=
"-mtune=generic -
march=x86_64 -
O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2"
cflags
=
"-mtune=generic -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2"
cxxflags
=
"-mtune=generic -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2"
ldflags
=
"-Wl,-O1 -Wl,-z,relro -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common"
buildhelper
=
None
compressionlevel
=
1
compressionlevel
=
9
fallback
=
"http://www.sulin.com.tr/pub"
ignored_build_types
=
""
...
...
inary/util/file_utils.py
Dosyayı görüntüle @
af1472aa
...
...
@@ -15,6 +15,7 @@
from
.path_utils
import
join_path
from
.process_utils
import
run_batch
from
.type_utils
import
*
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
...
...
@@ -28,6 +29,7 @@ import os
import
time
import
shutil
import
hashlib
import
fnmatch
class
Error
(
inary
.
errors
.
Error
):
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment