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
2d403640
Kaydet (Commit)
2d403640
authored
Agu 30, 2021
tarafından
𐰀𐰞𐰃:𐰺𐰃𐰔𐰀:𐰚𐰀𐰾𐰚𐰃𐰤 (𐰽𐰆𐰞𐰃𐰤𐰆𐰽)
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'develop' into 'master'
Develop See merge request sulinos/devel/inary!55
üst
5bb1b340
f36ec604
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
125 additions
and
16 deletions
+125
-16
autobuilder.py
inary/actionsapi/autobuilder.py
+76
-0
inarytools.py
inary/actionsapi/inarytools.py
+4
-2
shelltools.py
inary/actionsapi/shelltools.py
+7
-0
atomicoperations.py
inary/atomicoperations.py
+16
-6
configfile.py
inary/configfile.py
+3
-3
index.py
inary/data/index.py
+2
-0
build.py
inary/operations/build.py
+1
-0
genpspec
scripts/genpspec
+14
-3
revpspec
scripts/revpspec
+2
-2
No files found.
inary/actionsapi/autobuilder.py
0 → 100644
Dosyayı görüntüle @
2d403640
# -*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
# Copyright (C) 2016 - 2020, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
# Inary Modules
import
inary.context
as
ctx
from
inary.util
import
colorize
from
inary.util
import
join_path
# ActionsAPI Modules
from
inary.actionsapi
import
error
# Standart Python Modules
import
os
import
grp
import
pwd
import
sys
import
glob
import
shutil
from
inary.actionsapi.shelltools
import
can_access_file
import
inary.actionsapi.autotools
as
autotools
import
inary.actionsapi.cmaketools
as
cmaketools
import
inary.actionsapi.mesontools
as
mesontools
# Gettext Library
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
def
configure
(
args
=
''
):
"""Autobuilder setup"""
if
can_access_file
(
"autogen.sh"
):
autotools
.
autogen
(
args
)
if
can_access_file
(
"configure"
):
autotools
.
configure
(
args
)
if
can_access_file
(
"meson.build"
):
mesontools
.
configure
(
args
)
if
can_access_file
(
"CmakeLists.txt"
):
cmaketools
.
configure
(
args
)
def
make
(
args
=
''
):
"""Autobuilder build"""
if
can_access_file
(
"autogen.sh"
):
autotools
.
make
(
args
)
if
can_access_file
(
"Makefile"
):
autotools
.
make
(
args
)
if
can_access_file
(
"meson.build"
):
mesontools
.
make
(
args
)
if
can_access_file
(
"CmakeLists.txt"
):
cmaketools
.
make
(
args
)
def
install
(
args
=
''
):
"""Autobuilder install"""
if
can_access_file
(
"autogen.sh"
):
autotools
.
install
(
args
)
if
can_access_file
(
"Makefile"
):
autotools
.
install
(
args
)
if
can_access_file
(
"meson.build"
):
mesontools
.
install
(
args
)
if
can_access_file
(
"CmakeLists.txt"
):
cmaketools
.
install
(
args
)
setup
=
configure
()
build
=
make
()
inary/actionsapi/inarytools.py
Dosyayı görüntüle @
2d403640
...
...
@@ -448,7 +448,8 @@ def remove(sourceFile):
_
(
"No file matched pattern
\"
{}
\"
. Remove operation failed."
)
.
format
(
sourceFile
))
for
filePath
in
sourceFileGlob
:
unlink
(
filePath
)
if
os
.
path
.
exists
(
filePath
):
unlink
(
filePath
)
def
removeDir
(
destinationDirectory
):
...
...
@@ -459,7 +460,8 @@ def removeDir(destinationDirectory):
_
(
"No directory matched pattern
\"
{}
\"
. Remove directory operation failed."
)
.
format
(
destinationDirectory
))
for
directory
in
destdirGlob
:
unlinkDir
(
directory
)
if
os
.
path
.
isdir
(
directory
):
unlinkDir
(
directory
)
class
Flags
:
...
...
inary/actionsapi/shelltools.py
Dosyayı görüntüle @
2d403640
...
...
@@ -274,6 +274,13 @@ def export(key, value):
"""export environ variable"""
os
.
environ
[
str
(
key
)]
=
str
(
value
)
def
reset_env
():
_env
=
os
.
environ
.
copy
()
os
.
environ
.
clear
()
for
key
in
[
"PATH"
,
"HOST"
,
"CC"
,
"CXX"
]:
os
.
environ
[
key
]
=
_env
[
key
]
return
_env
def
isLink
(
filePath
):
"""return True if filePath refers to a symbolic link"""
...
...
inary/atomicoperations.py
Dosyayı görüntüle @
2d403640
...
...
@@ -164,6 +164,15 @@ class Install(AtomicOperation):
self
.
old_path
=
None
self
.
trigger
=
inary
.
trigger
.
Trigger
()
self
.
ask_reinstall
=
False
self
.
old_files
=
None
self
.
old_pkginfo
=
None
self
.
old_path
=
None
if
self
.
installdb
.
has_package
(
self
.
pkginfo
.
name
):
self
.
old_files
=
self
.
installdb
.
get_files
(
self
.
pkginfo
.
name
)
self
.
old_pkginfo
=
self
.
installdb
.
get_info
(
self
.
pkginfo
.
name
)
(
iversion_s
,
irelease_s
)
=
self
.
installdb
.
get_version
(
self
.
pkginfo
.
name
)[:
2
]
self
.
old_path
=
self
.
installdb
.
pkg_dir
(
self
.
pkginfo
.
name
,
iversion_s
,
irelease_s
)
def
install
(
self
,
ask_reinstall
=
True
):
...
...
@@ -279,7 +288,7 @@ class Install(AtomicOperation):
(
iversion_s
,
irelease_s
)
=
self
.
installdb
.
get_version
(
pkg
.
name
)[:
2
]
pkg_version
=
inary
.
version
.
make_version
(
pkg
.
version
)
iversion
=
inary
.
version
.
make_version
(
iversion_s
)
if
pkg_version
>
iversion
:
if
pkg_version
>
iversion
or
pkg
.
distributionRelease
>
self
.
installdb
.
get_distro_release
(
pkg
.
name
)[
1
]
:
if
ctx
.
config
.
get_option
(
'store_lib_info'
):
self
.
store_old_paths
=
os
.
path
.
join
(
ctx
.
config
.
old_paths_cache_dir
(),
pkg
.
name
)
...
...
@@ -295,7 +304,10 @@ class Install(AtomicOperation):
# is this an upgrade?
# determine and report the kind of upgrade: version, release
if
pkg_release
>
irelease
:
if
pkg
.
distributionRelease
>
self
.
installdb
.
get_distro_release
(
pkg
.
name
)[
1
]:
ctx
.
ui
.
info
(
_
(
'Upgrading to new distribution.'
))
self
.
operation
=
UPGRADE
elif
pkg_release
>
irelease
:
ctx
.
ui
.
info
(
_
(
'Upgrading to new release.'
))
self
.
operation
=
UPGRADE
# is this a downgrade? confirm this action.
...
...
@@ -312,10 +324,6 @@ class Install(AtomicOperation):
# schedule for reinstall
self
.
old_files
=
self
.
installdb
.
get_files
(
pkg
.
name
)
self
.
old_pkginfo
=
self
.
installdb
.
get_info
(
pkg
.
name
)
self
.
old_path
=
self
.
installdb
.
pkg_dir
(
pkg
.
name
,
iversion_s
,
irelease_s
)
def
preinstall
(
self
):
if
'postOps'
in
self
.
metadata
.
package
.
isA
:
...
...
@@ -355,6 +363,8 @@ class Install(AtomicOperation):
_
(
'Post-install configuration of
\"
{}
\"
package failed.'
)
.
format
(
self
.
pkginfo
.
name
))
self
.
installdb
.
mark_pending
(
self
.
pkginfo
.
name
)
return
0
if
self
.
old_path
!=
self
.
package
.
pkg_dir
()
and
self
.
old_path
!=
None
:
util
.
clean_dir
(
self
.
old_path
)
def
extract_install
(
self
):
"""unzip package in place"""
...
...
inary/configfile.py
Dosyayı görüntüle @
2d403640
...
...
@@ -77,8 +77,8 @@ class GeneralDefaults:
destinationdirectory
=
"/"
autoclean
=
False
distribution
=
"Sulin"
distribution_release
=
"20
19
"
distribution_id
=
"s
19
"
distribution_release
=
"20
21
"
distribution_id
=
"s
21
"
architecture
=
"x86_64"
allowrfp
=
False
http_proxy
=
os
.
getenv
(
"HTTP_PROXY"
)
or
None
...
...
@@ -115,7 +115,7 @@ class BuildDefaults:
"""Default values for [build] section"""
build_host
=
"localhost"
host
=
"x86_64-linux-gnu"
jobs
=
"-j
1
"
jobs
=
"-j
5
"
generateDebug
=
True
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"
...
...
inary/data/index.py
Dosyayı görüntüle @
2d403640
...
...
@@ -354,6 +354,8 @@ def index(dirs=None, output='inary-index.xml',
index
.
distribution
=
None
if
not
dirs
:
dirs
=
[
'.'
]
# TODO: replace this method with good one.
os
.
environ
[
"FAKEROOTKEY"
]
=
str
(
os
.
getpid
())
for
repo_dir
in
dirs
:
repo_dir
=
str
(
repo_dir
)
ctx
.
ui
.
info
(
...
...
inary/operations/build.py
Dosyayı görüntüle @
2d403640
...
...
@@ -483,6 +483,7 @@ class Builder:
"SRC_RELEASE"
:
self
.
spec
.
getSourceRelease
(),
"PATH"
:
"/bin:/usr/bin:/sbin:/usr/sbin"
,
"PYTHONDONTWRITEBYTECODE"
:
'1'
,
"JOBS"
:
ctx
.
config
.
values
.
build
.
jobs
,
"INARY_USE_FLAGS"
:
"True"
}
# FIXME: Get useflag status from pspec file (Source section)
os
.
environ
.
update
(
env
)
...
...
scripts/genpspec
Dosyayı görüntüle @
2d403640
...
...
@@ -38,7 +38,11 @@ print(otag("Packager"))
print
(
write
(
"Name"
,
inary
.
source
.
packager
.
name
))
print
(
write
(
"Email"
,
inary
.
source
.
packager
.
email
))
print
(
ctag
(
"Packager"
))
print
(
write
(
"License"
,
inary
.
source
.
license
))
if
type
(
inary
.
source
.
license
)
==
type
(
""
):
inary
.
source
.
license
=
[
inary
.
source
.
license
]
for
l
in
inary
.
source
.
license
:
print
(
write
(
"License"
,
l
))
# IsA kısmı zorunlu değil o yüzden önce varmı bakıyoz
if
hasattr
(
inary
.
source
,
"isa"
):
...
...
@@ -63,7 +67,7 @@ if hasattr(inary.source,"additionalfiles"):
print
(
otag
(
"AdditionalFiles"
))
for
i
in
inary
.
source
.
additionalfiles
:
print
(
write
(
"AdditionalFile"
,
i
[
1
],[
"target=
\"
{}
\"
"
.
format
(
i
[
0
])]))
print
(
ctag
(
"AdditionalFile"
))
print
(
ctag
(
"AdditionalFile
s
"
))
#BuildDependencies zorunlu (boş bile olsa)
print
(
otag
(
"BuildDependencies"
))
...
...
@@ -100,12 +104,19 @@ for package in inary.source.packages:
print
(
write
(
"Path"
,
i
[
1
],[
"fileType=
\"
{}
\"
"
.
format
(
i
[
0
])]))
print
(
ctag
(
"Files"
))
if
hasattr
(
pkg
,
"buildtype"
):
print
(
write
(
"BuildType"
,
pkg
.
buildtype
))
if
hasattr
(
pkg
,
"isa"
):
for
i
in
pkg
.
isa
:
print
(
write
(
"IsA"
,
i
))
#AdditionalFiles zorunlu değil
if
hasattr
(
pkg
,
"additionalfiles"
):
print
(
otag
(
"AdditionalFiles"
))
for
i
in
pkg
.
additionalfiles
:
print
(
write
(
"AdditionalFile"
,
i
[
0
],[
"owner=
\"
{}
\"
"
.
format
(
i
[
1
]),
"permission=
\"
{}
\"
"
.
format
(
str
(
i
[
2
])),
"target=
\"
{}
\"
"
.
format
(
i
[
3
])]))
print
(
ctag
(
"AdditionalFile"
))
print
(
ctag
(
"AdditionalFile
s
"
))
#Package sonu
print
(
ctag
(
"Package"
))
...
...
scripts/revpspec
Dosyayı görüntüle @
2d403640
...
...
@@ -93,10 +93,10 @@ o("description","Source.Description")
print
(
"archive = ["
,
1
)
archive
=
get_node
(
"Source.Archive"
)
if
type
(
archive
)
==
type
({}):
print
(
"(
\"
{}
\"
,
\"
{}
\"
),"
.
format
(
archive
[
"
Archive"
],
archive
[
"sha1sum
"
]))
print
(
"(
\"
{}
\"
,
\"
{}
\"
),"
.
format
(
archive
[
"
sha1sum"
],
archive
[
"Archive
"
]))
else
:
for
a
in
archive
:
print
(
"(
\"
{}
\"
,
\"
{}
\"
),"
.
format
(
a
[
"
Archive"
],
a
[
"sha1sum
"
]))
print
(
"(
\"
{}
\"
,
\"
{}
\"
),"
.
format
(
a
[
"
sha1sum"
],
a
[
"Archive
"
]))
tab
-=
1
print
(
"]"
)
o
(
"builddependencies"
,
"Source.BuildDependencies.Dependency"
,
True
)
...
...
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