Page 1 of 4

Posted: Fri 24 Jun 2011, 15:52
by russoodle
Thank you, Iguleder....i've uploaded them to my site, so there'll be an additional d/l location for them.

There are a number of random .pets in there, so they're in a named folder to make them easier to find. The url is:
http://www.puppylinuxstuff.meownplanet. ... /Iguleder/

Posted: Fri 24 Jun 2011, 18:26
by jpeps
Nice idea. I just used it to update Homebank. The GUI got stuck, but running "pur-build homebank" from the command line immediately produced a prompt requesting installation of the targz. It doesn't search for a previously installed desktop file, so created another menu entry without an icon. Since the files were updated, deleting the file left the original loading the updated version in Lucid 5.2.5. Thanks for the useful app!

Posted: Fri 24 Jun 2011, 18:30
by Iguleder
It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.

Regarding the menu entry - yes, the menu looks horrible unless you use some normal icon theme (e.g the GNOME one) with a full-featured DE or WM (Xfce, E17, etc').

Posted: Fri 24 Jun 2011, 18:37
by jpeps
Iguleder wrote:It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.
Yeah, it did. I went out to do an errand, and came back a few hours later and the original "building homebank" (or something to that effect) was still there. I closed it out, and tried running the CLI, and the installation GUI appeared.

Posted: Sat 25 Jun 2011, 09:50
by Sylvander
Could someone list the steps they've taken during the successful use of this?

So that perhaps even a non-expert like myself may be able to use it?

Some key terms may need to be explained.
e.g.
What is a "source" [I've seen "source code" mentioned in my travels]
Stripping and trimming a package->of what?
What are "Static Libraries"?

p.s. Added a link to this thread in my PC-Guide->"Puppy Linux" thread. :D
So I ALWAYS know how/where to find it.
And so will others.

Posted: Sat 25 Jun 2011, 10:03
by nooby
Sylvander wrote: What is a "source" [I've seen "source code" mentioned in my travels]
wiki to rescue

http://en.wikipedia.org/wiki/Source_code
In computer science, source code is text written in a computer programming language. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source code, which can then be automatically translated to binary machine code that the computer can directly read and execute.

An interpreter translates to machine code and executes it on the fly, while a compiler only translates to machine code that it stores as executable files; these can then be executed as a separate step.

Most computer applications are distributed in a form that includes executable files, but not their source code, which is only useful to a computer programmer who wishes to understand or modify the program.

The source code which constitutes a program is usually held in one or more text files stored on a computer's hard disk; usually these files are carefully arranged into a directory tree, known as a source tree.

Source code can also be stored in a database (as is common for stored procedures) or elsewhere.


The most important thing about source code is that it allows others to understand how the program is set up to achieve it's goals and if the documentation the human comments that is for us to read and the computer to ignore is that one can modify it so it suites our need. That is why we have "Free Open Source Software" FOSS so we don't have to pay incredible high sum to use that code?

QNX OS that is used now in latest RIM BlackBerry Playbook most likely is proprietary source code that you need a license to use.

Some 25 years ago I trusted the then "dogma that everybody can learn anything if one set ones mind to it and that talent was another word for hard work" so I tried to learn Assembler and C++ and all the other computer languages. It was not true. Not everybody can be a programmer.

Posted: Sat 25 Jun 2011, 10:06
by Iguleder
Software is written in programming languages, which define a certain syntax in which software can be written. This text (i.e, code) defines the algorithm and the flow of the program. In other words, the code of a program is written in a programming language and defines what the program does.

However, computers don't speak programming langauges - they speak machine language, which consists of long sequences of 0 and 1 - 1 indicates high voltage and 0 indicates little or none.

The procedure in which a software product is converted from the human-readable programming language into machine language is called compiling; the tool that performs this operation is a compiler. In our case, it's GCC, GNU's compiler.

The compiled software (i.e in the format the computer can understand and run) is called a binary package ("binary language" is a synonym for "machine language"), while the code (the text written in a programming language) is called the source; that's the source code.

Packages come in two forms: source packages and binary packages. For example, Slackware's packages come as binary packages, after someone compiled them for you. You just install the binary package and that's it. However, each package is built using a build script which patches the source package, compiles it and turns it into a binary package.

This tool allows you to automatically download a source package and build it using a build script that comes with the tool, in order to produce a binary package on your computer and not on someone else's computer.

Regarding static libraries - there are two kinds of libraries. One called "shared libraries" - these libraries appear once on the system and each application which relies on them simply loads them. The other kind is "static libraries" - these are compiled into the package that rely on them, so each application has its little, built-in copy. This wastes space but provides a very marginal performance gain; Puppy's approach is to use shared libraries, as many as possible, because static libraries waste space.

Puppy Ports 002

Posted: Sat 25 Jun 2011, 10:22
by L18L
Sylvander wrote:Could someone list the steps they've taken during the successful use of this?
simple steps I have used to get latest full featured yad:
- install pur-tools-o.2.pet (see 1st post)
- Menu > System > Puppizard
- select yad
- needed some patience
- yad 0.12.2 was offered to be installed

Really easy :)
Thank you iguleder
Edited
and thank you for your example of simple English too :wink:
edited once again
yes devx of course

Re: Puppy Ports 002

Posted: Sat 25 Jun 2011, 10:25
by nooby
L18L wrote:
Sylvander wrote:Could someone list the steps they've taken during the successful use of this?
simple steps I have used to get latest full featured yad:
- install pur-tools-o.2.pet (see 1st post)
- Menu > System > Puppizard
- select yad
- needed some patience
- yad 0.12.2 was offered to be installed

Really easy :)
Thank you iguleder
Sylvander if I get it this means he already had Devs sfs installed?

Posted: Sat 25 Jun 2011, 10:38
by Iguleder
Uploaded a version with small bug-fixes and overall cleanup.

I'm also uploading a new kernel I just built (using a script, too ... hehe) ... my puplet sense tickles :wink:

pur

Posted: Sat 25 Jun 2011, 11:31
by L18L
Iguleder wrote:Uploaded a version with small bug-fixes and overall cleanup.
Now my unspoken question where to get advancecomp and optipng from in answered.

BTW, compiling from source means that compiler is using i686 if on a 686 machine. Right?

Thanks again.

Posted: Sat 25 Jun 2011, 11:37
by Iguleder
Install AdvanceCOMP and OptiPNG through Puppizard itself :)

