Don's Pages and my Music

Wednesday, September 30, 2009

polishlinux.org » APT-build — optimize your Debian!

APT-build — optimize your Debian!

[ Friday, 23 November 2007, P2O2 ]

Certainly most of the Linux users would like to have their systems fully optimized for their rigs but do not have the stamina or enough knowledge to play with the Gentoo installation paradigm. But here comes the rescue — an apt-build goody available under every distro armed with the big gun - APT package manager.

Author: Gallus Annonimus

Time to make the beast work for us. First we have to install it. Issue the command:

apt-get install apt-build 

Now it's time to configure it. In doing so, we'll be asked for an optimization level — whether we want to create an apt-build repo for APT, and a question about processor architecture. Of course all options can be reconfigured in this way:

dpkg-reconfigure apt-build 

The above command offers two additional options for the gcc compiler and make builder. Their descriptions can be found in system manuals: man gcc and man make.

Optimizing system

Let's go to the next step and start optimizing our system. Our program makes use of deb-src entries contained in the etc/apt/sources.list file. Thanks to the source addresses compilation and installation processes are fully automatic (similar to emerge found in Gentoo). Apt-build downloads sources of the main application and its dependencies, compiles them, creates a deb package, and finally installs the package.

We are offered a broad spectrum of options. I list only a few basic ones:

  • apt-build update — updates repo list,
  • apt-build upgrade — updates operating system,
  • apt-build install program — installs an application,
  • apt-build world — something for hard-core users, it recompiles whole system!

Other useful options:

  • --noupdate — useful for underpowered machines and when we do not want to update repos (apt-build refreshes repos with every invocation),
  • --yes — we do not have time to approve every stupid question during program installation,
  • --force-yes — we approve unauthorized packages (ATTENTION: apt-build does not install unauthorized packages — what's worse is it won't ask us for this; the option's highly recommended),
  • --reinstall — reinstalls a package,
  • --rebuild — builds a package from the beginning.

Read more...
http://polishlinux.org/linux/debian/apt-build-optimize-debian/

Don

No comments:

Post a Comment