pUPnGO - 6Mb ISO - Basic Building Block Puplet

A home for all kinds of Puppy related projects
Message
Author
starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#631 Post by starhawk »

Got the *.tar.gz working -- apparently 7zip was flagging the .tar file as a directory in Windows (or Windows was making a very incorrect assumption!). I un-*.gz'd it using GZip (found on the 'net) and did the untarring with 7zip and it worked.

Gaah :roll: another reason to switch, albeit a small one. Either way: not your archive, my extracting methods.

I'll take a look at the Xorg pet you provided, as I've too little knowledge of how things work to know safely what to strip from a package.

EDIT: *.pet does not work. Install from within GUI = black screen, X cursor, nothing useful present. I think you cut out a little too much :lol:

I'll take a look at the original *.pet and see what I can do.

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#632 Post by starhawk »

I installed xorg 7.3-1 base, server, and drivers-full from the Puppy4 ibiblio repository, and "stole" (borrowed) the shell scripts xorgwizard, xrandrshell, xserverwizard, and input-wizard, from Puppy 412 not-retro.

I try to run xorgwizard and it doesn't work -- crashes instantly. xserverwizard says that gtkdialog2 is missing. My guess (although I can't read that fast) is that xorgwizard needs the same.

Is this something I can fix with a symlink, or do I need to learn to code something here?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#633 Post by technosaurus »

starhawk wrote:EDIT: *.pet does not work. Install from within GUI = black screen, X cursor, nothing useful present. I think you cut out a little too much :lol:
That means it works but you need a window manager ... jwm is the best supported and highly configurable

this is my hacky way to get X up without adding extra tools

Code: Select all

Xorg & sleep 5 && jwm -display :0
feel free to adjust the sleep value (some start in <1s others take up to 10s ... or you can use my static waitfordisplay that I posted some pages back)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#634 Post by goingnuts »

I haven't tested the xorg-pet in all the past pupngo versions but it works here in my test bench.... Try running xorgwizard from outside X (command prompt) that way you wont get the missing gtkdialog2 stuff. xorgwizard need some helpers to function (ddcprobe and dmidecode) although you can configure xorg via xorgwizard without if. Also some long options are used for grep and sort which the busybox version does not understand.
The xorg pet contains a xorgwizard modified to use gtkdialog1 (you can use the static versions provided in the programming area) - and with the described changes mentioned above.

After installing the xorg pet try starting X from command prompt with "xinit". If Xorg is symlinked to X and jwm startup is described in /root/.xinitrc - Xorg and jwm should start up ...

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#635 Post by starhawk »

Thanks, I'll try that.

BTW, a couple of general questions probably better for the Programming forum...

