Skip to content
Snippets Groups Projects
Commit bab652a0 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Use patch instead of quilt for the nginx patch

parent 56f2565d
No related branches found
No related tags found
No related merge requests found
Pipeline #587 failed
...@@ -10,7 +10,7 @@ packages: ...@@ -10,7 +10,7 @@ packages:
- patch_dir: patches/adcli - patch_dir: patches/adcli
target_dir: debian target_dir: debian
- name: nginx - name: nginx
patch_dir: patches/nginx patch: patches/nginx/00-add-module.patch
changelog: Add libnginx-mod-http-shibboleth changelog: Add libnginx-mod-http-shibboleth
additional_content: additional_content:
- git_url: "https://github.com/nginx-shib/nginx-http-shibboleth.git" - git_url: "https://github.com/nginx-shib/nginx-http-shibboleth.git"
......
...@@ -25,6 +25,7 @@ EXTRACT_PATTERN = (r"extracting (?P<name>{pkg_name}) in (?P<dir>{pkg_name}-{vers ...@@ -25,6 +25,7 @@ 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)
try: try:
result = sp.run( result = sp.run(
command, check=True, command, check=True,
...@@ -79,6 +80,9 @@ def build_package(repo_dir, package_dir, name, ...@@ -79,6 +80,9 @@ def build_package(repo_dir, package_dir, name,
abs_patch_dir = os.path.join( abs_patch_dir = os.path.join(
repo_dir, content["patch_dir"]) repo_dir, content["patch_dir"])
apply_patches(abs_patch_dir) apply_patches(abs_patch_dir)
if "patch" in content:
abs_patch_dir = os.path.join(repo_dir, content["patch"])
run_checked(["patch", "-d", ".", "-p0", abs_patch_dir])
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment