Compare commits

...

11 Commits

Author SHA1 Message Date
Michael Hudson-Doyle
9579ee1539 releasing package livecd-rootfs version 2.542.3 2019-05-08 10:54:09 +12:00
Michael Hudson-Doyle
a7b8928928 Remove device nodes later for ubuntu-base:minimized (i.e. docker) builds. (LP: #1828118) 2019-05-08 10:50:23 +12:00
Julian Andres Klode
af525ff0b4 releasing package livecd-rootfs version 2.542.2 2019-04-26 10:36:48 +02:00
Julian Andres Klode
82870b1185 Remove crufty files after minimize-manual
minimize-manual would be creating those files again, and other
parts may be creating them, so best to do the cleanup at the
very end.

LP: #1826377
2019-04-25 11:51:08 +02:00
Steve Langasek
5566c26c63 releasing package livecd-rootfs version 2.542.1 2018-12-20 13:13:11 -06:00
Balint Reczey
6d3346f5cf debian/control: Update Vcs-*: URLs 2018-12-12 16:25:54 +01:00
Balint Reczey
3efca0cf7a Add .keep files to preserve empty directories 2018-12-12 15:36:14 +01:00
Steve Langasek
96eb05a4db Merge lp:~codyshepherd/livecd-rootfs/ubuntu-core-dev-snaps-manifest 2018-11-13 11:20:02 -08:00
Cody Shepherd
3f07ddd5c9 Fixing version number in changelog. 2018-11-13 10:54:27 -08:00
Cody Shepherd
f661d400a1 Fix snap-seed-parse to take filename argument instead of printing to
stdout
2018-11-13 10:48:25 -08:00
Steve Langasek
44f8ddaa25 Merge lp:~codyshepherd/livecd-rootfs/uefi-manifests-cosmic/ 2018-10-29 10:52:49 -07:00
6 changed files with 66 additions and 38 deletions

19
debian/changelog vendored
View File

@ -1,8 +1,23 @@
livecd-rootfs (2.542.1) UNRELEASED; urgency=medium
livecd-rootfs (2.542.3) cosmic; urgency=medium
* Remove device nodes later for ubuntu-base:minimized (i.e. docker) builds.
(LP: #1828118)
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 08 May 2019 10:48:39 +1200
livecd-rootfs (2.542.2) cosmic; urgency=medium
* Remove crufty files after minimize-manual (LP: #1826377)
-- Julian Andres Klode <juliank@ubuntu.com> Fri, 26 Apr 2019 10:36:33 +0200
livecd-rootfs (2.542.1) cosmic; urgency=medium
[ Cody Shepherd ]
* Ensure pre-seeded snaps are now published in the image manifests.
* Include grub efi packages in manifests for uefi images.
-- Cody Shepherd <cody.shepherd@canonical.com> Mon, 22 Oct 2018 10:16:19 -0700
-- Steve Langasek <steve.langasek@ubuntu.com> Thu, 20 Dec 2018 13:12:42 -0600
livecd-rootfs (2.542) cosmic; urgency=medium

2
debian/control vendored
View File

@ -4,7 +4,7 @@ Priority: optional
Build-Depends: debhelper (>= 7)
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Standards-Version: 3.9.6
Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/livecd-rootfs/trunk
Vcs-Git: https://git.launchpad.net/livecd-rootfs -b ubuntu/cosmic
Package: livecd-rootfs
Architecture: any

View File

@ -259,20 +259,6 @@ EOF
apt-get -y --purge autoremove"
fi
# remove crufty files that shouldn't be left in an image
rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old
Chroot chroot apt clean
if [ "${PROJECT}:${SUBPROJECT:-}" = "ubuntu-base:minimized" ]; then
# Save even more size by removing apt lists (that are currently removed
# downstream anyway)
rm -rf chroot/var/lib/apt/lists/*
# Having device notes in the docker image can cause problems
# (https://github.com/tianon/docker-brew-ubuntu-core/issues/62)
# so remove them. We only do this for docker out of an
# abundance of caution.
rm -rf chroot/dev/*
fi
if [ -f config/universe-enabled ]; then
# This is cargo-culted almost verbatim (with some syntax changes for
@ -452,6 +438,21 @@ EOF
/usr/share/livecd-rootfs/minimize-manual chroot
# remove crufty files that shouldn't be left in an image
rm -f chroot/var/cache/debconf/*-old chroot/var/lib/dpkg/*-old
Chroot chroot apt clean
# For the docker images we remove even more stuff.
if [ "${PROJECT}:${SUBPROJECT:-}" = "ubuntu-base:minimized" ]; then
# Remove apt lists (that are currently removed downstream
# anyway)
rm -rf chroot/var/lib/apt/lists/*
# Having device nodes in the docker image can cause problems
# (https://github.com/tianon/docker-brew-ubuntu-core/issues/62)
# so remove them. We only do this for docker out of an
# abundance of caution.
rm -rf chroot/dev/*
fi
lb binary "$@"
touch binary.success
) 2>&1 | tee binary.log
@ -551,7 +552,7 @@ fi
# '--initramfs none' produces different manifest names.
if [ -e "binary/$INITFS/filesystem.packages" ]; then
./config/snap-seed-parse "chroot/" >> "binary/${INITFS}/filesystem.packages"
./config/snap-seed-parse "chroot/" "binary/${INITFS}/filesystem.packages"
ln "binary/$INITFS/filesystem.packages" "$PREFIX.manifest"
chmod 644 "$PREFIX.manifest"
fi

View File

@ -49,7 +49,7 @@ create_manifest() {
echo "create_manifest chroot_root: ${chroot_root}"
dpkg-query --show --admindir="${chroot_root}/var/lib/dpkg" > ${target_file}
echo "create_manifest call to dpkg-query finished."
./config/snap-seed-parse "${chroot_root}" >> ${target_file}
./config/snap-seed-parse "${chroot_root}" "${target_file}"
echo "create_manifest call to snap_seed_parse finished."
echo "create_manifest finished"
}

View File

@ -1,26 +1,35 @@
#!/usr/bin/python3
"""
Usage: snap-seed-parse ${chroot_dir} > somefile.manifest
Usage: snap-seed-parse [${chroot_dir}] <output file>
This script looks for a seed.yaml path in the given root directory, parsing
it and printing generated manifest lines to stdout for easy redirection.
it and appending the parsed lines to the given output file.
The $chroot_dir argument is optional and will default to the empty string.
"""
import re
import sys
import yaml
import argparse
import os.path
import re
import yaml
def log(msg):
sys.stderr.write("snap-seed-parse: {}\n".format(msg))
print("snap-seed-parse: {}".format(msg))
log("Parsing seed.yaml")
CHROOT_ROOT = sys.argv[1] if len(sys.argv) > 1 and len(sys.argv[1]) > 0 \
else ''
parser = argparse.ArgumentParser()
parser.add_argument('chroot', nargs='?', default='',
help='root dir for the chroot from which to generate the '
'manifest')
parser.add_argument('file', help='Output manifest to this file')
ARGS = parser.parse_args()
CHROOT_ROOT = ARGS.chroot
FNAME = ARGS.file
# Trim any trailing slashes for correct appending
log("CHROOT_ROOT: {}".format(CHROOT_ROOT))
@ -43,14 +52,17 @@ else:
with open(YAML_PATH, 'r') as fh:
yaml_lines = yaml.safe_load(fh)['snaps']
# Loop over dict items, outputting one manifest line from each triplet
for item in yaml_lines:
filestring = item['file']
# Pull the revision number off the file name
revision = filestring[filestring.rindex('_')+1:]
revision = re.sub(r'[^0-9]', '', revision)
print("{}{}\t{}\t{}".format(LINE_PREFIX,
item['name'],
item['channel'],
revision,
))
log('Writing manifest to {}'.format(FNAME))
with open(FNAME, 'a+') as fh:
for item in yaml_lines:
filestring = item['file']
# Pull the revision number off the file name
revision = filestring[filestring.rindex('_')+1:]
revision = re.sub(r'[^0-9]', '', revision)
fh.write("{}{}\t{}\t{}\n".format(LINE_PREFIX,
item['name'],
item['channel'],
revision,
))
log('Manifest output finished.')