(1) what does it mean to "statically" compile something? (I know you don't rub it with Cling Wrap! :lol: )
(2) when you strip things down, how is that done? Do you delete unnecessary files out of *.pets, or do you actually rewrite lines of code? or both?

I'm a total n00b with this stuff.

EDIT: might want to take a look at the referred thread -- the two *.gz files (of which I need one) won't gunzip. I posted my troubles in that thread.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#636 Post by goingnuts »

1. static linked executables hold everything needed for it to run as a stand alone binary - that is: No external shared libraries needed. Many of the younger pUPnGO versions are composed of totally static linked binaries - that means the main sfs has no need for any shared libraries.
2. strip in the compiling sense - is removing everything unneeded for the binary to run (comments in the code, bypassed code-snippets etc.). Normally done by using the strip-program.

When I speak of stripping the xorg-packages for all unneeded stuff its a removal (delete) of files from the packages which is something different. Other names it "cut-the-fat"...

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#637 Post by starhawk »

"strip-program"...? What program? Where do I get it?

I want to learn this stuff too :o

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#638 Post by Ibidem »

technosaurus wrote:I will try to provide a patch for those (either by adapting from a bsd or bionic) if/as soon as rich changes this: http://git.etalabs.net/cgi-bin/gitweb.c ... NG;hb=HEAD
Sounds like Rob (or someone on his behalf) put a bee in his bonnet ... it really wasn't filling any unfilled niche as a smaller lgpl licensed c library, but as BSD it could really gain some steam...
If all goes well with musl that will render most of my idea to combine all of the essential lgpl libraries into a single shared library moot (though I still may combine v1.2.x of glib,gtk* & gdk*)
Technosaurus:
The time is now.
Rich Felker wrote:Hi everyone,
OK, here it is: the first release in the 0.9.0 series:

Milestone release covering all interfaces in ISO C99 and POSIX 2008
base. Relicensed under standard MIT license. New configure script
for easy build setup. Full stack protector and PIE support on i386
and x86_64 targets. Major floating-point math improvements and
fixes, application compatibility improvements (mostly legacy header
details), and additional bug fixes in dlerror and several wide
character functions.

http://www.etalabs.net/musl/releases/musl-0.9.0.tar.gz

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#639 Post by Ibidem »

starhawk wrote:"strip-program"...? What program? Where do I get it?

Code: Select all

strip --help
You should have it already if you can compile anything--it's part of binutils.

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#640 Post by RetroTechGuy »

starhawk wrote:"strip-program"...? What program? Where do I get it?

I want to learn this stuff too :o
It should be in the bundle with your compiler. Typically strips out all the un-needed junk (debugging info, etc) -- it makes the compiled program smaller.

So you just compiled a program called "starhawk" (the binary). Try this:

Code: Select all

ls -la starhawk

strip starhawk

ls -la starhawk
You should see that the binary is smaller afterwards.
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#641 Post by goingnuts »

8) I wonder...if I stripped goingnuts...would it be the going or the nuts that got smaller..?

starhawk
Posts: 4906
Joined: Mon 22 Nov 2010, 06:04
Location: Everybody knows this is nowhere...

#642 Post by starhawk »

Probably it would just take out the vowels and you'd be gngnts :lol:

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#643 Post by technosaurus »

goingnuts wrote:8) I wonder...if I stripped goingnuts...would it be the going or the nuts that got smaller..?
before you do, you should set up a paypal account for tips
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#644 Post by RetroTechGuy »

goingnuts wrote:8) I wonder...if I stripped goingnuts...would it be the going or the nuts that got smaller..?
From coconuts, down to pine nuts... ;-)
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#645 Post by goingnuts »

Thank you for your support for the above strictly hypothetic question about stripping and goingnuts... :lol:
Hard to pickup with some boring stuff but I will give it a try:
Some time ago I made a mcb holding the following programs

Code: Select all

cdrecord genisoimage growisofs mkisofs mksquashfs3.0 mksquashfs4.0 wodim
(the cdrecord and mkisofs being symlinks to wodim and genisoimage)
I later found that mksquashfs4.0 is not needed if you have mksquashfs3.0.
When trying to rebuild it failed - as I have later changed my uclibc - from buildroot environment to standalone uclibc.
The problem is the cdrkit which is a pain to build. So looked at alternatives and got an interesting tour in history with the cdrkit versus cdrtool. Found an early source of mkisofs (mkisofs-1.12b5) giving a clear build with uclibc only 78K static. But it misses some functions. So looked at the cdrtools (cdrtools-1.10) but as with cdrkit the build is a pain. I guess those build systems that seems to haunt the cd-packages has a purpose but I wish they also was shipped with an ordinary configure&make opportunity. Btw. cdrtools-1.10 gave me a 180K cdrecord and a 286K mkisofs static build (versus cdrkits wodim 322K and genisoimage 618K). No doubt some newer features is missing but I only need it for the save-pup-to-cd/dvd...
Update: I was a little to quick above: The 1.10 cdrecord wont support my writer and a build from the 2.01 version only supports cdrw and not dvd. But at least the mkisofs works and saves some 300K...

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#646 Post by goingnuts »

