Skip to content

Instantly share code, notes, and snippets.

@satyamz
Created June 13, 2016 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satyamz/77d86e1fc78d104c784c0238a3a7c0e3 to your computer and use it in GitHub Desktop.
Save satyamz/77d86e1fc78d104c784c0238a3a7c0e3 to your computer and use it in GitHub Desktop.
Notes on free softwares with ignore capabilites

Notes on free softwares with ignore capabilites

  1. apkdiff :
  1. URL : https://github.com/WhisperSystems/Signal-Android/blob/master/apkdiff/apkdiff.py

  2. How it works : apkdiff is used to check the reproduciblity of Signal app (https://github.com/WhisperSystems/Signal-Android/wiki/Reproducible-Builds)

  3. What it ignores: apkfiff ignores three types of files from .apk packages

    1. CERT.SF - signature file
    2. CERT.RSA - the real signature file with certificate
    3. MANIFEST.MF - manifest file
  4. How it ignores: apkdiff ignores files by default with no external option to ignore files. apkdiff contains static list of files to be ignored.

  5. Interface : No interface (By default)

  6. Applicability to diffoscope : If diffoscope wants to ignore complete files from package then creating separate list of files which needs to be ignored can be used like apkdiff does. If there's any option in diffoscope which deals with ignoring a complete file(by default ignoring certain files) can be done by the way apkdiff did.

  1. pkg-diff:
  1. URL : https://github.com/openSUSE/build-compare
  2. How it works: pkg-diff is used for comparing two rpm packages.
  3. What it ignores: 1. binary dump of TeX 2. Metafont formats 3. Files containing timestamps 4. LibreOffice log file
  4. How it ignores: pkg-diff ignores stuff by default. It uses sed to do that.
  5. Interface : No interface (By default)
  6. Applicability to diffoscope: No. Because it uses sed which modifies files on runtime.
  1. tar:
  1. URL: http://git.gag.com/?p=debian/tar;a=tree
  2. How it works: Tar stores and extracts files from a tape or disk archive. For more info please refer man tar.
  3. What it ignores: Tar has different options for ignoring stuff.
``Options for ignoring stuff (source: man tar):``
   --exclude=PATTERN : exclude files, given as a PATTERN

   --exclude-backups : exclude backup and lock files

   --exclude-caches : exclude contents of directories containing CACHEDIR.TAG, except for the tag file itself

   --exclude-caches-all : exclude directories containing CACHEDIR.TAG

   --exclude-caches-under : exclude everything under directories containing CACHEDIR.TAG

   --exclude-tag=FILE : exclude contents of directories containing FILE, except for FILE itself

   --exclude-tag-all=FILE : exclude directories containing FILE

   --exclude-tag-under=FILE : exclude everything under directories containing FILE

   --exclude-vcs : exclude version control system directories
  1. How it ignores: e.g. After invoking --exclude-vcs. It creates a list of temp files and vcs ignore files. It ignores the files present in list(or array). Sample implementation: http://git.gag.com/?p=debian/tar;a=blob;f=src/exclist.c;h=f6e88532789536ea0871055d92219e9d5bbc9e26;hb=HEAD#l302 Similarly implementation of othe options can be found in src/exclist.c

  2. Applicability to diffoscope: tar has good interfaces for dealing with different tasks. Diffoscope can take some inspiration from these options. In case of Diffoscope options could be written as:

    --hide='*.debug' : For hiding(ignoring) debug symbols.
    
    --hide-timestamps='mtimes/gzip-metadata/latex' : For hiding(ignoring) different timestamps
    
    --hide-section='particular-section' : For hiding(ignoring) particular section of .buildinfo file.
    

    Note: There could be many other possible combinations based on use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment