Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Friday, February 26, 2021

Finding my way

 My last entry was a bunch of compile times with no context.

This post will give the context -hopefully!

First, I want to show why I think I may be on the right track:

iso-image ===> etc
make iso-image started at:  Fri Feb 26 12:57:59 AKST 2021
make iso-image finished at: Fri Feb 26 12:58:01 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Fri Feb 26 12:58:01 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -X /home/random/netbsd9/usr/xsrc -x -m sparc -j 5 -U -u -O /home/random/netbsd9/usr/obj -R /home/random/netbsd9/rel/rel-sparc -T /home/random/netbsd9/tooldir/tooldir-sparc release iso-image
         build.sh started:    Fri Feb 26 12:35:41 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             sparc
         MACHINE_ARCH:        sparc
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/tooldir/tooldir-sparc
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.sparc
         RELEASEDIR path:     /home/random/netbsd9/rel/rel-sparc
         Updated makewrapper: /home/random/netbsd9/tooldir/tooldir-sparc/bin/nbmake-sparc
         Successful make release
         Successful make iso-image
         build.sh ended:      Fri Feb 26 12:58:01 AKST 2021
===> . 

At this point, it seems as if I'm able to compile sparc/32 ...including X...in 23 minutes. That started at 12:35 and ended at 12:58. 

I haven't tested the iso to confirm that there's X on it, however. 

