Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
infra
packages
Commits
4239c35b
Commit
4239c35b
authored
6 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Fix applying patch
parent
b8d1b9c2
No related branches found
No related tags found
No related merge requests found
Pipeline
#590
passed
6 years ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages.yml
+6
-6
6 additions, 6 deletions
packages.yml
scripts/build.py
+5
-7
5 additions, 7 deletions
scripts/build.py
with
11 additions
and
13 deletions
packages.yml
+
6
−
6
View file @
4239c35b
...
@@ -3,12 +3,12 @@ maintainer:
...
@@ -3,12 +3,12 @@ maintainer:
mail
:
admin@fsmpi.rwth-aachen.de
mail
:
admin@fsmpi.rwth-aachen.de
upload_target
:
repo@web.fsmpi.rwth-aachen.de:/srv/repo/incoming/
upload_target
:
repo@web.fsmpi.rwth-aachen.de:/srv/repo/incoming/
packages
:
packages
:
-
name
:
adcli
#
- name: adcli
version
:
0.8.2-1.1-fsmpi
#
version: 0.8.2-1.1-fsmpi
changelog
:
Apply the unreleased upstream-patches, fixing RT#100
#
changelog: Apply the unreleased upstream-patches, fixing RT#100
additional_content
:
#
additional_content:
-
patch_dir
:
patches/adcli
#
- patch_dir: patches/adcli
target_dir
:
debian
#
target_dir: debian
-
name
:
nginx
-
name
:
nginx
changelog
:
Add libnginx-mod-http-shibboleth
changelog
:
Add libnginx-mod-http-shibboleth
additional_content
:
additional_content
:
...
...
This diff is collapsed.
Click to expand it.
scripts/build.py
+
5
−
7
View file @
4239c35b
...
@@ -25,15 +25,12 @@ EXTRACT_PATTERN = (r"extracting (?P<name>{pkg_name}) in (?P<dir>{pkg_name}-{vers
...
@@ -25,15 +25,12 @@ EXTRACT_PATTERN = (r"extracting (?P<name>{pkg_name}) in (?P<dir>{pkg_name}-{vers
def
run_checked
(
command
,
**
kwargs
):
def
run_checked
(
command
,
**
kwargs
):
print
(
command
)
print
(
os
.
getcwd
(),
command
)
try
:
try
:
re
sult
=
sp
.
run
(
re
turn
sp
.
run
(
command
,
check
=
True
,
command
,
check
=
True
,
stdout
=
sp
.
PIPE
,
stderr
=
sp
.
PIPE
,
universal_newlines
=
True
,
stdout
=
sp
.
PIPE
,
stderr
=
sp
.
PIPE
,
universal_newlines
=
True
,
**
kwargs
)
**
kwargs
)
print
(
result
.
stdout
)
print
(
result
.
stderr
)
return
result
except
sp
.
CalledProcessError
as
error
:
except
sp
.
CalledProcessError
as
error
:
print
(
error
.
stdout
)
print
(
error
.
stdout
)
print
(
error
.
stderr
)
print
(
error
.
stderr
)
...
@@ -71,7 +68,6 @@ def build_package(repo_dir, package_dir, name,
...
@@ -71,7 +68,6 @@ def build_package(repo_dir, package_dir, name,
workdir
=
os
.
path
.
join
(
tempdir
,
pkg_dir
)
workdir
=
os
.
path
.
join
(
tempdir
,
pkg_dir
)
if
additional_content
is
not
None
:
if
additional_content
is
not
None
:
for
content
in
additional_content
:
for
content
in
additional_content
:
target_dir
=
content
[
"
target_dir
"
]
target_dir
=
content
[
"
target_dir
"
]
...
@@ -82,7 +78,9 @@ def build_package(repo_dir, package_dir, name,
...
@@ -82,7 +78,9 @@ def build_package(repo_dir, package_dir, name,
apply_patches
(
abs_patch_dir
)
apply_patches
(
abs_patch_dir
)
elif
"
patch
"
in
content
:
elif
"
patch
"
in
content
:
abs_patch_dir
=
os
.
path
.
join
(
repo_dir
,
content
[
"
patch
"
])
abs_patch_dir
=
os
.
path
.
join
(
repo_dir
,
content
[
"
patch
"
])
run_checked
([
"
patch
"
,
"
-d
"
,
"
.
"
,
"
-p0
"
,
abs_patch_dir
])
with
open
(
abs_patch_dir
,
"
r
"
)
as
patch_file
:
run_checked
([
"
patch
"
,
"
-d
"
,
"
.
"
,
"
-p0
"
],
input
=
patch_file
.
read
())
elif
"
git_url
"
in
content
:
elif
"
git_url
"
in
content
:
run_checked
([
"
git
"
,
"
clone
"
,
content
[
"
git_url
"
]])
run_checked
([
"
git
"
,
"
clone
"
,
content
[
"
git_url
"
]])
elif
"
copy
"
in
content
:
elif
"
copy
"
in
content
:
...
...
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