openSUSE:YaST development build special

Jump to: navigation, search
This page is NOT up to date. Some information might not be valid any longer.

Building YaST, using y2makeall

y2makeall was enhanced by Stefan Hundhammer, so now no longer has a fixed list of core binaries that it builds first. It also no longer brute-force byte-compiles all YCP modules and installs them to the current machine.

Instead, it now dynamically calculates the correct build order based on "BuildRequires", "Requires", and "Provides" in the .spec.in files and invokes "make" (including "make -f Makefile.cvs") in each subdirectory in that order.

The old behaviour is still available (see y2makeall --help) for those who want it. I also kept the old y2makeall intact in y2makeall-old (also in devtools).

Martin Vidner had added support for prefix building to y2makeall. It should still work, but that part is untested right now - pleaste test.

It should now again be possible to build YaST2 from SVN without hour-long manual interaction - this had gone away recently, as some dependencies had changed and new dependencies between YCP packages had been added.

Quick start for those who don't know it at all:

Build everything:

cd ???????/yast2/source
y2makeall

Do a "make clean", then a "make pot" in all YaST2 packages:

y2makeall clean
y2makeall pot

Don't do "make -f Makefile.cvs" (autoreconf etc., configure), if not necessary:

y2makeall --fast

Build only in base packages and in subdirectories I added to my "favourites" section in my ~/.yast2/y2makeallrc file, and avoid unnecessary "make -f Makefile.cvs" calls:

y2makeall --fast --favourites

Output the correct build order, then exit:

y2makeall --dump-build-order

More info:

y2makeall --help

Building YaST into its own prefix

Create a directory to store YaST sources:

mkdir $HOME/yast-src; cd $HOME/yast-src

Checkout the basic modules (type 'anonymous' when asked for a password):

 cvs -z3 -d:ext:anonymous@forgecvs1.novell.com:/cvsroot/yast co extra-packages liby2util devtools core packagemanager testsuite pkg-bindings qt yast2

extra-packages is mandatory. You can of course checkout also more modules you are interested in. Check the list of modules in CVS

Add the devtools/prefixbuild to your path

export PATH=$HOME/yast-src/devtools/prefixbuild:$PATH

If you use some tool for distributed compiling, like distcc or icecream, add it to the path too

export PATH=/opt/icecream/bin:$PATH

Start the build, selecting a module to be build ans installed. The script will resolve the dependencies and build also the required modules. YaST will be built and installed in $HOME/pfx by default.

recreate -d yast2

To start YaST, use the pfx helper (this setups the environment)

devtools/prefixbuild/pfx $HOME/pfx/lib/YaST2/bin/yast2

Building YaST into mounted directory

Make copy of YaST libraries

mkdir /usr/share/YaST2-work
cp /usr/share/YaST2 /usr/share/YaST2-work
mkdir /usr/lib/YaST2-work
cp /usr/lib/YaST2 /usr/lib/YaST2-work


Mount YaST2-work directory over YaST2 directory

mount --bind /usr/share/YaST2-work/ /usr/share/YaST2/
mount --bind /usr/lib/YaST2-work/ /usr/lib/YaST2/

From now all you move to YaST2 be written to YaST2-work. If you want to back to old/working version

umount /usr/share/YaST2 && umount /usr/lib/YaST2

There is possible to make _x versions and mount over already mounted

mount --bind /usr/share/YaST2_x/ /usr/share/YaST2/
mount --bind /usr/lib/YaST2_x/ /usr/lib/YaST2/