Commit 147b318e authored by David Spencer's avatar David Spencer

Support rebuilds, update README.

parent 4ecdd5ba
......@@ -3,7 +3,7 @@
This is an experimental system for automatic building and Slackware packaging
of vanilla stable Linux kernels.
Every time a new kernel of the 4.4 or 4.15 long term support series is released,
Every time a new kernel of the 4.4 long term support or 4.16 series is released,
unofficial x86_64 generic (and i686 generic-smp) packages for Slackware are
automatically built and published within a few hours. You can download these
unofficial packages from https://dusk.idlemoor.tk/
......
......@@ -28,7 +28,9 @@
#------------------------------------------------------------------------------
ARCH=${ARCH:-$(uname -m)}
BUILD=${BUILD:-1}
SLKBUILD=${BUILD:-1}
unset BUILD
# 'generic' or 'huge'
KERNNAME=${KERNNAME:-generic}
......@@ -55,7 +57,8 @@ LOCALVERSION=${LOCALVERSION:-}
# The tag of the built package is also used in the kernel's version info
# (for example /proc/version and uname -r)
TAG=${TAG:-_dusk}
SLKTAG=${TAG:-_dusk}
unset TAG
# To use a specific kernel config file, pass its path in $CONFIG
CONFIG=${CONFIG:-}
......@@ -117,7 +120,8 @@ fi
if [ "$(cat $CWD/version_${KERNSERIES}_${SLKARCH} 2>/dev/null)" = "${VERSION}${DOTPATCHLEVEL}${DOTSUBLEVEL}" ]; then
printf "\n\e[32m%s\e[0m\n" "Up-to-date with linux-${VERSION}${DOTPATCHLEVEL}${DOTSUBLEVEL}"
exit 0
[ "$SLKBUILD" = 1 ] && exit 0
printf "\e[32m%s\e[0m\n" "Rebuild requested, BUILD=${SLKBUILD}"
fi
printf "\n\e[32m%s\e[0m\n" "Building linux-${VERSION}${DOTPATCHLEVEL}${DOTSUBLEVEL} -- Codename: $NAME"
......@@ -166,8 +170,8 @@ printf "\n\e[32m%s\e[0m\n" "Using kernel config $CONFIG"
cat "$CONFIG" > .config
# environment variables for kernel building:
export KBUILD_BUILD_HOST=${TAG##_}
export KBUILD_BUILD_USER=${TAG##_}
export KBUILD_BUILD_HOST=${SLKTAG##_}
export KBUILD_BUILD_USER=${SLKTAG##_}
export KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)
export MAKEFLAGS="${NUMJOBS} LOCALVERSION=${LOCALVERSION}"
......@@ -205,7 +209,7 @@ mkdir -p $PKG/install
cat $CWD/$SLKARCH/$PRGNAM-slack-desc > $PKG/install/slack-desc
cd $PKG
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-$SLKARCH-$BUILD$TAG.${PKGTYPE:-txz}
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-$SLKARCH-$SLKBUILD$SLKTAG.${PKGTYPE:-txz}
#------------------------------------------------------------------------------
......@@ -240,7 +244,7 @@ fi
EOF
cd $PKG
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-$SLKARCH-$BUILD$TAG.${PKGTYPE:-txz}
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-$SLKARCH-$SLKBUILD$SLKTAG.${PKGTYPE:-txz}
#------------------------------------------------------------------------------
......@@ -259,7 +263,7 @@ mkdir -p $PKG/install
cat $CWD/$SLKARCH/$PRGNAM-slack-desc > $PKG/install/slack-desc
cd $PKG
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-$SLKARCH-$BUILD$TAG.${PKGTYPE:-txz}
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-$SLKARCH-$SLKBUILD$SLKTAG.${PKGTYPE:-txz}
#------------------------------------------------------------------------------
......@@ -286,13 +290,13 @@ mkdir -p $PKG/install
cat $CWD/$SLKARCH/$PRGNAM-slack-desc > $PKG/install/slack-desc
cd $PKG
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-noarch-$BUILD$TAG.${PKGTYPE:-txz}
$NICE $CWD/makepkg -l y -c y $OUTPUT/$PRGNAM-$SLKVER-noarch-$SLKBUILD$SLKTAG.${PKGTYPE:-txz}
#------------------------------------------------------------------------------
if [ -x $CWD/post-build-hook.sh ]; then
export CWD OUTPUT KERNNAME KERNSERIES KERNVER SUBLEVEL SMPSUFFIX CONFSUFFIX SLKVER SLKARCH
export CWD OUTPUT KERNNAME KERNSERIES KERNVER SUBLEVEL SMPSUFFIX CONFSUFFIX SLKVER SLKARCH SLKBUILD SLKTAG
$CWD/post-build-hook.sh
fi
......
......@@ -7,7 +7,7 @@
# It uses AlienBOB's gen_repos_files.sh to create a proper repository.
#
# CWD, OUTPUT, KERNNAME, KERNSERIES, KERNVER, SUBLEVEL, SMPSUFFIX, CONFSUFFIX,
# SLKVER, SLKARCH are environment variables exported from dusk.SlackBuild.
# SLKVER, SLKARCH, SLKBUILD, SLKTAG are environment variables exported from dusk.SlackBuild.
#
# If you're making your own unofficial kernel builds, you'll probably
# want to modify this example script and save it to post-build-hook.sh.
......@@ -87,9 +87,15 @@ TMPLOG=/tmp/dusk-changelog-$$.tmp
> "$TMPLOG"
if [ -f ChangeLog.txt ]; then
for p in *.t?z ; do
echo "${p}: Updated for version ${SLKVER}. NEWLINE" >> "$TMPLOG"
done
if [ "$SLKBUILD" = 1 ]; then
for p in *.t?z ; do
echo "${p}: Updated for version ${SLKVER}. NEWLINE" >> "$TMPLOG"
done
else
for p in *.t?z ; do
echo "${p}: Rebuilt. NEWLINE" >> "$TMPLOG"
done
fi
else
for p in *.t?z ; do
echo "${p}: Added. NEWLINE" >> "$TMPLOG"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment