alternative puppy build system

A home for all kinds of Puppy related projects
Message
Author
s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#381 Post by s243a »

wldmpkx was correct, fixing the missing DISTRO_SPECS error, got me further along in the boot process. I didn't think it would because the boot process was getting past this point prior to me fixing the error. Anyway, here is my fix:

Code: Select all

[ ! -e /pup_new/etc/DISTRO_SPECS ] && \
  cp /DISTRO_SPECS /pup_new/etc/DISTRO_SPECS
/initrd-progs/0initrd/init#L1396

After fixing this I got to errors about not being able to open the following shared libraries:

Code: Select all

libpcre.so.3       #A dependency of grep
libsystemd.so.0 #A dependency of free
These errors occured because /etc/profile isn't called until after the end of /etc/rc.sysinit.

There are a few ways, that one could fix this which include:
1. symlink these two libs into the default search path
2. move these two files into the default search path
3. move the entire folders where these libs are included into the default search path and replace the orginal folder with a symlink to the new location.
4. call the busybox version of these functions instead in rc.systinit.
5. call ldconfig so that the location of these libs gets put into cash. Requires configuring ld.

Dpup stretch uses approach #3, I chose approach #5. Here is my ld.so.conf

Code: Select all

/usr/local/lib
/lib
/usr/lib
/root/my-applications/lib
/usr/local/lib
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/usr/lib/i386-gnu
when I call ldconfig I am told to remove some of these paths because they are default. I sill need to decide where to put this file. I think I will write a script to generate it based on the existence of the above paths.

Anyway, assuming one installs this into their root fs, then at the end of the basesfs config file (prior to trimming the packages), we can do the following:

Code: Select all

%reinstall libc-bin #contians ldconfig
%chroot ldconfig
/woof-distro/x86/tiny_devuan/ascii/basesfs#L266

Some other random notes. I added some debugging and lagacy code back into initrd to support the case that the kernal does not have devtmps. Wdlkmpx, says that this is need only for kernals woof-CE compiled kernals prior to 3.2 (i.e. warry/racy and earlier).

Here is the lagacy and debugging code that I added:


in build-iso.sh->install_initrd()

Code: Select all

    tar -xzf "$WOOFCE/woof-arch/woof-code_boot_initrd-tree0_DEVDIR.tar.gz" \
        -C "$initrdtmp"
    mv "$initrdtmp"/dev "$initrdtmp"/dev2
mkdir "$initrdtmp"/dev
    #cp "$WOOFCE/woof-arch/woof-code_rootfs-skeleton_DEVDIR.tar.gz" "$initrdtmp/dev1.tar.gz"
cp "$WOOFCE/woof-arch/woof-code_rootfs-skeleton_DEVDIR.tar.gz" "$initrdtmp/dev2.tar.gz"
/builders/build-iso.sh#L95

Code: Select all

exec 1>/dev2/console 2>&1 #s243a
/initrd-progs/0initrd/init#L59
**We use /dev2 because if we are dumping startup debugging info to /dev/console then we can't move or delete this folder because it will be busy. The solution is to add the console device file to /dev2.

Code: Select all

if [ "`mount | cut -f 1 -d ' ' | grep devtmpfs`" = "" ] ; then
  rm /pup_new${TMPFS}/dev 
  mkdir /pup_new${TMPFS}/dev 
  ( cd /pup_new${TMPFS}/dev ; tar -zxf /dev2.tar.gz ; ) #no devtmpfs
fi
/initrd-progs/0initrd/init#L1425

Code: Select all

if [ ! "`mount | cut -f 1 -d ' ' | grep devtmpfs`" = "" ] ; then
  umount /dev
fi
/initrd-progs/0initrd/init#L1444

Code: Select all

[ ! -e /etc/DISTRO_SPECS ] && cp /initrd/DISTRO_SPECS /etc/DISTRO_SPECS
/builders/build-iso.sh#L95

