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 Suckless 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 with Gentoo's package manager emerge.
  3. Install GLARBS overlay.
  4. Apply patches by activate USE flags in:

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.h 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

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.h for later editing.

root #euse --enable savedconfig

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.h 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

tools

dmenu

Customisation

dwm is customised btermsy editing config.h, a C language header file, and config.mk, a Make include file.

What is config.h?

config.h is a source code file which is included by package-name.c, the main Suckless source code module. It serves as the configuration file for all of Suckless's features, e.g., application placement, tags, and colours. A vanilla download of any Suckless software will contain a file called config.def.h, a template you can use to create your own config.h file. To start customising, simply copy config.def.h into config.h, make some customisations and create a patch with your config.h customisations.

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 Suckless 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 and the CONFIG_PROTECT variable will solve this isssue.

What is config.mk?

config.mk is a file included by Makefile. It allows you to configure how make is going to compile and install the Suckless 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 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 ebuilds will solve this issue.

Updating customizations after new release

When the time comes to update your customizations after a new release of the Suckless 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-patchname-YYYYMMDD-SHORTHASH.diff

The dwm patch allyourbase will look Like this:

dwm-allyourbase-20160617-3465bed.diff

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.)
  • For release versions

toolname-patchname-RELEASE.diff

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

The dwm patch allyourbase will look Like this:

dwm-allyourbase-6.2.diff

Diff 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-patchname-YYYYMMDD-SHORTHASH.diff
  • For tarballs
user $cd modified-program-directory/..
user $diff -up original-program-directory modified-program-directory > toolname-patchname-RELEASE.diff

How does emerge patch programs?

How does the savedconfig use flag affects Suckless's config.h file?

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
  • GLEP 25 - Technical information about the formal inclusion and usage of patches within portage.

External resources