Developer Tools GUI

Miscellaneous tools
Message
Author
User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

Developer Tools GUI

#1 Post by puppyluvr »

:D Hello,
As a long time Puppy user, and small time Developer, I find myself typing the same code again and again... Being a half blind arthritic Dyslexic, well, I hate to type..
I have found that many things are easy enough to Open up in Puppy, but some are not so easy to pack back up again..
Examples:
To open an ISO in Puppy, you click on it.. :)
But for newer users, repacking it into a bootable ISO isnt as "one click" easy..
The same applies to an SFS file..
Or how about unpacking, editing, and repacking the initrd??
Or tarring/untarring directories...
And of course, compiling a source tarball into a pet...

So I have written a simple GUI to aid in these processes..

The first button opens a window for you to put the contents of your ISO into.. Clicking OK turns it into a bootable ISO..

The second does the same for SFS files...

The third allows you to link an initrd into it, unpacks it for editing, and when OK is clicked, repacks it into an initrd again...

The fourth will unpack and/or repack tarballs...

The fifth button in a front end to Amigo`s awesome src2pkg..
Drop a source tarball into the window, click OK, and (hopefully) get a pet..
src2pkg must be installed separately, I will post a pet...

A lot more to do, this is just an alpha...
Testing needed.. any takers???

Image

Src2pkg is available, as a pet, @ my meownplanet link in my signature, or on the Forum, or from Ibiblio.org...
Attachments
DevTools.tar.gz
Unpack to /mnt/home..
(27.88 KiB) Downloaded 770 times
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#2 Post by amigo »

Here's an awesome direct link to the pet of the latest version. Users should note that they will probably need to edit the configuration file to tell src2pkg to create pets instead of some other supported package format. @puppyluvr maybe you could post yours here.
Link here:
http://distro.ibiblio.org/pub/linux/dis ... arch-2.pet

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#3 Post by puppyluvr »

:D Hello,
@Amigo,
Thank you.. The link to my dir is currently down..
DevTools uses a script to launch src2pkg, using the -PET2 option, launching it in a terminal, for feedback as it works..
I still have to learn about the options..
Any Puppy specific options I need to add by default??
BTW, nice program, it is really amazing.. 8)

I thought about including Joe`s (Bigbass) GUI for configuration..

Also, the helper didnt build libsentry.so properly, so I built and included it in my .pet..

Thanks..
Jay..
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#4 Post by puppyluvr »

:D Hello,
I suppose I should mention... :oops:
As an alpha, it has its limitations..
You must be using Rox.. Support for Thunar etc will come later..
You need a lot of room..
Although Tarballs (tar.gz/tar.bz2/tgz) and the initrd can (and should) be hardlinked in, ISO`s and SFS`s can be big, and currently, require you to Hardlink the contents themselves into the directory. Future releases will mount and link automatically, but this is an alpha... :roll: I have not setup the "mount/unmount" and first run stuff yet... I have limited "Puppy Time" atm....

I really made this for my own usage, via CLI scripts, (of which there are several in line for future inclusion), but realized that a GUI might attract newer users into "getting a little `Puppy guts` on their hands".. :shock:
Plus, as I stated, I hate to type..

Its pretty basic ATM, the dialog "eye candy" can wait..
Is it functional and user friendly..??
What would you like it to do??

