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
5808cc96
Kaydet (Commit)
5808cc96
authored
May 06, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ufak tefek hackler
üst
823f8947
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
25 deletions
+56
-25
ChangeLog
ChangeLog
+5
-0
inary.conf-x86_64
config/inary.conf-x86_64
+1
-1
atomicoperations.py
inary/atomicoperations.py
+1
-6
build.py
inary/cli/build.py
+19
-3
build.py
inary/operations/build.py
+30
-15
No files found.
ChangeLog
Dosyayı görüntüle @
5808cc96
2018-05-06 Suleyman Poyraz <zaryob.dev@gmail.com>
* Küçük bir hack:
-> Immm. Artık home-build şansımız var yani geliştirici root yetkisi
almaksızın evde paket yapabilecek. Tabi ufak testler yapıldıktan sonra
2018-05-05 Suleyman Poyraz <zaryob.dev@gmail.com>
* Test sonuçlarına uygun düzenlemeler:
-> inary/db/sourcedb.py dosyasında farkettiğim hata düzeltildi.
...
...
config/inary.conf-x86_64
Dosyayı görüntüle @
5808cc96
...
...
@@ -9,7 +9,7 @@ cc = %(host)s-gcc
cxx = %(host)s-g++
compressionlevel = 9
enableSandbox = True
fallback = http://source.sulin
linux.org/1.0
fallback = http://source.sulin
.org/archives
generateDebug = False
jobs = -j5
ldflags = -Wl,-O1 -Wl,-z,relro -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common
...
...
inary/atomicoperations.py
Dosyayı görüntüle @
5808cc96
...
...
@@ -636,7 +636,7 @@ class Remove(AtomicOperation):
# two packages such that a file has moved from one package to
# another as in #2911)
pkg
,
existing_file
=
ctx
.
filesdb
.
get_file
(
fileinfo
.
path
)
if
pkg
!=
package_name
:
if
pkg
and
pkg
!=
package_name
:
ctx
.
ui
.
warning
(
_
(
'Not removing conflicted file : {}'
)
.
format
(
fpath
))
return
...
...
@@ -713,11 +713,6 @@ class Remove(AtomicOperation):
def
remove_single
(
package_name
):
Remove
(
package_name
)
.
run
()
def
build
(
package
):
# wrapper for build op
import
inary.operations.build
return
inary
.
operations
.
build
.
build
(
package
)
#API ORDERS
def
locked
(
func
):
"""
...
...
inary/cli/build.py
Dosyayı görüntüle @
5808cc96
...
...
@@ -18,11 +18,13 @@ import gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
import
os
import
inary.atomicoperations
import
inary.cli.command
as
command
import
inary.context
as
ctx
import
inary.package
import
inary.operations
import
inary.util
as
util
usage
=
_
(
"""Build INARY packages
...
...
@@ -102,6 +104,12 @@ 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
,
...
...
@@ -162,7 +170,7 @@ class Build(command.Command, metaclass=command.autocommand):
if
not
self
.
options
.
quiet
:
self
.
options
.
debug
=
True
self
.
init
(
False
,
False
)
if
self
.
options
.
package_format
==
"help"
:
ctx
.
ui
.
info
(
_
(
"Supported package formats:"
))
for
format
in
inary
.
package
.
Package
.
formats
:
...
...
@@ -172,13 +180,21 @@ class Build(command.Command, metaclass=command.autocommand):
ctx
.
ui
.
info
(
" {}"
.
format
(
format
))
return
self
.
init
()
self
.
init
(
False
,
False
)
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'
))
else
:
inary
.
atomicoperations
.
build
(
x
)
inary
.
operations
.
build
.
build
(
x
)
inary/operations/build.py
Dosyayı görüntüle @
5808cc96
...
...
@@ -294,6 +294,7 @@ class Builder:
ctx
.
config
.
tmp_dir
(),
packageDir
)
def
pkg_work_dir
(
self
):
suffix
=
"-{}"
.
format
(
self
.
build_type
)
if
self
.
build_type
else
""
return
self
.
pkg_dir
()
+
ctx
.
const
.
work_dir_suffix
+
suffix
...
...
@@ -978,9 +979,36 @@ class Builder:
st
=
os
.
stat
(
fpath
)
else
:
st
=
os
.
lstat
(
fpath
)
_uid
=
str
(
st
.
st_uid
)
_gid
=
str
(
st
.
st_gid
)
for
afile
in
package
.
additionalFiles
:
# FIXME: Better way?
if
frpath
==
util
.
removepathprefix
(
"/"
,
afile
.
target
):
# This is an additional file, uid and gid will change
if
afile
.
owner
:
try
:
_uid
=
str
(
pwd
.
getpwnam
(
afile
.
owner
)[
2
])
except
KeyError
:
ctx
.
ui
.
warning
(
_
(
"No user named '
%
s' found "
"on the system"
)
%
afile
.
owner
)
if
afile
.
group
:
try
:
_gid
=
str
(
grp
.
getgrnam
(
afile
.
group
)[
2
])
except
KeyError
:
ctx
.
ui
.
warning
(
_
(
"No group named '
%
s' found "
"on the system"
)
%
afile
.
group
)
else
:
try
:
# Assume owner == root if no group is given
_gid
=
str
(
grp
.
getgrnam
(
afile
.
owner
)[
2
])
except
KeyError
:
ctx
.
ui
.
warning
(
_
(
"No group named '
%
s' (value "
"guessed from owner) found "
"on the system"
)
%
afile
.
owner
)
break
d
[
frpath
]
=
Files
.
FileInfo
(
path
=
frpath
,
type
=
ftype
,
permanent
=
permanent
,
size
=
fsize
,
hash
=
fhash
,
uid
=
str
(
st
.
st_uid
),
gid
=
str
(
st
.
st_gid
)
,
size
=
fsize
,
hash
=
fhash
,
uid
=
_uid
,
gid
=
_gid
,
mode
=
oct
(
stat
.
S_IMODE
(
st
.
st_mode
)))
if
stat
.
S_IMODE
(
st
.
st_mode
)
&
stat
.
S_ISUID
:
...
...
@@ -1058,19 +1086,6 @@ class Builder:
# mode is octal!
os
.
chmod
(
dest
,
int
(
afile
.
permission
,
8
))
# if afile.owner:
# try:
# os.chown(dest, pwd.getpwnam(afile.owner)[2], -1)
# except KeyError:
# ctx.ui.warning(_("No user named '{}' found on the system").format(afile.owner))
#
# if afile.group:
# try:
# os.chown(dest, -1, grp.getgrnam(afile.group)[2])
# except KeyError:
# ctx.ui.warning(_("No group named '{}' found on the system").format(afile.group))
#
os
.
chdir
(
c
)
# Show the files those are not collected from the install dir
...
...
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