Code: Select all

  #Coped removed code from: s243a: https://github.com/puppylinux-woof-CE/woof-CE/commit/54ef39153265bc8e032179f188c172d15b5f02f0
  # if devtmpfs fails, we're probably dealing with old stuff...
  # 
  if [ ! -e /dev/tty ] ; then
	if [ "`mount | cut -f 1 -d ' ' | grep devtmpfs`" = "" ] ; then
		tar -zxf /dev2.tar.gz  #no devtmpfs
		( cd / ; tar -zxf /initrd/dev2.tar.gz ; ) #no devtmpfs
		echo "Failed to mount devtmpfs" > /dev/console
	fi
fi
/etc/rc.d/rc.sysinit#L106


Note that there is some redundancy here between /etc/rc.d/rc.sysinit and /initrd0/init but this might make it so that one of these files can be replaced and have the system still boot up successfully.

On another note I put the /etc/fstab files into the following two packages:
/puppycore_users/etc/fstab
/tinycore9_base_gz_users/etc/fstab

The reason being is that at least on dpup stretch I see some user specific settings in fstab:

Code: Select all

none /dev/pts devpts gid=2,mode=620 0 0
/puppycore_users/etc/fstab#L3

Note that in the official woof-CE fstab is blank, so I copied the file from dpup stretch here. On dpup stretch here is what we have for group 2:

Code: Select all

tty:x:2:
and the corresponding entry (in dpup stretch) in inittab is:

Code: Select all

tty2::respawn:getty 38400 tty2
Edit:
It boots with all of the above changes except the /etc/rc.sysinit change. I will update github later tonight with the fix.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#382 Post by s243a »

The following looks like something that we might want to include in woof-next:

mistfire wrote:
I made some improvements on the tazpup builder. The builder now supports file stripping. This will strip the unstripped executable files, library files, and kernel modules in order to make tazpuppy even smaller. But it requires devx sfs installed on host puppy to enable this option. Already stripped files will be ignored automatically
http://www.murga-linux.com/puppy/viewto ... 37#1029537

Currently I think we are only stripping out documentation and unneeded internationalization files in woof-next..but I"ll look into this to see what woof-next is actually doing.

I wonder if stripping libs will reduce the number of dependencies for the lib.

Edit: I found a little bit about stripping at:
http://www.linuxfromscratch.org/lfs/vie ... pping.html

Later I'll look to see how mistfire does it.
Last edited by s243a on Fri 31 May 2019, 19:05, edited 2 times in total.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#383 Post by musher0 »

Hi s243a.

You say:
> "I wonder if stripping libs will reduce the number of dependencies for the lib."

No it won't. Properly done stripping should not affect any call to an
outside library.

Stripping a library or executable only does away with unneeded notes and
such that could be useful in debugging. Of course if the lib or exec works,
it doesn't need debugging anymore, and that's the purpose of stripping it.

As a reminder ( you may already know this ), the only correct parameter
for stripping a library is:

Code: Select all

strip --strip-unneeded libraryXYZ.so
Any other parm will cripple it.

On an executable you may use

Code: Select all

strip -g executable
or

Code: Select all

strip --strip-unneeded executable
. But you can't use < strip -g > on a library, it will cripple it.

To stay on the safe side, I also refrain from stripping static libraries ( the
ones ending in *.a or *.la ).

IHTH.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#384 Post by s243a »

musher0 wrote:Hi s243a.

You say:
> "I wonder if stripping libs will reduce the number of dependencies for the lib."

No it won't. Properly done stripping should not affect any call to an
outside library.

Stripping a library or executable only does away with unneeded notes and
such that could be useful in debugging. Of course if the lib or exec works,
it doesn't need debugging anymore, and that's the purpose of stripping it.

As a reminder ( you may already know this ), the only correct parameter
for stripping a library is:

Code: Select all

strip --strip-unneeded libraryXYZ.so
Any other parm will cripple it.

On an executable you may use

Code: Select all

strip -g executable
or

Code: Select all

strip --strip-unneeded executable
. But you can't use < strip -g > on a library, it will cripple it.

To stay on the safe side, I also refrain from stripping static libraries ( the
ones ending in *.a or *.la ).