ToDo:
Setup first run configuration dialogs..
Setup "mount/link/unmount" for ISO`s and SFS`s..
Include Bigbass`s GUI-config for src2pkg..
Documentation..
Pretty it up..
Future ideas:
"Difference" option.. 8)
"Kernel" section in Source..
Support for Macpup E-17 files..
"Convert" IE rpm2deb or taz2pet etc... Lotta possibilities..

LOUD FEEDBACK PLEASE... :wink:
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#5 Post by amigo »

Do you mean that src2pkg-helpers fails to build if you manually run 'src2pkg --setup'? If not, theres a problem in there.

There are lots of interesting options for puppy which are not specific to the pet format. See the advanced options by running 'src2pkg -hh'. You can have src2pkg trim the documents to a bare minimum for you, strip harder, have bins compressed using upx/ucl -many other esoteric stuff there. Have a read through /etc/src2pkg/src2pkg.conf and /usr/libexec/src2pkg/DEFINES for more insight into mayn options. Don't make changes directly in the DEFINES file, instead put any overrides in the conf file.

Note also, that src2pkg can be used to convert packages from one package type to another -with the added bonus of all the complex sanity-checks done by src2pkg

Two options you will find useful for pets/puppy:
LFS_POLICY -look for the line:
#[[ $FHS_POLICY ]] || FHS_POLICY=SLACK
in the /etc/src2pkg/src2pkg.conf file, and change to:
[[ $FHS_POLICY ]] || FHS_POLICY=NONE

src2pkg will complain bitterly(and rightly so!) if you try to build packages which contain your $HOME directory. For puppy this means '/root' and many packages quite wrongly install stuff there. No other package format in the world allows such intrusion into your HOME dir, but puppy keeps lots of stuff there -rant, rant, rant. YOu can't stop src2pkg from complaining about it, but you can make it not choke and refuse to build the package by putting this in the conf file:
FAIL_ON_BAD_DIRS=NO

Of course, all these options can also be passed on the command-line as environment variables:
FAIL_ON_BAD_DIRS=NO FHS_POLICY=NONE src2pkg ..options..
if you don't want to make changes directly in the conf file.

tatamata
Posts: 63
Joined: Sun 02 May 2010, 09:09

#6 Post by tatamata »

...and also it is easy to convert deb or rpm to pet, but what about vice versa?
Could it be included in this tool?

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#7 Post by puppyluvr »

:D Hello,
@tatamata,
Src2pkg, as Amigo stated above, has the ability to convert package formats, and I intend to create a "Convert" tab to take advantage of that functionality.
After I do a lot more reading. :shock:
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#8 Post by amigo »

src2pkg supports the creation of these formats:
slackware '.tgz' or '.txz'
slackware-derivatives '.tbz' or '.tlz'
kiss-linux '.txz' (similar to slack-packages but with enhanced package database and management)
debian & Co. '.deb'
rpm & Co. '.rpm'
slitaz 'taz'
puppy '.pet' old-style databse (pre 4.01 IIRC)
puppy '.pet' new-style databse (known as PET2 by src2pkg)

Conversion from/to should work for any combination of these packages types -except that src2pkg doesn't recognize .taz packages -it only creates them. It could easily support reading them and converting them -I just didn't think about it.

Besides, src2pkg's whole purpose is to foment the repeatable creation of standards-compliant packages. No one can create a program which perfectly does so without limits -it takes a human brain to properly undertsand and act on what the README file in some sources says. But src2pkg at least leverages previous human experience with the sources when possible. So, instead of going haywire in a frenzy of package conversion -try learning to use src2pkg to create new packages from scratch and you'll always be able to repeat your work and pass it around by simply supplying your packages' src2pkg 'recipe' and whatever additional materials are needed.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#9 Post by big_bass »

amigo
Users should note that they will probably need to edit the configuration file to tell src2pkg to create pets instead of some other supported package format.



Hey puppyluvr
puppyluvr
After I do a lot more reading
:D
reading about all the options before I made a GUI for the config
took me some time if I remember correctly it was 8 pages
and still I had to ask Gilbert some questions after I read though it all
to set it up correctly for puppy mainly because we are so non standard
to any other linux package but with all those background details aside

you could include my GUI config as an " advanced tool option" if you want to

but you could get the same result forcing those options with the file I will include (below)
and setup the conf file automatically preset with what you will need
by using this file that was generated from my GUI config file tool

place this in $HOME and call it .src2pkg.conf

Code: Select all

PKG_FORMAT=pet;PET2=1
ADD_SRC2PKG_SCRIPT=YES
AUTO_DESKTOP=YES
DOCLIST=MINIMAL
FHS_POLICY=NONE
FAIL_ON_BAD_DIRS=NO
SOURCES_DIR=$CWD
SRC_BUILDS_DIR=$CWD
PKG_BUILDS_DIR=$CWD
PKG_DEST_DIR=$CWD
BACKUP_DIR=$CWD
COMPRESSION_SIZE_LIMIT=50

Joe

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#10 Post by amigo »

Thanks for posting your conf file Joe. I think that for the next version of src2pkg, I will include pre-configured conf files for each system/package type which will give users a faster start using src2pkg.

About your config settings, some of them are not really needed as they reflect the default settings anyway. Still, it is useful to show a range of *possible* settings which users are most likely to want or need to change. And, it should be remembered that many of the possible settings can be over-ridden from the command-line, but only if you use conditional syntax in the conf file, like this:
[[ $PKG_FORMAT ]] || PKG_FORMAT=pet;PET2=1
This syntax also allows each build to have its' own settings, if needed, by setting them in the build script -although this is rarely useful. The above syntax can be read like this:
If the package format has not already been set, then set it to 'pet', etc.
But, any src2pkg CLI options, options set in the build recipe, or personal conf files are all seen *before* the /etc/src2pkg/src2pkg.conf conf file is read -but they will not be respected if the main conf file overrides them with the 'definitive' syntax you show. That's why the more complex conditional syntax is useful -it allows you to keep all options open to change from the CLI. That said, the main conf file has the last word, so using definitive syntax in it allows the system administrator to set any options definitely, if needed.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#11 Post by nooby »

First things first. Thanks for sharing it with everybody.

As you know I am not an average noob but when you write this:
Is it functional and user friendly..??
I hope it is okay to point out that not all of us noobs are good at .tar.gz just like that.
I don't dare to try tar.gz even after three years of daily usage of a linux Os.

What is expected of me to know to get the tar.gz thing right?
How much bigger would it be to upload and download unpacked?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#12 Post by puppyluvr »

:D Hello,
As stated above, to extract a tarball in Puppy, you simply click it, and xarchive will open and ask you where to unpack it to..

Unpack to /mnt/home and click the DirIcon..
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#13 Post by big_bass »

@Gilbert
[[ $PKG_FORMAT ]] || PKG_FORMAT=pet;PET2=1
This syntax also allows each build to have its' own settings, if needed, by setting them in the build script -although this is rarely useful.
does this work better ?
if so I can do a dialog version of it to generate that output from a GUI as an advanced setup with more possible options even if you include the new conf pre packaged
a front end would still be nice as an advanced option

and a source frontend to gather all the sources like spobkg does
that is already doable and done


Code: Select all

[[ $PKG_FORMAT ]] || PKG_FORMAT=pet;PET2=1 
[[ $ADD_SRC2PKG_SCRIPT ]] || ADD_SRC2PKG_SCRIPT="YES"
[[ $AUTO_DESKTOP  ]] || AUTO_DESKTOP=YES
DOCLIST=MINIMAL
[[ $FHS_POLICY  ]] || FHS_POLICY=NONE
[[ $FAIL_ON_BAD_DIRS ]] || FAIL_ON_BAD_DIRS=NO
[[ $SOURCES_DIR ]] || SOURCES_DIR="$CWD"
[[ $SOURCES_DIR ]] || SOURCES_DIR="$CWD"
[[ $SRC_BUILDS_DIR ]] || SRC_BUILDS_DIR="$CWD"
[[ $PKG_BUILDS_DIR ]] || PKG_BUILDS_DIR="$CWD"
[[ $PKG_DEST_DIR ]] || PKG_DEST_DIR="$CWD"
[[ $BACKUP_DIR ]] || BACKUP_DIR="$CWD"
COMPRESSION_SIZE_LIMIT=50 
Last edited by big_bass on Mon 08 Aug 2011, 13:42, edited 6 times in total.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#14 Post by nooby »

This part does work
As stated above, to extract a tarball in Puppy, you simply click it, and xarchive will open and ask you where to unpack it to..
It is the next part that fails. Don't know why.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#15 Post by 8-bit »

I think the name of the utility basically say it in the first word of "Developer".
The utility is not meant to be for the user that has no knowledge of the structure of an iso, SFS, tar.gz, etc.
For what the utility is, for a developer, it is handy. But the average user would need a course on linux in order to make use of it.
Adding a complete hand holding guide for the non- developer just is not an option.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#16 Post by nooby »

Ooops 8-bit you are right. I am no Dev so that is true. I apologize.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#17 Post by puppyluvr »

:D Hello,
As stated above, this tool is intended to help new users "get their feet wet"
If you are used to the commands, you prob have a few scripts lying about to do this stuff anyhow... :wink:
Remember, the CLI isnt your enemy, but instead a willing and helpful friend. Ask him how, he will tell you..
Wanna know how, for example, "tar" works, ask your friend, the CLI..
tar --help
@Nooby, CLI Lesson
Forget xarchive its a PITA anyhow..
In the directory where you D/L the tarball,
open a terminal and copy and paste this:
tar -xvf DevTools.tar.gz
Then hit enter...
DevTools is an AppRun, so you will see an icon appear in the directory.
Click it..

Then you can use it to pack/unpack in the future.. 8)
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#18 Post by 8-bit »

Ok, so I was wrong in my assumption. For that, I apologize.

I tried using it to make an iso of the contents of a 4gig autorun flash drive and did not get very far as some puppy files were not found.
I ended up using Pburn to burn a DVD data mode with the contents of the USB flash drive.
I also learned that links to an external source have to be absolute and not relative.

majorfoo
Posts: 448
Joined: Mon 07 Mar 2011, 22:27
Location: Wish I knew

#19 Post by majorfoo »

puppyluvr wrote::D Hello,
As stated above, this tool is intended to help new users "get their feet wet"
If you are used to the commands, you prob have a few scripts lying about to do this stuff anyhow... :wink:
Remember, the CLI isnt your enemy, but instead a willing and helpful friend. Ask him how, he will tell you..
puppyluvr - please don't stop working on this. I am trying to understand how the compile process works. I would like to compile from source. Also be able to change entries posted as tar.xxxxxx to pet files so hopefully they will be installed to proper location.
I vote for your continued support of this thread and look forward to more good stuff from you.

majorfoo

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#20 Post by puppyluvr »

:D Hello,
Still around, just been preoccupied by the so called "real world" ..LOL
The other parts of the program are simple scripts..
The compiling is handled by amigo`s src2pkg, which I need to make time to learn more about..
Actual compiling via the cli is much easier than making a gui that does it "automagically"...

As for tar to pet conversion..
tar xvf *.tar.gz
dir2pet *
Ex..
tar xvf "something".tar.gz
will create directory "something"
dir2pet "something"
will then turn it into a .pet

dir2pet will create a menu entry and a specs file...

Been working 7 days a week to keep afloat...
Puppy time, as with all "me time" is at a premium ATM...
I may slow down, but I aint stopping...
I have several things "in the fire" that I will be updating ASAP,
including this one...
As Catdude says.... Keep the faith....
Jay..
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

Post Reply