Giter VIP home page Giter VIP logo

build-locally's Introduction

build-locally

This package provides build programs (typically just shell scripts) that allow automatic downloading, building, and installing (locally) source packages onto existing systems, typically in a users HOME directory. Building locally in this context includes either full compilation or just downloading and installing packages that do not require compilation (but the goal is to always build from sources where possible (some exceptions will be allowed).

This is needed in one or more of the following situations:

  • It is difficult to install or upgrade packages using standard mechanisms (e.g., Apt, Yum).

  • The package is not provided by the base operating system.

  • It is desired to build the package without disturbing the configuration of the system, which may be in use by multiple users. Or you do not have system administrator (root) permissions and desire not to obtain those permissions just to install packages for your local use.

  • A more recent package is desired, whereas the operating system provided package is too old.

  • The user has to use multiple operating systems under the same account (see Warning below)

After building, it is intended that the user prepend to the resulting installation bin directory to their PATH. This will override the target platforms default installation location (e.g., override what is installed in /usr/bin) when one of the scripts or executables in the package is invoked from the UNIX/Linux shell command prompt.

These build programs are intensionally limited to building only those packages whose build logic that can be coerced (typically via dynamic build logic patching) into not prompting, and that can be downloaded from source directly from the Internet.

Usage

The following is an example of building the ficticious "example-package" on Linux, assuming that "whynot" is the GitHub user name that contains these files (e.g., GitHub cloning):

cd $HOME  # typically
mkdir whynot
cd whynot
git clone https://github.com/whynot/build-locally.git
$HOME/whynot/build-locally/packages/example-package/linux/build.bash

To build the other packages, just change "example-package" to the name of the package to build above.

Warning about renaming INSTALL_DIR

If you upgrade your system, then it is likely that INSTALL_DIR variable used in all of the scripts will change, and thus you will have to rebuild those packages using the new INSTALL_DIR.

The reason an INSTALL_DIR has a different value for each different system is because, in practice, if you have to work with multiple different Linux releases within the same NFS system (e.g., with the same HOME directory), you will want all of your packages to be available and built to work with that system.

Below is an example of what not to do:

The default for the INSTALL_DIR variable (in init_vars.bash). So, I rebuilt autoconf at one point and the INSTALL_DIR variable was:

/home/someuser/install/Ubuntu.16.04.1.x86_64

Then some time passed, and I upgraded my system such that the default INSTALL_DIR was:

/home/someuser/install/Ubuntu.16.04.2.x86_64

Then, I might have moved the above "2" directory back to the "1". but then when invoking autoreconf, it fails with:

Can't locate Autom4te/ChannelDefs.pm in @INC (you may need to install the Autom4te::ChannelDefs module) (@INC contains: /home/someuser/install/Ubuntu.16.04.1.x86_64/share/autoconf /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /home/someuser/install/Ubuntu.16.04.2.x86_64/bin/autoreconf line 39.
BEGIN failed--compilation aborted at /home/someuser/install/Ubuntu.16.04.2.x86_64/bin/autoreconf line 39.

Looking inside ~/install/Ubuntu.16.04.2.x86_64/bin/autoreconf we see

my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '/home/someuser/install/Ubuntu.16.04.1.x86_64/share/autoconf';

So the fully-qualified path to the old directory is being referenced there and thus is not relocatable. So renaming the directory is not an option.

You have to rebuild all of the packages I need. Granted, I end up just creating symbolic links inside the install directory to bypass having to rebuild packages but that defeats the purpose of having INSTALL_DIR be as fine-grained as it is.

Also consider that fully qualified values of RPATH are being used in executables in many packages.

Packages

The following is a list of packages whose build programs are provided by this package:

  • asciidoc: Building the asciidoc package.
  • atk: Building the atk package.
  • autoconf: Building the autoconf package.
  • automake: Building the automake package.
  • bdwgc: Building the bdwgc package.
  • bison: Building the bison package.
  • cairo: Building the cairo package.
  • colm: Building the colm package.
  • docbook2x: Building the docbook2x package.
  • emacs: Building the emacs package.
  • example-package: An example directory to serve as a template for adding more packages to be built by this project.
  • flex: Building the flex package.
  • freetype: Building the freetype package.
  • gdb: Building the gdb package.
  • gettext: Building the gettext package.
  • git: Building the Git package.
  • glib: Building the glib package.
  • gmp: Building the gmp package.
  • gnome-common: Building the gnome-common package.
  • gobject-introspection: Building the gobject-introspection package.
  • gtk-doc: Building the gtk-doc package.
  • gtk: Building the gtk package.
  • guile: Building the guile package.
  • harfbuzz: Building the harfbuzz package.
  • help2man: Building the help2man package.
  • idutils: Building the idutils package.
  • intltool: Building the intltool package.
  • libffi: Building the libffi package.
  • libpng: Building the libpng package.
  • libtool: Building the libtool package.
  • libunistring: Building the libunistring package.
  • libxkbcommon: Building the libxkbcommon package.
  • make: Building the make package.
  • numdiff: Building the numdiff package.
  • pango: Building the pango package.
  • patchelf: Building the patchelf package.
  • perl--cpanm: Building the Perl--cpanm language system.
  • perl: Building the Perl language system.
  • perl--xml-parser: Building the Perl--xml-parser language system.
  • pixman: Building the pixman package.
  • pkg-config: Building the pkg-config package.
  • python--ipython: Building the ipython package into the Python installation tree.
  • python--jira-python: Building the jira-python package into the Python installation tree.
  • python: Building the Python language system.
  • python--pip: Building the pip Python package into the Python installation tree.
  • python--rbtools: Building the python--rbtools package.
  • python--readline: Building the readline Python package into the Python installation tree.
  • python--setuptools: Building the setuptools package into the Python installation tree.
  • qt: Building the Qt framework.
  • ragel: Building the ragel package.
  • rdesktop: Building the rdesktop package.
  • sqlite3: Building the sqlite3 package.
  • texinfo: Building the texinfo package.
  • xbindkeys: Building the xbindkeys package.
  • xkeyboard-config: Building the xkeyboard-config package.
  • xorg-macros: Building the xorg-macros package.
  • zlib: Building the zlib package.

Development

See build-locally.org.

build-locally's People

Contributors

bgoodr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.