IHTH.
What if we know the name of the symbol that is causing some other lib to load that we don't want to load? I see the following two options:

--remove-section=sectionname
--remove-relocations=sectionpattern

https://sourceware.org/binutils/docs/bi ... strip.html

For give my ignorance here :oops:
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#385 Post by s243a »

I noticed that the .xinitrc script is looking at the wrong place for video drivers. Here is where the driver that I want is located:

Code: Select all

/usr/lib/xorg/modules/drivers/vmware_drv.so
here is some output:

Code: Select all

bash -x xwin 2>&1 | tee xwin.log
...
+ '[' '!' -x /etc/X11/xorg.conf ']'
+ '[' -f /tmp/xwin_xorgwizard_cli ']'
+ '[' -f /etc/X11/xorg.conf ']'
++grep -v '#.*Driver'
++ grep '#card0driver' /etc/X11/xorg.conf
+ USING_DRIVER=
++ grep -m1 versa_drv.so
++ grep -v backup
++ find /usr/lib /usr/X11R7/lib /usr/lib64 -noleaf -mount -type f -name versa_drv.so
+ '[' '' ']'
+ '[' false = true ']'
+ '[' -f /root/.XLOADED ']'
++ cat /root/.XLOADED
" '[' false = true ']'
+ '[' -f /var/local/xorg_udev ']'
**The above was manually typed
***I used the xorg wizard but the vmware driver wasn't an option.
****A quck fix might be to symlink the folders

I'll look into this stuff later.

Edit:
Here is my temporary symbolic link fix:

Code: Select all

mkdir -p /usr/X11R7/lib
cp -sr /usr/lib/xorg/modules/drivers/ /usr/X11R7/lib
**I'll report back shortly how it it works.
Last edited by s243a on Sat 01 Jun 2019, 05:11, edited 2 times in total.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#386 Post by musher0 »

"versa"? Isn't that a car model made by Nissan???!!!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#387 Post by s243a »

BTW if anyway is trying to debug Xorg startup, the following command gives me a lot of info:

Code: Select all

( Xorg & ) ; bash -x /root/.xinitrc 2>&1 | tee xinitrc.log
although, I might not be setting some important stuff from the xwin script here.

An even simpler command

Code: Select all

( Xorg & ) ; jwm
give me a no screens found error.

Hmmm...what to do.

Edit:

Maybe some useful info here:
Check if $ lspci | grep VGA outputs something similar to:

Code: Select all

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation Device 0df4 (rev a1)
https://wiki.archlinux.org/index.php/NV ... IA_Optimus
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

wanderer
Posts: 1098
Joined: Sat 20 Oct 2007, 23:17

#388 Post by wanderer »

hi s243a

just a post to say i am following your work with GREAT interest
it is really groundbreaking
and will be of great use to the puppy community

i am actually learning a lot
and look forward to using your system
when it is ready

but take it easy
dont wear yourself out

i will continue reading as you post

thanks again for doing all this work

regards

wanderer

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#389 Post by s243a »

Any thoughts on how we should handle keymaps. A quick search of woof-CE reveals:

Code: Select all

./rootfs-skeleton/lib/keymaps
./woof2-scripts_and_files/packages-templates/kbd/usr/share/kbd/keymaps
./woof2-scripts_and_files/packages-templates/kbd/usr/share/keymaps
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#390 Post by s243a »

wanderer wrote:hi s243a

like wiak has posted

i also am worried about you working too hard

can you just make a simple system
that builds to completion

Simple is relative, but to prove that I"m not completely stuck here is an iso:

tiny_puduan_ascii-PreAlpa1.iso (176.7 MiB)

This isn't really intended for anyone to use yet but wired Internet works, the window manager works (sort of), and I have frisbee installed(, so maybe maybe wireless will work?).
**Window manager tested on qemu with the versa driver minimum resolution.


There are no bells and whistles yet on the window manager. There is no pinboard and there is no menu. The issue is that when I call the fixmenus command, I get the error:

