another distro

Discussion of technology related topics including news, events, and announcements.

another distro

Postby nodir » October 7th, 2018, 1:06 am

I am checking out the dragora alpha 2 release announced at the mailing list and at linuxquestions.org, to be found here:
http://rsync.dragora.org/ISO/
(top entry is the alpha 1 release)

I make this post due to this ps_mem.py output for tty:
Code: Select all
 Private  +   Shared  =  RAM used       Program

 44.0 KiB +   0.5 KiB =  44.5 KiB       perpboot
 64.0 KiB +   0.5 KiB =  64.5 KiB       socklog
 72.0 KiB +   1.5 KiB =  73.5 KiB       crond
 88.0 KiB +   0.5 KiB =  88.5 KiB       perpd
128.0 KiB +   0.5 KiB = 128.5 KiB       init
188.0 KiB +   0.5 KiB = 188.5 KiB       acpid
164.0 KiB +  45.0 KiB = 209.0 KiB       tinylog (10)
 80.0 KiB + 156.0 KiB = 236.0 KiB       agetty (2)
292.0 KiB +   0.5 KiB = 292.5 KiB       rc.main
388.0 KiB + 191.5 KiB = 579.5 KiB       dbus-daemon
556.0 KiB +  55.5 KiB = 611.5 KiB       dhcpcd
428.0 KiB + 233.0 KiB = 661.0 KiB       mksh (2)
  1.5 MiB +   0.5 KiB =   1.5 MiB       sshd
  1.4 MiB + 198.5 KiB =   1.6 MiB       wpa_supplicant
  1.6 MiB + 689.0 KiB =   2.3 MiB       udevd (2)
---------------------------------
                          8.5 MiB
=================================


And this for a gui, openbox with netsurf-gtk and two instances of xterm running:
Code: Select all
 Private  +   Shared  =  RAM used       Program

 44.0 KiB +   0.5 KiB =  44.5 KiB       perpboot
 68.0 KiB +   0.5 KiB =  68.5 KiB       socklog
 72.0 KiB +   0.5 KiB =  72.5 KiB       crond
 92.0 KiB +   0.5 KiB =  92.5 KiB       perpd
124.0 KiB +   0.5 KiB = 124.5 KiB       init
 68.0 KiB + 114.5 KiB = 182.5 KiB       rc.main
 72.0 KiB + 114.5 KiB = 186.5 KiB       startx
 80.0 KiB + 107.0 KiB = 187.0 KiB       agetty (2)
192.0 KiB +   0.5 KiB = 192.5 KiB       acpid
168.0 KiB +  45.0 KiB = 213.0 KiB       tinylog (10)
120.0 KiB + 152.5 KiB = 272.5 KiB       xinit
268.0 KiB + 192.5 KiB = 460.5 KiB       dbus-daemon
432.0 KiB +  90.5 KiB = 522.5 KiB       dhcpcd
548.0 KiB +   0.5 KiB = 548.5 KiB       ssh-agent
860.0 KiB + 234.0 KiB =   1.1 MiB       mksh (4)
984.0 KiB + 348.5 KiB =   1.3 MiB       wpa_supplicant
  1.5 MiB +   0.5 KiB =   1.5 MiB       sshd
  1.5 MiB + 678.0 KiB =   2.2 MiB       udevd (2)
  1.9 MiB + 427.5 KiB =   2.3 MiB       irssi
  3.2 MiB +   2.1 MiB =   5.3 MiB       openbox
  8.5 MiB +   3.6 MiB =  12.1 MiB       xterm (2)
 16.8 MiB +   1.0 MiB =  17.8 MiB       Xorg
 37.3 MiB +   2.5 MiB =  39.9 MiB       netsurf-gtk
---------------------------------
                         86.4 MiB
=================================


Impressive it is, but the alpha2 iso or the rootfs will come with dwm, twm and xterm, as far the gui is concerned, and for the tty not that much is included yet either. To install packages you will have to compile them (either the good old fashioned way) or with the help of the used program called qi.

stay tuned.
nodir
 
Posts: 159
Joined: June 16th, 2015, 10:10 pm

Re: another distro

Postby nodir » October 9th, 2018, 3:25 am