The packages won't be ultra-stripped, so after you install them, do another round.

And regarding the i686 issue - see /usr/share/pur/profiles/default. The default CFLAGS are "safe" - i386 and size. I don't know why, many say i386 optimization makes packages uber-fast and it works well for me.

Posted: Sat 25 Jun 2011, 11:53
by nooby
AJ told me that Vector Linux was compiled from Arch but done for 486 while Arch Linux themselves compiled for 686.

And you talk about 386? How come that different Devs prefer different compile targets like that?

pur

Posted: Sat 25 Jun 2011, 12:01
by L18L
Iguleder wrote:And regarding the i686 issue - see /usr/share/pur/profiles/default. The default CFLAGS are "safe" - i386 and size. I don't know why, many say i386 optimization makes packages uber-fast and it works well for me.
Mh, hard to believe (the uber-fast), i386 had no floating point algebra

But why not just try, measure and compare it?
Using cpufamily in /proc/cpuinfo.

Anyone else interested in investigation of this?
edited
I am trying now

Code: Select all

case $(uname -m) in
	i686)
		LIBDIR_SUFFIX=""
		CFLAGS="-march=i686 -Os -fomit-frame-pointer -pipe "
		ARCH="i386"
		;;
	i?86)

Posted: Sat 25 Jun 2011, 12:08
by Iguleder
Just remove the CFLAGS and CXXFLAGS from /usr/share/pur/default/profile and packages will automatically build with optimizations suitable for your system.

Regarding the FPU thing - these are just optimizations, it doesn't mean your FPU isn't used.

puppy ports 003

Posted: Sat 25 Jun 2011, 13:07
by L18L
Thank you,
it will take some time on my 1.5GHz, now I will logout.

Edited 2011-07-05
There are some marginal differences in size.
# pwd
/mnt/+initrd+mnt+dev_save+wary511q+warysave.3fs/root/test686/686/usr/bin
# ls -l
total 464
-rwxr-xr-x 1 root root 108724 2011-06-26 15:44 advdef
-rwxr-xr-x 1 root root 129536 2011-06-26 15:44 advmng
-rwxr-xr-x 1 root root 96448 2011-06-26 15:44 advpng
-rwxr-xr-x 1 root root 118248 2011-06-26 15:44 advzip
#
# pwd
/mnt/+initrd+mnt+dev_save+wary511q+warysave.3fs/root/test686/386/usr/bin
# ls -l
total 464
-rwxr-xr-x 1 root root 108724 2011-06-26 15:32 advdef
-rwxr-xr-x 1 root root 129472 2011-06-26 15:32 advmng
-rwxr-xr-x 1 root root 96448 2011-06-26 15:32 advpng
-rwxr-xr-x 1 root root 118052 2011-06-26 15:32 advzip
#

