David Runge pushed to branch main at Arch Linux / Packaging / Packages / linux-rt
Commits: cdc7bb1b by David Runge at 2026-05-17T20:52:58+02:00 When creating patches, differentiate between `format-patch` and `diff` Upstream creates non-linear horror-history with merges, for which `git format-patch` will fail miserably, but `git diff` keeps working. To retain our own linear history in more meaningful patches, we use `git format-patch` for the distribution patches. Signed-off-by: David Runge <[email protected]> - - - - - 1 changed file: - .justfile Changes: ===================================== .justfile ===================================== @@ -35,15 +35,28 @@ source_dir := "$HOME/.local/state/packaging/linux-rt" # Creates a patch between the two tags `tag1` and `tag2` in a directory `dir` for the project `name`. [private] -create-patch-between-tags tag1 tag2 dir name: +create-diff-patch-between-tags tag1 tag2 dir name: + printf 'Creating patch for commits between tags "%s" and "%s"...\n' "{{ tag1 }}" "{{ tag2 }}" + just git diff "{{ tag1 }}".."{{ tag2 }}" > "{{ dir }}/{{ name }}-{{ tag2 }}.patch" + + just sign-and-compress-file "{{ dir }}/{{ name }}-{{ tag2 }}.patch" + +# Creates a patch between the two tags `tag1` and `tag2` in a directory `dir` for the project `name`. +[private] +create-format-patch-between-tags tag1 tag2 dir name: printf 'Creating patch for commits between tags "%s" and "%s"...\n' "{{ tag1 }}" "{{ tag2 }}" just git format-patch --find-renames --stdout "{{ tag1 }}".."{{ tag2 }}" > "{{ dir }}/{{ name }}-{{ tag2 }}.patch" - printf 'Signing patch "%s"...\n' "{{ name }}-{{ tag2 }}.patch" - gpg --output "{{ dir }}/{{ name }}-{{ tag2 }}.patch.sig" --default-key "$(just git config --local --get user.signingkey)" --detach-sign "{{ dir }}/{{ name }}-{{ tag2 }}.patch" + just sign-and-compress-file "{{ dir }}/{{ name }}-{{ tag2 }}.patch" + +# Creates a detached OpenPGP signature for `file` using `gpg`, then compresses it using `zstd`. +[private] +sign-and-compress-file file: + printf 'Signing file "%s"...\n' "$(basename "{{ file }}")" + gpg --output "{{ file }}.sig" --default-key "$(just git config --local --get user.signingkey)" --detach-sign "{{ file }}" - printf 'Compressing patch "%s"...\n' "{{ name }}-{{ tag2 }}.patch" - zstd --compress --verbose "{{ dir }}/{{ name }}-{{ tag2 }}.patch" -o "{{ dir }}/{{ name }}-{{ tag2 }}.patch.zst" + printf 'Compressing file "%s"...\n' "{{ file }}" + zstd --compress --verbose "{{ file }}" -o "{{ file }}.zst" # Derives the current tag from the current version of the source repository's `Makefile`. [private] @@ -291,8 +304,8 @@ release: just git tag --sign "$distribution_tag" --message "$distribution_tag" # Create the patch files (zstd compressed and signed). - just create-patch-between-tags "$upstream_tag" "$project_tag" "$tmpdir" "$project_name" - just create-patch-between-tags "$project_tag" "$distribution_tag" "$tmpdir" "$project_name" + just create-diff-patch-between-tags "$upstream_tag" "$project_tag" "$tmpdir" "$project_name" + just create-format-patch-between-tags "$project_tag" "$distribution_tag" "$tmpdir" "$project_name" printf 'Pushing tag "%s"...\n' "$distribution_tag" just git push origin refs/tags/"$distribution_tag" View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/linux-rt/-/commit/cdc7bb1b5102295ed88cccead3dfee16191d4321 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/linux-rt/-/commit/cdc7bb1b5102295ed88cccead3dfee16191d4321 You're receiving this email because of your account on gitlab.archlinux.org. Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications | Help: https://gitlab.archlinux.org/help
