Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 10 Dec 2019, 20:59
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
TazPuppy Beta 41
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 25 of 69 [1022 Posts]   Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27, ..., 67, 68, 69 Next
Author Message
mistfire

Joined: 04 Nov 2008
Posts: 1272
Location: PH

PostPosted: Wed 30 May 2018, 21:12    Post subject:  

@s243a can you please test that script? And also check if that script works on tazpanel too?
Back to top
View user's profile Send private message 
darry19662018

Joined: 31 Mar 2018
Posts: 652
Location: Rakaia

PostPosted: Thu 31 May 2018, 00:59    Post subject:  

Hello Mistfire it does not appear to work with tazpanel I tried replacing tazpkg with the Archpawn one and tried installing a package using Tazpanel and it said unknown unknown option sequence.

However at command line it does work and installs dependencies. Remembering I have set Tazpup to have bash installed and run this script

cd /bin
ln -sf bash sh
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2199

PostPosted: Thu 31 May 2018, 02:27    Post subject:  

mistfire wrote:
@s243a can you please test that script? And also check if that script works on tazpanel too?


Looks like darry19662018 beat me to it. Before I tested it, I wanted a script to create a reproducible test environment. Here's my script:

Code:

#!/bin/ash
export TMP='/tmp/InstallAndBuild'
... ... #lines omitted see full version at: https://pastebin.com/kdTykrkC
export BashAsSh=true
export InstallCoreUtils=true
export runEvals=true
export InstallPackages=true
export InstallCoreUtils=true
export extractPackages=true
mkdir -p "$TMP"
rm "$TMP"/To_Install
rm "$TMP"/For_DevX
rm "$TMP"/Should_Be_Standard
rm "$TMP"/To_Eval
rm "$TMP"/To_Extract
#cd $THIS_DIR
#https://stackoverflow.com/questions/2337616/can-i-read-line-from-a-heredoc-in-bash
while read line; do

  echo "$line"
  line=$( echo "$line" | tr -s [:blank:] )
  case "$line" in
     "#"*)
        #do nothing
        ;;
     "i "*)
         echo "$line" | tr -s [:blank:] | cut -d' ' -f2 >> "$TMP/To_Install"
         ;;     
#lines omitted see full version at: https://pastebin.com/kdTykrkC
      "s "*)  #Check if these are installed, I flagged them because they are important and should be standard but I don't know for sure         
          echo "$line" | tr -s [:blank:] | cut -d' ' -f2 >> "$TMP/Should_Be_Standard"; ;;
      "!eval "*) #To Eval
          echo "$line" | tr -s [:blank:] | cut -d' ' -f2-10 >> "$TMP/To_Eval"; ;;         
      "e "*) #Extract a package
          echo "$line" | tr -s [:blank:] | cut -d' ' -f2 >> "$TMP/To_Extract"; ;;
         
   esac 
#done < <( echo <<EOM
done <<EOM
  $( if [ $BashAsSh == true ]; then
           echo "i /var/lib/tazpkg/installed/bash
                 !eval cd /bin;
                 !eval rm 'sh';
                 !eval ln -s bash sh
                 !eval changeSheBang /usr/sbin/snapmergepuppy /bin/bash"
   fi )
 
  $( if [ $InstallCoreUtils == true ]; then
           echo "e /tazpkg/installed/coreutils-multicall
            !eval copyExtracted coreutils-multicall /usr/bin/readlink
            !eval copyExtracted coreutils-multicall /usr/libexec/coreutils/libstdbuf.so           
            !eval copyExtracted coreutils-multicall /usr/bin/coreutils
            !eval cd /usr/bin; rm readlink; ln -s coreutils readlink"
   fi )
