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 21 Oct 2014, 23:13
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Puppizard 008
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 3 of 5 Posts_count   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Sat 25 Jun 2011, 09:07    Post_subject: puppy ports 003
Sub_title: i386 vs. i686
 

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 Exclamation

Edited_times_total
Back to top
View user's profile Send_private_message 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Sun 26 Jun 2011, 17:08    Post_subject: Puppy Ports 003
Sub_title: GUI
 

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. Smile

This could be called get stuck

I would call it unexpected behavior.
Back to top
View user's profile Send_private_message 
SimpleWater

Joined: 19 Apr 2011
Posts: 95

PostPosted: Mon 27 Jun 2011, 04:53    Post_subject:  

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?
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Wed 29 Jun 2011, 15:41    Post_subject:  

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 Laughing

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 30 Jun 2011, 16:25    Post_subject:  

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:
#!/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 Very Happy

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
noryb009

Joined: 20 Mar 2010
Posts: 539

PostPosted: Thu 30 Jun 2011, 21:51    Post_subject:  

Great start, Iguleder!

I found a bug: Open the GUI, and immediately click and hold the scrollbar. Once it's done loading all the scripts, let go. The packages added to the list while you had the scroll bar held would have $something as the version
I only tested it on the first opening, on lupu 520.

A few suggestions:
- with the GUI, open a terminal window with minimal output (downloading, building, etc.)
- have an "Update scripts" command - much easier then making a new version
- warn about approximate size of download/space used after install
- option to install, make a pet, or both (or at least run tgz2pet on the .tgz file)

It's looking good, keep it up!
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 01 Jul 2011, 01:48    Post_subject:  

I rewrote the whole backend, now I also want to write a script called "installpkg" and form a mini-package manager, for two reasons:
- PPM ruins packages by modifying .desktop files, it makes menus ugly on DEs and full-blown WMs, especially E17
- I want to utilize XZ compression instead of the traditional gzip

Regarding package update, the algorithm needed to update a package is simple:
Quote:
build the new package
remove the old package
install the new package


I want to rebuild the GUI and make it run the build script through a terminal window, to make things easier.

And regarding the needed space - there's nothing I can do, since you can't estimate the binary package size.[/quote]

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Fri 01 Jul 2011, 11:34    Post_subject:  

I think it's a great idea to have a central depository of build scripts for the community.
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Sat 02 Jul 2011, 01:50    Post_subject:  

Good news, "installpkg" and "removepkg" are implemented. Still not heavily tested, but I've managed to install and remove aterm successfully.

Now it's time to rewrite the GUI and add more build scripts Smile

EDIT: the new GUI is here; see the changes Smile
puppizard-new.jpg
 Description   
 Filesize   43.83 KB
 Viewed   933 Time(s)

puppizard-new.jpg


_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Tue 05 Jul 2011, 12:44    Post_subject: Puppizard 004  

Iguleder wrote:
Good news, "installpkg" and "removepkg" are implemented. Still not heavily tested, but I've managed to install and remove aterm successfully.


my test building opera:

# pwd
/root/operabuild
# installpkg opera
Usage: installpkg [PACKAGE]
# installpkg opera-11.50-1074-1-i386.pxz
tar: Record size = 16 blocks
usr/
usr/share/
usr/share/opera/
{ cut off }
usr/bin/
usr/bin/opera-widget-manager
usr/bin/opera
# opera &
[1] 24911
# Smile

aterm
removing aterm made console unusable. (I had to remove the links) Crying or Very sad
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Tue 05 Jul 2011, 13:29    Post_subject:  

That happens for a good reason, the Aterm build script ovverides rxvt/urxvt for compatibility.

Once you remove Aterm, you have no terminal emulator.

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
noryb009

Joined: 20 Mar 2010
Posts: 539

PostPosted: Wed 06 Jul 2011, 08:54    Post_subject:  

Looking a little better!

A few things you might want to add:

- check if the files are already downloaded
- have some way to list the scripts from the command line
--- maybe be able to search?
- When using the GUI, it doesn't start downloading/compiling until after you close the message box. Can you start them at the same time?
- A way to update packages from a central repository

How do we submit scripts? Just post them here?
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 07 Jul 2011, 14:25    Post_subject:  

Yep! They're yours. You can even post them at the PETs thread if that's acceptable.

Regarding the bugs - I'll do a bug-hunting round this weekend. Thanks for reporting!

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
noryb009

Joined: 20 Mar 2010
Posts: 539

PostPosted: Thu 07 Jul 2011, 14:44    Post_subject:  

Just a question, how are you going to do (large) dependencies?
Back to top
View user's profile Send_private_message 
Iguleder


Joined: 11 Aug 2009
Posts: 1922
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 07 Jul 2011, 14:59    Post_subject:  

No dependency handling at all. The base assumption is that this tool is supposed to be simple enough to make it clear enough for users that package X depends or Y, or simple have only packages that don't have extra dependencies.
_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
Display_posts:   Sort by:   
Page 3 of 5 Posts_count   Goto page: Previous 1, 2, 3, 4, 5 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1051s ][ Queries: 12 (0.0194s) ][ GZIP on ]