Even if that has messed up (and I've no reason to think it has) I'm still in the right direction. What I'm referring to is using some of the more advanced(ish) features of buildsh. I have set up a per-arch tools dir and built the tools for several architectures. The quick compile time of sparc32 shows that it's paying off. 

I have a shell script that still has some flaws, but will show you the general idea of what I'm trying to do:

$ cat ../makeit.sh
#!/bin/bash
export TTDR=$HOME/netbsd9/tooldir/tooldir-
export RREL=$HOME/netbsd9/rel/rel-
export OOBJ=$HOME/netbsd9/usr/obj
 for x in i386 sparc64
do
mkdir $RREL$x
./build.sh -X ~/netbsd9/usr/xsrc/ -x -m $x -j 5 -U -u -O $OOBJ -R $RREL$x -T $TTDR$x release iso-image

done

I'm setting up the directories, then the enviromental variables and having mixed results. As I was typing this up, my i386 compile crashed -and now I'm trying with arch-specific obj dirs -a change not reflected in the snippet above.

I also need to research how/what buildsh does with DESTDIR and how to set it, too.

Thursday, February 25, 2021

Vax in under an hour...

make iso-image started at:  Thu Feb 25 20:50:56 AKST 2021
make iso-image finished at: Thu Feb 25 20:51:03 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Thu Feb 25 20:51:03 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -m vax -U -O /home/random/netbsd9/usr/obj -T /home/random/netbsd9/arch/amd64 -j 5 release iso-image
         build.sh started:    Thu Feb 25 20:08:36 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             vax
         MACHINE_ARCH:        vax
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/arch/amd64
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.vax
         RELEASEDIR path:     /home/random/netbsd9/usr/obj/releasedir
         Updated makewrapper: /home/random/netbsd9/arch/amd64/bin/nbmake-vax
         Successful make release
         Successful make iso-image
         build.sh ended:      Thu Feb 25 20:51:03 AKST 2021
===> .

 ...well, hmmph.

I ran a traditional/amd64 build with X and that took about 2 hours -but didn't record the time summary. also the make iso part was messed up because I forgot to put "sourcesets" before "iso-image-source".

Still! It takes half the time to compile NetBSD on a Linux VM than it does on a NetBSD VM. 

Hmmmph. 

This is on Debian 10.8, Virtualbox 6.1.18, 4 cores, for whatever that's worth

---

update

---

i386 in almost 90 minutes (again, no X):

make iso-image started at:  Thu Feb 25 22:26:51 AKST 2021
make iso-image finished at: Thu Feb 25 22:26:58 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Thu Feb 25 22:26:58 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -m i386 -U -O /home/random/netbsd9/usr/obj -T /home/random/netbsd9/arch/amd64 -j 5 release iso-image
         build.sh started:    Thu Feb 25 20:58:56 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             i386
         MACHINE_ARCH:        i386
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/arch/amd64
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.i386
         RELEASEDIR path:     /home/random/netbsd9/usr/obj/releasedir
         Updated makewrapper: /home/random/netbsd9/arch/amd64/bin/nbmake-i386
         Successful make release
         Successful make iso-image
         build.sh ended:      Thu Feb 25 22:26:58 AKST 2021
===> .

sun2 in ~45 minutes (no X)

---

iso-image ===> etc
make iso-image started at:  Thu Feb 25 23:13:19 AKST 2021
make iso-image finished at: Thu Feb 25 23:13:34 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Thu Feb 25 23:13:34 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -m sun2 -U -O /home/random/netbsd9/usr/obj -T /home/random/netbsd9/arch/amd64 -j 5 release iso-image
         build.sh started:    Thu Feb 25 22:38:21 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             sun2
         MACHINE_ARCH:        m68000
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/arch/amd64
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.sun2
         RELEASEDIR path:     /home/random/netbsd9/usr/obj/releasedir
         Updated makewrapper: /home/random/netbsd9/arch/amd64/bin/nbmake-sun2
         Successful make release
         Successful make iso-image
         build.sh ended:      Thu Feb 25 23:13:34 AKST 2021
===> .

---

iso-image ===> etc
make iso-image started at:  Fri Feb 26 00:08:14 AKST 2021
make iso-image finished at: Fri Feb 26 00:08:15 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Fri Feb 26 00:08:15 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -m sun3 -U -O /home/random/netbsd9/usr/obj -T /home/random/netbsd9/arch/amd64 -j 5 release iso-image
         build.sh started:    Thu Feb 25 23:23:37 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             sun3
         MACHINE_ARCH:        m68k
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/arch/amd64
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.sun3
         RELEASEDIR path:     /home/random/netbsd9/usr/obj/releasedir
         Updated makewrapper: /home/random/netbsd9/arch/amd64/bin/nbmake-sun3
         Successful make release
         Successful make iso-image
         build.sh ended:      Fri Feb 26 00:08:15 AKST 2021
===> . 

...time passes... 

iso-image ===> etc
make iso-image started at:  Fri Feb 26 12:57:59 AKST 2021
make iso-image finished at: Fri Feb 26 12:58:01 AKST 2021
===> Successful make iso-image
===> build.sh ended:      Fri Feb 26 12:58:01 AKST 2021
===> Summary of results:
         build.sh command:    ./build.sh -X /home/random/netbsd9/usr/xsrc -x -m sparc -j 5 -U -u -O /home/random/netbsd9/usr/obj -R /home/random/netbsd9/rel/rel-sparc -T /home/random/netbsd9/tooldir/tooldir-sparc release iso-image
         build.sh started:    Fri Feb 26 12:35:41 AKST 2021
         NetBSD version:      9.1_STABLE
         MACHINE:             sparc
         MACHINE_ARCH:        sparc
         Build platform:      Linux 4.19.0-14-amd64 x86_64
         HOST_SH:             /usr/bin/sh
         MAKECONF file:       /etc/mk.conf (File not found)
         TOOLDIR path:        /home/random/netbsd9/tooldir/tooldir-sparc
         DESTDIR path:        /home/random/netbsd9/usr/obj/destdir.sparc
         RELEASEDIR path:     /home/random/netbsd9/rel/rel-sparc
         Updated makewrapper: /home/random/netbsd9/tooldir/tooldir-sparc/bin/nbmake-sparc
         Successful make release
         Successful make iso-image
         build.sh ended:      Fri Feb 26 12:58:01 AKST 2021
===> .

Monday, January 25, 2021

A more prudent decision ...?

 I just, just wrote my previous blogpost 12 hours ago -and I've already got a good deal of 2020Q4 built on Debian 10.

It ought to go without saying I'm doing all of this in Virtualbox, as I do with 9/10ths of the other things I write about (with the exception of 86box stuff). But the Debian VM I was building in was built wrong -the disk space was split and arranged oddly.

So this morning I packed up what I had built and then remade another VM -this time with 80 odd gigs and all on one partition, and splatted it back on there.

Ncurses, gcc-10, libcups and harfbuzz all built just fine -but it was building harfbuzz that I discovered that I'd run out of room. I had things build while I slept:

gcc-10

clang

LLVM

harfbuzz

...it turns out that clang and LLVM didn't build; presumably because of space issues. 

Basically, my strategy is the get the problematic builds (ncurses, libcups) built, then the larger ones (gcc-10, clang) ...after that, I'll tackle widget libraries (gtk,wxwidgets and qt) and hopefully after that I'll be able to build packages such as codeblocks and libreoffice.

The title refers to my move (back) to building on Debian instead of Centos. I know where Debian is going to be and what they'll be doing 5 years from now. IBM -not so much. I might be more interested in riding out the Centos drama if I was invested in the RedHat ecosystem to begin with -but I'm not. I've always preferred Mint, Debian or Ubuntu (in that order).

Mind you, the Centos VM feels cozy as a desktop, and I can see myself possibly setting up a RHEL or a "Rocky" Or a "AlmaLinux" secondary desktop in the future -but for the purposes of learning pkgsrc on Linux I think my time is better spent getting things working on Debian. Like I say, I know where they'll be 5 or 10 years from now.

Monday, October 7, 2019

Debian Testing in a VB VM (2019/2020 edition)

To install guest additions, first:

sudo apt update -y && apt upgrade
sudo apt install dkms linux-headers-$(uname -r) build-essential
 
Then:
cd /media/cdrom0/; /bin/sh VBo*run
 
To set up ISO files as a local repository: 

1)Download the files somewhere. I use /.iso:
 