Code: Select all

jwm-xdgmenu: error while loading shared libaries: libgnome-menu.so.2: cannot open shared object file: No such file or directory
The missing binary is from libgnome-menu2 but what is available in the devaun ascii repo is libgnome-menu-3-0

I suppose that I'll try installing the older lib.

P.S. 1 When I boot the iso, I did try installing libgnome-menu-3-0 and doing the following symlink:

Code: Select all

pkg --get libgnome-menu-3-0
...
cd /usr/lib
ln -s libgnome-menu-3.so.0 libgnome-menu.so.2
which gives the following error when running the fixmenus command:

Code: Select all

jwm-xdgmenu: symbol lookup error: jwm-xdgmenu: undefined symbol: gneu_tree_lookup
P.S. 2. It looks like I forgot to sync the package database prior to building the iso, so if you use pkg it will install a bunch of stuff that are already installed unless you first sync the database. You can sync the database with the command, sync_pet_specs_fm_dpkg.sh
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

wanderer
Posts: 1098
Joined: Sat 20 Oct 2007, 23:17

#391 Post by wanderer »

hi s243a

just tried your iso

it boots with x and a window manager

very cool

nice to have an iso to play with and look at

i am tearing it apart and looking at its innards

now its time to take it slow and easy

you've done a ton of work

thanks much

wanderer

wanderer
Posts: 1098
Joined: Sat 20 Oct 2007, 23:17

#392 Post by wanderer »

edit

never mind figured it out by reading jamesbonds build.iso script

wanderer

wanderer
Posts: 1098
Joined: Sat 20 Oct 2007, 23:17

#393 Post by wanderer »

hi s243a (and everyone)

i am playing with your new iso

thanks much

i unsquashed the puppy.sfs file and resquashed it
with i guess a newer mksquashfs from upupbb32
and that has reduced it from 127 megs to 108 megs

i also added emelfm gtkedit gtk1 glib1 and goingnuts links web browser
but in the symlinked delta puppy style
with the apps in individual folders
in an apps directory in root
this keeps them completely separate
and you can add them and remove them at will
kind of like gobo linux