i386 is making smaller files :!:

Puppy Ports 003

Posted: Sun 26 Jun 2011, 21:08
by L18L
jpeps wrote:
Iguleder wrote:It doesn't get stuck - Homebank has heaps of PNG files and optimizing them takes ages.
Yeah, it did. I went out to do an errand, and came back a few hours later and the original "building homebank" (or something to that effect) was still there. I closed it out, and tried running the CLI, and the installation GUI appeared.
My observation is:
pur-gui started from command line makes a messages at top of screen.
I went out too, came back and waited and waited ....
The process started after hovering the messages. It was very fast then. :)

This could be called get stuck

I would call it unexpected behavior.

Posted: Mon 27 Jun 2011, 08:53
by SimpleWater
Not to be a downer or anything, but does this method not provide more work? Would it not be easier if you could do something like "pur build http://website.org/source.tgz"? Or what about a script that makes a build script?

Posted: Wed 29 Jun 2011, 19:41
by Iguleder
No, of course not... how can you make the computer able to understand what a sources tarball contains? How is the script supposed to determine the package in the tarball and how to build it?

And what if it needs some patching or special care to be built correctly? :idea:

And if you want a script that generates build scripts - build a robot that resembles the human brain and spirit perfectly. Then program the AI :lol:

Posted: Thu 30 Jun 2011, 20:25
by Iguleder
Just to let you know, guys - I'm working on an improved version of the whole thing. This one is safer and smarter in many areas.

I also wrote an Opera build script, which makes a package from the official Opera installer - quite useful for keeping the system clean.

Here's what the new aterm build script looks like:

Code: Select all

#!/bin/sh

PKG_NAME="aterm"
PKG_VER="1.0.1"
PKG_REV="1"
. /usr/share/pkg/default

download() {
	# download the sources
	for file in ftp://ftp.afterstep.org/apps/$PKG_NAME/$PKG_NAME-$PKG_VER.tar.bz2 http://www.afterstep.org/data/php/desktop/icons/rxvt.png
	do
		wget $file
		[ $? -ne 0 ] && return 1
	done
	return 0
}

build() {
	# extract the sources
	tar -xvf $PKG_NAME-$PKG_VER.tar.bz2
	[ $? -ne 0 ] && exit 1

	cd $PKG_NAME-$PKG_VER

	# configure the package
	CFLAGS="$CFLAGS" ./configure $BASE_CONFIGURE_ARGS --prefix=/usr \
	                             --disable-utmp --disable-wtmp \
	                             --disable-kanji --disable-big5 \
	                             --disable-greek --disable-thai \
	                             --disable-ttygid --enable-xgetdefault \
	                             --disable-memset --disable-dmalloc \
	                             --disable-dlmalloc --disable-gdb \
	                             --disable-sigsegv --enable-transparency \
	                             --without-libefence --disable-fading \
	                             --disable-background-image \
	                             --disable-next-scroll --enable-xterm-scroll \
	                             --disable-menubar --disable-graphics \
	                             --disable-half-shadow 
	[ $? -ne 0 ] && return 1

	# build the package
	make -j $BUILD_THREADS
	[ $? -ne 0 ] && return 1

	return 0
}

package() {	
	# install the package
	make DESTDIR=$INSTALL_DIR install
	[ $? -ne 0 ] && return 1

	cd ..
	
	# create symlinks for compatibility with existing stuff that rely on rxvt
	ln -s aterm $INSTALL_DIR/usr/bin/rxvt
	ln -s aterm $INSTALL_DIR/usr/bin/urxvt
	ln -s aterm $INSTALL_DIR/usr/bin/xterm

	# create a menu entry
	mkdir -p $INSTALL_DIR/usr/share/applications
	echo '[Desktop Entry]
	Encoding=UTF-8
	Name=Aterm
	GenericName=Terminal emulator
	Comment=command line shell
	Exec=aterm
	Icon=aterm
	Type=Application
	Categories=Utility;TerminalEmulator;' > $INSTALL_DIR/usr/share/applications/aterm.desktop

	# add the icon
	mkdir -p $INSTALL_DIR/usr/share/pixmaps
	mv rxvt.png $INSTALL_DIR/usr/share/pixmaps/aterm.png
	
	return 0
}
There's a wrapper called "buildpkg" which runs the build scripts in a dedicated directory and takes care of all error handling. It also takes care of the package creation, so this code appears only once. Makes life easier.

Tomorrow I guess I'm gonna rewrite many of the build scripts in the new format and build another E17. I did a rebuild today and I see E17 improves with every revision :D