... #lines omitted see full version at: https://pastebin.com/kdTykrkC
EOM
copyExtracted(){
   PKG_Name="$( basename "$1" )"
   DIR_NAME="$( dirname $2)"
    VERSION=`tazpkg info $PKG_Name | grep 'Version' | sed 's/.*://'|cut -c 6-`   
    cd "$TMP"/"$PKG_Name"-"$VERSION/fs"
    pwd
    mkdir -p "$DIR_NAME"
    cp -a -u ."$2" "$2"
}
changeSheBang(){
   if [ -f $1 ]; then
      cp $1 $1-old
      CHMOD_VAL="$( stat -c %a $1 )"
     rm $1
     line_num=1
     while read line; do
       if [ $line_num -eq 1 ]; then
         echo "#!$2" >> "$1"
       else
         echo "$line" >> "$1"
       fi
       line_num=`expr $line_num + 1`
     done <"$1-old"
     chmod "$CHMOD_VAL" "$1"
   fi
}
if [ $InstallPackages == true ]; then
 echo '============ INSTALLING PACKAGES ====================='
  while read PKG; do
     [ -f "$PKG" ] || tazpkg get-install "$( basename "$PKG" )"
  done <"$TMP/To_Install"
   while read PKG; do
     [ -f "$PKG" ] || tazpkg get-install "$( basename "$PKG" )"
  done <"$TMP/Should_Be_Standard"
fi
if [ $extractPackages == true ]; then
 echo '============ EXTRACTING PACKAGES ====================='
 cd "$TMP"
  while read PKG; do
      PKG_Name="$( basename "$PKG" )"
      tazpkg get $PKG_Name
      VERSION=`tazpkg info $PKG_Name | grep 'Version' | sed 's/.*://'|cut -c 6-`
      tazpkg extract "$PKG_Name"-"$VERSION".tazpkg "."
  done <"$TMP/To_Extract"
fi
#lines omitted see full version at: https://pastebin.com/kdTykrkC
if [ $runEvals == true ]; then
 echo '============ RUNNING EVALS ====================='
  while read toEval; do
      eval "$toEval"
  done <"$TMP/To_Eval"
fi

https://pastebin.com/kdTykrkC

The script:
1. installs bash
2. links sh to bash
3. installs the coreutils multicall binary
4. links readlink to the coreutils multicall binary
5. replaces the shebang to bash for snapmergepuppy

It also does some other stuff that isn't important to what we are trying to test here.
Back to top
View user's profile Send private message Visit poster's website 
darry19662018

Joined: 31 Mar 2018
Posts: 652
Location: Rakaia

PostPosted: Thu 31 May 2018, 03:00    Post subject:  

@s243a

Hi mate,

Used your script and found that your script indeed changed to bash settings and installed bash and tried to run 2 of my converted puppy gtkdialog programs that refused to run on a pristine TazPup 9 - now run after running the script.

Will now do package manager tests.
Back to top
View user's profile Send private message Visit poster's website 
darry19662018

Joined: 31 Mar 2018
Posts: 652
Location: Rakaia

PostPosted: Thu 31 May 2018, 03:23    Post subject:  

Ok ran package manager dependency checking didn't work.
Back to top
View user's profile Send private message Visit poster's website 
darry19662018

Joined: 31 Mar 2018
Posts: 652
Location: Rakaia

PostPosted: Thu 31 May 2018, 04:00    Post subject:  

Here is your script attached for those who want to try it.
switch.sh.gz
Description 
gz

 Download 
Filename  switch.sh.gz 
Filesize  3.54 KB 
Downloaded  54 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 4208
Location: holland

PostPosted: Thu 31 May 2018, 04:16    Post subject:  

mistfire wrote:
@s243a and @fredx181 I found a tazpkg on from archpwn. It is a single script and was written in bash. I wonder if the tazpkg from archpawn works the same as the original tazpkg from slitaz.

https://github.com/nopper/archpwn/blob/master/scripts/tazpkg

You may test it if you want.


The good news is that it works for me from commandline (including dependencies), but:
- It uses different switches, e.g. to install you need to use:
Code:
tazpkg get-install <package>

With official/included tazpkg it is:
Code:
tazpkg -gi <package>


- It doesn't work on tazpanel (error message, nothing gets installed)

EDIT: It seems to me that this other tazpkg is not depending on the scripts in /usr/libexec/tazpkg/ BTW.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 1272
Location: PH

PostPosted: Thu 31 May 2018, 06:02    Post subject:  

This only a preview of tazpup builder.

It has two scripts:

make-tazpup.sh - creates tazpup locally (requires slitaz iso and puppy iso)

