termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.39k stars 3.08k forks source link

Show list of files changed in CI log #20389

Open Biswa96 opened 5 months ago

Biswa96 commented 5 months ago

Would it be possible to show list of files that have been changed by a commit or pull request in its CI log? This will help to find if the change adds or removes a file intentionally or accidentally. Also, potential issues could be discovered if some build options were changed in an upstream project.

I could not figure out how to add the feature in CI files but I use the following function in bash to find difference in two deb files.

diff_deb_files() {
    mkdir old new
    ar x --output=old $1
    ar x --output=new $2
    diff <(tar tf old/data.tar.xz | sort) <(tar tf new/data.tar.xz | sort)
    rm -r old new
}

Example: diff_deb_files old-package.deb new-package.deb

Diffoscope could also be used but it produces verbose output with file metadata also. debdiff tool can be used but I am not familiar with that yet.

TomJo2000 commented 5 months ago

This would be quite handy to have in general as part of ./build-package.sh's output, though maybe behind a flag? I'm not sure if it would be desirable to do a directory diff on packages by default. It would also require downloading the previous version of the package(s) for diff-ing.