didbs-0.0.6 Development Bootstrap Tooling
#5
RE: didbs-0.0.6 Development Bootstrap Tooling
For those interested in checking what package version and/or patches didbs uses -

Under the /packages/ area (in git too) - you can find the package name and inside there a ".packagedef"

e.g.


Code:
[dan@leafy ~]$ cd /usr/didbs/didbs.git/
[dan@leafy didbs.git]$ cat packages/sed/sed.packagedef
packageSource=http://ftp.gnu.org/gnu/sed/sed-4.5.tar.xz
packageFile=sed-4.5.tar.xz
packageChecksum=ade8f8c2c548bf41f74db2dcfc37e4e3
packageExtraction=tarxfsystemhelper.sh
packageDir=sed-4.5
packagePatch=sed.fixtimeheaders.patch
expectedToolList=
dependenciesList=make,tar,xz
envModifs=setupenv.sh
configureRecipe=configureit
buildRecipe=buildit
installRecipe=installit
passesChecksIndicator=1


You see the source where it fetches it from and what version - and also the dependencies didbs uses when it works out the order things must be installed in.

The "setenv.sh" it mentions here is the custom per package environment that's setup - it's just a shell script:


Code:
[dan@leafy didbs.git]$ cat packages/sed/setupenv.sh    
#
CC=$DIDBS_CC
#CFLAGS="$DIDBS_ARCH_CFLAGS -O1"
CFLAGS="$DIDBS_ARCH_CFLAGS $DIDBS_O3_IPA_CFLAGS $DIDBS_NOWARN_CFLAGS"
LDFLAGS="$DIDBS_ARCH_LDFLAGS $DIDBS_IPA_LDFLAGS $DIDBS_NOWARN_LDFLAGS"
export CC CFLAGS LDFLAGS


This isn't run directly - but is "sourced" by the actual configureit, buildit and installit scripts in the same directory before they are run. These scripts are the things doing the real work - at a basic level the "bootstrap.pl" script is just a dependency engine and some way to call these scripts.

Sed's "configureit":

Code:
#!/bin/sh
BUILDDIR=$1
INSTALLDIR=$2
EXTRAARGS=$3
echo $BUILDDIR
echo $INSTALLDIR
echo $EXTRAARGS
. ./setupenv.sh
cd $BUILDDIR || exit -1
gl_cv_func_select_supports0=no gl_cv_func_select_detects_ebadf=no ./configure --prefix=$INSTALLDIR || exit -1
exit 0

Bonus for those that have installed didbs - using the "--buildshell package" arguments to bootstrap.pl will launch you a bash shell inside the package directory with the correct environment set up for fixing bugs or running package tests.


Code:
[dan@leafy didbs.git]$ ./bootstrap.pl --buildshell sed
2019-06-20 17:56:03.507.317 didbs bootstrapper script version 0.0.6
2019-06-20 17:56:03.508.520
2019-06-20 17:56:03.509.053 Adding found config.
 To start fresh, rm /usr/didbs/didbs.git/bootstrap.conf
2019-06-20 17:56:03.509.598 TODO: Check for build prerequisites (7.4.4m, sed etc - see toolstocheckfor.txt)
2019-06-20 17:56:03.526.893 Checking if there is a missing stage...
2019-06-20 17:56:03.527.493 Looking for stage finished file at /usr/didbs/build/stage0/stage.finished
2019-06-20 17:56:03.528.089 currentStage=
2019-06-20 17:56:03.528.623 stage0missing=
2019-06-20 17:56:03.529.175 Setting missing stage to
2019-06-20 17:56:03.529.745 Would attempt to call modify path for stage 'BUILD' ...
2019-06-20 17:56:03.530.348 Reset PATH from /usr/sbin:/sbin:/usr/bsd:/usr/bin:/usr/bin/X11 to /usr/didbs/0_0_6/bin:/usr/sbin:/sbin:/usr/bsd:/usr/bin:/usr/bin/X11
2019-06-20 17:56:03.530.947 Reset LD_LIBRARY_PATH from  to /usr/didbs/0_0_6/lib:
2019-06-20 17:56:03.531.509 Reset LD_LIBRARYN32_PATH from /usr/lib32:/lib32 to /usr/didbs/0_0_6/lib:/usr/lib32:/lib32
2019-06-20 17:56:03.532.098 Reset PKG_CONFIG_PATH from  to /usr/didbs/0_0_6/lib/pkgconfig:
2019-06-20 17:56:03.532.681 Modify the above in defaultenv.vars

2019-06-20 17:56:03.533.524 Looking for packages in /usr/didbs/didbs.git/packages
2019-06-20 17:56:03.565.651 Completed package search of /usr/didbs/didbs.git/packages
2019-06-20 17:56:03.566.121 Reading package definitions...
2019-06-20 17:56:03.641.257 Computing package dependencies and order...
2019-06-20 17:56:04.013.249 Completed package dependencies and order...
2019-06-20 17:56:04.014.340 Package shell for sed
Build shell and environment ready.
SCRIPTLOCATION=/usr/didbs/didbs.git
PACKAGEID=sed
PACKAGEDIR=/usr/didbs/didbs.git/packages/sed
BUILDDIR=/usr/didbs/build/sed/sed-4.5
INSTALLDIR=/usr/didbs/0_0_6
ENVMODIFS=/usr/didbs/didbs.git/packages/sed/setupenv.sh
Current directory is /usr/didbs/build/sed/sed-4.5
[didbsshell dan@leafy sed-4.5]$ pwd
/usr/didbs/build/sed/sed-4.5
[didbsshell dan@leafy sed-4.5]$ env |grep LD_LIBRARY
LD_LIBRARYN32_PATH=/usr/didbs/0_0_6/lib:/usr/lib32:/lib32
LD_LIBRARY_PATH=/usr/didbs/0_0_6/lib:
[didbsshell dan@leafy sed-4.5]$


If you are building a package by hand and want to know what CFLAGS I used, this is the right way to do it.
mrthinlysliced
Unregistered

Trade Count: (0)
 
Reply
06-20-2019, 05:05 PM


Messages In This Thread
didbs-0.0.6 Development Bootstrap Tooling - by mrthinlysliced - 06-17-2019, 04:59 PM
RE: didbs-0.0.6 Development Bootstrap Tooling - by Raion - 06-17-2019, 06:12 PM
RE: didbs-0.0.6 Development Bootstrap Tooling - by mrthinlysliced - 06-17-2019, 06:39 PM
RE: didbs-0.0.6 Development Bootstrap Tooling - by gijoe77 - 06-18-2019, 03:03 AM
RE: didbs-0.0.6 Development Bootstrap Tooling - by mrthinlysliced - 06-20-2019, 05:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)