diff --git a/.cruft.json b/.cruft.json index fd62e7a..701bbd4 100644 --- a/.cruft.json +++ b/.cruft.json @@ -41,6 +41,8 @@ "gpg", "python-gnupg" ], + "build_user": "giteabuild", + "build_user_home": "/home/giteabuild", "shell": "/bin/bash", "user": "git", "group": "git", @@ -53,6 +55,24 @@ "sig": "https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-{arch}.asc", "source": "https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-{arch}", "source_hash": "https://dl.gitea.io/gitea/{version}/gitea-{version}-linux-{arch}.sha256" + }, + "go": { + "pkg": "https://go.dev/dl/go1.18.2.linux-amd64.tar.gz", + "source_hash": "e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc" + }, + "mod_rst": { + "pip_dependencies": [ + "docutils" + ], + "pkg_dependencies": [ + "python3", + "python3-pip" + ], + "chroma_repo": "https://github.com/alecthomas/chroma", + "chroma_build_path": "/opt/chroma/src", + "chroma_bin": "/opt/chroma/chroma", + "chroma_rev": "HEAD", + "path": "/usr/local/bin/grst" } }, "_settings": { diff --git a/docs/README.rst b/docs/README.rst index 7f81321..1c21688 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -50,6 +50,26 @@ Special notes * If Gitea requires mounts for some of the paths, you can specify them in ``service:requires_mount`` as a list. * If Gitea requires a local service unit (e.g. database server), specify it/them in ``service:wants`` as a list. +RST mod +^^^^^^^ +This formula provides basic support for installing an external ``rst`` renderer. This especially makes Gitea display ``README.rst`` files similar to as it does for ``README.md``. + +The installation is not included by default, you will have to specifically target ``gitea.mods.rst`` to the minion. Furthermore, you will have to setup the external renderer in your ``app.ini`` similar to: + +.. code-block:: yaml + + markup.restructuredtext: + enabled: true + file_extensions: '.rst' + render_command: timeout 30s /usr/local/bin/grst + is_input_file: true + markup.sanitizer.restructuredtext: + element: pre + allow_attr: class + regexp: '' + +The mod compiles ``chroma`` (the syntax highlighting library that is used by Gitea) from source and installs a Python script that renders RST files, which currently relies on ``chroma`` and the ``docutils`` python package. The parameters can be modified in ``gitea:lookup:mod_rst``. I currently use this to patch ``*.sls``, ``*.jinja`` and ``*.j2`` highlighting into ``chroma``. + Configuration ------------- An example pillar is provided, please see `pillar.example`. Note that you do not need to specify everything by pillar. Often, it's much easier and less resource-heavy to use the ``parameters//.yaml`` files for non-sensitive settings. The underlying logic is explained in `map.jinja`. diff --git a/gitea/go/clean.sls b/gitea/go/clean.sls new file mode 100644 index 0000000..6c548b3 --- /dev/null +++ b/gitea/go/clean.sls @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{%- set tplroot = tpldir.split('/')[0] %} +{%- set sls_config_file = tplroot ~ '.config.file' %} +{%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} + +Go is absent for build user: + file.absent: + - name: {{ gitea.lookup.build_user_home | path_join("go") }} + +Gitea build user is absent: + user.absent: + - name: {{ gitea.lookup.build_user }} diff --git a/gitea/go/init.sls b/gitea/go/init.sls new file mode 100644 index 0000000..57abe4c --- /dev/null +++ b/gitea/go/init.sls @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{%- set tplroot = tpldir.split('/')[0] %} +{%- set sls_config_file = tplroot ~ '.config.file' %} +{%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} + +Gitea build user is present: + user.present: + - name: {{ gitea.lookup.build_user }} + - home: {{ gitea.lookup.build_user_home }} + - createhome: true + +Go is installed for build user: + archive.extracted: + - name: {{ gitea.lookup.build_user_home }} + - source: {{ gitea.lookup.go.pkg }} + - source_hash: {{ gitea.lookup.go.source_hash }} + - user: {{ gitea.lookup.build_user }} diff --git a/gitea/mods/rst/clean.sls b/gitea/mods/rst/clean.sls new file mode 100644 index 0000000..9d38bbe --- /dev/null +++ b/gitea/mods/rst/clean.sls @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{%- set tplroot = tpldir.split('/')[0] %} +{%- set sls_config_file = tplroot ~ '.config.file' %} +{%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} +{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} + +Gitea RST external renderer is absent: + file.absent: + - names: + - {{ gitea.lookup.mod_rst.chroma_build_path }} + - {{ gitea.lookup.mod_rst.chroma_bin }} + - {{ gitea.lookup.mod_rst.path }} diff --git a/gitea/mods/rst/files/default/grst b/gitea/mods/rst/files/default/grst new file mode 100644 index 0000000..b575454 --- /dev/null +++ b/gitea/mods/rst/files/default/grst @@ -0,0 +1,128 @@ +#!/usr/bin/python3 + +import subprocess +import sys + +from docutils import nodes, core, io +from docutils.parsers.rst import directives, Directive + + +class Chroma(Directive): + """Source code syntax highlighting.""" + + required_arguments = 1 + optional_arguments = 0 + final_argument_whitespace = True + option_spec = {} + has_content = True + + def run(self): + self.assert_has_content() + data = "\n".join(self.content) + try: + parsed = subprocess.run( + ["{{ gitea.lookup.mod_rst.chroma_bin }}", "--html", "--html-only", "-l", self.arguments[0]], + text=True, + input=data, + capture_output=True, + check=True, + ) + except subprocess.CalledProcessError: + parsed = subprocess.run( + ["{{ gitea.lookup.mod_rst.chroma_bin }}", "--html", "--html-only"], + text=True, + input=data, + capture_output=True, + check=True, + ) + + return [nodes.raw("", parsed.stdout, format="html")] + + +def html_parts( + input_string, + source_path=None, + destination_path=None, + input_encoding="utf8", + doctitle=True, + initial_header_level=1, +): + """ + Given an input string, returns a dictionary of HTML document parts. + + Dictionary keys are the names of parts, and values are Unicode strings; + encoding is up to the client. + + Parameters: + + - `input_string`: A multi-line text string; required. + - `source_path`: Path to the source file or object. Optional, but useful + for diagnostic output (system messages). + - `destination_path`: Path to the file or object which will receive the + output; optional. Used for determining relative paths (stylesheets, + source links, etc.). + - `input_encoding`: The encoding of `input_string`. If it is an encoded + 8-bit string, provide the correct encoding. If it is a Unicode string, + use "unicode", the default. + - `doctitle`: Disable the promotion of a lone top-level section title to + document title (and subsequent section title to document subtitle + promotion); enabled by default. + - `initial_header_level`: The initial level for header elements (e.g. 1 + for "

"). + """ + overrides = { + "input_encoding": input_encoding, + "doctitle_xform": doctitle, + "initial_header_level": initial_header_level, + "report_level": 4, + } + + parts = core.publish_parts( + source=input_string, + source_path=source_path, + destination_path=destination_path, + writer_name="html", + settings_overrides=overrides, + ) + return parts + + +def html_body( + input_string, + source_path=None, + destination_path=None, + input_encoding="utf8", + output_encoding="unicode", + doctitle=True, + initial_header_level=1, +): + """ + Given an input string, returns an HTML fragment as a string. + + The return value is the contents of the element. + + Parameters (see `html_parts()` for the remainder): + + - `output_encoding`: The desired encoding of the output. If a Unicode + string is desired, use the default value of "unicode" . + """ + parts = html_parts( + input_string=input_string, + source_path=source_path, + destination_path=destination_path, + input_encoding=input_encoding, + doctitle=doctitle, + initial_header_level=initial_header_level, + ) + fragment = parts["html_body"] + if output_encoding != "unicode": + fragment = fragment.encode(output_encoding) + return fragment + + +if __name__ == "__main__": + directives.register_directive("code-block", Chroma) + + with open(sys.argv[1], "r") as f: + source = "".join(f.readlines()) + print(html_body(source.encode())) diff --git a/gitea/mods/rst/init.sls b/gitea/mods/rst/init.sls new file mode 100644 index 0000000..1ba0ed9 --- /dev/null +++ b/gitea/mods/rst/init.sls @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# vim: ft=sls + +{%- set tplroot = tpldir.split('/')[0] %} +{%- set sls_config_file = tplroot ~ '.config.file' %} +{%- set sls_go_install = tplroot ~ '.go' %} +{%- from tplroot ~ "/map.jinja" import mapdata as gitea with context %} +{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %} + +include: + - {{ sls_go_install }} + +RST external renderer pkg dependencies are installed: + pkg.installed: + - pkgs: {{ gitea.lookup.mod_rst.pkg_dependencies | json }} + +RST external renderer pip dependencies are installed: + pip.installed: + - names: {{ gitea.lookup.mod_rst.pip_dependencies | json }} + - require: + - RST external renderer pkg dependencies are installed + +Chroma is cloned: + file.directory: + - name: {{ gitea.lookup.mod_rst.chroma_build_path }} + - makedirs: true + - user: {{ gitea.lookup.build_user }} + - mode: '0755' + git.latest: + - name: {{ gitea.lookup.mod_rst.chroma_repo }} + - target: {{ gitea.lookup.mod_rst.chroma_build_path }} + - rev: {{ gitea.lookup.mod_rst.chroma_rev }} + - user: {{ gitea.lookup.build_user }} + - force_reset: true + - require: + - file: {{ gitea.lookup.mod_rst.chroma_build_path }} + +Chroma is installed: + file.directory: + - name: {{ salt["file.dirname"](gitea.lookup.mod_rst.chroma_bin) }} + cmd.run: + - name: {{ gitea.lookup.build_user_home | path_join("go", "bin", "go") }} build -o '{{ gitea.lookup.mod_rst.chroma_bin }}' + - cwd: {{ gitea.lookup.mod_rst.chroma_build_path | path_join("cmd", "chroma") }} + - runas: {{ gitea.lookup.build_user }} + - require: + - RST external renderer pkg dependencies are installed + - file: {{ salt["file.dirname"](gitea.lookup.mod_rst.chroma_bin) }} + - sls: {{ sls_go_install }} + - onchanges: + - Chroma is cloned + +RST external renderer is installed: + file.managed: + - name: {{ gitea.lookup.mod_rst.path }} + - source: {{ files_switch(['grst'], + use_subpath=True, + lookup='RST external renderer is installed' + ) + }} + - mode: '0755' + - user: root + - group: {{ gitea.lookup.rootgroup }} + - template: jinja + - context: + gitea: {{ gitea | json }} + - require: + - RST external renderer pip dependencies are installed diff --git a/gitea/parameters/defaults.yaml b/gitea/parameters/defaults.yaml index 1e3b591..ce2a3bb 100644 --- a/gitea/parameters/defaults.yaml +++ b/gitea/parameters/defaults.yaml @@ -9,10 +9,26 @@ values: service: name: gitea unit: /etc/systemd/system/{name}.service + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/pillar.example b/pillar.example index 748e544..90731bd 100644 --- a/pillar.example +++ b/pillar.example @@ -74,10 +74,26 @@ gitea: # You should not need to change these values, except for changing # the default paths. lookup: + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/almalinux-8.yaml b/test/integration/default/files/_mapdata/almalinux-8.yaml index 1052f37..5055c42 100644 --- a/test/integration/default/files/_mapdata/almalinux-8.yaml +++ b/test/integration/default/files/_mapdata/almalinux-8.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/amazonlinux-1.yaml b/test/integration/default/files/_mapdata/amazonlinux-1.yaml index c5a57d9..1e3eb63 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-1.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-1.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index a1bb206..c97295d 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index f676d34..711e11a 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/centos-6.yaml b/test/integration/default/files/_mapdata/centos-6.yaml index 548c1ec..b29a16e 100644 --- a/test/integration/default/files/_mapdata/centos-6.yaml +++ b/test/integration/default/files/_mapdata/centos-6.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index 5f56170..20a0c57 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index 1988012..3fda4a1 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 4c542ff..d862b21 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/debian-11.yaml b/test/integration/default/files/_mapdata/debian-11.yaml index 8f896bc..748c455 100644 --- a/test/integration/default/files/_mapdata/debian-11.yaml +++ b/test/integration/default/files/_mapdata/debian-11.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index 8de9eb3..58c2f5e 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/fedora-31.yaml b/test/integration/default/files/_mapdata/fedora-31.yaml index b00fadd..0637c47 100644 --- a/test/integration/default/files/_mapdata/fedora-31.yaml +++ b/test/integration/default/files/_mapdata/fedora-31.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index fd801bf..3308ab1 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 5a51a6d..336def8 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/fedora-34.yaml b/test/integration/default/files/_mapdata/fedora-34.yaml index 11740ff..5299a62 100644 --- a/test/integration/default/files/_mapdata/fedora-34.yaml +++ b/test/integration/default/files/_mapdata/fedora-34.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/fedora-35.yaml b/test/integration/default/files/_mapdata/fedora-35.yaml index 04497aa..65b965f 100644 --- a/test/integration/default/files/_mapdata/fedora-35.yaml +++ b/test/integration/default/files/_mapdata/fedora-35.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/fedora-36.yaml b/test/integration/default/files/_mapdata/fedora-36.yaml index 30c9707..609ecde 100644 --- a/test/integration/default/files/_mapdata/fedora-36.yaml +++ b/test/integration/default/files/_mapdata/fedora-36.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index 4ce0b4d..9d445c2 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index 4ce0b4d..9d445c2 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index f6835db..cca9ec4 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 157f29e..2def1b5 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index 2b6d27f..e28794b 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index 8a9e0fc..33b71c2 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/rockylinux-8.yaml b/test/integration/default/files/_mapdata/rockylinux-8.yaml index cf3596a..b01bbc0 100644 --- a/test/integration/default/files/_mapdata/rockylinux-8.yaml +++ b/test/integration/default/files/_mapdata/rockylinux-8.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index c803da3..12415f6 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index 4435649..7aa3465 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index 9744724..ae065c2 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -11,10 +11,26 @@ values: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/salt/pillar/default.sls b/test/salt/pillar/default.sls index 5ea799f..d18e531 100644 --- a/test/salt/pillar/default.sls +++ b/test/salt/pillar/default.sls @@ -10,10 +10,26 @@ gitea: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea diff --git a/test/salt/pillar/upstart.sls b/test/salt/pillar/upstart.sls index 5ea799f..d18e531 100644 --- a/test/salt/pillar/upstart.sls +++ b/test/salt/pillar/upstart.sls @@ -10,10 +10,26 @@ gitea: config: '/etc/gitea/app.ini' service: name: gitea + build_user: giteabuild + build_user_home: /home/giteabuild + go: + pkg: https://go.dev/dl/go1.18.2.linux-amd64.tar.gz + source_hash: e54bec97a1a5d230fc2f9ad0880fcbabb5888f30ed9666eca4a91c5a32e86cbc gpg: key: 7C9E68152594688862D62AF62D9AE806EC1592E2 keyserver: keys.openpgp.org group: git + mod_rst: + chroma_bin: /opt/chroma/chroma + chroma_build_path: /opt/chroma/src + chroma_repo: https://github.com/alecthomas/chroma + chroma_rev: HEAD + path: /usr/local/bin/grst + pip_dependencies: + - docutils + pkg_dependencies: + - python3 + - python3-pip paths: bin: /opt/gitea conf: /etc/gitea