For me it wasn't easy to find the info how to use qi to write a recipe, which will be used to build and install a package with qi.
Might be useful for the ones who stop by to offer them the bit i try to figure out.
First of all some official docs:
http://dragora.org/repo.fsl/doc/trunk/q ... ml#Recipes

Now a short description:
download the example http://git.savannah.nongnu.org/cgit/dra ... url/recipe
Code: Select all
vi recipe #edit accordingly, duh.

Code: Select all
qi -b recipe #  to build

Code: Select all
qi -i /var/cache/qi/packages/i586/network/curl*tlz # to install the resulting tlz

can be done in one step:
Code: Select all
qi  -b -i recipe # build and install in one step

What i mainly edit are the variables before build (), just a few and if the INSTALL file gives me a hint i make changes to the ./configure, make, make install routine, as long i know how. For easy packages the edit takes less than 5 minutes. Slackbuilds etc can have some ideas too.
While editing quickly getting the source might be handy:

Code: Select all
awk -F= '/fetch/ { print $2}' | xargs wget

You can do it with mouse-copy-paste too, of course. Assuming you figure out how to to that with xterm and you got X up and running at all .... :-)

The example recipe can be found here:
http://git.savannah.nongnu.org/cgit/dra ... url/recipe
and looks like this:
Code: Select all
# Build recipe for curl.
#
# Copyright (c) 2018 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
# Copyright (c) 2018 Matias A. Fonzo, <selk@dragora.org>.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

program=curl
version=7.61.1
release=2

# Set 'outdir' for a nice and well-organized output directory
outdir="${outdir}/${arch}/networking"

tarname=${program}-${version}.tar.bz2

# Remote source(s)
fetch=http://curl.haxx.se/download/$tarname

description="
Command line tool and library for transferring data with URLs.

cURL is a powerful command line tool for transferring data supporting
various protocolos, including DICT, FILE, FTP, FTPS, Gopher, HTTP,
HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP,
SMB, SMBS, SMTP, SMTPS, Telnet and TFTP.
"

homepage=http://curl.haxx.se/
license="Custom MIT/X derivate"

# Source documentation
docs="CHANGES COPYING README RELEASE-NOTES"
docsdir="${docdir}/${program}-${version}"

build()
{
    set -e

    unpack "${tardir}/$tarname"

    cd "$srcdir"

    # Set sane permissions
    chmod -R u+w,go-w,a+rX-s .

    ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
     $configure_args \
     --libdir=/usr/lib${libSuffix} \
     --infodir=$infodir \
     --mandir=$mandir \
     --enable-shared \
     --enable-static \
     --enable-ipv6 \
     --enable-pthreads \
     --enable-threaded-resolver \
     --with-ca-path=/etc/ssl/certs \
     --with-ca-bundle=/etc/ssl/cert.pem \
     --build="$(cc -dumpmachine)"

    make -j${jobs} V=1
    make -j${jobs} DESTDIR="$destdir" install-strip

    # Compress and link man pages (if needed)
    if test -d "${destdir}/$mandir"
    then
        (
            cd "${destdir}/$mandir"
            find . -type f -exec lzip -9 '{}' +
            find . -type l | while read -r file
            do
                ln -sf "$(readlink -- "$file").lz" "${file}.lz"
                rm -- "$file"
            done
        )
    fi

    # Copy documentation
    mkdir -p "${destdir}${docsdir}"
    cp -p $docs "${destdir}${docsdir}"
}


variables are set in
Code: Select all
/etc/qirc
; or via command line options, do "qi --help"
worktree for the build per default is:
Code: Select all
/usr/src/qi

resulting packages are
Code: Select all
/var/cache/qi/ ... 

recipes are stored at
Code: Select all
/var/lib/qi ...

"find" is your friend here. (say find /usr/src/qi -name '*pkgname*' , assuming i borked the paths ... )

-
That's how i understand it right now.
(You might tend to say: now that is damn easy, where is the point in writing it down. Not that easy to find those info. Once you got them, it is easy)
nodir
 
Posts: 159
Joined: June 16th, 2015, 10:10 pm


Return to Technical Talk

Who is online

Users browsing this forum: No registered users and 1 guest

x