From 9adb59fa83321d5d309ba02746b64d23945a91fd Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 Jan 2026 16:01:37 +0300 Subject: [PATCH] Exclude tex4ht-java classes for i686 as it requires javac for building --- config.yaml | 118 ++++++++++++++++++++++++---------------------------- 1 file changed, 55 insertions(+), 63 deletions(-) diff --git a/config.yaml b/config.yaml index 6b2708d..834f6fd 100644 --- a/config.yaml +++ b/config.yaml @@ -1,70 +1,62 @@ -# 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" + - target: "spec" + find: | + # Remove xdvi due to X11 removal from rhel10/c10s + %global xdvi 0 + replace: | + # Remove xdvi due to X11 removal from rhel10/c10s + %global xdvi 0 - # 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" + # texlive tex4ht java classes are not built for i686 as it requires javac for building + %ifarch %{ix86} + %global build_tex4ht_java 0 + %else + %global build_tex4ht_java 1 + %endif + count: 1 + - target: "spec" + find: | + BuildRequires: /usr/bin/javac + replace: | + %if 0%{?build_tex4ht_java} + BuildRequires: /usr/bin/javac + %endif + count: 1 + - target: "spec" + find: | + # build java classes for tex4ht from source and remove the prebuilt one + mkdir tex4ht-java + cd ../texk/tex4htk/java + javac *.java */*.java */*/*.java -d ../../../work/tex4ht-java + cd ../../../work/tex4ht-java + jar cvf ../tex4ht-java/tex4ht.jar . + replace: | + %if 0%{?build_tex4ht_java} + # build java classes for tex4ht from source and remove the prebuilt one + mkdir tex4ht-java + cd ../texk/tex4htk/java + javac *.java */*.java */*/*.java -d ../../../work/tex4ht-java + cd ../../../work/tex4ht-java + jar cvf ../tex4ht-java/tex4ht.jar . + %endif + count: 1 + - target: "spec" + find: | + # install java classes for tex4ht from source and remove the prebuilt one + cp -f source/work/tex4ht-java/tex4ht.jar %{buildroot}%{_texdir}/texmf-dist/tex4ht/bin/tex4ht.jar + replace: | + %if 0%{?build_tex4ht_java} + # install java classes for tex4ht from source and remove the prebuilt one + cp -f source/work/tex4ht-java/tex4ht.jar %{buildroot}%{_texdir}/texmf-dist/tex4ht/bin/tex4ht.jar + %endif + count: 1 - # 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) + - suffix: ".alma.1" - # 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) + - name: "eabdullin" + email: "eabdullin@almalinux.org" + line: + - "Exclude tex4ht-java classes for i686 as it requires javac for building"