Need a small CD-player? Attached two different:
* cdtool-2.1.8 which also include tools for getting cddb output.
*dcd-0.99.2 - a more simple player.
Both need the hardware cabling from your CD/dvd-drive to your soundcard/motherboard being present...and remember to un-mute CD in audio mixer and turn up the volume as well...
Both might be handy back ends for a gtkdialog gui-frontend
Attachments
cdtool-2.1.8-i486.pet
static build CLI CD-player + other CD-utilities
(68.82 KiB) Downloaded 466 times
dcd-0.99.2-i486.pet
static build CLI CD-player
(19.2 KiB) Downloaded 452 times

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#647 Post by goingnuts »

After making the gtkman for gktdialog1 I tried to run it in pupngo. But found that although man-bin is static build it wont work. Turns out that man depends on at least tbl and nroff which in turn depends on different auxiliary macro-files.
All that just to view a man page that is "readable" by command "cat"...
tbl is quite easy to build static but nroff did not turn out easy. They belong to GNU groff-package which I did not manage to do a normal build of. Another source is The Heirloom Documentation Tools - all c-code and state that build with diet libc can be done. I tried diet but my version is 0.31 and I think it needs at least version 0.32 of diet libc (needs wctomb). But I managed to hack my way to a final static build of tbl and nroff - just to realize that although working they seems not to work well with man-expectations - some demand of -mandoc that I was not able to fullfill.
Btw. busybox man also needs tbl and nroff/troff/groff (it needs gtbl which is a symlink to tbl).
Another solution here. awf is a man-page formatter based on awk-macros and it does a decent job!
A third solution is to use the man2html - which is a standalone app with no need for auxiliary progs - and then use sed to remove the HTML-tags. man2html is part of the original man page.
The forth solution is to use sed on the raw man-page as well (guess awk would work too).
So ended up with a draft for gtkman version 0.2 where at least the sed-only and the man2html method gives reasonable output in pupngo - but with a lot of room for improvement...Maybe a project target for some sed -or awk-sharks?
The present draft code below:

Code: Select all

#!/bin/ash
#simple demo for gtkdialog1 to view text formated man pages
#May 2012 goingnuts
#v0.1 needs original man - will not work with busybox man
#v0.2 liberate it from the man bin/use other ways...
#depending on the system one of the below will be used:
VIEW_ME=4	#simple sed - improve it please!

[ $(which awf) ] && VIEW_ME=3	#view http://awk.info/?tools/awf

[ $(which man2html) ] && VIEW_ME=2	#part of org man pkg

[ $(which man) ] && [ $(which tbl) ] && [ $(which nroff) ] && VIEW_ME=1 #for systems with all it takes for man to work

echo "Using methode $VIEW_ME" #just to know what is going on...

#hardcode mandirs...
MANDIRS="/usr/share/man /usr/man /usr/local/man"

echo > /tmp/gtkman

#create list of man-files present in system
COMBOLIST="<item>Select page to view</item>"
#v0.2
mandirs=$(find ${MANDIRS} -type f)

for file in $mandirs; do
	name=$(basename ${file})
	name=$(echo ${name%.*})	#for .gz
	name=$(echo ${name%.*})	#for .1
	COMBOLIST="$COMBOLIST<item>$name</item>"
done

#ash function file
echo '
view_me1 () {
	man -P cat ${1} 2> /dev/null | sed "s/.`echo -e\\\b`//g" | sed "s/.^H//g" | sed "s/.\x08//g" > /tmp/gtkman
}

macro_2 () {
	sed -e "s/<[^>]*>//g" | \
	sed -e "s/\</</g" | \
	sed -e "s/\&nbsp;/ /g" | \
	sed -e "s/\>/>/g" | \
	sed "/^$/d"
}