random@flustered:~$ ls -l /.iso
total 12833380
dr-xr-xr-x 1 root   root         4096 Oct  6 20:57 1
dr-xr-xr-x 1 root   root         2048 Oct  6 21:13 2
dr-xr-xr-x 1 root   root         2048 Oct  6 21:15 3
-rwxr-xr-x 1 random random 3838230528 Oct  7 09:23 debian-testing-amd64-DVD-1.iso
-rwxr-xr-x 1 random random 4619786240 Oct  7 09:25 debian-testing-amd64-DVD-2.iso
-rwxr-xr-x 1 random random 4683341824 Oct  7 09:27 debian-testing-amd64-DVD-3.iso
random@flustered:~$
 
2) create mountpoints (mkdir /.iso{1,2,3}). 
3) add the mountpoints to /etc/fstab:
 
random@flustered:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#                
# / was on /dev/sda1 during installation
UUID=4c /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=28 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/.iso/debian-testing-amd64-DVD-1.iso /.iso/1 iso9660     ro,loop,auto    0       0
/.iso/debian-testing-amd64-DVD-2.iso /.iso/2 iso9660     ro,loop,auto    0       0
/.iso/debian-testing-amd64-DVD-3.iso /.iso/3 iso9660     ro,loop,auto    0       0
random@flustered:~$
 
4) make the proper changes to /etc/apt/sources.list:

deb [trusted=yes] file:/.iso/1 bullseye contrib main
deb [trusted=yes] file:/.iso/2 bullseye contrib main
deb [trusted=yes] file:/.iso/3 bullseye contrib main
 
...it's important to put "[trusted=yes]", or apt won't process them.
5)apt update to use the new sources
...and you're good to go.

automating zfs mounts -a quick and very dirty script

 #!/bin/sh for x in obj xsrc src pkgsrc pkgsrc/distfiles pkgsrc/packages pkg         do zfs create ext/$x zfs set mountpoint=/usr/$x ext/$x ...