NetworkManager/libnm-core/nm-libnm-core-aux
Thomas Haller 82ca0a0b00
license: relicense "libnm-core/nm-libnm-core-aux/nm-dispatcher-api.h" under LGPL-2.1+
>>>

  H0=a3e75f329446a93a61ca4c458a7657bd919f4fe6
  commit_has_file() {
      git ls-tree -r "$1" | grep -q "\\s$2"\$
  }
  print_commit_authors() {
      git --no-pager log --full-history --follow --no-merges --pretty='format:<%ae>' $H0 -- "$1" | sort | uniq
  }
  print_blame_authors() {
      local LAST_H

      if commit_has_file $H0 "$1"; then
          LAST_H=$H0
      else
          LAST_H="$(git log --full-history --no-merges -n1 --pretty='format:%H' $H0 -- "$1")"^1
      fi
      git blame --no-progress -C -C -C20 -M -M10 -e "$LAST_H" -- "$1" | sed 's/.*\(<[^>]\+@[^>]\+>\).*/\1/' | sort | uniq
  }
  print_grep() {
      git --no-pager log -p --full-history --follow $H0 -- "$1" | grep -i '[a-z0-9]@\|author\|copyright' | sort | uniq
  }
  prefix() {
      sed "s/^/>>>$1 /"
  }
  collect_all() {
      for F; do
         print_commit_authors "$F" | prefix 1
         echo
         print_blame_authors "$F" | prefix 2
         echo
         print_grep "$F" | prefix 3
      done |
      sort |
      uniq |
      sed 's/@/(at)/'
  }

  collect_all \
      shared/nm-libnm-core-aux/nm-dispatcher-api.h \
      callouts/nm-dispatcher-api.h \
      callouts/nm-dispatcher-api.h \
      callouts/nm-dispatcher-action.h \
      ;

<<<

gives:

>>>1 <bgalvani(at)redhat.com>
>>>1 <daniel(at)gnoutcheff.name>
>>>1 <danw(at)gnome.org>
>>>1 <danw(at)redhat.com>
>>>1 <dcbw(at)redhat.com>
>>>1 <lkundrak(at)v3.sk>
>>>1 <mario(at)endlessm.com>
>>>1 <thaller(at)redhat.com>
>>>2 <bgalvani(at)redhat.com>
>>>2 <blueowl(at)centrum.cz>
>>>2 <danw(at)redhat.com>
>>>2 <dcbw(at)redhat.com>
>>>2 <mario(at)endlessm.com>
>>>2 <thaller(at)redhat.com>
>>>3 [...] Red Hat, Inc.

Everybody in this list agreed to relicensing according to RELICENSE.md.
2020-10-20 15:58:41 +02:00
..
nm-dispatcher-api.h license: relicense "libnm-core/nm-libnm-core-aux/nm-dispatcher-api.h" under LGPL-2.1+ 2020-10-20 15:58:41 +02:00
nm-libnm-core-aux.c all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
nm-libnm-core-aux.h all: unify comment style for SPDX-License-Identifier tag 2020-09-29 16:50:53 +02:00
README.md all: move "shared/nm-libnm-core-aux" to "libnm-core/nm-libnm-core-aux" 2020-06-11 10:53:50 +02:00

nm-libnm-core-aux is a static library that:

  • uses parts of "libnm-core", that are public API of "libnm"
  • can be statically linked into users of libnm-core (like libnm and NetworkManager).
  • that can also be statically linked into other users of libnm.

Basically, it is a static library with utility functions that extends libnm-core (the part that is public API of libnm), but can also be used without full libnm.

That means:

  • you can use it everywhere where you either statically link with libnm-core, or dynamically link with libnm.
  • you cannot use it inside libnm-core itself. This is the difference between nm-libnm-core-intern and nm-libnm-core-aux.

Also, since nm-libnm-core-aux itself only uses public (stable) API of libnm, you theoretically can copy the sources into your own source tree.