Tiny Core Base > TCB Talk

Potential solution for lack of extensions - source based package manager

<< < (2/2)

tobiaus:

--- Quote from: Juanito on March 31, 2009, 01:09:42 AM ---You should give compiling in tc a go - it's not difficult and there are many people in the forum that would be glad to help.

--- End quote ---

i don't want to contradict you. this is something i really don't know much about, and besides i'd really prefer that you're right. however i've tried to compile several things, and only zile compiled, and when i asked for help there was a (very speedy, very polite) reply offering a link to a page on the lfs website that... to be honest, showed me just how beyond me compiling really is. most of the things i'm interested in compiling do not have fancy gui's, but ncurses seems to present just as much of a challenge.

curaga:
The issue with a source-based package manager is that all packages have their quirks.
One that applies to all is the url / mirrors. Then package X might not compile with certain optimizations. Or package Y might install things in a non-wanted place with just "./configure".

So, it would require a bit more work, as to create a "recipe" one needs to actually do the compile. To use some other distro's recipes would mean not only being dependent on them, but also that we'd need to match their base and configuration. Otherwise we'd need to change their recipes, which possibly could not be automated.

tobiaus:
in other words, instead of creating an extension, you'd have to create something like this:

readme
home.url the url of the project page
src.url the actual url of the source package
makeinstall.sh a wrapper script for make install
makescript.sh a wrapper script for make
configurescript.sh a wrapper script for configure

home.url and src.url could be multiline, but these would be as simple as any other tc system, they could be one url per line without other information, like a dep list.

you could call it ".tcs" it wouldn't require changing the getting started page, because it wouldn't be a "mode" for running tc, to make tc compile its extensions on each boot. it would simply be a third type of extension for people that want to create source based packages. it could become as popular as tce and tcz, but i believe it will play a supporting role.

sourcemage is a very cool distro. i've never used it but i like the idea. i tried to compile moc today. as usual it checked a lot of things, it got to configure or make and started telling me why it wasn't going to compile. .tcs files could be collected and used to create documentation and howtos for compiling like experts. it would be a feature that is still very rare in distros, very faithful to the idea of gnu and linux, and possibly help to give tc an even larger place in the world of distributions. but the first thing tc should be is simple. i'm hoping this is a very simple way to do what sourcemage does in tc.

Jason W:
While we are not using a source based package manager, I do think we would benefit from having a build script for each package.  Not to mention the GPL requires it unless you are hosting the configured source.  They don't have to be overly complex or automatic though they can be.  You build and submit a package today, and say a year later you may be no longer around.  With a recipt/build script someone can easily update or recreate your package ir if needs updating or fixing.  Something as simple as this would make it easy to recreate your extension:


--- Code: ---#!/bin/bash

# Needed dependencies: gtk1.tcel glib1.tcel openssh-0.9.8h.tcel
# Needed files: xmms-1.2.11.tar.gz xmms_doublesize.patch

export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig

tar xzvf xmms-1.2.11.tar.gz
cd xmms-1.2.11
patch -p1 < ../xmms_doublesize.patch
sed -i 's:-lXxf86vm::g' configure
./configure --prefix=/usr/local --disable-mikmod --disable-nls --enable-oss --disable-esd --disable-opengl --disable-alsatest

make
make DESTDIR=/mnt/hda2/pkg install
rm -r /mnt/hda2/pkg/usr/local/man
cd /mnt/hda2/pkg/
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null

# create extension now, can automate if desired

--- End code ---

It takes a few more minutes to make a script for each package but it saves time in the long run when you want to update it or have to rebuild it.  I had to rebuild my extensions a few months back for i486 compatibility and believe me, having a build script for each one saved me countless hours.

While on the subjuct, please do remember and send in a build script with GPL licensed extensions as we are required to have one along with the source.

Navigation

[0] Message Index

[*] Previous page

Go to full version