create pet by compiling from source ? SOLVED using RE-pet

Puppy related raves and general interest that doesn't fit anywhere else
Post Reply
Message
Author
Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

create pet by compiling from source ? SOLVED using RE-pet

#1 Post by Master_wrong »

I have experiment by creating blueman.pet and i find that manually finding installed files rather tedious. so I wonder if there any simpler way to create pet from compiled source ?

I mean can i mount iso of original pup, then compare the difference between the mounted iso and the actual root which already install the program then create list of it. then from the list we can create pet.


thank you
Last edited by Master_wrong on Wed 07 Sep 2011, 03:46, edited 1 time in total.
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]
User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#2 Post by pemasu »

At compiling time there might be possibility to install the compiled stuff to the separate folder.
Like: make DESTDIR=/tmp/blueman install

check the compiling notes of the package.

I havent checked blueman, it might be python package and I havent much tinkered with them.
Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#3 Post by Master_wrong »

I already made the pet for blueman
http://www.murga-linux.com/puppy/viewtopic.php?t=67113
make DESTDIR=/tmp/blueman install
thank you for the info...

btw yes blueman uses a lot of python, some of the dependency also installed into python directory which makes it difficult to track.

I believe i have test using
./configure --prefix=/xxx
which failed.
thanks for the tip
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]
User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#4 Post by pemasu »

with ./configure --prefix=/xxx you can only specify how the compiled package will be structured, like /usr or /usr/local as starting folder.

But if the source recognizes make DESTDIR=/xxx install, you can install the whole stuff under some folder name and make easily pet of that folder afterwards. The pet will install the folder content to their right places in wanted folders.
No need to chase the installed stuff.
Unfortunately not all source allows that kind spesification.
Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

RE-pet

#5 Post by Master_wrong »

@pemasu
I just tried to do that without success...

trying to simplify creating pet from installing source code... in the process i created

RE-pet....
create clone pet from installed program !

all i need to do is list of recenly installed/copyed program.
i guess this is what should i do ?

1. install source code
2. search files with specific date stamp and time stamp ? what should i look for ? ctime atime ?

3. copy the list of files into text files, this could be as much as 2000 files

4. run RE-pet, using the text files, those files will copyed into specific place

5. the copied files can be turned into pet using petmaker very easy
Last edited by Master_wrong on Thu 08 Sep 2011, 02:27, edited 1 time in total.
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]
User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#6 Post by pemasu »

Usually there is readme or install file included when you extract the source. It should have instructions if source supports installing to the spesified folder with some command. Also ./configure --help might help.
But as I told before not all source allows the installing in spesified folder.
I am not that handy that I have started to hack source files to enable it if it is missing.

Otherwise it goes to manual or semimanual afterwards hunting as you have described.
User avatar
runtt21
Posts: 1649
Joined: Sun 08 Jun 2008, 02:43
Location: BigD Texas
Contact:

#7 Post by runtt21 »

Have you ever tried :

./configure --prefix=/usr
make
new2dir make install


using the new2dir will both install the compiled app and make a new folder with everything that got installed in their correct sub-folders.It will then ask you if you want to make a .pet out of the new folder and run the dir2pet command for you.
jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#8 Post by jamesbond »

Here: http://distro.ibiblio.org/pub/linux/dis ... ndbox.html. It's in Fatdog but you can probably get it to work on other puppies. If it does - let me know :D
cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#9 Post by amigo »

I don't get any more simple, secure, or reliable than this:
src2pkg -PET2 url-or-path-to-source

src2pkg can handle even exotic stuff which doesn't recongize DESTDIR or any of its' many variants, using one of several methods -some similar to the sandboxing mentioned.
Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#10 Post by Master_wrong »

thanks all for response...

@runtl
it was python package... and consist of more than 1 package which mean new2dir make install cannot be used effectively
i have tried, the package is not useable

@james
i have created for 5.2, but 528 is different so that the pet was useless, so i doubt that pet from another variation of 52 will work

@amigo
thanks, never heard of it, but i have created my own way of doing it

@pemasu
it looks semi automatic to me
the script RE-pet below will copy all files from list of files into /root/xxx
those files then can be used by petmaker to create pet

1. boot with old date like 2010, use pfix=ram
2. after boot and ready to install packatge change date to 09/09/2011
3. configure make install
4. change date to 09/18/2011
5. run pfind for system files, dated 09/08/2011 to 09/09/2011, check for cmake,amake or mmake *
6. the "list of files" file will be placed on /tmp
7. copy "list of files" file into /root/.packages
8. run script, select the file
9. files copied into /root/xxx
10. run petmaker 430

* i dont know which one is best, i try all then select the one with more files.
Last edited by Master_wrong on Wed 07 Sep 2011, 04:45, edited 7 times in total.
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]
Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

RE-pet

#11 Post by Master_wrong »

#!/bin/sh
#RE-pet... to clone your long lost pet by master_wrong
#test on 528

tail -n +4 $0 > /tmp/programassasin.txt
exec rxvt -e sh /tmp/programassasin.txt
mkdir /root/xxx
finish="n"
until [ "$finish" = "y" ]
#---------------------------
do
cd ~/.packages
xdir="/root/.packages"
if [ -d "$xdir" ] ; then
cd /root/.packages

echo files is in directory $xdir
echo LIST OF PROGRAM :
ls
echo
echo
echo TYPE FILENAME HERE :
read a
target=`gawk '{sum=sum+1}; END {print sum}' $a `
echo $target lines
echo
echo

n=1
while ((n<=target))
do
echo $n


awk 'NR=='$n'' /root/.packages/$a > /tmp/programassasin2.txt
paragraphs[n]=`awk 'NR=='$n'' /root/.packages/$a`
echo ${paragraphs[$n]}
echo "directory (0=no)?"
tes="0"

if [[ -d "${paragraphs[$n]}" ]] ; then
tes="1"
echo "directory"
elif [[ -f "${paragraphs[$n]}" ]]; then
tes="0"
echo "files"
else
tes="3"
echo "error"
fi

echo $tes
echo ${paragraphs[$n]}
if [ "$tes" = "0" ] ; then
#mkdir /root/xxx${paragraphs[$n]}
cp -R ${paragraphs[$n]} /root/xxx${paragraphs[$n]}
echo copy files
else
mkdir /root/xxx${paragraphs[$n]}
cd /root/xxx${paragraphs[$n]}
echo entering directory
fi
echo
echo
let n="$n+1"
done
cd ~/.packages/builtin_files
echo "build in ok"
else

echo
echo
n=1

fi

echo "DONE y/n?(enter "n" to select another program - y to quit)"
read finish
#-------------------------
done

#rm /tmp/programassasin.txt
#rm /tmp/programassasin2.txt
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]
Post Reply