Diff for "Soyuz/HowToUseSoyuzLocally"

Not logged in - Log In / Register

Differences between revisions 9 and 24 (spanning 15 versions)
Revision 9 as of 2009-11-12 22:46:20
Size: 5641
Editor: pgquiles
Comment: Revert the debootstrap stuff, apparently debootstrap --variant=buildd does not create the same bootstrap you can download from launchpadlibrarian.net
Revision 24 as of 2010-01-10 23:20:18
Size: 6104
Editor: wgrant
Comment: Remove some lp-buildd modifications, since they've just been merged.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
 * Alter the following sections of the configuration (`configs/development/launchpad-lazr.conf`) as shown:

{{{
[archivepublisher]
root: /var/tmp/archive
base_url: http://archive.launchpad.dev/ # <- this

[builddmaster]
root: /var/tmp/builddmaster/
uploader: scripts/process-upload.py -Mvv --context buildd # <- and this
}}}

 * In /etc/hosts, point `archive.launchpad.dev` at 127.0.0.88 like the rest.
 * Add to `/etc/apache2/site-available/local-launchpad`:

{{{
 <VirtualHost 127.0.0.88:80>
  ServerName archive.launchpad.dev
  LogLevel debug
  DocumentRoot /var/tmp/archive
  <Directory /var/tmp/archive/>
   Order Deny,Allow
   Deny from all
   Allow from 127.0.0.0/255.0.0.0
   Options Indexes
  </Directory>
 </VirtualHost>
}}}

 * Grab and run [[attachment:make-ubuntu-sane.py|make-ubuntu-sane.py]], to set up some Ubuntu series that still exist, along with some state such as permissions.
 * Grab and run [[attachment:make-ubuntu-sane.py|make-ubuntu-sane.py]], to set up some Ubuntu series that still exist, along with some state such as permissions ([[#amd64chroots|Please see note on amd64 chroots]]).
Line 34: Line 5:
 * `mkdir /var/tmp/zeca`
Line 43: Line 15:
  * Check email in `root`'s mailbox, and use it to activate the key.
 * Sign the code of conduct.
  * Get the token from the `logintoken` table, or check the email in `root`'s mailbox, and use it to activate the key (potential gotchas: [[#runmta|no MTA]], [[#gpgcrc|gpg CRC errors]])
   * To use the logintoken, go to launchpad.dev/token/$TOKEN
 * Sign the code of conduct (or [[https://launchpad.dev/codeofconduct/console/+new|simply add one as an admin]]).
Line 50: Line 23:
 * Log in as `admin@example.com:test`.  * Log in as `admin@canonical.com:test`.
Line 57: Line 30:
deb http://archive.ubuntu.com/ubuntu %(series) main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu %(series)s main restricted universe multiverse
Line 65: Line 38:
 * `sudo apt-get -f install`
Line 66: Line 40:
  * Add `$SUDO cp /etc/resolv.conf /etc/hosts "$HOME/build-$BUILDID/chroot-autobuild/etc"` to the end of `/usr/share/launchpad-buildd/slavebin/mount-chroot`, so name resolution works.
Line 68: Line 41:
  * (>= Karmic) Might need to alter "`dpkg-source: extracting`" output grepping in sbuild to "`dpkg-source: info: extracting`"
Line 70: Line 42:
 * Get an Ubuntu buildd chroot by downloading one from LaunchpadLibrarian.net  * Get an Ubuntu buildd chroot from Launchpad:
Line 88: Line 60:
 * mkdir `/var/tmp/poppy`
Line 117: Line 90:

= Notes =

<<Anchor(amd64chroots)>>
== Amd64 chroots ==

Run the query below (e.g. using "`psql -d launchpad_dev`") '''before''' running `make-ubuntu-sane.py` in case you want to be able to set up `amd64` chroots for build slaves.

{{{
INSERT INTO distroarchseries (distroseries, processorfamily, architecturetag, owner, official) VALUES (3, 3, 'amd64', 1, true);
}}}

It adds an `amd64` `DistroArchSeries` for `hoary` from which all the subsequent distro series are cloned by the `make-ubuntu-sane.py` script.


<<Anchor(runmta)>>
== MTA needed ==

You need to have some sort of MTA (e.g. `postfix`) running in order for the email to be placed in the root's mailbox. In cases where you have Launchpad running in a `chroot` you'll need to stop the "normal" MTA and start it in the `chroot` or configure the one in the `chroot` to use a different port.

<<Anchor(gpgcrc)>>
== Gpg CRC errors ==
Run gpg like this "`gpg --ignore-crc-error -d <file>`" in case you see the following error message while decrypting the email sent by launchpad:
{{{
gpg: malformed CRC
gpg: quoted printable character in armor - probably a buggy MTA has been used
}}}

Initial setup

Configure an account and PPA

  • make run

  • Create an account for yourself (utilities/make-lp-user USERNAME)

  • Log in with USERNAME@example.com:test.

  • Add your OpenPGP key
    • gpg --keyserver keyserver.launchpad.dev --send-keys DEADBEEF

    • Add it to your Launchpad account, as normal.
    • Get the token from the logintoken table, or check the email in root's mailbox, and use it to activate the key (potential gotchas: no MTA, gpg CRC errors)

      • To use the logintoken, go to launchpad.dev/token/$TOKEN
  • Sign the code of conduct (or simply add one as an admin).

  • Create a PPA.

Set up the PPA

  • Log out.
  • Log in as admin@canonical.com:test.

  • Browse to the new PPA.
  • Click "Administer".
    • Ensure that the PPA is allowed to build on non-virtual builders.
    • Add an external dependency so you don't have to import the entire Ubuntu archive just for a PPA to work:

deb http://archive.ubuntu.com/ubuntu %(series)s main restricted universe multiverse

Configure a buildd

Please note a "builder" and a "chroot" are not the same thing, nor are they "associated" in any way. The logic is as follows:

  • PPAs require builders (a machine where to build packages)
  • The builder may be virtualized (for instance, launchpad.net uses Xen-virtualized builders) or the same machine where Launchpad (meaning "your launchpad.dev") is running, which is what this page details. Using the very same machine where Launchpad.dev is running limits the architectures you can build for: if you are running on i386, you can't build for PowerPC, for instace.
  • A builder needs to setup a bootstrap (what you get with debootstrap) Linux. That bootstrap is what you get in the chroot tarballs mentioned above.
  • When you upload a package and tell Launchpad to process it (see below for this), the builder will pick the chroot it needs (for instance, karmic i386), uncompress it and start building the package.
  • In summary, there are two lists: a list of builders and a list of chroots.

Upload a source to the PPA

  • mkdir /var/tmp/poppy

  • Run scripts/process-upload.py /var/tmp/poppy (creates hierarchy)

  • Add to ~/.dput.cf:

[lpdev]
fqdn = ppa.launchpad.dev:2121
method = ftp
incoming = %(lpdev)s
login = anonymous
  • dput lpdev:~USERNAME/PPANAME/ubuntu some_source.changes

  • scripts/process-upload.py /var/tmp/poppy # Accept the source upload.

  • Within five seconds of upload acceptance, the buildd should start building. Wait until it is complete.
  • scripts/process-accepted.py --ppa ubuntu # Create publishings for the binaries.

  • scripts/publish-distro.py --ppa # Publish the source and binaries.

    • Note that private archive builds will not be dispatched until their source is published.

Dealing with the primary archive

  • Add yourself to ~ubuntu-team.

  • dput lpdev:ubuntu some_source.changes

  • scripts/process-upload.py /var/tmp/poppy

  • Watch the output -- the upload might end up in NEW.
    • If it does, go to the queue and accept it.
  • Your builder should now be busy. Once it finishes, the binaries might go into NEW. Accept them if required.
  • scripts/process-accepted.py ubuntu

  • scripts/publish-distro.py

    • The first time, add -C to ensure a full publication of the archive.

Notes

Amd64 chroots

Run the query below (e.g. using "psql -d launchpad_dev") before running make-ubuntu-sane.py in case you want to be able to set up amd64 chroots for build slaves.

INSERT INTO distroarchseries (distroseries, processorfamily, architecturetag, owner, official) VALUES (3, 3, 'amd64', 1, true);

It adds an amd64 DistroArchSeries for hoary from which all the subsequent distro series are cloned by the make-ubuntu-sane.py script.

MTA needed

You need to have some sort of MTA (e.g. postfix) running in order for the email to be placed in the root's mailbox. In cases where you have Launchpad running in a chroot you'll need to stop the "normal" MTA and start it in the chroot or configure the one in the chroot to use a different port.

Gpg CRC errors

Run gpg like this "gpg --ignore-crc-error -d <file>" in case you see the following error message while decrypting the email sent by launchpad:

gpg: malformed CRC
gpg: quoted printable character in armor - probably a buggy MTA has been used

Soyuz/HowToUseSoyuzLocally (last edited 2022-12-10 08:09:22 by jugmac00)