Commit 8bce0e33 authored by Michael Pöhn's avatar Michael Pöhn

discontinued jessie support

parent 2cbe76cc
......@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Removed
- discontinued jessie support
## [0.5.1] - 2019-01-28
### Added
- added CHANGELOG.md
......
......@@ -58,7 +58,7 @@ fdroidserver.)
-q, --quiet Restrict output to warnings and errors
-t TARGET, --target TARGET
target debian version. defaults to 'stretch64'.
(supported: jessie64, stretch64)
(supported: stretch64)
-p PROVIDER, --provider PROVIDER
target vagrant provider. defaults to 'virtualbox'.
(supported: libvirt, virtualbox)
......
......@@ -30,7 +30,7 @@ from argparse import ArgumentParser
SUPPORTED_PROVIDERS = ('libvirt', 'virtualbox')
SUPPORTED_DEBVERS = ('jessie64', 'stretch64')
SUPPORTED_DEBVERS = ('stretch64',)
class BaseboxException(Exception):
......@@ -99,8 +99,6 @@ def init_params(provider, debver, workdir='.', verbose=False, dry_run=False):
'python-minimal',
'python2.7',
'python2.7-minimal')
if debver == 'jessie64':
params['deb_packages'] += ('perl-modules',)
if provider == 'libvirt':
params['img_name_qcow2'] = params['vm_name'] + '.qcow2'
......@@ -112,10 +110,6 @@ def init_params(provider, debver, workdir='.', verbose=False, dry_run=False):
params['img_path_vmdk'] = os.path.join(workdir,
params['img_name_vmdk'])
params['ovf_path'] = os.path.join(workdir, 'box.ovf')
if debver == 'jessie64':
params['deb_packages'] += ('virtualbox-guest-dkms',
'virtualbox-guest-utils',
'linux-headers-amd64')
return params
......@@ -260,9 +254,7 @@ def vbox_convert_raw_to_vmdk(params):
def vbox_write_ovf(params):
if params['deb_distro'] == 'jessie':
ovf_template = get_resource_as_string('jessie.box.ovf')
elif params['deb_distro'] == 'stretch':
if params['deb_distro'] == 'stretch':
ovf_template = get_resource_as_string('stretch.box.ovf')
if not params['dry_run']:
......@@ -304,7 +296,7 @@ def vbox_package_box(params):
logging.info('(dry run) Skip packaging box file.')
def main(provider='virtualbox', debver='jessie64', workdir=None,
def main(provider='virtualbox', debver='stretch64', workdir=None,
verbose=False, dry_run=False, skip_checks=False):
if not os.geteuid() == 0 and not skip_checks:
......
......@@ -29,21 +29,18 @@ fi
echo "LANG=en_GB.UTF-8" > $VMROOT/etc/default/locale
if [ $DEB_DISTRO = 'stretch' ]; then
echo 'deb http://deb.debian.org/debian stretch-backports main contrib' > $VMROOT/etc/apt/sources.list.d/stretch-backports.list
echo 'deb http://deb.debian.org/debian stretch-backports main contrib' > $VMROOT/etc/apt/sources.list.d/stretch-backports.list
if [ $PROVIDER = 'virtualbox' ]; then
if [ $PROVIDER = 'virtualbox' ]; then
# hack dns settings
# TODO: find out how nspawn supports networking
systemd-nspawn -D $VMROOT /usr/bin/unlink /etc/resolv.conf
systemd-nspawn -D $VMROOT /bin/bash -c 'echo "nameserver 1.1.1.1" > /etc/resolv.conf'
# hack dns settings
# TODO: find out how nspawn supports networking
systemd-nspawn -D $VMROOT /usr/bin/unlink /etc/resolv.conf
systemd-nspawn -D $VMROOT /bin/bash -c 'echo "nameserver 1.1.1.1" > /etc/resolv.conf'
systemd-nspawn -D $VMROOT /usr/bin/apt-get update -y
systemd-nspawn -D $VMROOT /usr/bin/apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils linux-headers-amd64
systemd-nspawn -D $VMROOT /usr/bin/apt-get update -y
systemd-nspawn -D $VMROOT /usr/bin/apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils linux-headers-amd64
# restore hacked dns settings
systemd-nspawn -D $VMROOT /bin/bash -c 'unlink /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'
fi
# restore hacked dns settings
systemd-nspawn -D $VMROOT /bin/bash -c 'unlink /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf'
fi
This diff is collapsed.
Vagrant.configure("2") do |config|
config.vm.box = "basebox-stretch64"
#config.vm.box = "basebox-jessie64"
config.vm.provider :libvirt do |libvirt|
libvirt.driver = "kvm"
......
Vagrant.configure("2") do |config|
config.vm.box = "basebox-jessie64"
#config.vm.box = "basebox-stretch64"
config.vm.box = "basebox-stretch64"
end
......@@ -35,7 +35,7 @@ class MkBsBoxTest(unittest.TestCase):
path = os.path.join(tmpdir, 'script.sh')
params = {'dry_run': False,
'boostrapscript': path,
'deb_distro': 'jessie',
'deb_distro': 'stretch',
'deb_mirror': 'http://deb.debian.org/debian',
'username': 'theUserName',
'verbose': True}
......@@ -47,13 +47,6 @@ class MkBsBoxTest(unittest.TestCase):
def test_main_dry_run(self):
fdroid_basebox.main(dry_run=True, skip_checks=True, workdir='.')
def test_main_dry_run_jessie64_virtualbox(self):
fdroid_basebox.main(dry_run=True,
skip_checks=True,
workdir='.',
provider='virtualbox',
debver='jessie64')
def test_main_dry_run_stretch64_virtualbox(self):
fdroid_basebox.main(dry_run=True,
skip_checks=True,
......@@ -61,13 +54,6 @@ class MkBsBoxTest(unittest.TestCase):
provider='virtualbox',
debver='stretch64')
def test_main_dry_run_jessie64_libvirt(self):
fdroid_basebox.main(dry_run=True,
skip_checks=True,
workdir='.',
provider='libvirt',
debver='jessie64')
def test_main_dry_run_stretch64_libvirt(self):
fdroid_basebox.main(dry_run=True,
skip_checks=True,
......@@ -87,7 +73,7 @@ class MkBsBoxTest(unittest.TestCase):
def test_main_dry_run_bad_debver(self):
self.assertRaisesRegex(fdroid_basebox.BaseboxException,
"target debian version 'etch32' not supported. "
"Supported versions are: jessie64, stretch64",
"Supported versions are: stretch64",
fdroid_basebox.main,
debver='etch32',
dry_run=True,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment