zypper up vs zypper dup

zypper up

  • no vendor changes
  • no harm to system
  • no dependency changes
  • no trash deletion

Update installed packages with newer versions, where possible. This command will not update packages which would require change of package vendor unless the vendor is specified in /etc/zypp/vendors.d, or which would require manual resolution of problems with dependencies. Such non-installable updates will then be listed in separate section of the summary as “The following package updates will NOT be installed:”. To update individual packages, specify one or more package names. You can use the ‘*’ and ‘?’ wildcard characters in the package names to specify multiple packages matching the pattern.

zypper dup

  • should only be used with --repo <REPO>
  • or as real ‘dist upgrade’

Perform a distribution upgrade. This command applies the state of (specified) repositories onto the system; upgrades (or even downgrades) installed packages to versions found in repositories, removes packages that are no longer in the repositories and pose a dependency problem for the upgrade, handles package splits and renames, etc. If no repositories are specified via –from or –repo options, zypper will do the upgrade with all defined repositories. This can be a problem if the system contains conflicting repositories, like repositories for two different distribution releases. This often happens if one forgets to remove older release repository after adding a new one, say openSUSE 11.1 and openSUSE 11.2. To avoid the above trouble, you can specify the repositories from which to do the upgrade using the –from or –repo options. The difference between these two is that when –repo is used, zypper acts as if it knew only the specified repositories, while with –from zypper can eventually use also the rest of enabled repositories to satisfy package dependencies

Read More

owb’s project

policy kit

Polkit (formerly PolicyKit) is a component for controlling system-wide
privileges in Unix-like operating systems. It provides an organized
way for non-privileged processes to communicate with privileged ones.
Polkit allows a level of control of centralized system policy. It is
developed and maintained by David Zeuthen from Red Hat and hosted by
the freedesktop.org project.

Can be used to give a certain user who runs the e.g. rails application required permissions

sinatra

Sinatra is a free and open source software web application library and
domain-specific language written in Ruby. It is an alternative to
other Ruby web application frameworks such as Ruby on Rails, Merb,
Nitro and Camping. It is dependent on the Rack web server interface.

Designed and developed by Blake Mizerany, Sinatra is small and
flexible. It does not follow the typical model–view–controller pattern
used in other frameworks, such as Ruby on Rails. Instead, Sinatra
focuses on “quickly creating web-applications in Ruby with minimal
effort.”

Can be used to build a light and easy to use webserver for client/server implementation

event machine

EventMachine is an event-driven I/O and lightweight concurrency
library for Ruby. It provides event-driven I/O using the Reactor
pattern, much like JBoss Netty, Apache MINA, Python’s Twisted,
Node.js, libevent and libev.

EventMachine is designed to simultaneously meet two key needs

Extremely high scalability, performance and stability for the most demanding production environments.
An API that eliminates the complexities of high-performance threaded network programming, allowing engineers to concentrate on
their application logic.

This unique combination makes EventMachine a premier choice for
designers of critical networked applications, including Web servers
and proxies, email and IM production systems,
authentication/authorization processors, and many more.

TODO

client/server

Implementing a Client/Server logic. Most difficult but fastest and ressource-saving option since the Client should be wirtten in plain C.

rails as root for syscalls

Easy but bad.

websocket

TODO:

padrino + puma == lightweight

Padrino is a ruby framework built upon the excellent Sinatra Web
Library. Sinatra is a DSL for creating simple web applications in Ruby
quickly and with minimal effort. This framework tries to make it as
fun and easy as possible to code more advanced web applications by
building upon the Sinatra philosophies and foundations.

Can be a good solution in combination with puma (smallest webserver)

chef for cluster provisioning

Chef is a configuration management tool written in Ruby and Erlang. It
uses a pure-Ruby, domain-specific language (DSL) for writing system
configuration “recipes”. Chef is used to streamline the task of
configuring & maintaining a company’s servers, and can integrate with
cloud-based platforms such as Rackspace, Amazon EC2, Google Cloud
Platform, OpenStack and Microsoft Azure to automatically provision and
configure new machines.

Use it with Vagrant to setup predefined settings in a big(or small) cluster of VMs
Could also be a good solution, huh?

Read More

Kernel compiling and installing

With the .config file in place you can start compiling with make. Since you also have to compile the modules youve set, chain commands:

make; make modules

Now Installation phase begins:

make install && make modules_install

Kernels install script will also adapt grub.cfg with the right menu entries.


The vmlinuz (or some similar name) is the kernel itself.

Initrd is the temporary RAM-based filesystem that is placed in memory and used during boot-up.

The System-map contains a list of kernel symbols. These are global variables and functions used in the kernel’s code.


Some Linux distros store the kernel’s config file in the /boot/ directory. Developers wanting to compile a kernel with the same settings as their current kernel can copy the file to their build directory. cp /boot/config-$(uname -r) /PATH/TO/.config

Read More

Kernel Configuration

make config

  • Plain text interface (most commonly used choice)

make menuconfig

  • Text-based with colored menus and radiolists. This options allows developers to save their progress. ncurses must be installed (sudo apt-get install libncurses5-dev).

make nconfig

  • Text-based colored menus – curses (libcdk5-dev) must be installed

make xconfig

  • QT/X-windows interface – QT is required

make gconfig

  • Gtk/X-windows interface – GTK is required

make oldconfig

  • Plain text interface that defaults questions based on the local config file

make silentoldconfig

  • This is the same as oldconfig except the questions answered by the config file will not be shown

make olddefconfig

  • This is like silentoldconfig except some questions are answered by their defaults

make defconfig

  • This option creates a config file that uses default settings based on the current system’s architecture.

make ${PLATFORM}_defconfig

  • Creates a config file using values from arch/$ARCH/configs/${PLATFORM}_defconfig.

make allyesconfig

  • This option creates a config file that will answer yes to as many questions as possible.

make allmodconfig

  • This option creates a config file that will make as many parts of the kernel a module as possible

Read More

Kernel modules

modprobe <MODULE> activates specified module

modinfo <MODULE> prints info about kernelmodule

lsmod lists all activated modules

list of modules

http://www.linux.org/threads/the-linux-kernel-drivers.4205/

modprobe -c | grep <MODULE> to check parameters and aliases

Read More

mutlithreading in ruby

thread1 = Thread.new do
  sum=0
  1.upto(10) {|x| sum = sum + x}
  puts("The sum of the first 10 integers is #{sum}")
end

thread2 = Thread.new do
  product=1
  1.upto(10) {|x| product = product * x}
  puts("The product of the first 10 integers is #{product}")
end

thread1.join
thread2.join

While there is great power in multithreaded code, there is also a lot of danger. A
great way to introduce hard-to-find bugs into your programs is to allow two or more
threads to modify the same data structure at the same time. A good way to avoid this
and other race conditions and make your code thread safe is to use the Monitor class:

@monitor = Monitor.new
  @monitor.synchronize do
  # Only one thread at a time here...
end

Read More