view_me2 () {
	if [ ! $1 = "Select" ]; then
		manfile2view=$(find /usr -name ${1}.1*)
		if [ $(echo ${manfile2view##*.}) = "gz" ]; then
			zcat $manfile2view | man2html | grep -v "Content-type: text/html" | macro_2 > /tmp/gtkman
		else 
			man2html $manfile2view | grep -v "Content-type: text/html" | macro_2 > /tmp/gtkman
		fi
	fi
}

view_me3 () {
	if [ ! $1 = "Select" ]; then
		manfile2view=$(find /usr -name ${1}.1*)
		if [ $(echo ${manfile2view##*.}) = "gz" ]; then
			zcat $manfile2view | awf -man | sed "s/.`echo -e\\\b`//g" | sed "s/.^H//g" | sed "s/.\x08//g" > /tmp/gtkman
		else
			awf -man $manfile2view | sed "s/.`echo -e\\\b`//g" | sed "s/.^H//g" | sed "s/.\x08//g" > /tmp/gtkman
		fi
	fi
}

macro_4 () {
	sed "s/.B //g" | \
	sed "s/.I //g" | \
	sed "s/.TP//g" | \
	sed "s/.PP//g" | \
	sed "s/.LP//g" | \
	sed "s/.TH //g" | \
	sed "s/.SH //g" | \
	sed "s/.BR //g" | \
	sed "s/.RI //g" | \
	sed "s/.BI //g" | \
	sed "s/.RI \[\\\| \\\//g" | \
	sed "s/.I \\\//g" | \
	sed "s/.br/\n/g" | \
	sed "s/fI//g"	
}


view_me4 () {
	if [ ! $1 = "Select" ]; then
		manfile2view=$(find /usr -name ${1}.1*)
		if [ $(echo ${manfile2view##*.}) = "gz" ]; then
			zcat $manfile2view | macro_4 > /tmp/gtkman
		else
			cat $manfile2view | macro_4 > /tmp/gtkman
		fi
	fi
}

' > /tmp/ashfunc

export MAIN_DIALOG='
<wtitle>gtkman</wtitle>
<vbox>
	<hbox>
		<button>
			<label>Quit</label>
			<input file>exit.png</input>
		</button>
	</hbox>
	<combobox>
		<variable>MAN_LIST</variable>
		'${COMBOLIST}'
		<action>view_me'${VIEW_ME}' ${MAN_LIST}</action>  
		<action>clear:EDIT</action>
		<action>refresh:EDIT</action>
	</combobox>
	<frame manpage view>
		<edit>
			<width>500</width>
			<height>300</height>
			<input file>/tmp/gtkman</input>
			<variable>EDIT</variable>
		</edit>
	</frame>
</vbox>
'

gtkdialog1 --center --wmclass gtkman --program=MAIN_DIALOG -i /tmp/ashfunc

#clean up
rm -f /tmp/gtkman
rm -f /tmp/ashfunc

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#648 Post by technosaurus »

Nice, we have needed a decent manpage viewer for a while.

As per our previous discussion on reducing xpm images I finally got around to patching mtpaint to support saving xpm images with 92 colors per character vs 64. It makes for a bit nicer looking reduced images, and also bumps support for over 8000 colors vs. ~4000.

the patch is here:
http://www.murga-linux.com/puppy/viewto ... 164#631164
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

PANZERKOPF
Posts: 282
Joined: Wed 16 Dec 2009, 21:38
Location: Earth

#649 Post by PANZERKOPF »

Another small tools for mentioned above purposes:
Rman - standalone man page converter (converts man to html or plain text)
asm-toys - multicall tool, includes simple cdplayer
asmutils - coreutils,util-linux, netutils, shell and some other tools including cda2raw
Attachments
asm-toys-0.2.1.tar.gz
(80.17 KiB) Downloaded 493 times
rman_3.2.tar.gz
(77.54 KiB) Downloaded 452 times
SUUM CUIQUE.

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#650 Post by Ibidem »

Busybox had an nroff patch once which I dug up and updated...
I'll have to see if I can find it again :roll:

Post Reply