mirror of
https://git.launchpad.net/livecd-rootfs
synced 2026-02-16 06:53:28 +00:00
Compare commits
No commits in common. "ubuntu/master" and "2.275+ppa2" have entirely different histories.
ubuntu/mas
...
2.275+ppa2
@ -1,12 +0,0 @@
|
||||
pipeline:
|
||||
- [lint]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
series: noble
|
||||
architectures: amd64
|
||||
packages:
|
||||
- black
|
||||
- mypy
|
||||
- python3-flake8
|
||||
run: ./check-lint
|
||||
177
BuildLiveCD
Executable file
177
BuildLiveCD
Executable file
@ -0,0 +1,177 @@
|
||||
#!/bin/bash
|
||||
BUILD_LOG=~/public_html/BuildLive.out
|
||||
ALWAYS_SEND_LOG=yes
|
||||
LANG=C
|
||||
|
||||
finish() {
|
||||
[ $? != "0" ] && STATUS="Failed" || STATUS="Successful"
|
||||
if [ "$STATUS" = "Failed" ] || [ "$ALWAYS_SEND_LOG" = "yes" ]; then
|
||||
SEND_LOG=yes
|
||||
fi
|
||||
if [ -e "$LOG" ]; then
|
||||
echo "======================= Log of livefs.sh output follows ======================="
|
||||
cat $LOG
|
||||
fi
|
||||
if [ "$SEND_LOG" = "yes" ]; then
|
||||
exec >/dev/null 2>&1
|
||||
mailx -s "LiveCD: $STATUS $STE:$FS${SUBPROJECT:+-$SUBPROJECT}${SUBARCH:+-$SUBARCH}${UBUNTU_DEFAULTS_LOCALE:+-$UBUNTU_DEFAULTS_LOCALE} build on ${ARCH}" buildd+porters < "$BUILD_LOG"
|
||||
fi
|
||||
rm -f ~/buildLiveCD.lock
|
||||
nohup ~/bin/pruneLiveCD >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
if [ -n "$SSH_ORIGINAL_COMMAND" ]; then
|
||||
set -- $SSH_ORIGINAL_COMMAND
|
||||
[ ${1##*/} != 'BuildLiveCD' ] && echo bad command >&2 && exit 2
|
||||
shift
|
||||
fi
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
SUBARCH=""
|
||||
NEWSUITE="precise"
|
||||
SUITES=""
|
||||
PROPOSED=""
|
||||
IMAGEFORMAT=""
|
||||
LIVE_BUILD=false
|
||||
UBUNTU_DEFAULTS_LOCALE=""
|
||||
|
||||
while getopts :A:s:r:d:f:plu:t: name; do case $name in
|
||||
A) ARCH="$OPTARG";;
|
||||
s) SUBARCH="$OPTARG";;
|
||||
r) SUBPROJECT="$OPTARG";;
|
||||
d) NEWSUITE="$OPTARG";;
|
||||
f) IMAGEFORMAT="$OPTARG";;
|
||||
p) PROPOSED="-p";;
|
||||
l) LIVE_BUILD=:;;
|
||||
u) UBUNTU_DEFAULTS_LOCALE="$OPTARG";;
|
||||
t) UBUNTU_TOUCH_ANDROID="$OPTARG";;
|
||||
esac; done;
|
||||
shift $((OPTIND-1))
|
||||
|
||||
for s in $NEWSUITE; do
|
||||
if [ -d build-${s}-live/chroot-${s} ]; then SUITES="$SUITES $s"; fi
|
||||
done
|
||||
if [ -z "$SUITES" ]; then
|
||||
echo "No valid suites to build for" >&2 && exit 1
|
||||
fi
|
||||
for s in $SUITES; do
|
||||
case $s in
|
||||
dapper|edgy|feisty|gutsy|hardy)
|
||||
old_suite="yes"
|
||||
;;
|
||||
*)
|
||||
new_suite="yes"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ "$new_suite" = "yes" ] && [ "$old_suite" = "yes" ]; then
|
||||
echo "Can't build images for suites older than intrepid and suites" >&2
|
||||
echo "greater than hardy at the same time, please use two invocations" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ([ $# = 0 ] || [ "X$1" = "Xall" ]) && ! $LIVE_BUILD; then
|
||||
set -- ubuntu kubuntu kubuntu-active edubuntu xubuntu mythbuntu base
|
||||
if [ "$ARCH" = "i386" ]; then
|
||||
set -- ubuntu ubuntu-dvd ubuntu-lpia ubuntu-netbook kubuntu kubuntu-dvd kubuntu-active edubuntu edubuntu-dvd xubuntu mythbuntu base
|
||||
fi
|
||||
fi
|
||||
|
||||
case ${ARCH} in
|
||||
hppa|sparc|powerpc) LINUX32=linux32;;
|
||||
*) LINUX32="";;
|
||||
esac
|
||||
|
||||
if [ "`echo $@ | wc -w`" -gt "1" ]; then
|
||||
for arg in "$@"; do
|
||||
$0 $arg
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
FS="$1"
|
||||
shift
|
||||
|
||||
# 12 hours should be enough for even the longest build queue to clear.
|
||||
lockfile -8 -r$((12 * 60 * 60 / 8)) ~/buildLiveCD.lock || exit 1
|
||||
trap "finish" 0
|
||||
trap "rm -f ~/buildLiveCD.lock; exit 1" 1 2 3 15
|
||||
exec > $BUILD_LOG 2>&1
|
||||
set -e
|
||||
|
||||
for STE in $SUITES; do
|
||||
if [ -d ~/build-${STE}-live/chroot-${STE} ]; then
|
||||
sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -qq update || true
|
||||
sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y dist-upgrade || true
|
||||
sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y install livecd-rootfs eatmydata || true
|
||||
sudo chroot ~/build-${STE}-live/chroot-${STE} apt-get -y --install-recommends install ubuntu-defaults-builder || true
|
||||
fi
|
||||
done
|
||||
for STE in $SUITES; do
|
||||
if cd ~/build-${STE}-live 2>/dev/null; then
|
||||
DIR=~/build-${STE}-live/chroot-${STE}/./build/
|
||||
else
|
||||
cd ~/build.live
|
||||
DIR=~/build.live/chroot-${STE}/./build/
|
||||
fi
|
||||
|
||||
PUBDIR=~/public_html/LiveCD/${STE}/${FS}${SUBPROJECT:+-$SUBPROJECT}${SUBARCH:+-$SUBARCH}${UBUNTU_DEFAULTS_LOCALE:+-$UBUNTU_DEFAULTS_LOCALE}/
|
||||
mkdir -p ${PUBDIR}
|
||||
|
||||
NOW=$(date +%Y%m%d)
|
||||
if [ -d ${PUBDIR}${NOW} ]; then
|
||||
typeset -i n=1; while [ -d ${PUBDIR}${NOW}.$n ]; do n=n+1; done
|
||||
NOW=${NOW}.$n
|
||||
fi
|
||||
LOG=${PUBDIR}${NOW}/livecd-${NOW}-${ARCH}.out
|
||||
|
||||
rm -f ${PUBDIR}latest
|
||||
ln -sf ${PUBDIR}${NOW} ${PUBDIR}latest
|
||||
mkdir -p ${PUBDIR}${NOW}
|
||||
> ${LOG}
|
||||
ln -sf livecd-${NOW}-${ARCH}.out ${PUBDIR}${NOW}/livecd-${ARCH}.out
|
||||
if $LIVE_BUILD; then
|
||||
$LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && rm -rf auto && mkdir -p auto && for f in config build clean; do ln -s /usr/share/livecd-rootfs/live-build/auto/\$f auto/; done" >> ${LOG} 2>&1 || true
|
||||
$LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && lb clean --purge" >> ${LOG} 2>&1 || true
|
||||
if ! $LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && NOW=${NOW} SUITE=${STE} PROJECT=${FS} SUBPROJECT=${SUBPROJECT} ARCH=${ARCH} SUBARCH=${SUBARCH} IMAGEFORMAT=${IMAGEFORMAT} PROPOSED=${PROPOSED:+1} lb config" >> ${LOG} 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
COMMAND="PROJECT=${FS} SUBPROJECT=${SUBPROJECT} ARCH=${ARCH} SUBARCH=${SUBARCH} lb build"
|
||||
elif [ "$UBUNTU_DEFAULTS_LOCALE" ]; then
|
||||
COMMAND="ubuntu-defaults-image --locale ${UBUNTU_DEFAULTS_LOCALE} --arch ${ARCH} --release ${STE}"
|
||||
else
|
||||
echo "Must pass either -l or -u."
|
||||
exit 1
|
||||
fi
|
||||
if $LINUX32 sudo chroot ${DIR%/./*} sh -c "cd /${DIR#*/./} && eatmydata -- $COMMAND" >> ${LOG} 2>&1; then
|
||||
rm -f ${PUBDIR}current
|
||||
ln -sf ${NOW} ${PUBDIR}current
|
||||
|
||||
for file in ${DIR}livecd.*; do
|
||||
if [ -f ${file} ]; then
|
||||
ext=${file##*.}
|
||||
base=${file%.*}; base=${base##*/}
|
||||
sudo chown buildd ${file}
|
||||
sudo mv ${file} ${PUBDIR}${NOW}/${base}-${NOW}-${ARCH}.${ext}
|
||||
ln -sf ${base}-${NOW}-${ARCH}.${ext} ${PUBDIR}${NOW}/${base}.${ext}
|
||||
fi
|
||||
done
|
||||
|
||||
for f in ${PUBDIR}${NOW}/livecd.*.cloop-*; do
|
||||
if [ -f ${f} ]; then
|
||||
target=${f%-*}
|
||||
if [ ! -f ${target} ]; then
|
||||
for fsbs in 4096:4096 1024:65536; do
|
||||
if [ -f ${target}-${fsbs} ]; then
|
||||
ln -sf ${target##*/}-${fsbs} ${target}
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ! -f ${target} ]; then
|
||||
best=$(ls -ld ${target}-* | sort -k5,5n| awk '{print $NF; quit}')
|
||||
ln -sf ${best##*/} ${target}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
@ -1,236 +0,0 @@
|
||||
Understanding the parameters used by livecd-rootfs
|
||||
==================================================
|
||||
|
||||
livecd-rootfs is a confusing codebase. One of the confusing things is
|
||||
how information flows into and around the image build process. There
|
||||
is IMAGEFORMAT and IMAGE_TARGETS and PROJECT and many other
|
||||
variables. It is not obvious when looking at the code if a given
|
||||
variable is something passed as a parameter or something derived from
|
||||
it.
|
||||
|
||||
All (or almost all) production use of livecd-rootfs is via
|
||||
launchpad-buildd so the set of potential parameters is limited by the
|
||||
set of environment variables launchpad-build can set in response to
|
||||
the build request.
|
||||
|
||||
The process from build request to environment live-build is run is a
|
||||
little convoluted. The build request takes:
|
||||
|
||||
an archive -- where to get livecd-rootfs from
|
||||
a distro_arch_series -- the series to get livecd-rootfs and build
|
||||
a pocket -- pocket to get livecd-rootfs from, also influences if proposed is
|
||||
used as a package source for the image being built
|
||||
unique_key -- you cannot have more than one pending livefs build with the same
|
||||
unique_key. does not affect the build at all.
|
||||
version -- optional version string, see below. often a serial like 20250525.1
|
||||
metadata_override -- combined with the metadata on the livefs itself to make
|
||||
the metadata for this build.
|
||||
|
||||
(ref: https://launchpad.net/+apidoc/devel.html#livefs-requestBuild)
|
||||
|
||||
These parameters are stored on the livefsbuild object (ref:
|
||||
https://git.launchpad.net/launchpad/tree/lib/lp/soyuz/model/livefsbuild.py#n372)
|
||||
and converted into a set of args passed to launchpad-build by the
|
||||
LiveFSBuildBehaviour class (ref:
|
||||
https://git.launchpad.net/launchpad/tree/lib/lp/soyuz/model/livefsbuildbehaviour.py#n99).
|
||||
|
||||
Inside launchpad-build, these arguments are inspected by the
|
||||
LiveFilesystemBuildManager.initiate method (ref:
|
||||
https://git.launchpad.net/launchpad-buildd/tree/lpbuildd/livefs.py#n24)
|
||||
which turns them into arguments for the BuildLiveFS lpbuild
|
||||
"operation" which is what creates the environment live-build runs in
|
||||
(ref:
|
||||
https://git.launchpad.net/launchpad-buildd/tree/lpbuildd/target/build_livefs.py#n167).
|
||||
|
||||
These variables can be set for both lb config and lb build:
|
||||
|
||||
PROJECT (mandatory, comes from "project" in the metadata)
|
||||
ARCH (set to the abi tag of the distroarchseries being built for)
|
||||
SUBPROJECT (optional, comes from "subproject" in the metadata)
|
||||
SUBARCH (optional, comes from "subarch" in the metadata)
|
||||
CHANNEL (optional, comes from "subarch" in the metadata)
|
||||
IMAGE_TARGETS (optional, comes from "image_targets" in the metadata
|
||||
"image_targets" is a list. IMAGE_TARGETS is set to " ".join(image_targets))
|
||||
REPO_SNAPSHOT_STAMP
|
||||
(optional, comes from "repo_snapshot_stamp" in the metadata)
|
||||
SNAPSHOT_SERVICE_TIMESTAMP
|
||||
(optional, comes from "snapshot_snapshot_stamp" in the metadata)
|
||||
COHORT_KEY
|
||||
(optional, comes from "cohort-key" in the metadata)
|
||||
|
||||
launchpad-buildd also contains code to set http_proxy / HTTP_PROXY /
|
||||
LB_APT_HTTP_PROXY but there does not appear to be any way to trigger
|
||||
this when requesting a build.
|
||||
|
||||
In addition the following variables can be set for lb config only (why
|
||||
are some things set for lb config only? no idea):
|
||||
|
||||
SUITE (set to the name of the distroarchseries being built for)
|
||||
NOW (set to value of the 'version' argument to the build request,
|
||||
defaults to strftime("%Y%m%d-%H%M%S"))
|
||||
IMAGEFORMAT (optional, comes from "image_format" in the metadata)
|
||||
PROPOSED (set to "1" if the pocket passed to the build request is proposed)
|
||||
EXTRA_PPAS (optional, comes from "extra_ppas" in the metadata
|
||||
"extra_ppas" is a list. EXTRA_PPAS is set to " ".join(extra_ppas))
|
||||
EXTRA_SNAPS (optional, comes from "extra_snaps" in the metadata
|
||||
"extra_snaps" is a list. EXTRA_SNAPS is set to " ".join(extra_snaps))
|
||||
|
||||
Here is an opinionated and slightly angry attempt to describe what
|
||||
each of these is for:
|
||||
|
||||
PROJECT
|
||||
-------
|
||||
|
||||
This is the big one, the main variable that defines what is being
|
||||
built. It can be ubuntu, ubuntu-server, xubuntu, ubuntu-mini-iso, that
|
||||
sort of thing. Generally PROJECT determines the set of packages
|
||||
installed but it (unfortunately?) has a bit more impact than that.
|
||||
|
||||
It's unarguable that we need a parameter like this.
|
||||
|
||||
ARCH
|
||||
----
|
||||
|
||||
The architecture being built for. This is always the same as `dpkg
|
||||
--print-architecture` for us, we don't do any cross builds.
|
||||
|
||||
It's kind of redundant but it's not really a problem that this exists.
|
||||
|
||||
SUBPROJECT
|
||||
----------
|
||||
|
||||
This is used for some builds to build a different sort of build of the
|
||||
project. It can be set to:
|
||||
|
||||
* "minimized" for ubuntu-cpc builds to make a minimal cloud image
|
||||
* "minimal" for xubuntu builds to make a smaller ISO
|
||||
* "desktop-preinstalled" for ubuntu builds to make a preinstalled
|
||||
image instead of the parts for an installer.
|
||||
* "buildd" for images to be used as build images by craft tools, and also
|
||||
buildd chroots used on launchpad builders?
|
||||
* "live" for ubuntu-server builds, historically to distinguish d-i
|
||||
style installers from subiquity style installers
|
||||
* "desktop" for ubuntu-core-installer builds, to influence which
|
||||
model is use to build the ubuntu core system that will be
|
||||
installed.
|
||||
|
||||
_This_ parameter is a total mess. The desktop-preinstalled use feels
|
||||
particularly egregious.
|
||||
|
||||
SUBARCH
|
||||
-------
|
||||
|
||||
This identifies the target machine more specifically than ARCH,
|
||||
e.g. "tegra-jetson" or "licheerv". Used mostly but not exclusively for
|
||||
preinstalled builds.
|
||||
|
||||
We probably do need something like this.
|
||||
|
||||
CHANNEL
|
||||
-------
|
||||
|
||||
Influences which channel snaps included in the build are taken from
|
||||
(via a few different mechanisms).
|
||||
|
||||
IMAGE_TARGETS
|
||||
-------------
|
||||
|
||||
Passed for CPC (and ubuntu-oem, for some reason) builds to
|
||||
`config/hooks.d/make-hooks` which uses it to select which binary hooks
|
||||
to run (and so determines which artifacts get produced).
|
||||
|
||||
It is probably reasonable that this exists.
|
||||
|
||||
REPO_SNAPSHOT_STAMP
|
||||
-------------------
|
||||
|
||||
Currently unused.
|
||||
|
||||
SNAPSHOT_SERVICE_TIMESTAMP
|
||||
--------------------------
|
||||
|
||||
Also currently unused, and unclear how it differs from
|
||||
REPO_SNAPSHOT_STAMP.
|
||||
|
||||
COHORT_KEY
|
||||
----------
|
||||
|
||||
Used to make sure that different builds run at the same time don't get
|
||||
different versions of snaps due to phasing differences.
|
||||
|
||||
This is a totally valid thing to need to supply.
|
||||
|
||||
http_proxy / HTTP_PROXY / LB_APT_HTTP_PROXY
|
||||
-------------------------------------------
|
||||
|
||||
Nothing complex here!
|
||||
|
||||
SUITE
|
||||
-----
|
||||
|
||||
This is the series being built (e.g. noble, questing). It is misnamed
|
||||
really -- a suite is usually a combination of a series and a pocket
|
||||
(noble-proposed, questing-security).
|
||||
|
||||
As with ARCH this is sort of redundant as we do builds in a chroot of
|
||||
the series being built but OTOH it is definitely information the
|
||||
build needs to know!
|
||||
|
||||
NOW
|
||||
---
|
||||
|
||||
The serial for the build, e.g. 20250519 or 20240418.4.
|
||||
|
||||
It is a totally reasonable parameter.
|
||||
|
||||
IMAGEFORMAT
|
||||
-----------
|
||||
|
||||
This is one of the more incoherently handled parameters. In rough
|
||||
outline it is the filesystem of the image we produce.
|
||||
|
||||
Installer builds do not produce raw images, so this ends up being set
|
||||
to 'plain' (which causes live-build to just leave the rootfs as a
|
||||
directory tree) or 'none' (which causes live-build to do roughly the
|
||||
same thing but in a different way?).
|
||||
|
||||
Image builds that use ubuntu-image set it to "ubuntu-image". These
|
||||
builds do not call 'lb build' or 'lb binary'.
|
||||
|
||||
Other preinstalled images (mostly cpc images) set it to ext4 (but then
|
||||
use live-build/ubuntu-cpc/hooks.d/remove-implicit-artifacts to remove
|
||||
the output file that this causes live-build to produce...). Some
|
||||
projects rely on this being set via metadata when building the project
|
||||
it seems.
|
||||
|
||||
It can be set when starting an image build, but most builds do not and
|
||||
the behavior when it is not set explicitly is pretty confusing.
|
||||
|
||||
This place is not a place of honor.
|
||||
|
||||
PROPOSED
|
||||
--------
|
||||
|
||||
Should packages from proposed by included?
|
||||
|
||||
This is not really as useful as it used to be for a bunch of reasons
|
||||
but it conceptually makes sense.
|
||||
|
||||
EXTRA_PPAS
|
||||
----------
|
||||
|
||||
Extra archives to get packages from.
|
||||
|
||||
This is a space separated list by the time it gets to
|
||||
livecd-rootfs. Each element of the list is of the form USER/NAME[:PIN]
|
||||
where user is a Launchpad user/team name, NAME is the name of the ppa
|
||||
to add and the optional colon-PIN at the end is the value to pin (in
|
||||
the "man 5 apt_preferences: sense) packages from this PPA at.
|
||||
|
||||
Production builds shouldn't really use this but it's definitely useful
|
||||
for development.
|
||||
|
||||
EXTRA_SNAPS
|
||||
-----------
|
||||
|
||||
Extra snaps to include (but only for ubuntu-image based builds).
|
||||
@ -1,63 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
"""List the packages which could be automatically installed without becoming autoremovable
|
||||
|
||||
Finds all manually installed meta packages, and prints their dependencies
|
||||
which could be marked as automatically installed.
|
||||
"""
|
||||
import sys
|
||||
|
||||
import apt
|
||||
|
||||
|
||||
def is_root(pkg):
|
||||
"""Check if the package is a root package (manually inst. meta)"""
|
||||
section = pkg.candidate.section if pkg.candidate else ""
|
||||
return (pkg.is_installed and
|
||||
not pkg.is_auto_installed and
|
||||
(section == "metapackages" or
|
||||
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()
|
||||
ubiquity_depends = 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 and pkg not in ubiquity_depends:
|
||||
if not pkg.is_auto_installed:
|
||||
print(pkg.name)
|
||||
|
||||
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:
|
||||
if pkg.name == "ubiquity":
|
||||
ubiquity_depends.add(ver.package)
|
||||
if pkg.name != "ubiquity":
|
||||
# Reprocess this package again, as we did not mark it when we visited it from ubiquity
|
||||
try:
|
||||
ubiquity_depends.remove(ver.package)
|
||||
# This will raise the KeyError here if ubiquity did not depend on it
|
||||
seen.remove(ver.package)
|
||||
except KeyError:
|
||||
pass
|
||||
workset.add(ver.package)
|
||||
|
||||
seen.add(pkg)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
11
check-lint
11
check-lint
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
export MYPYPATH=live-build
|
||||
mypy live-build/isobuilder live-build/isobuild
|
||||
mypy live-build/gen-iso-ids
|
||||
|
||||
black --check live-build/isobuilder live-build/isobuild live-build/gen-iso-ids
|
||||
|
||||
python3 -m flake8 --max-line-length 88 --ignore E203 live-build/isobuilder live-build/isobuild live-build/gen-iso-ids
|
||||
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
branch=$1
|
||||
dir=$2
|
||||
target="$(readlink -f "${3}")"
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
cd "${tmpdir}"
|
||||
|
||||
cleanup () {
|
||||
rm -rf "${tmpdir}"
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
mkdir -p $target
|
||||
|
||||
git clone $branch checkout
|
||||
for po in checkout/$dir/*.po; do
|
||||
msgfmt "${po}" -o "${target}/$(basename "${po}" .po).mo"
|
||||
done
|
||||
1
debian/.gitignore
vendored
1
debian/.gitignore
vendored
@ -1 +0,0 @@
|
||||
files
|
||||
7077
debian/changelog
vendored
7077
debian/changelog
vendored
File diff suppressed because it is too large
Load Diff
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
7
|
||||
51
debian/control
vendored
51
debian/control
vendored
@ -1,56 +1,15 @@
|
||||
Source: livecd-rootfs
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Build-Depends: debhelper (>= 7)
|
||||
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
|
||||
Standards-Version: 4.7.0
|
||||
Vcs-Git: https://git.launchpad.net/livecd-rootfs -b ubuntu/master
|
||||
Vcs-Browser: https://git.launchpad.net/livecd-rootfs
|
||||
Rules-Requires-Root: no
|
||||
Standards-Version: 3.9.4
|
||||
Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk
|
||||
|
||||
Package: livecd-rootfs
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends},
|
||||
apt-utils,
|
||||
attr,
|
||||
debootstrap,
|
||||
devscripts,
|
||||
distro-info,
|
||||
dosfstools,
|
||||
e2fsprogs,
|
||||
gdisk,
|
||||
genisoimage,
|
||||
germinate (>= 1.25.1),
|
||||
gettext,
|
||||
git,
|
||||
gnupg,
|
||||
grep-dctrl,
|
||||
jq,
|
||||
kpartx,
|
||||
live-build (>= 3.0~a57-1ubuntu31~),
|
||||
lsb-release,
|
||||
lzma,
|
||||
make,
|
||||
mount,
|
||||
mtools [!i386],
|
||||
parted,
|
||||
procps,
|
||||
python3,
|
||||
python3-apt,
|
||||
python3-click,
|
||||
python3-launchpadlib [!i386],
|
||||
python3-yaml,
|
||||
qemu-utils [!i386],
|
||||
rsync [!i386],
|
||||
snapd (>= 2.39) [!i386],
|
||||
squashfs-tools (>= 1:3.3-1),
|
||||
sudo,
|
||||
u-boot-tools [arm64 armhf],
|
||||
python3-vmdkstream [amd64 i386],
|
||||
xorriso [!i386],
|
||||
xz-utils,
|
||||
zerofree,
|
||||
zstd
|
||||
Depends: ${misc:Depends}, debootstrap, rsync, python-minimal | python, procps, squashfs-tools (>= 1:3.3-1), grep-dctrl, lsb-release, lzma, e2fsprogs, germinate (>= 1.25.1), apt-utils, gnupg, live-build (>= 3.0~a57-1ubuntu12~), android-tools-fsutils [armhf], python3-software-properties
|
||||
Suggests: partimage
|
||||
Breaks: ubuntu-defaults-builder (<< 0.32)
|
||||
Description: construction script for the livecd rootfs
|
||||
livecd-rootfs provides the script used to create the root filesystem
|
||||
|
||||
8
debian/copyright
vendored
8
debian/copyright
vendored
@ -1,4 +1,4 @@
|
||||
live-build/* is copyright (c) 2004-2016 by Canonical Ltd.
|
||||
live-build/* is copyright (c) 2004-2013 by Canonical Ltd.
|
||||
|
||||
These programs are free software; you can redistribute and/or modify
|
||||
them under the terms of the GNU General Public License as published by
|
||||
@ -11,12 +11,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License with
|
||||
your Ubuntu system, in /usr/share/common-licenses/GPL-2, or with the
|
||||
your Ubuntu system, in /usr/share/common-licenses/GPL, or with the
|
||||
livecd-rootfs source package as the file COPYING. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA.
|
||||
|
||||
Files: live-build/ubuntu-cpc/hooks/raspi2/mkknlimg
|
||||
Copyright: 2009,2010 Dick Streefland <dick@streefland.net>
|
||||
2014,2015 Raspberry Pi (Trading) Limited <info@raspberrypi.org>
|
||||
License: GPL-2+
|
||||
|
||||
1
debian/examples
vendored
Normal file
1
debian/examples
vendored
Normal file
@ -0,0 +1 @@
|
||||
BuildLiveCD
|
||||
4
debian/gbp.conf
vendored
4
debian/gbp.conf
vendored
@ -1,4 +0,0 @@
|
||||
[DEFAULT]
|
||||
debian-branch=ubuntu/master
|
||||
debian-tag = %(version)s
|
||||
dch-opt = --vendor=debian
|
||||
5
debian/install
vendored
5
debian/install
vendored
@ -1,7 +1,2 @@
|
||||
auto-markable-pkgs usr/share/livecd-rootfs
|
||||
live-build usr/share/livecd-rootfs
|
||||
get-ppa-fingerprint usr/share/livecd-rootfs
|
||||
minimize-manual usr/share/livecd-rootfs
|
||||
checkout-translations-branch usr/share/livecd-rootfs
|
||||
update-source-catalog usr/share/livecd-rootfs
|
||||
sync-mtime usr/share/livecd-rootfs
|
||||
|
||||
10
debian/livecd-rootfs.lintian-overrides
vendored
10
debian/livecd-rootfs.lintian-overrides
vendored
@ -1,10 +0,0 @@
|
||||
# This is expected and okay
|
||||
livecd-rootfs: service-file-is-not-a-file [usr/share/livecd-rootfs/*.service]
|
||||
livecd-rootfs: uses-dpkg-database-directly [usr/share/livecd-rootfs/live-build/lb_chroot_layered]
|
||||
livecd-rootfs: package-contains-no-arch-dependent-files
|
||||
|
||||
# Developer documentation in an already-expected spot
|
||||
livecd-rootfs: package-contains-documentation-outside-usr-share-doc [usr/share/livecd-rootfs/live-build/ubuntu-cpc/README.cpc.md]
|
||||
|
||||
# This is going to occur quite a bit; we're making a livefs
|
||||
livecd-rootfs: repeated-path-segment * [*]
|
||||
6
debian/rules
vendored
6
debian/rules
vendored
@ -4,12 +4,6 @@
|
||||
|
||||
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
override_dh_auto_test:
|
||||
dh_auto_test
|
||||
set -e; for x in live-build/auto/*; do \
|
||||
sh -n "$$x"; \
|
||||
done
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
find debian/livecd-rootfs -type f -print0 | \
|
||||
|
||||
5
debian/source/lintian-overrides
vendored
5
debian/source/lintian-overrides
vendored
@ -1,5 +0,0 @@
|
||||
# This is expected and okay
|
||||
livecd-rootfs source: absolute-symbolic-link-target-in-source * [live-build/*]
|
||||
|
||||
# The description indicates that it's not required in debhelper >= 13, which we have
|
||||
livecd-rootfs source: override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS [debian/rules:*]
|
||||
7
debian/tests/control
vendored
7
debian/tests/control
vendored
@ -1,7 +0,0 @@
|
||||
Tests: default-bootstraps
|
||||
Depends: @, lsb-release
|
||||
Restrictions: needs-root isolation-machine allow-stderr
|
||||
|
||||
Tests: minimized
|
||||
Depends: @, lsb-release
|
||||
Restrictions: needs-root isolation-machine allow-stderr
|
||||
92
debian/tests/default-bootstraps
vendored
92
debian/tests/default-bootstraps
vendored
@ -1,92 +0,0 @@
|
||||
#!/bin/sh
|
||||
# autopkgtest check: Build default rootfs for all supported project:subproject pairs
|
||||
# (C) 2017 Canonical Ltd.
|
||||
# Author: Balint Reczey <balint.reczey@canonical.com>
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$SUITE" ]; then
|
||||
SUITE=$(lsb_release -c -s)
|
||||
fi
|
||||
|
||||
# Known project:subproject:template combinations.
|
||||
# Listed subprojects can be combined with other projects as well,
|
||||
# but this list gives reasonable coverage.
|
||||
ALL_TRIPLETS="
|
||||
edubuntu::
|
||||
kubuntu::
|
||||
lubuntu::
|
||||
ubuntu-unity::
|
||||
ubuntu::
|
||||
ubuntu-base::
|
||||
ubuntu-base:buildd:
|
||||
ubuntu-budgie::
|
||||
ubuntu-budgie-desktop::
|
||||
ubuntu-budgie-live::
|
||||
ubuntucinnamon::
|
||||
ubuntu-core:system-image:ubuntu-core
|
||||
ubuntu-cpc::ubuntu-cpc
|
||||
ubuntu-cpc:minimized:ubuntu-cpc
|
||||
ubuntu-dvd::
|
||||
ubuntukylin::
|
||||
ubuntu-mate::
|
||||
ubuntu-mate-core::
|
||||
ubuntu-mate-desktop::
|
||||
ubuntu-mate-live::
|
||||
ubuntu-server:live:ubuntu-server
|
||||
xubuntu::
|
||||
xubuntu:minimal:"
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
|
||||
if [ -z "$SELECTED_TRIPLETS" ]; then
|
||||
SELECTED_TRIPLETS="
|
||||
ubuntu-base::
|
||||
ubuntu-cpc::ubuntu-cpc
|
||||
"
|
||||
if [ "$ARCH" = amd64 ]; then
|
||||
SELECTED_TRIPLETS="$SELECTED_TRIPLETS
|
||||
ubuntu::"
|
||||
fi
|
||||
fi
|
||||
|
||||
live_build_rootfs() {
|
||||
PROJECT=${1%%:*}
|
||||
local SUBPROJECT_TMP=${1%:*}
|
||||
SUBPROJECT=${SUBPROJECT_TMP#*:}
|
||||
TEMPLATE=${1##*:}
|
||||
echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
|
||||
cp -a /usr/share/livecd-rootfs/live-build/auto .
|
||||
if [ -n "$TEMPLATE" ]; then
|
||||
cp -a /usr/share/livecd-rootfs/live-build/$TEMPLATE .
|
||||
fi
|
||||
env PROJECT=$PROJECT \
|
||||
SUBPROJECT=$SUBPROJECT \
|
||||
SUITE=$SUITE \
|
||||
ARCH=$ARCH \
|
||||
NOW=$(date '+%Y%m%d') \
|
||||
lb config
|
||||
mkdir chroot
|
||||
# this part needs root rights, but right now the whole script ran as root by autopkgtest
|
||||
env PROJECT=$PROJECT \
|
||||
SUBPROJECT=$SUBPROJECT \
|
||||
ARCH=$ARCH \
|
||||
NOW=$(date '+%Y%m%d') \
|
||||
lb build
|
||||
echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
|
||||
du -sh *
|
||||
echo ""
|
||||
}
|
||||
|
||||
[ -d /adt ] || mkdir /adt
|
||||
WORKDIR=$(mktemp -d -p /adt)
|
||||
trap "RET=\$?; rm -rf $WORKDIR; exit \$RET" 0 INT QUIT ABRT PIPE TERM
|
||||
cd $WORKDIR
|
||||
|
||||
for i in $SELECTED_TRIPLETS; do
|
||||
mkdir $i
|
||||
(cd $i && live_build_rootfs $i)
|
||||
# clean up after build to avoid filling the disk, needs root rights
|
||||
rm -rf $i
|
||||
done
|
||||
|
||||
3
debian/tests/minimized
vendored
3
debian/tests/minimized
vendored
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
env SELECTED_TRIPLETS=ubuntu-cpc:minimized:ubuntu-cpc debian/tests/default-bootstraps
|
||||
@ -2,14 +2,16 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from launchpadlib.launchpad import Launchpad
|
||||
from optparse import OptionParser
|
||||
|
||||
from softwareproperties import ppa
|
||||
|
||||
|
||||
parser = OptionParser(usage="%prog OWNER/NAME")
|
||||
_, args = parser.parse_args()
|
||||
if not args:
|
||||
parser.error("must provide a PPA owner/name")
|
||||
owner_name, ppa_name = args[0].split("/", 1)
|
||||
lp = Launchpad.login_anonymously('livecd-rootfs', 'production', version='devel')
|
||||
print(lp.people(owner_name).getPPAByName(name=ppa_name).signing_key_fingerprint)
|
||||
owner_name = "~%s" % owner_name
|
||||
ppa_info = ppa.get_ppa_info_from_lp(owner_name, ppa_name)
|
||||
print(ppa_info["signing_key_fingerprint"])
|
||||
|
||||
@ -1 +0,0 @@
|
||||
0xffffff
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read perfmon bpf checkpoint_restore
|
||||
@ -1 +0,0 @@
|
||||
acquire send receive
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
1.2
|
||||
@ -1 +0,0 @@
|
||||
create read write exec append mmap_exec link lock
|
||||
@ -1 +0,0 @@
|
||||
sqpoll override_creds
|
||||
@ -1 +0,0 @@
|
||||
create read write open delete setattr getattr
|
||||
@ -1 +0,0 @@
|
||||
mount umount pivot_root
|
||||
@ -1 +0,0 @@
|
||||
detached
|
||||
@ -1 +0,0 @@
|
||||
userns_create
|
||||
@ -1 +0,0 @@
|
||||
no
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
pciu&
|
||||
@ -1 +0,0 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp mctp
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp mctp
|
||||
@ -1 +0,0 @@
|
||||
file
|
||||
@ -1 +0,0 @@
|
||||
0x000001
|
||||
@ -1 +0,0 @@
|
||||
allow deny subtree cond kill complain prompt audit quiet hide xindex tag label
|
||||
@ -1 +0,0 @@
|
||||
0x000003
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
0x000001
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
1
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
read trace
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
allow deny audit quiet
|
||||
@ -1 +0,0 @@
|
||||
cpu fsize data stack core rss nproc nofile memlock as locks sigpending msgqueue nice rtprio rttime
|
||||
@ -1 +0,0 @@
|
||||
hup int quit ill trap abrt bus fpe kill usr1 segv usr2 pipe alrm term stkflt chld cont stop stp ttin ttou urg xcpu xfsz vtalrm prof winch io pwr sys emt lost
|
||||
@ -1 +0,0 @@
|
||||
0xffffff
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read perfmon bpf checkpoint_restore
|
||||
@ -1 +0,0 @@
|
||||
acquire send receive
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
1.2
|
||||
@ -1 +0,0 @@
|
||||
create read write exec append mmap_exec link lock
|
||||
@ -1 +0,0 @@
|
||||
sqpoll override_creds
|
||||
@ -1 +0,0 @@
|
||||
create read write open delete setattr getattr
|
||||
@ -1 +0,0 @@
|
||||
mount umount pivot_root
|
||||
@ -1 +0,0 @@
|
||||
detached
|
||||
@ -1 +0,0 @@
|
||||
userns_create
|
||||
@ -1 +0,0 @@
|
||||
no
|
||||
@ -1 +0,0 @@
|
||||
yes
|
||||
@ -1 +0,0 @@
|
||||
pciu&
|
||||
@ -1 +0,0 @@
|
||||
unspec unix inet ax25 ipx appletalk netrom bridge atmpvc x25 inet6 rose netbeui security key netlink packet ash econet atmsvc rds sna irda pppox wanpipe llc ib mpls can tipc bluetooth iucv rxrpc isdn phonet ieee802154 caif alg nfc vsock kcm qipcrtr smc xdp mctp
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user