<br /> Building Debian from source – Debian Planet

Welcome to Debian Planet

News for Debian. Stuff that *really* matters

Sponsorship

Debian Planet is hosted by Bluelinux Internet Services Ltd. Offering a special discounted rate for Free and Open Source software community members.

Buy your Debian merchandise at DebianShop.com.

Debian
These are important Debian sites one should not be without!

  • Official Debian site
  • Package search
  • Mailing list archives
  • Bug reports
  • Debian on CD
  • Debian Weekly News — excellent news source!
  • Unofficial APT sources
    (apt-get.org)

  • Developers’ Corner
  • Community
    Need help? You’re not alone on this planet.

  • Planet Debian
  • debianHELP
    (User support site)

  • Debian Administration
    (SysAdmin resources)

  • Debian International
  • DebianForum.de
    (Deutsch)

  • DebianForum.dk
    (Dansk)

  • EsDebian
    (Español)

  • DebianWorld
    (Français)

  • Debian-Fr
    (Français)

  • MaximumDebian
    (Italiano)

  • DebianItalia
    (Italiano)
  • DebianUsers
    (한국어)

  • Debian-BR
    (Português)

  • DebianHOWTO
    (Deutsch)

  • Russian Debian (Русский)
  • Debian-JP
    (日本語)
  • Debian Suisse
    (Suisse)
  • Contribute
    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you’ve written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    General feedback should be sent to staff@debianplanet.org

    IRC
    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.oftc.net.

    Many of the Debian Planet staff live there so pop by and say hello.

    Debian Planet also has its own channel on the same network called #debianplanet.

    Syndicate
    XML

    Building Debian from source
    Submitted by Anonymous on Monday, June 10, 2002 – 17:42
    PackagesThere have been several discussions about building Debian from source. I hacked together a script today that will rebuild all installed packages — it’s written in perl and operates very smoothly.
    The URL for my script is http://www.rootshell.be/~kp2sushi/source_builder.pl.

    Robot101: Yes, the idea of building everything from source has been discussed before here, here, here, here, and here. The general consensus is that it’s a bit of a time-waster except for building optimised versions of a handful of CPU intensive packages such as bzip, gzip , mozilla and glibc. After woody releases, we may see support for this added to dpkg and apt, allowing a few select packages to ship with optimised versions where appropriate.

    Category: News

    Control panel

    Comment viewing options:



    Select your prefered way to display the comments and click ‘Update settings’ to activate your changes.

    Subject: Re: Building Debian from source
    Author: Idimmu
    Date: Wednesday, 2002/06/12 – 15:36
    What are the chances of something like this being included in apt as a normal feature though?
    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: xerxes
    Date: Wednesday, 2002/06/12 – 16:59
    I read somewhere in debian-devel a message about supporting it in woody+1.. Don’t know how serious those plans are though..

    You might want to search trough the mailing lists archives for ‘woody+1 wishlist’

    [ Please login, or register ]

    Subject: Re: Building Debian from source
    Author: Anonymous
    Date: Tuesday, 2002/06/11 – 04:08
    …and is there a simple way to make ‘apt-get upgrade’ not try to download and reinstall the same versions of all the packages, once you have compiled your own and installed them?

    I compiled Mozilla, KDE, X and a few others optimized for i686. When I checked for updates, apt tried to re-download the lot and install the official un-optimized binaries! Dang. Manually putting these packages on hold can be a pain. kpackage is clever enough to not show these packages as being updated. Although I am told that this is a feature and not a bug in apt.

    What is the work around for this?

    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: hrwandil
    Date: Tuesday, 2002/06/11 – 14:00
    Bump version of packages or (better) insert something into version string to know which are yours (my packages are named 0.8.9-hrw-1 for example).
    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: mman
    Date: Tuesday, 2002/06/11 – 09:15
    …and is there a simple way to make ‘apt-get upgrade’ not try to download and reinstall the same versions of all the packages, once you have compiled your own and installed them?

    after building your own packages put them to some directory, study how dpkg-scanpackages work, create Packages.gz listing, fill in missing Release file with your custom origin and then finally prioritize your origin via apt-preferences(5), put your directory to sources.list and voila, your own packages will not be replaced unless there is a newer official version available… and you can use apt to even upgrade to your custom made packages…

    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: robot101
    Date: Friday, 2002/06/14 – 18:41
    Or just edit the changelog before you build and increment the version by 0.0.1 for your local build. Or add a string or something.

    Regards,
    Rob

    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: Anonymous
    Date: Tuesday, 2002/06/11 – 23:33
    Always wondered how those package lists were generated. Thanks man! 🙂
    [ Please login, or register ]

    Subject: Re: Building Debian from source
    Author: matthijs
    Date: Monday, 2002/06/10 – 19:02
    Do the packages actually get built for the building architecture this way? IM: Does it produce i686 optimized binaries om my PII? I know it would seem logical that it does, but I vaguely remember reading something about having specifically to set an option for this. Can anyone confirm/deny/explain?
    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: grolschie
    Date: Tuesday, 2002/06/11 – 23:35
    What about Duron optimization? Do you use i686 or Athlon when using pentium-builder?
    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: aj
    Date: Thursday, 2002/06/13 – 19:12
    I’ve been using Athlon for GCC-3.0

    You’ve many more options with GCC-3.1 (TBird, etc.)
    But nothing obvious for Duron.

    Duron’s just an old shrunk Athlon with less cache, no?

    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: robot101
    Date: Friday, 2002/06/14 – 00:43
    Yeah, Duron has less cache, and a few less registers. The registers are mostly the performance killer.
    [ Please login, or register ]

     

    Subject: The right arch
    Author: Valium
    Date: Tuesday, 2002/06/11 – 11:34
    There is a package out there called pentium-builder. If you install it, it will put itself between the user and gcc (transparent). If you then set the environment-variable DEBIAN_BUILDARCH=i486,pentium,i686,athlon
    it will compile optimized binaries for that arch.
    (athlon will only work on GCC3.x)

    My script (see previous comment) uses this internally. And the workaround I used for the auto-upgrade overwrite problem with apt (this _is_ by design) my little script changes the version to version.cast, so you can see for yourself which packages have been casted, and apt won’t overwrite them unless there is a newer official release.

    [ Please login, or register ]

     

    Subject: Re: The right arch
    Author: aj
    Date: Tuesday, 2002/06/11 – 18:29
    Other useful variables to use with cast and
    pentium builder include:

    LINUX_SOURCE=/usr/src/linux (or whichever)
    DEBIAN_BUILDGCCVER=3.1 (or whichever)

    Note, with gcc 3.1 you have more DEBIAN_BUILDARCH options too.

    cast is pretty sweet. much thanx to valium for the time and effort.

    -aj

    [ Please login, or register ]

     

    Subject: Re: The right arch
    Author: aj
    Date: Tuesday, 2002/06/11 – 18:16
    And also Athlon builder for gcc 3.x :

    sources:

    deb http://people.debian.org/~dancer/athlon-builder/ ./
    deb-srchttp://people.debian.org/~dancer/athlon-builder/ ./

    # apt-get gcc3.0-athlon-builder

    cheers,

    -aj

    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: Valium
    Date: Monday, 2002/06/10 – 22:17
    I made a compile-script too. I made it in plain bash, so you can install it on a bare-bones system. It requires some basic stuff like head/tail, sed and awk (and of course apt-get and dpkg).

    You can use it in the same way you use apt-get, just install packages with it.

    It uses a config-file:
    you can define arch, location of compilation, depth of compilation (auto-dependency-compilation), autocompilation of -dev packages etc… It has reached beta-quality.

    install it with:
    http://atlas.et.tudelft.nl/valium/install-cast | sh

    [ Please login, or register ]

     

    Subject: Re: Building Debian from source
    Author: SpaceMathieu
    Date: Wednesday, 2002/06/12 – 08:19
    Well beta-quality is not good enough then.

    This program might try to rm -rf your root directory! That is _VERY_ bad: do not use it.

    It happened to me, I lost /bin, /etc, /lib, /opt and I stopped it when I saw error messages regarding /dev :). This was a testing-machine hopefully! Thanks Valium…

    [ Please login, or register ]

     

    Subject: Ow my god!
    Author: Valium
    Date: Thursday, 2002/06/13 – 11:27
    That’s not supposed to happen.

    Why did it do that? Could you drop me a mail where you explain what you did?

    My thoughts: You started cast without ‘cast prep’ to set it up. (The install-script does this automatically. Maybe a config-check would be in order.)

    [ Please login, or register ]

     

    Subject: Re: Ow my god!
    Author: SpaceMathieu
    Date: Monday, 2002/06/17 – 10:18
    yes, that’s possible… 🙂
    and also I gave it an invalid package name:
    cast mysql
    (instead of mysql-server).

    Then it pauses for a while and starts issuing errors like: cannot remove /dev/pty/0: permission denied. That’s when I Ctrl-C it 🙂

    [ Please login, or register ]

    Search articles



    Category
    ·News (406)
    ·Features (5)
    ·Site News (16)
    ·HOWTOs (79)
    ·Tips (21)
    ·Opinion (29)
    ·Q & A (35)
    ·Sponsorship (1)
    ·Press Releases (5)

    Log in
    Username:

    Password:

    Remember me

    » Register
    » New password

    Debian Security Announcements
    DSA-943 perl
    DSA-942 albatross
    DSA-903 unzip
    DSA-941 tuxpaint
    DSA-940 gpdf
    DSA-939 fetchmail
    DSA-938 koffice
    DSA-937 tetex-bin
    DSA-936 libextractor
    DSA-935 libapache2-mod-auth-pgsql

    Planet Debian
    Wouter Verhelst: On flames.
    Joachim Breitner: Fixing my planet.debian.org subscription
    Steve Kemp: She has the blood of reptile just underneath her skin
    Pierre Habouzit: Married …
    Pierre Habouzit: whitelister 0.4 (SPF) and aaege ….
    Pierre Habouzit: kde 3.4.1 upload
    Holger Levsen: In case you are running OpenWRT
    Michael Janssen: Shiny roofs are good for the environment!
    Matthew Palmer: Work it out yourself, dammit!
    Axel Beckert: Tell me which music you like and I tell who you are

    Debian Administration
    How do I prevent rebuilt packages from being upgraded?
    Disabling the print-screen key inside X?
    Monitoring your bandwidth usage with vnstat
    Ruby on Rails on Debian
    Choice for Virtual Private Servers?
    Monitoring your hardware’s temperature
    Sending mail with Exim from ‘dialup’ IP
    How to recover GRUB Debian Sarge after reinstalling Windows
    Getting a GUI
    Spam filtering with Pyzor and SpamBayes

    Latest poll: Which release scheme should Debian follow?
    Continue this way (release when ready)
    48%
     
    Give up on releasing
    8%
       
    Split the release up
    8%
       
    Speed the release up
    32%
       
    Crank the workload up (see DebianWiki ReleaseProposals for details on these)
    4%
       

    Total votes: 372
    0 comments · older polls

    home · archives · news feeds · about · polls · search · sections · user account

    Powered by the amazing Drupal

    Debian Planet is not officially related to the Debian Project.
    Debian and the Debian logo are trademarks of Software in the Public Interest, Inc.