From 47f93d0ea472ae834d77d0b3fdec4ae5610a7f75 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Mon, 8 Mar 2010 18:08:35 +0100 Subject: [PATCH 01/16] postinst-setup: update default packages --- postinst-setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/postinst-setup b/postinst-setup index b187109..5dd64ce 100755 --- a/postinst-setup +++ b/postinst-setup @@ -69,8 +69,8 @@ rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* killall apt-get || true apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools bzr-svn patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff debian-goodies ccache subversion listadmin quilt python-dev cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot imagemagick pngquant pdfjam easytag rsnapshot texlive-lang-german texlive-latex-extra python-coverage powertop sane-utils vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet -apt-get -y build-dep postgresql-8.4 hal cups apport jockey calibre gvfs devicekit-disks devicekit-power gnome-disk-utility +DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet +apt-get -y build-dep postgresql-8.4 cups apport jockey calibre gvfs udisks upower gnome-disk-utility # basic 32 bit libraries (for adb) if [ `uname -m` = x86_64 ]; then @@ -84,5 +84,5 @@ crontab -u martin - < Date: Mon, 8 Mar 2010 18:13:15 +0100 Subject: [PATCH 02/16] drop some obsolete scripts --- amberfiles | 49 ------------------------------------ dsrc-new-patch | 28 --------------------- vcard2gnokii | 67 -------------------------------------------------- 3 files changed, 144 deletions(-) delete mode 100755 amberfiles delete mode 100755 dsrc-new-patch delete mode 100755 vcard2gnokii diff --git a/amberfiles b/amberfiles deleted file mode 100755 index 82ebd87..0000000 --- a/amberfiles +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/python - -import sys, os, os.path, md5 - -mirror = "http://security.ubuntu.com/ubuntu/" - -if len(sys.argv) < 2: - print "Usage:", sys.argv[0], " []" - sys.exit(1) - -# arch -> name -> (size,md5) -files = {} - -if len(sys.argv) > 2: - version = sys.argv[2] -else: - version = None - -for f in os.listdir(sys.argv[1]): - if version and f.find(version) < 0: - continue - - path=os.path.join(sys.argv[1], f) - if os.path.isfile(path): - m = md5.new() - m.update(open(path, "r").read()) - data = (os.path.getsize(path), m.hexdigest()) - - if f.find("i386.deb") > 0: - files.setdefault("i386 architecture (x86 compatible Intel/AMD)", {})[path] = data - elif f.find("powerpc.deb") > 0: - files.setdefault("powerpc architecture (Apple Macintosh G3/G4/G5)", {})[path] = data - elif f.find("amd64.deb") > 0: - files.setdefault("amd64 architecture (Athlon64, Opteron, EM64T Xeon)", {})[path] = data - elif f.find("all.deb") > 0: - files.setdefault("Architecture independent packages:", {})[path] = data - elif (f.find("tar.gz") > 0) or (f.find("diff.gz") > 0) or (f.find(".dsc") > 0): - files.setdefault("Source archives:", {})[path] = data - else: - print >> sys.stderr, "Ignoring unknown file", path - -for arch, filemap in files.iteritems(): - print " ", arch - print - for name, (size, md5) in files[arch].iteritems(): - print " ", mirror + name - print " Size/MD5: ", size, md5 - - print diff --git a/dsrc-new-patch b/dsrc-new-patch deleted file mode 100755 index 8b26f68..0000000 --- a/dsrc-new-patch +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -[ -n "$1" ] -[ -e debian/rules ] -[ -d debian/patches ] -[ ! -e debian/patches/$1 ] - -CWD=`pwd` -D=`mktemp -d` -trap "rm -rf $D" 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 - -debclean -cp -r . $D/orig -cd $D/orig -debian/rules setup || debian/rules patch || debian/rules apply-patches || debian/rules apply-dpatches || debian/rules unpack || debian/rules patch-stamp -[ -z "`find -name '*.rej'`" ] || { - echo 'there are rejections from the current patches, aborting' >&2 - exit 1 -} -find -name '*.orig' | xargs rm || true -cd .. -cp -a orig new -cd new -echo 'make your modifications in this shell and exit it successfully' -bash -find -name '*.orig' | xargs rm || true -cd .. -diff -Nurp orig new > "$CWD/debian/patches/$1" diff --git a/vcard2gnokii b/vcard2gnokii deleted file mode 100755 index f3cef82..0000000 --- a/vcard2gnokii +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/python - -import sys - -def output_info(info, pos): - if info.has_key('X-EVOLUTION-FILE-AS'): - result = info['X-EVOLUTION-FILE-AS'] - elif info.has_key('N'): - name_comp = info['N'].split(';') - result = '%s\, %' % (name_comp[0], ' '.join([c for c in name_comp[1:] if c])) - else: - print >> sys.stderr, 'No suitable name for', info - return - - result += ';;ME;%i;5' % pos - - id = 0 - - for k, v in info.iteritems(): - kf = k.split(';') - type = 0 - if len(kf) > 1: - if 'TYPE=HOME' in k: - type = 2 - elif 'TYPE=CELL' in k: - type = 3 - elif 'TYPE=WORK' in k: - type = 6 - - if kf[0] == 'ADR': - # current gnokii does not swallow type "9" (postal address) - result += ';10;0;%i;%s' % (id, '\\n'.join([f for f in v.split(';') if f])) - elif kf[0] == 'EMAIL': - result += ';8;%i;%i;%s' % (type, id, v) - elif kf[0] == 'TEL': - result += ';11;%i;%i;%s' % (type, id, v) - elif kf[0] == 'BDAY': - result += (';10;0;%i;BDAY: ' %id) + v - else: - continue - - id += 1 - - print result - -pos = 1 -info = {} -for line in open(sys.argv[1]): - if not line or line[0] == ' ': - continue - line = line.strip() - if not line: - continue - try: - (key, value) = line.split(':', 1) - except ValueError: - print >> sys.stderr, 'ignoring invalid line:', line - continue - value = value.strip() - if value == 'VCARD': - if key == 'BEGIN': - info = {} - elif key == 'END': - output_info(info, pos) - pos += 1 - if value: - info[key] = value.strip() -- 2.39.5 From 8dc8587c1ffe2ca9bfd199ae322240db59eb748b Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Tue, 16 Mar 2010 17:26:50 +0100 Subject: [PATCH 03/16] postinst-setup: add more packages --- postinst-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postinst-setup b/postinst-setup index 5dd64ce..aafb6dc 100755 --- a/postinst-setup +++ b/postinst-setup @@ -69,7 +69,7 @@ rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* killall apt-get || true apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet +DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet germinate debootstrap seahorse-plugins apt-get -y build-dep postgresql-8.4 cups apport jockey calibre gvfs udisks upower gnome-disk-utility # basic 32 bit libraries (for adb) -- 2.39.5 From c660e1ad48ba4763209bf3c32b71a11a62d8b607 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Thu, 15 Apr 2010 11:27:23 +0200 Subject: [PATCH 04/16] add newscommit --- cleanpg | 2 +- newscommit | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100755 newscommit diff --git a/cleanpg b/cleanpg index e238f18..3719c34 100755 --- a/cleanpg +++ b/cleanpg @@ -5,4 +5,4 @@ for v in 7.4 8.0 8.1 8.2 8.3; do [ -x $i ] && $SUDO $i stop done $SUDO killall pg_autovacuum postmaster postgres -$SUDO rm -rf /etc/postgresql /var/lib/postgresql/ /var/log/postgresql/ /tmp/postgresql-testsuite/ /var/run/postgresql/* +$SUDO rm -rf /etc/postgresql /var/lib/postgresql/ /var/log/postgresql/* /tmp/postgresql-testsuite/ /var/run/postgresql/* diff --git a/newscommit b/newscommit new file mode 100755 index 0000000..b1d8b51 --- /dev/null +++ b/newscommit @@ -0,0 +1,46 @@ +#!/usr/bin/python + +import subprocess, re, sys + +lpbugs_re = re.compile(r'lp: #([0-9, ]+)', re.I) + +bzr = subprocess.Popen(['bzr', 'diff', 'NEWS'], stdout=subprocess.PIPE) +raw_msg = bzr.communicate()[0].strip() +if bzr.returncode != 1: + print >> sys.stderr, 'bzr diff NEWS failed' + sys.exit(1) + +# parse/format message +msg = '' +for l in raw_msg.splitlines(): + if not l.startswith('+ '): + continue + if msg: + msg += ' ' + msg += l[2:].strip() + +if msg.startswith('-'): + msg = msg[1:].strip() + +print '-- commit message: --' +print msg +print '---' + +if not msg: + print >> sys.stderr, 'No message in NEWS, aborting' + sys.exit(1) + +# parse Launchpad bugs +lpbugs = [] +for b_grp in lpbugs_re.finditer(msg): + for b in b_grp.group(1).split(','): + lpbugs.append(b.strip()) +print 'Fixed LP bugs:', ' '.join(lpbugs) + +# commit +argv = ['bzr', 'commit', '-m', msg] +for b in lpbugs: + argv += ['--fixes', 'lp:' + b] + +sys.exit(subprocess.call(argv)) + -- 2.39.5 From c826f0798caa6ab6128fd14846ae439857992839 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Wed, 26 May 2010 10:11:44 +0200 Subject: [PATCH 05/16] add install-manifest --- install-manifest | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 install-manifest diff --git a/install-manifest b/install-manifest new file mode 100755 index 0000000..dce8daa --- /dev/null +++ b/install-manifest @@ -0,0 +1,63 @@ +#!/usr/bin/python + +import urllib, sys, optparse, re, subprocess + +kernel_pkg_re = re.compile('linux-(generic|firmware|headers|image|backports|ec2|source|virtual|preempt)') + +def parse_argv(): + '''Parse CLI options. + + Return (options, manifest) tuple. + ''' + + optparser = optparse.OptionParser('''%prog [options] + +Install/remove packages according to a CD build manifest. + can be a local file or URL.''') + optparser.add_option('-k', '--keep-kernel', + help='Do not change kernel packages', action='store_true', + dest='keep_kernel', default=False) + options, args = optparser.parse_args() + + if len(args) != 1: + optparser.error('You need to specify exactly one manifest argument, see --help') + sys.exit(1) + + return (options, args[0]) + +# +# main +# + +(options, manifest) = parse_argv() + +selection = '' +for l in urllib.urlopen(manifest): + pkg = l.split()[0] + if options.keep_kernel and kernel_pkg_re.match(pkg): + continue + selection += '%s\tinstall\n' % pkg + +# add local kernel packages on --keep-kernel +if options.keep_kernel: + dpkg = subprocess.Popen(['dpkg', '--get-selections'], + stdout=subprocess.PIPE) + for l in dpkg.stdout: + pkg, status = l.split() + if status != 'install': + continue + if kernel_pkg_re.match(pkg): + selection += '%s\tinstall\n' % pkg + +if subprocess.call(['which', 'dselect'], stdout=subprocess.PIPE) != 0: + print >> sys.stderr, 'INFO: installing dselect (needed by this script)' + assert subprocess.call(['apt-get', '-y', 'install', 'dselect']) == 0 + +# now apply the new selections +assert subprocess.call(['dpkg', '--clear-selections']) == 0 +dpkg = subprocess.Popen(['dpkg', '--set-selections'], stdin=subprocess.PIPE) +dpkg.communicate(selection) +assert dpkg.returncode == 0 + +# commit! +subprocess.call(['dselect', 'install']) -- 2.39.5 From 6c5e192b2c2f243c332099dbaaad3691abb967ad Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Wed, 26 May 2010 10:14:03 +0200 Subject: [PATCH 06/16] install-manifest: drop -y from apt-get install dselect --- install-manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-manifest b/install-manifest index dce8daa..b6d7bc4 100755 --- a/install-manifest +++ b/install-manifest @@ -51,7 +51,7 @@ if options.keep_kernel: if subprocess.call(['which', 'dselect'], stdout=subprocess.PIPE) != 0: print >> sys.stderr, 'INFO: installing dselect (needed by this script)' - assert subprocess.call(['apt-get', '-y', 'install', 'dselect']) == 0 + assert subprocess.call(['apt-get', 'install', 'dselect']) == 0 # now apply the new selections assert subprocess.call(['dpkg', '--clear-selections']) == 0 -- 2.39.5 From 6c8261c08d6e3f0666f91da3339a98176cb945b2 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Wed, 26 May 2010 10:39:39 +0200 Subject: [PATCH 07/16] install-manifest: update package filtering --- install-manifest | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/install-manifest b/install-manifest index b6d7bc4..1fd337c 100755 --- a/install-manifest +++ b/install-manifest @@ -2,7 +2,9 @@ import urllib, sys, optparse, re, subprocess -kernel_pkg_re = re.compile('linux-(generic|firmware|headers|image|backports|ec2|source|virtual|preempt)') +kernel_pkg_re = re.compile('^linux-(generic|firmware|headers|image|backports|ec2|source|virtual|preempt)') +no_remove_re = re.compile('^bcmwl-|^dkms|^grub|^xserver-xorg-video-intel') +no_install_re = re.compile('^ubiquity|^casper|debian-install') def parse_argv(): '''Parse CLI options. @@ -36,18 +38,21 @@ for l in urllib.urlopen(manifest): pkg = l.split()[0] if options.keep_kernel and kernel_pkg_re.match(pkg): continue + if no_install_re.search(pkg): + continue selection += '%s\tinstall\n' % pkg # add local kernel packages on --keep-kernel -if options.keep_kernel: - dpkg = subprocess.Popen(['dpkg', '--get-selections'], - stdout=subprocess.PIPE) - for l in dpkg.stdout: - pkg, status = l.split() - if status != 'install': - continue - if kernel_pkg_re.match(pkg): - selection += '%s\tinstall\n' % pkg +dpkg = subprocess.Popen(['dpkg', '--get-selections'], + stdout=subprocess.PIPE) +for l in dpkg.stdout: + pkg, status = l.split() + if status != 'install': + continue + if options.keep_kernel and kernel_pkg_re.match(pkg): + selection += '%s\tinstall\n' % pkg + if no_remove_re.search(pkg): + selection += '%s\tinstall\n' % pkg if subprocess.call(['which', 'dselect'], stdout=subprocess.PIPE) != 0: print >> sys.stderr, 'INFO: installing dselect (needed by this script)' -- 2.39.5 From 290d4a65a7878c43370470a51e00ba22d8164a59 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Wed, 26 May 2010 11:06:22 +0200 Subject: [PATCH 08/16] install-manifest: remove usage of dselect --- install-manifest | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install-manifest b/install-manifest index 1fd337c..5339ba8 100755 --- a/install-manifest +++ b/install-manifest @@ -54,10 +54,6 @@ for l in dpkg.stdout: if no_remove_re.search(pkg): selection += '%s\tinstall\n' % pkg -if subprocess.call(['which', 'dselect'], stdout=subprocess.PIPE) != 0: - print >> sys.stderr, 'INFO: installing dselect (needed by this script)' - assert subprocess.call(['apt-get', 'install', 'dselect']) == 0 - # now apply the new selections assert subprocess.call(['dpkg', '--clear-selections']) == 0 dpkg = subprocess.Popen(['dpkg', '--set-selections'], stdin=subprocess.PIPE) @@ -65,4 +61,4 @@ dpkg.communicate(selection) assert dpkg.returncode == 0 # commit! -subprocess.call(['dselect', 'install']) +subprocess.call(['apt-get', 'dselect-upgrade']) -- 2.39.5 From 57e5db0a7327a0c729a372a39cb47eefd4546e43 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Mon, 7 Jun 2010 10:54:35 +0200 Subject: [PATCH 09/16] install-manifest: update filters --- install-manifest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-manifest b/install-manifest index 5339ba8..a770d3b 100755 --- a/install-manifest +++ b/install-manifest @@ -3,8 +3,8 @@ import urllib, sys, optparse, re, subprocess kernel_pkg_re = re.compile('^linux-(generic|firmware|headers|image|backports|ec2|source|virtual|preempt)') -no_remove_re = re.compile('^bcmwl-|^dkms|^grub|^xserver-xorg-video-intel') -no_install_re = re.compile('^ubiquity|^casper|debian-install') +no_remove_re = re.compile('^bcmwl-|^dkms|^grub|^xserver-xorg-video-intel|bootchart|^openssh-client') +no_install_re = re.compile('^ubiquity|^casper|debian-install|^cryptsetup|^dmsetup|^ecryptfs-utils|^parted|^redboot-tools|^tasksel|^aptitude|^os-prober|^devio') def parse_argv(): '''Parse CLI options. -- 2.39.5 From 03229ed620fb5bd5a19f2ffac8c9a87a7e23a3f9 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Tue, 29 Jun 2010 14:22:10 +0200 Subject: [PATCH 10/16] add iso-deb-size-compare --- iso-deb-size-compare | 68 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 iso-deb-size-compare diff --git a/iso-deb-size-compare b/iso-deb-size-compare new file mode 100755 index 0000000..c98bb28 --- /dev/null +++ b/iso-deb-size-compare @@ -0,0 +1,68 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import subprocess, sys + +def deb_size_map(iso_path): + map = {} # package -> (version, size) + isoinfo = subprocess.Popen(['isoinfo', '-lR', '-i', iso_path], + stdout=subprocess.PIPE) + out = isoinfo.communicate()[0] + assert isoinfo.returncode == 0 + + for l in out.splitlines(): + l = l.strip() + if not l.endswith('.deb'): + continue + + fields = l.split() + size = int(fields[4]) + fname = fields[11] + + (pkg, version, _) = fname.split('_') + map[pkg] = (version, size) + + return map + +# +# main +# + +if len(sys.argv) != 3: + print >> sys.stderr, 'Usage: %s ' % sys.argv[0] + sys.exit(1) + +old_map = deb_size_map(sys.argv[1]) +new_map = deb_size_map(sys.argv[2]) + +print '== Removed packages ==' +sum = 0 +for p, (v, s) in old_map.iteritems(): + if p not in new_map: + print '%s (%.1f MB)' % (p, s / 1000000.) + sum += s +print 'TOTAL: -%.1f MB' % (sum/1000000.) + +sum = 0 +print '\n== Added packages ==' +for p, (v, s) in new_map.iteritems(): + if p not in old_map: + print '%s (%.1f MB)' % (p, s / 1000000.) + sum += s +print 'TOTAL: +%.1f MB' % (sum/1000000.) + +print '\n== Changed packages ==' +sum = 0 +for p, (v, s) in old_map.iteritems(): + if p not in new_map: + continue + + new_s = new_map[p][1] + sum += new_s - s + + # only show differences > 100 kB to filter out noise + if new_s - s > 100000: + print '%s (Δ %.1f MB - %s: %.1f MB %s: %.1f MB)' % ( + p, (new_s-s)/1000000., v, s/1000000., new_map[p][0], new_s/1000000.) + +print 'TOTAL difference: %.1f MB' % (sum/1000000.) -- 2.39.5 From b3a5d00f729cd7e2d819d67f68d494a1ad5cea9a Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Wed, 4 Aug 2010 21:22:28 +0200 Subject: [PATCH 11/16] remove iso-deb-size-compare, moved to ubuntu-archive-tools --- iso-deb-size-compare | 68 -------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100755 iso-deb-size-compare diff --git a/iso-deb-size-compare b/iso-deb-size-compare deleted file mode 100755 index c98bb28..0000000 --- a/iso-deb-size-compare +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import subprocess, sys - -def deb_size_map(iso_path): - map = {} # package -> (version, size) - isoinfo = subprocess.Popen(['isoinfo', '-lR', '-i', iso_path], - stdout=subprocess.PIPE) - out = isoinfo.communicate()[0] - assert isoinfo.returncode == 0 - - for l in out.splitlines(): - l = l.strip() - if not l.endswith('.deb'): - continue - - fields = l.split() - size = int(fields[4]) - fname = fields[11] - - (pkg, version, _) = fname.split('_') - map[pkg] = (version, size) - - return map - -# -# main -# - -if len(sys.argv) != 3: - print >> sys.stderr, 'Usage: %s ' % sys.argv[0] - sys.exit(1) - -old_map = deb_size_map(sys.argv[1]) -new_map = deb_size_map(sys.argv[2]) - -print '== Removed packages ==' -sum = 0 -for p, (v, s) in old_map.iteritems(): - if p not in new_map: - print '%s (%.1f MB)' % (p, s / 1000000.) - sum += s -print 'TOTAL: -%.1f MB' % (sum/1000000.) - -sum = 0 -print '\n== Added packages ==' -for p, (v, s) in new_map.iteritems(): - if p not in old_map: - print '%s (%.1f MB)' % (p, s / 1000000.) - sum += s -print 'TOTAL: +%.1f MB' % (sum/1000000.) - -print '\n== Changed packages ==' -sum = 0 -for p, (v, s) in old_map.iteritems(): - if p not in new_map: - continue - - new_s = new_map[p][1] - sum += new_s - s - - # only show differences > 100 kB to filter out noise - if new_s - s > 100000: - print '%s (Δ %.1f MB - %s: %.1f MB %s: %.1f MB)' % ( - p, (new_s-s)/1000000., v, s/1000000., new_map[p][0], new_s/1000000.) - -print 'TOTAL difference: %.1f MB' % (sum/1000000.) -- 2.39.5 From 349e9c013c473edf9782021b362fdbc1b069501d Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Mon, 9 Aug 2010 08:52:07 +0200 Subject: [PATCH 12/16] postinst-setup: package updates --- postinst-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postinst-setup b/postinst-setup index aafb6dc..4d9c5ae 100755 --- a/postinst-setup +++ b/postinst-setup @@ -69,8 +69,8 @@ rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* killall apt-get || true apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet germinate debootstrap seahorse-plugins -apt-get -y build-dep postgresql-8.4 cups apport jockey calibre gvfs udisks upower gnome-disk-utility +DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet germinate debootstrap seahorse-plugins wmctrl +apt-get -y build-dep postgresql-8.4 cups apport calibre gvfs udisks upower gnome-disk-utility # basic 32 bit libraries (for adb) if [ `uname -m` = x86_64 ]; then -- 2.39.5 From 64b42c672b525dd497b3b38ed99a4f7f48095f59 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Tue, 10 Aug 2010 11:08:57 +0200 Subject: [PATCH 13/16] makechroot: use rbind, to cover ecryptfs submounts --- makechroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makechroot b/makechroot index 55dfa41..76201b1 100755 --- a/makechroot +++ b/makechroot @@ -29,7 +29,7 @@ if ! grep -q $DIR /etc/fstab; then cat <> /etc/fstab # $DIST chroot -/home $DIR/home none bind 0 0 +/home $DIR/home none rbind 0 0 /proc $DIR/proc none bind 0 0 /sys $DIR/sys none bind 0 0 /tmp $DIR/tmp none bind 0 0 -- 2.39.5 From 4f3fa2a9d54689cd022d3aaea7812bfd54faf767 Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Tue, 10 Aug 2010 16:06:52 +0200 Subject: [PATCH 14/16] postinst-setup: package updates --- postinst-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postinst-setup b/postinst-setup index 4d9c5ae..47e703e 100755 --- a/postinst-setup +++ b/postinst-setup @@ -69,7 +69,7 @@ rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* killall apt-get || true apt-get update -DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage corkscrew d-feet germinate debootstrap seahorse-plugins wmctrl +DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim bzrtools patchutils offlineimap wipe diffstat gtimelog jigdo-file libtool devhelp python-doc manpages-dev gstreamer0.10-fluendo-mp3 gstreamer0.10-ffmpeg weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt cryptsetup mutt editmoin lintian python-gtk2-doc fakechroot ubuntu-dev-tools dput dchroot fakechroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop vim-scripts libtemplate-perl kvm bzr-buildpackage git-core greasemonkey build-essential fakeroot devscripts libglib2.0-doc libgtk2.0-doc git-buildpackage d-feet germinate debootstrap seahorse-plugins wmctrl mumble apt-get -y build-dep postgresql-8.4 cups apport calibre gvfs udisks upower gnome-disk-utility # basic 32 bit libraries (for adb) -- 2.39.5 From c3807c71d42820e554ce2bfe7e620a24064d0597 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Aug 2010 08:18:39 +0200 Subject: [PATCH 15/16] postinst-setup: more cleanup --- postinst-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postinst-setup b/postinst-setup index 47e703e..1be35aa 100755 --- a/postinst-setup +++ b/postinst-setup @@ -61,7 +61,7 @@ locale-gen ru_RU ru_RU.UTF-8 # remove packages that we do not need killall apt-get || true # cronjob goo -apt-get purge -y --auto-remove hplip brltty bluez-cups gnome-accessibility-themes gnome-mag gnome-orca onboard tomboy ttf-lao ttf-thai-tlwg || true +apt-get purge -y --auto-remove hplip hplip-data hpijs brltty bluez-cups gnome-accessibility-themes gnome-mag gnome-orca onboard tomboy ttf-lao ttf-thai-tlwg || true rm -f /etc/rcS.d/*pcmcia* /etc/rcS.d/*ppp* -- 2.39.5 From 0b09ab125e0f3380abda81c5a7857f7be52fecb3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 11 Oct 2010 10:53:57 +0200 Subject: [PATCH 16/16] makechroot: fix bind mounting for /home --- makechroot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/makechroot b/makechroot index 76201b1..b255b7b 100755 --- a/makechroot +++ b/makechroot @@ -29,10 +29,10 @@ if ! grep -q $DIR /etc/fstab; then cat <> /etc/fstab # $DIST chroot -/home $DIR/home none rbind 0 0 -/proc $DIR/proc none bind 0 0 -/sys $DIR/sys none bind 0 0 -/tmp $DIR/tmp none bind 0 0 +/home/martin $DIR/home/martin none bind 0 0 +/proc $DIR/proc none bind 0 0 +/sys $DIR/sys none bind 0 0 +/tmp $DIR/tmp none bind 0 0 EOF mount $DIR/home mount $DIR/proc -- 2.39.5