Hi all,

testing fixes or new features is quite easy in an installed system, usually just
running "sudo rake install" is enough for Ruby packages. However, if you need 
to test
something in installation then the things gets more complicated.

If it is just one-liner you can modify the file locally before running the 
installer.
If it is more complicated you can build a Driver Update Disk. But that's not 
trivial
and takes some time. You also need to somewhere publish the built DUD so the
installer can download it, you need to configure an HTTP/FTP/NFS server...

If you need to fix several packages it gets even more complicated.


Therefore I have implemented the "yupdate" helper script which makes the
modifications to inst-sys much easier.

You need to start the installation with "start_shell=1" boot parameter to apply 
the
changes before starting the installer.


Documentation
=============

The latest documentation is always available here:

[1] https://github.com/yast/yast-installation/blob/master/doc/yupdate.md
[2] https://github.com/yast/yast-rake/#server


What it can do?
================


1. Install the sources from GitHub
-----------------------------------

It can install the sources directly from GitHub, just specify the GitHub 
repository
name and the branch to apply.

Run in the inst-sys:

  yupdate patch yast-yast2 master

This will install the latest "yast2" package from the "master" branch. You can 
also
use your fork, just use the full name including the user name like 
"user/yast-yast2".
If the user name is missing it uses the "yast" organization by default.


2. Install from a local Git checkout
------------------------------------

Committing and pushing every single change to GitHub is a bit annoying if you 
are
just adding debug messages or experimenting with the code.

Therefore I have implemented a simple HTTP server which serves the local 
sources in a
similar way as GitHub. Just run "rake server" in an YaST Git checkout to start 
it.

To use the sources from your server run in the inst-sys:

  yupdate patch my_machine.suse.com

Replace the "my_machine.suse.com" with your host name or IP address.

(If the firewall is running you need to open the port for server, the [2]
documentation for details.)


3. Install from multiple local Git checkouts
--------------------------------------------

If you need to update several YaST packages, then just run "rake server" in 
each of
them and use the same "yupdate" command. The HTTP server provides a simple
introspection which lists all running "rake server" servers and the "yupdate" 
script
applies the sources from each of them one-by-one.


4. Additional commands
-----------------------

The "yupdate" script supports some more commands, see the documentation. I'd 
just
mention here the "yupdate overlayfs reset" which removes all changes and resets 
the
inst-sys to the original state. This can be useful if you mess up the inst-sys 
and
you want to start from scratch.


Notes
=====

Logging
-------

The "yupdate" logs to the standard y2log file so you can see there which files 
have
been modified. When reading an y2log you can easily find out that the inst-sys 
was
not the same as on the installation medium.

Self Update
-----------

After installing an update the "yupdate" script disables the YaST self-update 
feature
because there is a conflict. If you need the self-update installed then start 
the
installer, let the self-update proceed, abort the installation and then use the
"yupdate" script.


Limitations
------------

Of course, nothing is perfect so also this approach has some disadvantages:

- Works only for packages which use the Rake tool for installation (it cannot 
work
with the autotools based packages simply because the autoconf, automake and 
their
dependencies are missing in the inst-sys)

- Works only for Ruby packages (more exactly for packages which do not have any
special build dependencies, e.g. do not require a C++ compiler).

- Does not work for some specific packages which do some additional magic in the
*.spec file after running "rake install". For example the yast-theme package 
does not
work because of that.


Enjoy! :-)


--
Ladislav Slezák
YaST Developer

SUSE LINUX, s.r.o.
Corso IIa
Křižíkova 148/34
18600 Praha 8
--
To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org
To contact the owner, e-mail: yast-devel+ow...@opensuse.org

Reply via email to