Commit Graph

16 Commits

Author SHA1 Message Date
Ian Wienand
f3121f0fb7 Fix up doc errors
It seems that pbr's "warnerrors" isn't actually doing anything at the
moment (I680b448471e687919d202e8f2abe57f8ba3b22ee) meaning we're able
to commit docs with RST parser errors.  Fix all these up in some
minimal way (I have not audited content, just made it pass build).

Link the specs in so they're referenced from the top level.

Change-Id: Id67b9ea7ba8f49b43969c58ca3fb7fa1243538a4
2017-02-08 16:07:01 +11:00
Jenkins
074a10fd74 Merge "Allow disto-specific mirror settings" 2017-01-19 21:00:56 +00:00
Gregory Haynes
6278371eaa Make dib-python use the default python for distro
Right now dib-python works by trying to find any python on a system in
an order of precedence. A much better way is if we are explicit about
the python we intend to be there which will allow us to make better
decisions in other elements (such as allowing for package-installs to
take into account DIB_PYTHON_VERSION) as well as allow for users to
specify a preferred python version.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: Ie609de51cc5fcde701296c9474e315981d9778a2
2016-12-09 09:25:37 -08:00
Gregory Haynes
cd1965f7b7 Allow disto-specific mirror settings
Most of our distros support DIB_DISTRIBUTION_MIRROR for setting the
mirror to be used when building. This has a major downside where if
someone would like to create a static configuration for building various
distro images it cannot set DIB_DISTRIBUTION_MIRROR (think of the case
where we want to run our tests).

By adding support for DIB_$DISTRO_DISTRIBUTION_MIRROR this problem is
resolved.

Change-Id: I92964b17ec3e47cf97e3a3091f054b2a205ac768
2016-12-08 16:02:15 -08:00
Markos Chandras
e22faa0f77 elements: Drop executable bits from environment files
Files in $element/environment.d are meant to be sourced, so drop
the executable bit. Moreover, drop the executable bit from a couple
of other scripts that are either meant to be sourced or simply because
they are configuration files.

Change-Id: I7f724dd9d409f4a835a136f12f48a84aa9acc41e
2016-12-01 23:06:56 +00:00
Gregory Haynes
45df304d48 Perform package install outside of debootstrap
Debootstrap only supports one apt repository to install packages from.
As a result, we do not consider the updates repo during debootstrap
causing us install a second kernel when we do an apt-get dist-upgrade
during build.

Lets use debootstrap to get us a minimal chroot, then add our repos and
install the correct packages from the start.

We also have to reorder the dpkg root.d scripts which configure apt so
they run before we perform our package installs.

Change-Id: I6a592db6f0a01d3b19d8e0786e63f1315a1ef647
Closes-Bug: #1637516
2016-11-30 15:16:46 +11:00
Paul Belanger
7dc9465ed1
Default to http://ftp.us.debian.org/debian for debian-minimal
Since http://httpredir.debian.org is unreliable is selecting a mirror
to use, we'll now default to http://ftp.us.debian.org/debian.  In
fact, in openstack-infra we have been overriding httpredir.debian.org
for a while, now make this default in diskimage-builder.

Change-Id: I48658bc076e13a0913821197e4120c73618fef8f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-10-01 21:10:08 -04:00
Xiang Chen
ff234b65ea Explain difference between two envvars
Explain difference between 'DIB_OFFLINE' and
 'DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE'

Those variables are not redundant,they hava different effective ranges.
However,some people may be confused about this and reported a bug.
So,this difference should be writen in the README file.

Closes-Bug: #1506275

Change-Id: Ie5316de41d129bf98781708954f09ef0b2592b53
2016-08-25 10:07:29 +08:00
Andreas Florath
a8c8c61711 Fix packaging problems for Debian
This patch solves three issues with Debian packaging / apt:

o When building 'testing' only default apt sources is
  included - backports, updates and security are skipped because they
  do not exists.

o The default release for Debian was `unstable`: this is now fixed to
  `stable`.

