passt: Relicense to GPL 2.0, or any later version
In practical terms, passt doesn't benefit from the additional
protection offered by the AGPL over the GPL, because it's not
suitable to be executed over a computer network.
Further, restricting the distribution under the version 3 of the GPL
wouldn't provide any practical advantage either, as long as the passt
codebase is concerned, and might cause unnecessary compatibility
dilemmas.
Change licensing terms to the GNU General Public License Version 2,
or any later version, with written permission from all current and
past contributors, namely: myself, David Gibson, Laine Stump, Andrea
Bolognani, Paul Holzinger, Richard W.M. Jones, Chris Kuhn, Florian
Weimer, Giuseppe Scrivano, Stefan Hajnoczi, and Vasiliy Ulyanov.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-04-05 20:11:44 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2022-06-07 17:44:30 +02:00
|
|
|
#
|
|
|
|
# PASST - Plug A Simple Socket Transport
|
|
|
|
# for qemu/UNIX domain socket mode
|
|
|
|
#
|
|
|
|
# PASTA - Pack A Subtle Tap Abstraction
|
|
|
|
# for network namespace/tap device mode
|
|
|
|
#
|
|
|
|
# contrib/fedora/rpkg.macros - rpkg macros (for COPR builds)
|
|
|
|
#
|
|
|
|
# Copyright (c) 2022 Red Hat GmbH
|
|
|
|
# Author: Stefano Brivio <sbrivio@redhat.com>
|
|
|
|
|
|
|
|
function git_version {
|
2022-08-29 14:53:59 +02:00
|
|
|
__commit="$(git rev-parse --short "${1:-HEAD}")"
|
|
|
|
__date="$(git log --pretty="format:%cI" "${__commit}" -1)"
|
|
|
|
|
|
|
|
printf "0^%s.g%s" "$(date -uI -d "${__date}" | tr -d -)" "${__commit}"
|
2022-06-07 17:44:30 +02:00
|
|
|
}
|
fedora: Introduce own rpkg macro for changelog
git_dir_changelog is useful in theory, but it requires pairs of
annotated tags, which should be generated by rpkg itself to make any
sense, implying a relatively heavyweight interaction whenever I want
to push a new package version.
Also, the default content of the changelog entries include the full
list of changes, but the Fedora Packaging Guidelines specifically
mention that:
[t]hey must never simply contain an entire copy of the source
CHANGELOG entries.
We don't have a CHANGELOG file, but the full git history is
conceptually equivalent for this purpose, I guess.
Introduce our own passt_git_changelog() rpkg macro, building
changelog entries, using tags in the form DATE-SHA, where DATE
is an ISO 8601 date representation, and SHA is a short (7-digits)
form of the head commit at a given moment (git push).
These changelog entries mention, specifically, changes to the
packaging information itself (entries under contrib/fedora), and
simply report a link to cgit for the ranges between tags.
Reported-by: Benson Muite <benson_muite@emailplus.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-08-18 19:48:09 +02:00
|
|
|
|
2022-08-18 21:04:24 +02:00
|
|
|
function git_head {
|
|
|
|
git rev-parse HEAD
|
|
|
|
}
|
|
|
|
|
fedora: Introduce own rpkg macro for changelog
git_dir_changelog is useful in theory, but it requires pairs of
annotated tags, which should be generated by rpkg itself to make any
sense, implying a relatively heavyweight interaction whenever I want
to push a new package version.
Also, the default content of the changelog entries include the full
list of changes, but the Fedora Packaging Guidelines specifically
mention that:
[t]hey must never simply contain an entire copy of the source
CHANGELOG entries.
We don't have a CHANGELOG file, but the full git history is
conceptually equivalent for this purpose, I guess.
Introduce our own passt_git_changelog() rpkg macro, building
changelog entries, using tags in the form DATE-SHA, where DATE
is an ISO 8601 date representation, and SHA is a short (7-digits)
form of the head commit at a given moment (git push).
These changelog entries mention, specifically, changes to the
packaging information itself (entries under contrib/fedora), and
simply report a link to cgit for the ranges between tags.
Reported-by: Benson Muite <benson_muite@emailplus.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-08-18 19:48:09 +02:00
|
|
|
function passt_git_changelog_entry {
|
|
|
|
__from="${2}"
|
|
|
|
__to="${1}"
|
|
|
|
|
|
|
|
[ -z "${__from}" ] && __from="$(git rev-list --max-parents=0 HEAD)"
|
|
|
|
|
|
|
|
__date="$(git log --pretty="format:%cI" "${__to}" -1)"
|
2024-07-26 16:40:41 +02:00
|
|
|
__author="Stefano Brivio <sbrivio@redhat.com>"
|
|
|
|
# Use:
|
|
|
|
# __author="$(git log -1 --pretty="format:%an <%ae>" ${__to} -- contrib/fedora)"
|
|
|
|
# if you want the author of changelog entries to match the latest
|
|
|
|
# author for contrib/fedora
|
fedora: Introduce own rpkg macro for changelog
git_dir_changelog is useful in theory, but it requires pairs of
annotated tags, which should be generated by rpkg itself to make any
sense, implying a relatively heavyweight interaction whenever I want
to push a new package version.
Also, the default content of the changelog entries include the full
list of changes, but the Fedora Packaging Guidelines specifically
mention that:
[t]hey must never simply contain an entire copy of the source
CHANGELOG entries.
We don't have a CHANGELOG file, but the full git history is
conceptually equivalent for this purpose, I guess.
Introduce our own passt_git_changelog() rpkg macro, building
changelog entries, using tags in the form DATE-SHA, where DATE
is an ISO 8601 date representation, and SHA is a short (7-digits)
form of the head commit at a given moment (git push).
These changelog entries mention, specifically, changes to the
packaging information itself (entries under contrib/fedora), and
simply report a link to cgit for the ranges between tags.
Reported-by: Benson Muite <benson_muite@emailplus.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-08-18 19:48:09 +02:00
|
|
|
|
2022-08-29 14:53:59 +02:00
|
|
|
printf "* %s %s - %s\n" "$(date "+%a %b %e %Y" -d "${__date}")" "${__author}" "$(git_version "${__to}")-1"
|
fedora: Introduce own rpkg macro for changelog
git_dir_changelog is useful in theory, but it requires pairs of
annotated tags, which should be generated by rpkg itself to make any
sense, implying a relatively heavyweight interaction whenever I want
to push a new package version.
Also, the default content of the changelog entries include the full
list of changes, but the Fedora Packaging Guidelines specifically
mention that:
[t]hey must never simply contain an entire copy of the source
CHANGELOG entries.
We don't have a CHANGELOG file, but the full git history is
conceptually equivalent for this purpose, I guess.
Introduce our own passt_git_changelog() rpkg macro, building
changelog entries, using tags in the form DATE-SHA, where DATE
is an ISO 8601 date representation, and SHA is a short (7-digits)
form of the head commit at a given moment (git push).
These changelog entries mention, specifically, changes to the
packaging information itself (entries under contrib/fedora), and
simply report a link to cgit for the ranges between tags.
Reported-by: Benson Muite <benson_muite@emailplus.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-08-18 19:48:09 +02:00
|
|
|
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
for l in $(git log ${__from}..${__to} --pretty=format:"- %s" -- contrib/fedora); do
|
2022-09-06 23:02:01 +02:00
|
|
|
printf "%s%s\n" '-' "${l#*:}" | sed s/%/%%/g
|
fedora: Introduce own rpkg macro for changelog
git_dir_changelog is useful in theory, but it requires pairs of
annotated tags, which should be generated by rpkg itself to make any
sense, implying a relatively heavyweight interaction whenever I want
to push a new package version.
Also, the default content of the changelog entries include the full
list of changes, but the Fedora Packaging Guidelines specifically
mention that:
[t]hey must never simply contain an entire copy of the source
CHANGELOG entries.
We don't have a CHANGELOG file, but the full git history is
conceptually equivalent for this purpose, I guess.
Introduce our own passt_git_changelog() rpkg macro, building
changelog entries, using tags in the form DATE-SHA, where DATE
is an ISO 8601 date representation, and SHA is a short (7-digits)
form of the head commit at a given moment (git push).
These changelog entries mention, specifically, changes to the
packaging information itself (entries under contrib/fedora), and
simply report a link to cgit for the ranges between tags.
Reported-by: Benson Muite <benson_muite@emailplus.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-08-18 19:48:09 +02:00
|
|
|
done
|
|
|
|
unset IFS
|
|
|
|
|
|
|
|
printf "%s Upstream changes: https://passt.top/passt/log/?qt=range&q=%s..%s\n\n" '-' "${__from}" "${__to}"
|
|
|
|
}
|
|
|
|
|
|
|
|
function passt_git_changelog_pairs {
|
|
|
|
while [ -n "${2}" ]; do
|
|
|
|
passt_git_changelog_entry "${1}" "${2}"
|
|
|
|
shift 2
|
|
|
|
done
|
|
|
|
|
|
|
|
passt_git_changelog_entry "${1}" ""
|
|
|
|
}
|
|
|
|
|
|
|
|
function passt_git_changelog {
|
|
|
|
passt_git_changelog_pairs $((git tag --sort="-v:refname"|tail -n+2; git tag --sort="-v:refname") | sort -r)
|
|
|
|
}
|