User:Et-8/GLARBS

From Gentoo Wiki
Jump to:navigation Jump to:search
Article status
This article has some todo items:
  • Write a TODO list.
GLARBS related overlays
Warning
This page is a work in progress by Et-8 (talk | contribs). Treat its contents with caution.

GLARBS = Gentoo Linux Auto-Rice Bootstrapping Scripts

GLARBS is an efficient ebuild that will install a fully-featured dynamic window manager-based system on any Gentoo or Gentoo Linux-based system, without any of the routine of manual post-install processes and configuration. By default, GLARBS gives you the option to install any of the below video creators rice and deploy their personal dotfiles for their special builds of software, which is very cool!

Tip
In the future GLARBS will be aviable for install with a CLI installer from the Gentoo minimal installCD or with a GUI installer from a GLARBS LiveDVD with the Calamares installer.

GLARS will include the following video creators

How to install Suckless software the Gentoo way

  1. Enable the savedconfig USE flag globally in /etc/portage/make.conf
  2. Install the ebuilds for Suckless vanilla programs in the portage tree with Gentoo's package manager, Portage.
  3. Install GLARBS overlay.
  4. Install the ebuilds for programs in the glarbs-overlay with Gentoo's package manager, Portage.
  5. Apply Suckless and other patches, which has been cleaned for Portage, by activate USE flags in these ebuilds.

Suckless vanilla programs in the portage tree

dwm

USE flags for x11-wm/dwm a dynamic window manager for X11

savedconfig Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies
xinerama Add support for querying multi-monitor screen geometry through the Xinerama API

You must enable the savedconfig USE flag in order to save customized configuration file to /etc/portage/savedconfig/x11-wm/dwm-6.2 for later editing.

root #euse --enable savedconfig

Users with multiple monitors should enable the xinerama USE flag regardless of whether or not Xinerama will be used.

root #euse --enable xinerama

Install dwm with the command:

root #emerge --ask --verbose x11-wm/dwm

st

USE flags for x11-terms/st simple terminal implementation for X

savedconfig Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies

You must enable the savedconfig USE flag in order to save customized configuration file to /etc/portage/savedconfig/x11-terms/st-0.8.4 for later editing.

root #euse --enable savedconfig

Install st with the command:

root #emerge --ask --verbose x11-terms/st

surf

USE flags for www-client/surf a simple web browser based on WebKit/GTK+

savedconfig Without a saved config.h, this package depends on net-misc/curl and x11-terms/st for a default download mechanism
tabbed Install surf-open.sh script for running surf in x11-misc/tabbed

You must enable the savedconfig USE flag in order to save customized configuration file to /etc/portage/savedconfig/www-client/surf-2.0 for later editing.

root #euse --enable savedconfig

Some customization's requires the tabbed USE flag to be enabled. This will cause a rebuild of www-client/surf if it isn't already enabled.

root #euse --enable tabbed

Install surf with the command:

root #emerge --ask --verbose www-client/surf

tools

dmenu

USE flags for x11-misc/dmenu a generic, highly customizable, and efficient menu for the X Window System

savedconfig Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies
xinerama Add support for querying multi-monitor screen geometry through the Xinerama API

You must enable the savedconfig USE flag in order to save customized configuration file to /etc/portage/savedconfig/x11-misc/dmenu-5.0 for later editing.

root #euse --enable savedconfig

Users with multiple monitors should enable the xinerama USE flag regardless of whether or not Xinerama will be used.

root #euse --enable xinerama

Install dmenu with the command:

root #emerge --ask --verbose x11-misc/dmenu

Programs in the glarbs-overlay

To use the glarbs-overlay you must enable it with Eselect/Repository or layman.

root #emerge --ask app-eselect/eselect-repository
root #eselect repository enable glarbs-overlay

dwmblocks

Cannot load package information. Is the atom x11-misc/dwmblocks correct?

You must enable the savedconfig USE flag in order to save customized configuration file to /etc/portage/savedconfig/x11-misc/dwmblocks-1.0.0 for later editing.

