Skip to content
Permalink
Browse files

sbopkg: Use correct SlackBuild file name to build package

During package creation, most SlackBuilds copy the .SlackBuild file to
/usr/doc/$PKG/.  Previously, sbopkg would cause the "original"
SlackBuild instead of the "local" SlackBuild with user edits to be
copied to the documentation directory.  Now, sbopkg backs up the
original SlackBuild to $PKGNAME.SlackBuild.original before building the
package.

Old behavior:
1. Original (upstream) SlackBuild is named $PKGNAME.SlackBuild.
2. User optionally defines custom SlackBuild in
   $PKGNAME.SlackBuild.sbopkg.
3. sbopkg asks user to use Original or Local SlackBuild, and copies
   $PKGNAME.SlackBuild or $PKGNAME.SlackBuild.sbopkg to
   $PKGNAME.SlackBuild.build, respectively.
4. sbopkg builds package (which includes copying SlackBuild to
   /usr/doc/).
5. sbopkg removes *.build files.

New behavior:
1. Original (upstream) SlackBuild is named $PKGNAME.SlackBuild.
2. User optionally defines custom SlackBuild in
   $PKGNAME.SlackBuild.sbopkg.
3. sbopkg asks user to use Original or Local SlackBuild, and copies
   $PKGNAME.SlackBuild or $PKGNAME.SlackBuild.sbopkg to
   $PKGNAME.SlackBuild.build, respectively.
4. sbopkg backs up original SlackBuild by moving $PKGNAME.SlackBuild
   to $PKGNAME.SlackBuild.original.
5. sbopkg copies $PKGNAME.SlackBuild.build to $PKGNAME.SlackBuild.
6. sbopkg builds package (which includes copying SlackBuild to
   /usr/doc/).
7. sbopkg restores original SlackBuild by moving
   $PKGNAME.SlackBuild.original to $PKGNAME.SlackBuild.
8. sbopkg removes *.build files.

Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
  • Loading branch information...
ErichRitz authored and willysr committed Jan 10, 2018
1 parent bef8ffc commit 371284cd8972641ece61957a76fe5629651e6c6a
Showing with 10 additions and 3 deletions.
  1. +2 −0 src/usr/doc/THANKS
  2. +5 −2 src/usr/sbin/sbopkg
  3. +3 −1 tools/ChangeLog-latest.txt
@@ -90,3 +90,5 @@ We moved to github, so revision number no longer used
Sergey V.
Marcel Saegebarth
Loki Harfagr
Alan
Erich Ritz
@@ -3412,6 +3412,8 @@ process_package() {
mkdir -p $SB_OUTPUT

cd $REPO_DIR/$PKGPATH
mv $PKGNAME.SlackBuild $PKGNAME.SlackBuild.original
cp $PKGNAME.SlackBuild.build $PKGNAME.SlackBuild

# Start the actual build
# We loop here to enable a 'retry' if anything goes wrong with the build
@@ -3475,6 +3477,7 @@ process_package() {

# Cleanup
cd $REPO_DIR/$PKGPATH
mv $PKGNAME.SlackBuild.original $PKGNAME.SlackBuild
rm -f $PKGNAME.{info,SlackBuild}.build
rm -f options.build

@@ -3499,10 +3502,10 @@ build_package() {
# deleting too much or leaving garbage behind us), a nice
# approach is to use sbopkg's own temp directory.
export TMP=$SBOPKGTMP
nice -n ${NICE:-10} sh $PKGNAME.SlackBuild.build
nice -n ${NICE:-10} sh $PKGNAME.SlackBuild
echo "Cleaning up..."
else
nice -n ${NICE:-10} sh $PKGNAME.SlackBuild.build
nice -n ${NICE:-10} sh $PKGNAME.SlackBuild
fi
)
}
@@ -1,6 +1,6 @@
SBOPKG NEWS

sbopkg-dev (2018-01-08 23:08:43 UTC)
sbopkg-dev (2018-01-12 00:52:10 UTC)
FEATURES
* sqg: Parallelize building of single and all packages by option -j.
Requires GNU Parallel.
@@ -30,6 +30,8 @@ sbopkg-dev (2018-01-08 23:08:43 UTC)
* Remove SKIP_EMPTY option.
* Fix wrong glob expansion
Patch by Alan
* Use correct SlackBuild file name to build package
Patch by Erich Ritz

sbopkg 0.38.1 (2016-09-01 13:42 UTC)
FEATURES

0 comments on commit 371284c

Please sign in to comment.
You can’t perform that action at this time.