From 4f8d52738fa4a33890ba6c52a88e2f109af01063 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Mon, 28 Oct 2013 12:44:51 +0100 Subject: [PATCH] Version 1.0rc3 - 28/Oct/2013 - slackpkg+ 1.0 release candidate 3. Last call. :) - Added setupmultilib.sh in /usr/doc/slackpk+-*, an helper for configure multilibs in slackpkgplus.conf --- ChangeLog.txt | 5 +++ src/ChangeLog.txt | 5 +++ src/README | 12 +++-- src/setupmultilib.sh | 96 ++++++++++++++++++++++++++++++++++++++++ src/slackpkg+.SlackBuild | 2 + 5 files changed, 116 insertions(+), 4 deletions(-) create mode 100755 src/setupmultilib.sh diff --git a/ChangeLog.txt b/ChangeLog.txt index 6186aa9..bd11fac 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +Version 1.0rc3 - 28/Oct/2013 + - slackpkg+ 1.0 release candidate 3. Last call. :) + - Added setupmultilib.sh in /usr/doc/slackpk+-*, an helper for configure + multilibs in slackpkgplus.conf + Version 1.0rc2 - 21/Oct/2013 - Looks like we get a slackpkg+ 1.0 release candidate 2... but things are pretty much nailed down at this point. Please test and report any last :D diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 6186aa9..bd11fac 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,8 @@ +Version 1.0rc3 - 28/Oct/2013 + - slackpkg+ 1.0 release candidate 3. Last call. :) + - Added setupmultilib.sh in /usr/doc/slackpk+-*, an helper for configure + multilibs in slackpkgplus.conf + Version 1.0rc2 - 21/Oct/2013 - Looks like we get a slackpkg+ 1.0 release candidate 2... but things are pretty much nailed down at this point. Please test and report any last :D diff --git a/src/README b/src/README index 32a22bb..af8ae82 100644 --- a/src/README +++ b/src/README @@ -104,13 +104,17 @@ restricted:.* mean 'all packages in repository restricted' MULTILIB: -If you want to use a multilib system, add the repository 'multilib', add "PKGS_PRIORITY=( multilib:.* )" then launch: +If you want to use a multilib system you must configure the multilib repository in slackpkgplus.conf +You can do that simply by running: +# /usr/doc/slackpkg+-1.0/setupmultilib.sh + +Otherwise you can configure it manually: +Add the repository 'multilib', add "PKGS_PRIORITY=( multilib:.* )" then launch: -the first time: # slackpkg update gpg # slackpkg update -# slackpkg install multilib # slackpkg upgrade-all +# slackpkg install multilib next: # slackpkg update @@ -121,7 +125,7 @@ to remove the multilib, you must remove 'multilib:.*' from PKGS_PRIORITY and fro # slackpkg update # slackpkg remove multilib Note: that does NOT remove the core multilib packages becouse they affect the 64bit system, so you must remove these by launch: -# slackpkg reinstall gcc glibc +# slackpkg upgrade-all then delete or comment the related MIRRORPLUS line and launch: # slackpkg update diff --git a/src/setupmultilib.sh b/src/setupmultilib.sh new file mode 100755 index 0000000..df43e06 --- /dev/null +++ b/src/setupmultilib.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +cd $(dirname $(readlink -f $0)) +if [ ! -e repositories.txt ];then + echo "Fatal. repositories.txt not found!" + exit 1 +fi + +ISX64=$(ls /var/log/packages/aaa_base-*-x86_64-*|wc -l) +if [ $ISX64 -ne 1 ];then + echo "Slackware multilib's are supported only from slackware x86_64!" + exit 1 +fi +SVER=$(grep -v ^\# /etc/slackpkg/mirrors|sed -r 's,^.*/slackware64-(current|14.1|14.0|13.37|13.0)/,\1,'|head -1) +if [ -z "$SVER" ];then + echo "I can't detect you Slackware version." + echo "Which Slackware version are you running? (current/14.1/14.0/13.37/13.0)" + read $SVER +fi +if ! echo $SVER|egrep -q '^(current|14.1|14.0|13.37|13.0)$';then + echo "Invalid Slackware version ($SVER)" + exit 1 +fi + +if grep -q -e '^PKGS_PRIORITY=.* multilib:\.\* .*$' -e '^MIRRORPLUS..multilib..=.*multilib.*' /etc/slackpkg/slackpkgplus.conf;then + echo "slackpkg+ seem to be already configured for multilib support. Would you like to remove multilib support from the configuration? (y/N)" + read ANS + if [ "$ANS" == "y" -o "$ANS" == "Y" ];then + cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.backup + sed -i -r \ + -e 's/^PKGS_PRIORITY=(.*) multilib:\.\* (.*)$/PKGS_PRIORITY=\1 \2/' \ + -e 's/^(PKGS_PRIORITY=\( +\).*)$/#\1/' \ + -e 's/^(MIRRORPLUS..multilib..=.*multilib.*)$/#\1/' \ + -e 's/^REPOPLUS=(.*) multilib (.*)/REPOPLUS=\1 \2/' \ + -e 's/^(REPOPLUS=\( +\).*)$/#\1/' /etc/slackpkg/slackpkgplus.conf + echo "multilib support has been removed from slackpkg+. Now you need to remove the installed packages (using slackpkg)." + echo "Would you like this script to run slackpkg for you and remove the Multilib packages? (y/N)" + read ANS + if [ "$ANS" == "y" -o "$ANS" == "Y" ];then + slackpkg update + slackpkg upgrade gcc glibc + slackpkg remove multilib + echo "Multilib removed!!" + exit 0 + else + echo "To remove installed packages type:" + echo "# slackpkg update" + echo "# slackpkg upgrade gcc glibc" + echo "# slackpkg remove multilib" + exit 0 + fi + else + echo "Aborted" + exit 1 + fi +fi + +echo "Would you setup slackpkg+ to add multilib support? (y/N)" +read ANS +if [ "$ANS" == "y" -o "$ANS" == "Y" ];then + MULTILIBREPO="MIRRORPLUS['multilib']="$(grep -m1 '> multilib: ' repositories.txt|awk '{print $3}'|sed "s/{.*}/$SVER/") + cp /etc/slackpkg/slackpkgplus.conf /etc/slackpkg/slackpkgplus.conf.backup + if grep -q ^PKGS_PRIORITY= /etc/slackpkg/slackpkgplus.conf;then + sed -i -r -e 's/^PKGS_PRIORITY=\( (.*) \)/PKGS_PRIORITY=( multilib:.* \1 )/' /etc/slackpkg/slackpkgplus.conf + else + sed -i -r -e 's/^(REPOPLUS=.*)$/PKGS_PRIORITY=( multilib:.* )\n\1/' /etc/slackpkg/slackpkgplus.conf + fi + sed -i -r -e 's|^(REPOPLUS=.*)$|\1\n'"$MULTILIBREPO|" /etc/slackpkg/slackpkgplus.conf + sed -i.backup -r -e 's/^(\[0-9\]\+compat32)$/\#\1/' /etc/slackpkg/blacklist + echo "slackpkg+ is now configured for multilib support." + echo "Do you want to install then multilib now? (y/N)" + read ANS + if [ "$ANS" == "y" -o "$ANS" == "Y" ];then + slackpkg update gpg + slackpkg update + slackpkg upgrade multilib + slackpkg install multilib + echo "Multilib installed" + else + echo "To install multilib type:" + echo "# slackpkg update gpg" + echo "# slackpkg update" + echo "# slackpkg upgrade gcc glibc" + echo "# slackpkg remove multilib" + fi + echo "To keep multilib updated, simply type:" + echo "# slackpkg upgrade-all" + if [ "$SVER" == "current" ];then + echo "Remember... When you see NEW packages with 'slackpkg install-new' command," + echo "you may need to install the related multilib package" + fi + exit 0 +else + echo "Aborted" + exit 1 +fi diff --git a/src/slackpkg+.SlackBuild b/src/slackpkg+.SlackBuild index 243242b..4edaf06 100644 --- a/src/slackpkg+.SlackBuild +++ b/src/slackpkg+.SlackBuild @@ -25,6 +25,7 @@ cp $CWD/zdialogplus.sh usr/libexec/slackpkg/functions.d/ cp $CWD/README usr/doc/slackpkg+-$VERSION/ cp $CWD/ChangeLog.txt usr/doc/slackpkg+-$VERSION/ cp $CWD/repositories.txt usr/doc/slackpkg+-$VERSION/ +cp $CWD/setupmultilib.sh usr/doc/slackpkg+-$VERSION/ cp $CWD/slackpkg+.SlackBuild usr/doc/slackpkg+-$VERSION/ cp $CWD/slackpkgplus.*.sample usr/doc/slackpkg+-$VERSION/ cp $CWD/slack-desc install/ @@ -32,6 +33,7 @@ cat $CWD/doinst.sh|sed "s/SLPVERSION/$VERSION/" > install/doinst.sh chmod +x usr/libexec/slackpkg/functions.d/slackpkgplus.sh chmod +x usr/libexec/slackpkg/functions.d/zdialogplus.sh +chmod +x usr/doc/slackpkg+-$VERSION/setupmultilib.sh makepkg -l y -c y $OUTPUT/slackpkg+-$VERSION-noarch-$BUILD.txz