root #euse --enable savedconfig

Install dwmblocks with the command:

root #emerge --ask --verbose x11-misc/dwmblocks

Customisation

Programs are customised by editing config.h, a C language header file, and config.mk, a Make include file.

What is config.h (config header file)?

config.h is a source code file which is included by package-name.c, the main source code module. It serves as the configuration file for all of the programs's features, e.g. application placement, tags, and colours. A vanilla download of the software will contain a file called config.def.h, a template you can use to create your own config.h file.

How do I modify config.h?

config.h can be edited just like any other C source code file. It contains definitions of variables that are going to be used by package-name.c and therefore it is vital that the file is always up to date. The default Makefile distributed with software will not overwrite your customised config.h with the contents of config.def.h, even if it was updated in the the latest git pull or release. Therefore, you should always compare your customised config.h with config.def.h and make sure you include any changes to the latter in your config.h. The savedconfig USE flag together with the CONFIG_PROTECT variable will make portage inform you when a change need manual intervention.

What is config.mk (make include file)?

config.mk is a file included by Make. It allows you to configure how Make is going to compile and install the software.

How do I modify config.mk?

config.mk can be edited just like any other text file. It contains definitions of variables that are going to be used inside the Makefile. Unlike config.h, config.mk does not have a config.def.mk (a default Makefile). Therefore, during an update, you may run into conflicts if the original config.mk is edited. GLARBS patches will solve this issue.

Updating customizations after a new release

When the time comes to update your customizations after a new release of the software, you do the following...

Patches

There are two types of patches:

  • The ones that fit to your personal taste.
  • The ones included in mainline.
Important
Many patches make changes to config.def.h instead of config.h. You must move those changes to config.h.

Patch filename format

There are two formats for patches:

  • For git revisions

toolname-toolversion-patchname-YYYYMMDD-SHORTHASH.patch

The toolversion should correspond to the tool release version, ie 6.2 for dwm-6.2.

The YYYYMMDD date should correspond to the last time the patch has been modified. The SHORTHASH here is the seven chars git commit short hash corresponding to the last commit of the tool on which the patch can be applied correctly and is working with. You can get it by taking the first seven chars of the full hash or for example:

user $git rev-parse --short <commit-id> (with commit-id: HEAD, commit hash, etc.)

The dwm patch allyourbase will look Like this:

dwm-6.2-allyourbase-20160617-3465bed.patch

  • For release versions

toolname-toolversion-patchname.patch

The toolversion should correspond to the tool release version, ie 6.2 for dwm-6.2.

The dwm patch allyourbase will look Like this:

dwm-6.2-allyourbase.patch

Patch generation

  • For git users
user $cd program-directory
user $git add filechanges...
user $git commit (write a clear patch description)
user $git format-patch --stdout HEAD^ > toolname-toolversion-patchname-YYYYMMDD-SHORTHASH.patch
  • For tarballs
user $cd modified-program-directory/..
user $diff -up original-program-directory modified-program-directory > toolname-toolversion-patchname.patch

How does emerge patch programs?

How does the savedconfig use flag affects the config header file?

As stated previously, the configuration file is the /etc/portage/savedconfig/$category/$Packagename-version file and after each change, the program needs to be recompiled for any changes to take effect.

In order for the editor to use syntax highlighting feature for C code, create a symlink using a header filename.

root #ln -s /etc/portage/savedconfig/x11-wm/dwm-6.2 /etc/portage/savedconfig/x11-wm/dwm-6.2.h

or

if you use an editor based on vi, inside the editor, type:

CODE
:set filetype=c

What is the CONFIG_PROTECT variable?

Troubleshooting

See also

  • Patches — describes how to create a source code patch.
  • /etc/portage/patches — provide a way for users to apply patches to package source code
  • Clean patch howto - Gentoo development guide.
  • GLEP 25 - Technical information about the formal inclusion and usage of patches within portage.

External resources