for example
/root/apps/gtkedit/*

i also put in a single very simplified .jwmrc file in root
so you can easily add or subtract apps and scripts
to the jwm menu by hand

so now it has urxvt emelfm gtkedit and links
and is 159 megs

i will post the new iso
in the repository on the first post
it will be called t1.iso
for tiny-puduan-ascii-prealpha1-modified-1.iso

i will continue to add and mod stuff
like wiaks firstrib and fredx portable firefox

and report my progress

thanks again for all your work
on the puppy alternate build system

but take it easy
and dont exhaust yourself
you have done a ton of stuff already

regards

wanderer

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#394 Post by s243a »

wanderer wrote:hi s243a (and everyone)

i am playing with your new iso

thanks much

i unsquashed the puppy.sfs file and resquashed it
with i guess a newer mksquashfs from upupbb32
and that has reduced it from 127 megs to 108 megs

i also added emelfm gtkedit gtk1 glib1 and goingnuts links web browser
but in the symlinked delta puppy style
with the apps in individual folders
in an apps directory in root
this keeps them completely separate
and you can add them and remove them at will
kind of like gobo linux

for example
/root/apps/gtkedit/*

i also put in a single very simplified .jwmrc file in root
so you can easily add or subtract apps and scripts
to the jwm menu by hand
In some ways this might be better than what puppy does because one can keep the menu clearn that way. That said, I had some sucuess in adding the puppy stuff to build the menu but I've had some computer problems :(

so now it has urxvt emelfm gtkedit and links
and is 159 megs

i will post the new iso
in the repository on the first post
it will be called t1.iso
for tiny-puduan-ascii-prealpha1-modified-1.iso

i will continue to add and mod stuff
like wiaks firstrib and fredx portable firefox
Sounds interesting. P.S. rather than adding fredx's portable firefox, you could add jrb's portable browser installer:
http://murga-linux.com/puppy/viewtopic.php?t=116099

this would keep the base iso smaller :)
and report my progress

thanks again for all your work
on the puppy alternate build system

but take it easy
and dont exhaust yourself
you have done a ton of stuff already

regards

wanderer
Thankyou. I look forward to hearing more about your experiments.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#395 Post by s243a »

s243a wrote:
wanderer wrote:hi s243a (and everyone)

i am playing with your new iso

thanks much

i unsquashed the puppy.sfs file and resquashed it
with i guess a newer mksquashfs from upupbb32
and that has reduced it from 127 megs to 108 megs

i also added emelfm gtkedit gtk1 glib1 and goingnuts links web browser
but in the symlinked delta puppy style
with the apps in individual folders
in an apps directory in root
this keeps them completely separate
and you can add them and remove them at will
kind of like gobo linux

for example
/root/apps/gtkedit/*

i also put in a single very simplified .jwmrc file in root
so you can easily add or subtract apps and scripts
to the jwm menu by hand
In some ways this might be better than what puppy does because one can keep the menu clearn that way. That said, I had some sucuess in adding the puppy stuff to build the menu but I've had some computer problems :(
Here's one with the menu stuff included:
tiny_puduan_ascii-PreAlpha2.iso (182.0 MiB )
**It also includes rox-filler, which isn't absolutely essential.
***Pinboard icons not unique for each item on the desktop (i.e. missing theme stuff)

Again this isn't intended for anyone to use at this point.

Edit: 1 Networking missing in this iso. I'll fix this.

Edit: 2 Updated with friesbee included:
tiny_puduan_ascii-PreAlpha3.iso (182.0 MiB)
Last edited by s243a on Tue 04 Jun 2019, 04:11, edited 2 times in total.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

wanderer
Posts: 1098
Joined: Sat 20 Oct 2007, 23:17

#396 Post by wanderer »

hi s243a

looks like its coming along nicely

wanderer

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#397 Post by wiak »

Yes, good to see so much progress s243a

wanderer
Posts: 1098
Joined: Sat 20 Oct 2007, 23:17

#398 Post by wanderer »

hi s243a (and everyone)

i have posted the t1.iso

in the repository on the first post

just so people can see the delta symlinked individual apps system

added to s243a woof-next system

wanderer

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#399 Post by wiak »

wanderer wrote:hi s243a (and everyone)

i have posted the t1.iso

in the repository on the first post

just so people can see the delta symlinked individual apps system

added to s243a woof-next system

wanderer
I'll take a little time out from FirstRib soon wanderer and take the opportunity to take a little look at your iso and that of s243a. I presume your symlinked system is inspired by the way tiny core does things?

wiak

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#400 Post by s243a »

s243a wrote:
wander wrote:
so now it has urxvt emelfm gtkedit and links
and is 159 megs

i will post the new iso
in the repository on the first post
it will be called t1.iso
for tiny-puduan-ascii-prealpha1-modified-1.iso

i will continue to add and mod stuff
like wiaks firstrib and fredx portable firefox
Sounds interesting. P.S. rather than adding fredx's portable firefox, you could add jrb's portable browser installer:
http://murga-linux.com/puppy/viewtopic.php?t=116099

this would keep the base iso smaller :)

My intuition might be slightly off here. I tried adding JRB's portable browser installer in:

tiny_puduan_ascii-PreAlpha4.iso

It seems to use JRB's installer that we need the packages:

Code: Select all

libwayland-client0 #Required for yad
yad 
For now I'll install these.

As an aside:
libwayland-client0 - is also listed as a dependency for "libegl1-mesa, libgbm1",

although the system seems to run without it.

Another issue I had with JRB's portable installer is that I"m getting the error:

Code: Select all

urxvt: unable to exec child. 
I'm not sure if this has anything to do with me symlinking xterm to urxvt. I reported the issue:
http://murga-linux.com/puppy/viewtopic. ... 84#1029784

p.s. as a side note, in this last iso it happened that running the pinstall.sh script of ptheme seems to have broken the top panel.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

Post Reply