commit
791d2adfd8
@ -1,2 +1,3 @@
|
||||
live-build usr/share/livecd-rootfs
|
||||
get-ppa-fingerprint usr/share/livecd-rootfs
|
||||
minimize-manual usr/share/livecd-rootfs
|
||||
|
@ -0,0 +1,5 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# At one point, kernel builds needed this.
|
||||
echo do_initrd = Yes >>/etc/kernel-img.conf
|
@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
. config/bootstrap
|
||||
|
||||
# Use a public-facing mirror URL, for the benefit of
|
||||
# sbuild-launchpad-chroot. We deliberately do this only after live-build
|
||||
# has run "apt-get update" for the last time, in order that
|
||||
# /var/lib/apt/lists/ has suitable cached Packages files; this speeds up
|
||||
# builds on buildds.
|
||||
sed -i "s,${LB_PARENT_MIRROR_BINARY},${LB_MIRROR_BINARY},g" \
|
||||
binary/etc/apt/sources.list
|
@ -0,0 +1,10 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Configure pkgbinarymangler.
|
||||
sed -i /^enable/s/false/true/ \
|
||||
/etc/pkgbinarymangler/maintainermangler.conf \
|
||||
/etc/pkgbinarymangler/striptranslations.conf || true
|
||||
sed -i /^invalid_current/s/ignore/fail/ \
|
||||
/etc/pkgbinarymangler/maintainermangler.conf \
|
||||
/etc/pkgbinarymangler/striptranslations.conf || true
|
@ -0,0 +1,9 @@
|
||||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Create the buildd user and group.
|
||||
addgroup --gid 2501 buildd
|
||||
adduser --system --disabled-password --gecos 'Build Daemon user' \
|
||||
--ingroup buildd --uid 2001 --shell /bin/bash buildd
|
||||
mkdir -p /build/buildd
|
||||
chown buildd:buildd /build/buildd
|
@ -0,0 +1,2 @@
|
||||
DPkg::Options {"--force-unsafe-io";};
|
||||
DPkg::Use-Pty "false";
|
@ -0,0 +1,3 @@
|
||||
Package: *
|
||||
Pin: release a=*-backports
|
||||
Pin-Priority: 500
|
@ -0,0 +1 @@
|
||||
/dev/root / ext2 noatime,errors=remount-ro 0 1
|
@ -0,0 +1 @@
|
||||
INVALID
|
@ -0,0 +1,9 @@
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff00::0 ip6-mcastprefix
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
ff02::3 ip6-allhosts
|
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# policy-rc.d script for chroots.
|
||||
# Copyright (c) 2007 Peter Palfrader <peter@palfrader.org>
|
||||
# License: <weasel> MIT, if you want one.
|
||||
|
||||
while true; do
|
||||
case "$1" in
|
||||
-*) shift ;;
|
||||
makedev) exit 0;;
|
||||
*) echo "Not running services in chroot."; exit 101 ;;
|
||||
esac
|
||||
done
|
@ -0,0 +1,2 @@
|
||||
# We never want debconf interaction.
|
||||
debconf debconf/frontend select Noninteractive
|
@ -0,0 +1,3 @@
|
||||
# Avoid unnecessary manual page database builds (see
|
||||
# https://bugs.debian.org/554914).
|
||||
man-db man-db/auto-update boolean false
|
@ -0,0 +1,3 @@
|
||||
# Pre-accept interactive EULA prompts.
|
||||
sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
|
||||
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
|
@ -0,0 +1,2 @@
|
||||
[Journal]
|
||||
RateLimitIntervalSec=0
|
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/python3
|
||||
"""Minimize the number of manually installed packages in the image.
|
||||
|
||||
Finds all manually installed meta packages, and marks their dependencies
|
||||
as automatically installed.
|
||||
"""
|
||||
import sys
|
||||
|
||||
import apt
|
||||
|
||||
|
||||
def is_root(pkg):
|
||||
"""Check if the package is a root package (manually inst. meta)"""
|
||||
return (pkg.is_installed and
|
||||
not pkg.is_auto_installed and
|
||||
(pkg.section == "metapackages" or
|
||||
pkg.section.endswith("/metapackages")))
|
||||
|
||||
|
||||
def main():
|
||||
"""Main function"""
|
||||
cache = apt.Cache(rootdir=sys.argv[1] if len(sys.argv) > 1 else None)
|
||||
roots = set(pkg for pkg in cache if is_root(pkg))
|
||||
workset = set(roots)
|
||||
seen = set()
|
||||
|
||||
with cache.actiongroup():
|
||||
while True:
|
||||
print("Iteration", file=sys.stderr)
|
||||
to_proc = workset - seen
|
||||
if not to_proc:
|
||||
break
|
||||
for pkg in sorted(to_proc):
|
||||
print(" Visiting", pkg, file=sys.stderr)
|
||||
|
||||
if pkg not in roots:
|
||||
pkg.mark_auto()
|
||||
|
||||
for dep in (pkg.installed.dependencies +
|
||||
pkg.installed.recommends):
|
||||
for bdep in dep.or_dependencies:
|
||||
for ver in bdep.target_versions:
|
||||
if ver.package.is_installed:
|
||||
workset.add(ver.package)
|
||||
|
||||
seen.add(pkg)
|
||||
|
||||
cache.commit()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in new issue