Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpcdf
obs
osc-plugins
Commits
aa71410c
Commit
aa71410c
authored
5 years ago
by
Lorenz Hüdepohl
Browse files
Options
Downloads
Patches
Plain Diff
CentOS 8 specific updates
parent
f1d6ad3d
Branches
Branches containing commit
No related tags found
1 merge request
!3
Merge changes for new OBS from obs-api branch
Pipeline
#71673
failed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mpcdf_common.py
+42
-20
42 additions, 20 deletions
mpcdf_common.py
mpcdf_setup_software_project.py
+15
-11
15 additions, 11 deletions
mpcdf_setup_software_project.py
with
57 additions
and
31 deletions
mpcdf_common.py
+
42
−
20
View file @
aa71410c
...
@@ -48,22 +48,45 @@ compiler_parallel_studio = {value["compiler"]: dict({"ps": key}, **value) for ke
...
@@ -48,22 +48,45 @@ compiler_parallel_studio = {value["compiler"]: dict({"ps": key}, **value) for ke
prjconf_start_marker
=
"
# Autogenerated by osc mpcdf_setup_repos, do not edit till end of section
\n
"
prjconf_start_marker
=
"
# Autogenerated by osc mpcdf_setup_repos, do not edit till end of section
\n
"
prjconf_end_marker
=
"
# End of autogenerated section
\n
"
prjconf_end_marker
=
"
# End of autogenerated section
\n
"
centos_prjconf_tags
=
textwrap
.
dedent
(
"""
Prefer: perl-Error
Substitute: c_compiler gcc
Substitute: c++_compiler gcc-c++
Substitute: ca-certificates-mozilla ca-certificates
"""
).
strip
()
centos_macros
=
textwrap
.
dedent
(
def
dist_prjconf_tags
(
distribution
):
"""
centos_prjconf_tags
=
textwrap
.
dedent
(
# Disable all problematic automatic RPM stuff
"""
# like byte-compiling (with the wrong Python version)
Prefer: perl-Error
# or debug packages that fail for many binary-only packages
Substitute: c_compiler gcc
%__no_python_bytecompile 1
Substitute: c++_compiler gcc-c++
%debug_package %{nil}
Substitute: ca-certificates-mozilla ca-certificates
"""
).
strip
()
"""
).
strip
()
centos8_prjconf_tags
=
textwrap
.
dedent
(
"""
ExpandFlags: module:python36-3.6
"""
).
strip
()
res
=
""
if
"
CentOS
"
in
distribution
:
res
+=
centos_prjconf_tags
if
"
CentOS_8
"
in
distribution
:
res
+=
"
\n
"
+
centos8_prjconf_tags
return
res
def
dist_prjconf_macros
(
distribution
):
centos_macros
=
textwrap
.
dedent
(
"""
# Disable all problematic automatic RPM stuff
# like byte-compiling (with the wrong Python version)
# or debug packages that fail for many binary-only packages
%__no_python_bytecompile 1
%debug_package %{nil}
"""
).
strip
()
res
=
""
if
"
CentOS
"
in
distribution
:
res
+=
centos_macros
return
res
def
check_for_update
():
def
check_for_update
():
...
@@ -575,11 +598,10 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
...
@@ -575,11 +598,10 @@ def mpcdf_setup_subproject(api_url, project, distribution, microarchitecture,
prjconf_ours
.
append
(
"
Preinstall: mpcdf_{0}_directory
"
.
format
(
microarchitecture
))
prjconf_ours
.
append
(
"
Preinstall: mpcdf_{0}_directory
"
.
format
(
microarchitecture
))
prjconf_ours
.
append
(
"
PublishFilter: ^mpcdf_.*$
"
)
prjconf_ours
.
append
(
"
PublishFilter: ^mpcdf_.*$
"
)
if
"
CentOS
"
in
distribution
:
extra_tags
=
dist_prjconf_tags
(
distribution
)
prjconf_ours
.
append
(
centos_prjconf_tags
)
if
extra_tags
:
extra_macros
=
centos_macros
prjconf_ours
.
append
(
extra_tags
)
else
:
extra_macros
=
dist_prjconf_macros
(
distribution
)
extra_macros
=
""
prjconf_ours
.
append
(
"""
prjconf_ours
.
append
(
"""
Macros:
Macros:
...
...
This diff is collapsed.
Click to expand it.
mpcdf_setup_software_project.py
+
15
−
11
View file @
aa71410c
...
@@ -59,17 +59,21 @@ def do_mpcdf_setup_software_project(self, subcmd, opts, *args):
...
@@ -59,17 +59,21 @@ def do_mpcdf_setup_software_project(self, subcmd, opts, *args):
prjconf
.
append
(
"
Preinstall: brp_mpcdf_modules
"
)
prjconf
.
append
(
"
Preinstall: brp_mpcdf_modules
"
)
software_meta
=
mpcdf_common
.
project_meta
(
api_url
,
"
software
"
)
software_meta
=
mpcdf_common
.
project_meta
(
api_url
,
"
software
"
)
distributions
=
(
repo
.
get
(
"
name
"
)
for
repo
in
software_meta
.
findall
(
'
./repository
'
))
centos_distributions
=
list
(
distro
for
distro
in
distributions
if
"
CentOS
"
in
distro
)
distributions
=
sorted
(
repo
.
get
(
"
name
"
)
for
repo
in
software_meta
.
findall
(
'
./repository
'
))
if
centos_distributions
:
for
distribution
in
distributions
:
prjconf
.
append
(
""
)
extra_tags
=
mpcdf_common
.
dist_prjconf_tags
(
distribution
)
prjconf
.
append
(
"
%if {0}
"
.
format
(
"
||
"
.
join
(
'"
%_repository
"
==
"
{0}
"'
.
format
(
c
)
for
c
in
centos_distributions
)))
extra_macros
=
mpcdf_common
.
dist_prjconf_macros
(
distribution
)
prjconf
.
append
(
mpcdf_common
.
centos_prjconf_tags
)
prjconf
.
append
(
""
)
if
len
(
extra_tags
)
>
0
or
len
(
extra_macros
)
>
0
:
prjconf
.
append
(
"
Macros:
"
)
prjconf
.
append
(
""
)
prjconf
.
append
(
mpcdf_common
.
centos_macros
)
prjconf
.
append
(
"
%if
\"
%_repository
\"
==
\"
{0}
\"
"
.
format
(
distribution
))
prjconf
.
append
(
"
:Macros
"
)
prjconf
.
append
(
extra_tags
)
prjconf
.
append
(
"
%endif
"
)
prjconf
.
append
(
""
)
prjconf
.
append
(
"
Macros:
"
)
prjconf
.
append
(
extra_macros
)
prjconf
.
append
(
"
:Macros
"
)
prjconf
.
append
(
"
%endif
"
)
prjconf
.
append
(
end_marker
)
prjconf
.
append
(
end_marker
)
prjconf
=
prjconf_head
+
"
\n
"
.
join
(
prjconf
)
+
prjconf_tail
prjconf
=
prjconf_head
+
"
\n
"
.
join
(
prjconf
)
+
prjconf_tail
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment