compat-drivers: add genlog
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 20 Oct 2012 01:35:41 +0000 (18:35 -0700)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 20 Oct 2012 01:35:41 +0000 (18:35 -0700)
This will generate log files for our releases.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
scripts/gen-release.sh
scripts/genlog-3.7 [new file with mode: 0755]

index ab7499ae513d61a081178cbd391e6f01e4b859bb..54692b42ffa96300ec0c9a89ff9de910ba225603 100755 (executable)
@@ -158,6 +158,7 @@ echo "On ${BASE_TREE}: $TARGET_BRANCH"
 # Lets now make sure you are on matching compat-drivers branch.
 # This is a super hack, but let me know if you figure out a cleaner way
 TARGET_KERNEL_RELEASE=$(make VERSION="linux-3" SUBLEVEL="" EXTRAVERSION=".y" kernelversion)
+GENLOG_TARGET=$(make VERSION="3" SUBLEVEL="" EXTRAVERSION="" kernelversion)
 
 if [[ $COMPAT_DRIVERS_BRANCH != $TARGET_KERNEL_RELEASE && $BASE_TREE != "linux-next" ]]; then
        echo -e "You are on the compat-drivers ${GREEN}${COMPAT_DRIVERS_BRANCH}${NORMAL} but are "
@@ -172,6 +173,7 @@ if [[ $COMPAT_DRIVERS_BRANCH != $TARGET_KERNEL_RELEASE && $BASE_TREE != "linux-n
 fi
 
 cd $COMPAT_DRIVERS_DIR
+CHANGELOG_FILE=$(git describe)
 
 if [[ $COMPAT_DRIVERS_BRANCH != "master" ]]; then
        RELEASE=$(git describe --abbrev=0 | sed -e 's|\(v\)\([0-9]\)|\2|')
@@ -290,6 +292,12 @@ elif [[ "$BASE_TREE" = "linux-stable" ]]; then
        fi
 
        kup put ${RELEASE}.tar.bz2 ${RELEASE}.tar.asc ${TARGET_STABLE}/
+
+       cd $GIT_TREE
+       $STAGING/${RELEASE}/scripts/genlog-${GENLOG_TARGET}
+
+       gpg --armor --detach-sign $CHANGELOG_FILE
+       kup put ${CHANGELOG_FILE} ${CHANGELOG_FILE}.asc
 else
        echo "Unsupported release type: $BASE_TREE"
        exit 1
diff --git a/scripts/genlog-3.7 b/scripts/genlog-3.7
new file mode 100755 (executable)
index 0000000..7ac827a
--- /dev/null
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+COMPAT=$HOME/compat/.git
+COMPAT_DRIVERS=$HOME/devel/compat-drivers/.git
+
+export GIT_DIR=${COMPAT_DRIVERS}
+
+OLD_VER=6
+let VER="7"
+RC="-rc1"
+LOG="ChangeLog-$(git describe)"
+
+echo > $LOG
+
+echo -e "===============================================" >> $LOG
+echo -e "ChangeLog for compat-drivers for linux-3.${VER}${RC}" >> $LOG
+echo -e "===============================================" >> $LOG
+
+echo -e "
+This is the ChangeLog for the Linux kernel project compat-drivers.
+It provides a backport of a few Linux kernel subsystems down to
+older kernels:
+
+  * 802.11
+  * Bluetooth
+  * Ethernet
+  * DRM
+
+For more details refer to the home pages:
+
+https://backports.wiki.kernel.org
+
+The compat-drivers project consists of code from three projects:
+
+  * The Linux kernel: linux-stable.git
+  * Compat-wirelesS: compat-drivers.git
+  * Compat: compat.git
+
+The compat-drivers stable releases incorporates code from from
+each of these git trees for the respective upstream Linux kernel
+stable release. A branch called linux-3.x.y exists for each
+stable release. Below we provide the ChangeLog of changes from
+the previous branched release to the new branched release.
+
+Release: linux-3.${VER}
+
+" >> $LOG
+
+export GIT_DIR=${COMPAT}
+echo -e "Updates from the compat.git project:" >> $LOG
+echo -e "====================================\n" >> $LOG
+
+echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
+git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
+
+export GIT_DIR=${COMPAT_DRIVERS}
+echo -e "Updates from the compat-drivers.git project:" >> $LOG
+echo -e "=============================================\n" >> $LOG
+echo -e "git shortlog linux-3.${OLD_VER}.y..linux-3.${VER}.y\n" >> $LOG
+git shortlog origin/linux-3.${OLD_VER}.y..HEAD >> $LOG
+
+echo -e "Updates from the Linux kernel:" >> $LOG
+echo -e "=============================================\n" >> $LOG
+
+echo -e "We only include very specific changes for the supported" >> $LOG
+echo -e "subsystems:\n" >> $LOG
+echo -e "  * 802.11" >> $LOG
+echo -e "  * Bluetooth" >> $LOG
+echo -e "  * Ethernet" >> $LOG
+echo -e "  * DRM " >> $LOG
+
+echo -e "
+Generated by using: 
+
+git log v3.${OLD_VER}${RC}..HEAD \ 
+        net/wireless/ \ 
+        net/mac80211/ \ 
+        net/rfkill/ \ 
+        drivers/net/wireless/ \ 
+        net/bluetooth/ \ 
+        drivers/bluetooth/ \ 
+        drivers/gpu/drm/ \
+        drivers/net/ethernet/atheros/atl1c/ \ 
+        drivers/net/ethernet/atheros/atl1e/ \ 
+        drivers/net/ethernet/atheros/atlx/ \ 
+        include/uapi/linux/nl80211.h \ 
+        include/linux/rfkill.h \ 
+        include/uapi/rfkill.h \ 
+        include/uapi/drm \ 
+        include/net/cfg80211.h \ 
+        include/net/regulatory.h \ 
+        include/net/cfg80211.h >> $LOG 
+
+git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
+" >> $LOG
+
+export GIT_DIR=${PWD}/.git/
+git log v3.${OLD_VER}..HEAD \
+        net/wireless/ \
+        net/mac80211/ \
+        net/rfkill/ \
+        drivers/net/wireless/ \
+        net/bluetooth/ \
+        drivers/bluetooth/ \
+        drivers/gpu/drm/ \
+        drivers/net/ethernet/atheros/atl1c/ \
+        drivers/net/ethernet/atheros/atl1e/ \
+        drivers/net/ethernet/atheros/atlx/ \
+        include/uapi/linux/nl80211.h \
+        include/linux/rfkill.h \
+        include/uapi/linux/rfkill.h \
+        include/uapi/drm \
+        include/net/cfg80211.h \
+        include/net/regulatory.h \
+        include/net/cfg80211.h >> $LOG
+