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
9ae65788
Kaydet (Commit)
9ae65788
authored
Ock 17, 2019
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
actionsapi-runtime-fixes.patch
üst
951eec3f
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
36 additions
and
22 deletions
+36
-22
ChangeLog
ChangeLog
+1
-0
autotools.py
inary/actionsapi/autotools.py
+8
-5
cmaketools.py
inary/actionsapi/cmaketools.py
+1
-1
coreutils.py
inary/actionsapi/coreutils.py
+1
-1
get.py
inary/actionsapi/get.py
+9
-1
kerneltools.py
inary/actionsapi/kerneltools.py
+2
-2
libtools.py
inary/actionsapi/libtools.py
+1
-1
perlmodules.py
inary/actionsapi/perlmodules.py
+4
-4
pkgconfig.py
inary/actionsapi/pkgconfig.py
+5
-5
shelltools.py
inary/actionsapi/shelltools.py
+3
-2
variables.py
inary/actionsapi/variables.py
+1
-0
No files found.
ChangeLog
Dosyayı görüntüle @
9ae65788
2018-01-17 Suleyman Poyraz <zaryob.dev@gmail.com>
* fetcher pycurl kullanılarak yeniden yazıldı. Bu sayede base sistemde
dependency yükü azaldı, partial file download özelliği getirildi.
* actionsapi modulleri elden geçirildi kararlılık sağlandı
2018-12-07 Suleyman Poyraz <zaryob.dev@gmail.com>
* inary.operations.operations isimli modül hem saçma hem gereksizdi. Silindi.
...
...
inary/actionsapi/autotools.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -27,15 +27,11 @@ import inary.actionsapi.get as get
from
inary.actionsapi.shelltools
import
system
from
inary.actionsapi.shelltools
import
can_access_file
from
inary.actionsapi.shelltools
import
unlink
from
inary.actionsapi.shelltools
import
export
from
inary.actionsapi.libtools
import
gnuconfig_update
from
inary.actionsapi.shelltools
import
isDirectory
from
inary.actionsapi.shelltools
import
ls
from
inary.actionsapi.inarytools
import
dosed
from
inary.actionsapi.inarytools
import
removeDir
from
inary.actionsapi.shelltools
import
isDirectory
from
inary.actionsapi.shelltools
import
ls
from
inary.actionsapi.inarytools
import
removeDir
class
ConfigureError
(
inary
.
actionsapi
.
Error
):
def
__init__
(
self
,
value
=
''
):
...
...
@@ -51,6 +47,12 @@ class MakeError(inary.actionsapi.Error):
self
.
value
=
value
ctx
.
ui
.
error
(
value
)
class
CompileError
(
inary
.
actionsapi
.
Error
):
def
__init__
(
self
,
value
=
''
):
inary
.
actionsapi
.
Error
.
__init__
(
self
,
value
)
self
.
value
=
value
ctx
.
ui
.
error
(
value
)
class
InstallError
(
inary
.
actionsapi
.
Error
):
def
__init__
(
self
,
value
=
''
):
inary
.
actionsapi
.
Error
.
__init__
(
self
,
value
)
...
...
@@ -104,7 +106,8 @@ def rawConfigure(parameters = ''):
raise
ConfigureError
(
_
(
'No configure script found.'
))
def
compile
(
parameters
=
''
):
system
(
'{0} {1} {2}'
.
format
(
get
.
CC
(),
get
.
CFLAGS
(),
parameters
))
if
system
(
'{0} {1} {2}'
.
format
(
get
.
CC
(),
get
.
CFLAGS
(),
parameters
)):
raise
CompileError
(
_
(
'Compiling failed.'
))
def
make
(
parameters
=
''
):
"""make source with given parameters = "all" || "doc" etc."""
...
...
inary/actionsapi/cmaketools.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -56,7 +56,7 @@ class RunTimeError(inary.actionsapi.Error):
ctx
.
ui
.
error
(
value
)
def
configure
(
parameters
=
''
,
installPrefix
=
'/{}'
.
format
(
get
.
defaultprefixDIR
()),
sourceDir
=
'.'
):
"""configure source with given cmake parameters = "-DCMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS ...
\"
"""
"""configure source with given cmake parameters = "-DCMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS ...
"
"""
if
can_access_file
(
join_path
(
sourceDir
,
'CMakeLists.txt'
)):
args
=
'cmake -DCMAKE_INSTALL_PREFIX={0}
\
-DCMAKE_C_FLAGS="{1}"
\
...
...
inary/actionsapi/coreutils.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -24,7 +24,7 @@ from itertools import filterfalse
import
inary.actionsapi
def
cat
(
filename
):
return
file
(
filename
)
return
open
(
filename
)
class
grep
:
"""keep only lines that match the regexp"""
...
...
inary/actionsapi/get.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -36,6 +36,7 @@ class BinutilsError(inary.actionsapi.Error):
# Globals
env
=
inary
.
actionsapi
.
variables
.
glb
.
env
dirs
=
inary
.
actionsapi
.
variables
.
glb
.
dirs
config
=
inary
.
actionsapi
.
variables
.
glb
.
config
generals
=
inary
.
actionsapi
.
variables
.
glb
.
generals
def
curDIR
():
...
...
@@ -53,6 +54,10 @@ def curPYTHON():
def
curPERL
():
""" returns currently used perl's version"""
#for i in os.listdir("/usr/bin"):
# if i.startswith("perl"):
# if i.split("perl")[1]
return
os
.
path
.
realpath
(
'/usr/bin/perl'
)
.
split
(
'perl'
)[
1
]
def
ENV
(
environ
):
...
...
@@ -76,13 +81,16 @@ def installDIR():
"""returns the path of binary packages"""
return
env
.
install_dir
#
Pardus
Related Functions
#
Sulin
Related Functions
def
lsbINFO
():
"""Returns a dictionary filled through /etc/lsb-release."""
return
dict
([(
l
.
split
(
"="
)[
0
],
l
.
split
(
"="
)[
1
]
.
strip
(
"'
\"
"
))
\
for
l
in
open
(
"/etc/lsb-release"
,
"r"
)
.
read
()
.
strip
()
.
split
(
"
\n
"
)
if
"="
in
l
])
def
kernelVERSION
():
return
env
.
src_version
# PSPEC Related Functions
def
srcNAME
():
...
...
inary/actionsapi/kerneltools.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -27,7 +27,7 @@ import inary.context as ctx
import
inary.actionsapi
import
inary.actionsapi.get
as
get
import
inary.actionsapi.autotools
as
autotools
import
inary.actionsapi.inarytools
as
inarytools
import
inary.actionsapi.inarytools
as
inarytools
import
inary.actionsapi.shelltools
as
shelltools
...
...
@@ -84,7 +84,7 @@ def __getExtraVersion():
# if successful, this is something like:
# .1 for 2.6.30.1
# _rc8 for 2.6.30_rc8
extraversion
=
re
.
split
(
"
3
.[0-9].[0-9]{2}([._].*)"
,
get
.
srcVERSION
())[
1
]
extraversion
=
re
.
split
(
"
4
.[0-9].[0-9]{2}([._].*)"
,
get
.
srcVERSION
())[
1
]
except
IndexError
:
# e.g. if version == 2.6.30
pass
...
...
inary/actionsapi/libtools.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -66,7 +66,7 @@ def gen_usr_ldscript(dynamicLib):
destinationFile
=
open
(
'{0}/usr/lib/{1}'
.
format
(
get
.
installDIR
(),
dynamicLib
),
'w'
)
content
=
'''
/* GNU ld script
Since
Pardus
has critical dynamic libraries
Since
Sulin
has critical dynamic libraries
in /lib, and the static versions in /usr/lib,
we need to have a "fake" dynamic lib in /usr/lib,
otherwise we run into linking problems.
...
...
inary/actionsapi/perlmodules.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -53,10 +53,10 @@ def configure(parameters = ''):
"""configure source with given parameters."""
export
(
'PERL_MM_USE_DEFAULT'
,
'1'
)
if
can_access_file
(
'Build.PL'
):
if
system
(
'perl
Build.PL installdirs=vendor destdir={}'
.
format
(
get
.
installDIR
())):
if
system
(
'perl
{0} Build.PL installdirs=vendor destdir={1}'
.
format
(
get
.
curPERL
(),
get
.
installDIR
())):
raise
ConfigureError
(
_
(
'Configure failed.'
))
else
:
if
system
(
'perl
Makefile.PL {0} PREFIX=/usr INSTALLDIRS=vendor DESTDIR={1}'
.
format
(
parameters
,
get
.
installDIR
())):
if
system
(
'perl
{0} Makefile.PL {1} PREFIX=/usr INSTALLDIRS=vendor DESTDIR={2}'
.
format
(
get
.
curPERL
(),
parameters
,
get
.
installDIR
())):
raise
ConfigureError
(
_
(
'Configure failed.'
))
def
make
(
parameters
=
''
):
...
...
@@ -65,7 +65,7 @@ def make(parameters = ''):
if
system
(
'make {}'
.
format
(
parameters
)):
raise
MakeError
(
_
(
'Make failed.'
))
else
:
if
system
(
'perl
Build {}'
.
format
(
parameters
)):
if
system
(
'perl
{0} Build {1}'
.
format
(
get
.
curPERL
(),
parameters
)):
raise
MakeError
(
_
(
'perl build failed.'
))
def
install
(
parameters
=
'install'
):
...
...
@@ -74,7 +74,7 @@ def install(parameters = 'install'):
if
system
(
'make {}'
.
format
(
parameters
)):
raise
InstallError
(
_
(
'Make failed.'
))
else
:
if
system
(
'perl
Build install'
):
if
system
(
'perl
{} Build install'
.
get
.
curPERL
()
):
raise
MakeError
(
_
(
'perl install failed.'
))
removePacklist
()
...
...
inary/actionsapi/pkgconfig.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -39,7 +39,7 @@ def getVariableForLibrary(library, variable):
return_code
=
proc
.
wait
()
except
OSError
as
exception
:
if
exception
.
errno
==
2
:
raise
PkgconfigError
(
_
(
"
pkg-
config is not installed on your system."
))
raise
PkgconfigError
(
_
(
"
Package pkg
config is not installed on your system."
))
else
:
if
return_code
==
0
and
proc
.
stdout
:
return
proc
.
stdout
.
read
()
.
strip
()
...
...
@@ -58,7 +58,7 @@ def getLibraryVersion(library):
return_code
=
proc
.
wait
()
except
OSError
as
exception
:
if
exception
.
errno
==
2
:
raise
PkgconfigError
(
_
(
"
pkg-
config is not installed on your system."
))
raise
PkgconfigError
(
_
(
"
Package pkg
config is not installed on your system."
))
else
:
if
return_code
==
0
and
proc
.
stdout
:
return
proc
.
stdout
.
read
()
.
strip
()
...
...
@@ -78,7 +78,7 @@ def getLibraryCFLAGS(library):
return_code
=
proc
.
wait
()
except
OSError
as
exception
:
if
exception
.
errno
==
2
:
raise
PkgconfigError
(
_
(
"
pkg-
config is not installed on your system."
))
raise
PkgconfigError
(
_
(
"
Package pkg
config is not installed on your system."
))
else
:
if
return_code
==
0
and
proc
.
stdout
:
return
proc
.
stdout
.
read
()
.
strip
()
...
...
@@ -98,7 +98,7 @@ def getLibraryLIBADD(library):
return_code
=
proc
.
wait
()
except
OSError
as
exception
:
if
exception
.
errno
==
2
:
raise
PkgconfigError
(
_
(
"
pkg-
config is not installed on your system."
))
raise
PkgconfigError
(
_
(
"
Package pkg
config is not installed on your system."
))
else
:
if
return_code
==
0
and
proc
.
stdout
:
return
proc
.
stdout
.
read
()
.
strip
()
...
...
@@ -117,7 +117,7 @@ def runManualCommand(*args):
return_code
=
proc
.
wait
()
except
OSError
as
exception
:
if
exception
.
errno
==
2
:
raise
PkgconfigError
(
_
(
"
pkg-
config is not installed on your system."
))
raise
PkgconfigError
(
_
(
"
Package pkg
config is not installed on your system."
))
else
:
if
return_code
==
0
and
proc
.
stdout
:
return
proc
.
stdout
.
read
()
.
strip
()
...
...
inary/actionsapi/shelltools.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -104,7 +104,8 @@ def unlink(pattern):
except
OSError
:
ctx
.
ui
.
error
(
_
(
'ActionsAPI [unlink]: Permission denied: {}.'
)
.
format
(
filePath
))
elif
isDirectory
(
filePath
):
pass
ctx
.
ui
.
warning
(
_
(
'ActionsAPI [unlink]:
%
s is not a file, use
\'
unlinkDir
\'
or
\'
removeDir
\'
to remove directories.'
)
%
filePath
)
else
:
ctx
.
ui
.
error
(
_
(
'ActionsAPI [unlink]: File {} doesn
\'
t exists.'
)
.
format
(
filePath
))
...
...
@@ -137,7 +138,7 @@ def move(source, destination):
# FIXME: instead of passing a sym parameter, split copy and copytree into 4 different function
def
copy
(
source
,
destination
,
sym
=
True
):
"""recursively copy a "source" file or directory to "destination
\"
"""
"""recursively copy a "source" file or directory to "destination
\"
"""
sourceGlob
=
glob
.
glob
(
source
)
if
len
(
sourceGlob
)
==
0
:
error
(
_
(
"ActionsAPI [copy]: No file matched pattern
\"
{}
\"
."
)
.
format
(
source
))
...
...
inary/actionsapi/variables.py
Dosyayı görüntüle @
9ae65788
...
...
@@ -41,6 +41,7 @@ def exportFlags():
# http://liste.pardus.org.tr/gelistirici/2009-January/016442.html
os
.
environ
[
'CC'
]
=
"{}-gcc"
.
format
(
values
.
build
.
host
)
os
.
environ
[
'CXX'
]
=
"{}-g++"
.
format
(
values
.
build
.
host
)
os
.
environ
[
'LD'
]
=
"{}-ld"
.
format
(
values
.
build
.
host
)
class
Env
(
object
):
"""General environment variables used in actions API"""
...
...
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