Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
infra
packages
Commits
4239c35b
Commit
4239c35b
authored
Jan 07, 2019
by
Robin Sonnabend
Browse files
Fix applying patch
parent
b8d1b9c2
Pipeline
#590
passed with stage
in 13 minutes and 30 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
packages.yml
View file @
4239c35b
...
...
@@ -3,12 +3,12 @@ maintainer:
mail
:
admin@fsmpi.rwth-aachen.de
upload_target
:
repo@web.fsmpi.rwth-aachen.de:/srv/repo/incoming/
packages
:
-
name
:
adcli
version
:
0.8.2-1.1-fsmpi
changelog
:
Apply the unreleased upstream-patches, fixing RT#100
additional_content
:
-
patch_dir
:
patches/adcli
target_dir
:
debian
#
- name: adcli
#
version: 0.8.2-1.1-fsmpi
#
changelog: Apply the unreleased upstream-patches, fixing RT#100
#
additional_content:
#
- patch_dir: patches/adcli
#
target_dir: debian
-
name
:
nginx
changelog
:
Add libnginx-mod-http-shibboleth
additional_content
:
...
...
scripts/build.py
View file @
4239c35b
...
...
@@ -25,15 +25,12 @@ EXTRACT_PATTERN = (r"extracting (?P<name>{pkg_name}) in (?P<dir>{pkg_name}-{vers
def
run_checked
(
command
,
**
kwargs
):
print
(
command
)
print
(
os
.
getcwd
(),
command
)
try
:
re
sult
=
sp
.
run
(
re
turn
sp
.
run
(
command
,
check
=
True
,
stdout
=
sp
.
PIPE
,
stderr
=
sp
.
PIPE
,
universal_newlines
=
True
,
**
kwargs
)
print
(
result
.
stdout
)
print
(
result
.
stderr
)
return
result
except
sp
.
CalledProcessError
as
error
:
print
(
error
.
stdout
)
print
(
error
.
stderr
)
...
...
@@ -71,7 +68,6 @@ def build_package(repo_dir, package_dir, name,
workdir
=
os
.
path
.
join
(
tempdir
,
pkg_dir
)
if
additional_content
is
not
None
:
for
content
in
additional_content
:
target_dir
=
content
[
"target_dir"
]
...
...
@@ -82,7 +78,9 @@ def build_package(repo_dir, package_dir, name,
apply_patches
(
abs_patch_dir
)
elif
"patch"
in
content
:
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
:
run_checked
([
"git"
,
"clone"
,
content
[
"git_url"
]])
elif
"copy"
in
content
:
...
...
Write
Preview
Supports
Markdown
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