From 1c668abf10ab88f2cfb43cd1ea2608cec08ddcf1 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 Jan 2026 15:54:38 +0300 Subject: [PATCH] Add configuration example --- config.yaml | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 config.yaml diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..6b2708d --- /dev/null +++ b/config.yaml @@ -0,0 +1,70 @@ +# parameters - section for parameters that can be used in the autopatch tool +parameters: + insert_almalinux_line: true # whether to apply the AlmaLinux line in the spec file, default is "true". Has lower priority than the "insert_almalinux_line" parameter in the "add_files" section. + custom_target_branch: "custom_target_branch_name" # custom branch to push the changes to + pre_clean: true # whether to clean the package repository before merging branches, default is "false". Should be used only if the package has conflict with types of files in the repository. + ignore_version_macros: true # whether to ignore the version macros in the spec file, default is "false". Returns raw version from the spec file. + ignore_release_macros: true # whether to ignore the release macros in the spec file, default is "false". Returns raw release from the spec file. + +# actions - section for all actions related to files, including the spec file +actions: + # replace - actions for replacing strings. Specify target (path to the file or "spec" for the spec file). + - replace: + - target: "spec" # the target can be "spec" or a file to which changes are applied (in this case, the file will be searched for). glob patterns are supported. + find: "RHEL" # string to be replaced + replace: "AlmaLinux" # string to replace with + count: 1 # number of replacements, default is -1 (all occurrences) + - target: "README.md" + find: "RHEL" + replace: "AlmaLinux" + + # delete_line - list of lines to delete. + - delete_line: + - target: "spec" # the target can be "spec" or a file to which changes are applied (in this case, the file will be searched for). + lines: + - "line1" + - "line2" + - | + hello world + asdfas + - target: "README.md" + lines: + - "line1" + + # modify_release - modify the release by adding a suffix, enabled by default. + - modify_release: + - suffix: ".alma.1" # append the suffix to the release + enabled: true # (is "true" by default) + + # changelog_entry - adding entries to the changelog for the spec file. + - changelog_entry: + # There can be multiple entries. If autochangelog is present, entries should not be added. The "line" is also used as the commit message. + - name: "eabdullin" # author's name + email: "eabdullin@almalinux.org" # author's email + line: # lines to add to the changelog + - "Updated branding to AlmaLinux" + - "Additional update for branding" + + # add_files - adding files (source files and patches). + - add_files: + - type: "patch" # file type (patch or source, other types may be added in the future) + name: "my_patch.patch" # patch name + number: "Latest" # number - either the patch number or "Latest" for automatic patch detection (default is "Latest") + insert_almalinux_line: true # whether to insert the patch application line in the spec file, default is "true". Has more priority than global parameter "apply_almalinux_line" + modify_spec: false + no_backup: false # adds "-b" option to the patch application line, default is "True", no effect for source files + - type: "source" + name: "my_new_source.tar.gz" # source file name + number: "Latest" # number - either the source number or "Latest" for automatic source detection (default is "Latest") + modify_spec: false # whether to modify the spec file, default is "true" + insert_almalinux_line: true # whether to insert the patch application line in the spec file, default is "true". Has more priority than global parameter "apply_almalinux_line" + + # delete_files - list of files to delete. + - delete_files: + - file_name: "file1.txt" # file name to delete, will be searched for in the package repository + - file_name: "file2.txt" + + # run_script - list of scripts to execute in the RPM package repository. + - run_script: + - script: "custom_script.sh" # name of the script to execute, the script must be in the scripts directory + cwd: '"rpms" or "autopatch"' # directory where the script will be executed, "rpms" (the directory with package sources) by default, or "autopatch" (the directory with the auto-patching configuration)