o Starting a Debian Stretch VM that was build with diskimage-builder
  does not work, because some mandatory packages are missing.
  This patch fixes this problem: it adds the mandatory packages and
  the test case.

Change-Id: If49b5b162c4da1e074e9b19324839bc59d87dc57
Signed-off-by: Andreas Florath <andreas@florath.net>
2016-07-19 07:11:57 +02:00
Andreas Florath
92355004d9 Fix apt-sources configuration for debian-minimal
The apt-sources element did not work with debian-minimal, because
the later one overwrote the /etc/apt/sources.list file created by
the apt-sources element.

Two changes were made:
o the debian-minimal uses now files inside the /etc/apt/sources.list.d
  directory.  Therefore there is no possibilty for clashes between those
  two elements any more.
o instead of only adding backports, also the updates and the security
  repository is added by default which gives perfect initial
  configuration for a stable system.
  If you want to use local mirrors with other naming schemas or an
  unstable tree, there is the possibility to fully specify the
  repositories.

Change-Id: I69dbaa34be3db3d667e6bd8450ef4ce04a751c70
Signed-off-by: Andreas Florath <andreas@florath.net>
2016-05-13 09:26:49 +02:00
Antoine Musso
ee58c5b1cc debian-minimal: configurable debootstrap components
The debian-minimal element creates /etc/apt/sources.list solely with
the 'main' component. I need to add 'non-free' and 'contribs'. I tried
to pass them via DIB_DEBIAN_COMPONENTS but it is not recognized.

Make debian-minimal to honor DIB_DEBIAN_COMPONENTS. Note that it is
comma separated for 'debootstrap', so replace commas with spaces to fit
the needs of sources.list.

Example usage:

 DIB_DEBIAN_COMPONENTS='main,non-free,contrib'

Will debootstrap with the three components then when debian-minimal is
realized pre install a sources.list that has:

  deb http://example.org/debian jessie main contrib non-free

Change-Id: I1dca2e8ffd31044a6b441ccb277298601e62f67c
2016-02-12 22:57:58 +01:00
Igor Belikov
78278405ce Fix debian-minimal image building
'locales' package gets installed before '12-debian-locale-gen' is executed
and generates effectively empty /etc/locales.gen in debian, which makes
dpkg-reconfigure call to locales ignore the values set by
debconf-set-selections.
* Remove /etc/locale.gen generated by 'locales' installation to ensure
  proper locales generation on debian images
* Remove 'locales-all' package installation from debian element since
  it's not needed anymore to build the image and cosnumes additional
  ~120MB of space
* Remove unused 'package-installs' dependency from debian-minimal
  element

Change-Id: Ic39ba2b5ceb5018efb75742547b2babf80827e56
Closes-Bug: #1452400
2016-01-28 16:41:35 +03:00
Clint Adams
b0ee421a2a Use official mirror name for debian-minimal
The canonical name of the official Debian mirror redirector is
httpredir.debian.org.

Change-Id: I61455919d84d414d5da7df699a5b14439f07ff3d
2015-07-09 23:41:49 -04:00
Gregory Haynes
917962d26c Install debian locales
Building debian images failes due to missing the locale were trying to
set.

Change-Id: I9fa330fd82e5289b549713f6b31345f6113cef1d
2015-05-19 19:22:43 +00:00
Adam Gandelman
0afdb07445 debian-minimal: Remove -backport's restricted + universe
These are ubuntu-isms that do not exist on debian mirrors and cause
builds to break if they're based on a stable debian release.

Change-Id: I08c2826eba4aabd0be69955220624b2f179a15ee
Closes-bug: #1450198
2015-04-29 13:45:29 -07:00
Monty Taylor
23aa76dff0 Split the debootstrap functions into an element
debootstrap is not debian or ubuntu specific. We can make a debootstrap
element that knows how to do all of the things, and then a
debian-minimal and ubuntu-minimal image that use it. Finally, make
the debian element simply be a collection of the extra things we do to
make it look like a cloud-init based cloud image.

Change-Id: Iaf46c8e61bf1cac9a096cbfd75d6d6a9111b701e
2015-04-26 18:04:59 +00:00