From e375d9e474fa3c21e17db433cb187a4add40c3a4 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 14 Sep 2016 14:28:35 +0200 Subject: [PATCH] makerepo: detect upstream branch parent for VPN plugins --- contrib/fedora/utils/makerepo.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/contrib/fedora/utils/makerepo.sh b/contrib/fedora/utils/makerepo.sh index 67497db9bb..3d110a1ab3 100755 --- a/contrib/fedora/utils/makerepo.sh +++ b/contrib/fedora/utils/makerepo.sh @@ -399,22 +399,25 @@ pushd "$DIRNAME" if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then # if RELEASE_BASE_COMMIT is not set, try detecting the BASE_COMMIT... - if [[ "$BUILD_TYPE" == "NetworkManager" ]]; then - # try to find the commit from which the original tarball originates - # and base the new branch on to of it. + if [[ "$BUILD_TYPE" == "NetworkManager" || + "$BUILD_TYPE" == "NetworkManager-libreswan" || + "$BUILD_TYPE" == "NetworkManager-pptp" || + "$BUILD_TYPE" == "NetworkManager-openconnect" || + "$BUILD_TYPE" == "NetworkManager-vpnc" ]]; then RELEASE_BASE_COMMIT="$(sed -n 's/^NM_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)" elif [[ "$BUILD_TYPE" == "libnl3" ]]; then - # try to find the commit from which the original tarball originates - # and base the new branch on to of it. RELEASE_BASE_COMMIT="$(sed -n 's/^LIBNL_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)" elif [[ "$BUILD_TYPE" == "network-manager-applet" ]]; then RELEASE_BASE_COMMIT="$(sed -n 's/^NMA_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)" elif [[ "$BUILD_TYPE" == "iproute" ]]; then RELEASE_BASE_COMMIT="$(git rev-parse --verify -q "$(sed 's/.*\/dev/null)" elif [[ "$BUILD_TYPE" == "NetworkManager-openvpn" ]]; then - DATE="$(sed -n 's/%global snapshot .git\(20[0-3][0-9]\)\([0-1][0-9]\)\([0-3][0-9]\)/\1-\2-\3/p' "../$SPEC")" - if [[ "x$DATE" != x ]]; then - RELEASE_BASE_COMMIT="$(git rev-list -n1 --date-order --before="$DATE" origin/master 2>/dev/null)" + RELEASE_BASE_COMMIT="$(sed -n 's/^NM_GIT_SHA=\(.*\)/\1/p' configure 2>/dev/null)" + if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then + DATE="$(sed -n 's/%global snapshot .git\(20[0-3][0-9]\)\([0-1][0-9]\)\([0-3][0-9]\)/\1-\2-\3/p' "../$SPEC")" + if [[ "x$DATE" != x ]]; then + RELEASE_BASE_COMMIT="$(git rev-list -n1 --date-order --before="$DATE" origin/master 2>/dev/null)" + fi fi fi if [[ "x$RELEASE_BASE_COMMIT" == x ]]; then