make-tazpup-cloud.sh - creates tazpup from fresh release of slitaz. (It downloads slitaz iso and tazpkgs from online repo, requires puppy iso)

Download: https://drive.google.com/file/d/1CZlWpO3E6NUcu_RF5Oyi7sVbglgeqztU/view?usp=sharing
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1842
Location: not Bulgaria

PostPosted: Thu 31 May 2018, 06:06    Post subject:  

fredx181 wrote:
mistfire wrote:
@s243a and @fredx181 I found a tazpkg on from archpwn. It is a single script and was written in bash. I wonder if the tazpkg from archpawn works the same as the original tazpkg from slitaz.

https://github.com/nopper/archpwn/blob/master/scripts/tazpkg

You may test it if you want.


The good news is that it works for me from commandline (including dependencies), but:
- It uses different switches, e.g. to install you need to use:
Code:
tazpkg get-install <package>

With official/included tazpkg it is:
Code:
tazpkg -gi <package>


- It doesn't work on tazpanel (error message, nothing gets installed)

EDIT: It seems to me that this other tazpkg is not depending on the scripts in /usr/libexec/tazpkg/ BTW.

Fred


I don't myself think it is good to move away from using pristine/official slitaz scripts.

wiak
Back to top
View user's profile Send private message 
darry19662018

Joined: 31 Mar 2018
Posts: 652
Location: Rakaia

PostPosted: Thu 31 May 2018, 07:03    Post subject:  

I'm in two minds about that.
If there was a change of package manager had anybody thought about this?

http://murga-linux.com/puppy/viewtopic.php?t=112927
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2199

PostPosted: Thu 31 May 2018, 09:26    Post subject:  

darry19662018 wrote:
I'm in two minds about that.
If there was a change of package manager had anybody thought about this?

http://murga-linux.com/puppy/viewtopic.php?t=112927


I thought about trying to modify the existing puppy package manger to store the package info the same way that TazPkg does. We could do the same for this CLI version that you posted.
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 4208
Location: holland

PostPosted: Thu 31 May 2018, 12:26    Post subject:  

wiak wrote:
I don't myself think it is good to move away from using pristine/official slitaz scripts.


I'd agree with that, the way Slitaz is constructed is just wonderful (a piece of art Smile ), including the package management, keep it intact !
Specially because of that package management I would prefer tazpup over other puppies.

Fred

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5393
Location: Ontario

PostPosted: Thu 31 May 2018, 20:14    Post subject:  

I had to include the 'paste' app with my bulldog finder app so a list could be
constructed. Bulldog finder worked in Alpha8 not alpha9.

I'll try installing 'bash' to see if that helps.
By the way BarryK prefers bash3 rather than bash4 since it's smaller (only 242k compressed).
Most of the puppy scripts will work with it.

Would it be possible for the puppy linux scripts to use bash shell and
the taz scripts to use sh shell??
http://distro.ibiblio.org/puppylinux/pet_packages-2/bash-3.0.16.pet
______________________________________________________
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2199

PostPosted: Thu 31 May 2018, 21:56    Post subject:  

I'm thinking of running a script to look for all files in
\woof-CE/woof-code/rootfs-skeleton/

which have the following shebang
Code:

#!/bin/sh


Save the list, and then write a script that uses the list to covert all of these shebangs to bash.

I here that won't solve all the problems with using puppycode in stilatz but it will be helpful for people that want to use puppy code but keep busybox-puppy as the system shell.

On a related note, I was wondering what changing the path variable might do, if one wanted to temporary use a different system shell, or alternatively, could one make a function called sh that wraps the shell, and then export that function.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2199

PostPosted: Thu 31 May 2018, 22:06    Post subject:  

We need a common place to save these packages that we are converting, so that we can write scripts to install them. i Don't think that it will work from the forum because one needs to be logged into the forum.
....
However, let me try anway, to see if I can wget a package saved to this forum.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 25 of 69 [1022 Posts]   Goto page: Previous 1, 2, 3, ..., 23, 24, 25, 26, 27, ..., 67, 68, 69 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1457s ][ Queries: 13 (0.0325s) ][ GZIP on ]