Refactor all the things! lbng->lwr
This commit is contained in:
parent
908b672429
commit
dcc4fb7be0
13 changed files with 37 additions and 31 deletions
18
bin/lwr
18
bin/lwr
|
|
@ -19,11 +19,11 @@ import cliapp
|
|||
import logging
|
||||
from pycurl import Curl
|
||||
from tarfile import TarFile
|
||||
from lbng.vm import VMDebootstrap
|
||||
from lbng.isolinux import install_isolinux
|
||||
from lbng.disk import install_disk_info
|
||||
from lbng.grub import install_grub
|
||||
from lbng.xorriso import Xorriso
|
||||
from lwr.vm import VMDebootstrap
|
||||
from lwr.isolinux import install_isolinux
|
||||
from lwr.disk import install_disk_info
|
||||
from lwr.grub import install_grub
|
||||
from lwr.xorriso import Xorriso
|
||||
|
||||
__version__ = '0.1'
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ def fetch_di_helpers():
|
|||
info.close()
|
||||
|
||||
|
||||
class LiveBuildNG(cliapp.Application):
|
||||
class LiveWrapper(cliapp.Application):
|
||||
|
||||
def add_settings(self):
|
||||
self.settings.string(
|
||||
|
|
@ -105,8 +105,8 @@ class LiveBuildNG(cliapp.Application):
|
|||
"remove before building a fresh image.")
|
||||
|
||||
#Make options available to customise hook in vmdebootstrap
|
||||
os.environ['LBNG_TASK_PACKAGES'] = self.settings['tasks']
|
||||
os.environ['LBNG_EXTRA_PACKAGES'] = self.settings['extra']
|
||||
os.environ['LWR_TASK_PACKAGES'] = self.settings['tasks']
|
||||
os.environ['LWR_EXTRA_PACKAGES'] = self.settings['extra']
|
||||
if self.settings['mirror'] == "":
|
||||
os.environ['MIRROR'] = self.settings['mirror']
|
||||
|
||||
|
|
@ -138,4 +138,4 @@ class LiveBuildNG(cliapp.Application):
|
|||
xorriso.build_image()
|
||||
|
||||
if __name__ == "__main__":
|
||||
LiveBuildNG(version=__version__).run()
|
||||
LiveWrapper(version=__version__).run()
|
||||
|
|
|
|||
6
debian/changelog
vendored
6
debian/changelog
vendored
|
|
@ -1,3 +1,9 @@
|
|||
live-wrapper (0.4) UNRELEASED; urgency=medium
|
||||
|
||||
*
|
||||
|
||||
-- Iain R. Learmonth <irl@debian.org> Wed, 25 May 2016 14:01:00 +0100
|
||||
|
||||
live-wrapper (0.3) unstable; urgency=medium
|
||||
|
||||
* Fix handling of mirror selection for building the image.
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ Developer Documentation
|
|||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
lbng
|
||||
lwr
|
||||
|
||||
|
|
|
|||
|
|
@ -5,32 +5,32 @@ Helper Documentation
|
|||
Root Filesystem Helpers
|
||||
-----------------------
|
||||
|
||||
.. automodule:: lbng.vm
|
||||
.. automodule:: lwr.vm
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
Bootloader Helpers
|
||||
------------------
|
||||
|
||||
.. automodule:: lbng.grub
|
||||
.. automodule:: lwr.grub
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. automodule:: lbng.isolinux
|
||||
.. automodule:: lwr.isolinux
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
CD Filesystem Helpers
|
||||
---------------------
|
||||
|
||||
.. automodule:: lbng.disk
|
||||
.. automodule:: lwr.disk
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
ISO Creation Helpers
|
||||
--------------------
|
||||
|
||||
.. automodule:: lbng.xorriso
|
||||
.. automodule:: lwr.xorriso
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ mount_support
|
|||
disable_daemons
|
||||
prepare_apt_source
|
||||
|
||||
chroot ${rootdir} apt-get -y install initramfs-tools live-boot live-config ${LBNG_TASK_PACKAGES} ${LBNG_EXTRA_PACKAGES} task-laptop task-english
|
||||
chroot ${rootdir} apt-get -y install initramfs-tools live-boot live-config ${LWR_TASK_PACKAGES} ${LWR_EXTRA_PACKAGES} task-laptop task-english
|
||||
|
||||
echo "blacklist bochs-drm" > $rootdir/etc/modprobe.d/qemu-blacklist.conf
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# (C) Iain R. Learmonth 2015 <irl@debian.org>
|
||||
# See COPYING for terms of usage, modification and redistribution.
|
||||
#
|
||||
# lbng/disk.py - .disk folder helpers
|
||||
# lwr/disk.py - .disk folder helpers
|
||||
|
||||
"""
|
||||
This module provides helpers for generating the metadata stored in .disk/ on
|
||||
|
|
@ -2,17 +2,17 @@
|
|||
# (C) Iain R. Learmonth 2015 <irl@debian.org>
|
||||
# See COPYING for terms of usage, modification and redistribution.
|
||||
#
|
||||
# lbng/grub.py - Grub 2 helpers
|
||||
# lwr/grub.py - Grub 2 helpers
|
||||
|
||||
"""
|
||||
The lbng.grub module contains helpers for GRUB 2 including the installation
|
||||
The lwr.grub module contains helpers for GRUB 2 including the installation
|
||||
of GRUB files to the cdroot and the generation of the grub.cfg and loopback.cfg
|
||||
files.
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from lbng.vm import detect_kernels
|
||||
from lwr.vm import detect_kernels
|
||||
|
||||
class GrubConfig():
|
||||
"""
|
||||
|
|
@ -2,17 +2,17 @@
|
|||
# (C) Iain R. Learmonth 2015 <irl@debian.org>
|
||||
# See COPYING for terms of usage, modification and redistribution.
|
||||
#
|
||||
# lbng/isolinux.py - ISOLINUX helpers
|
||||
# lwr/isolinux.py - ISOLINUX helpers
|
||||
|
||||
"""
|
||||
The lbng.isolinux module contains helpers for isolinux including the
|
||||
The lwr.isolinux module contains helpers for isolinux including the
|
||||
installation of isolinux files to the cdroot and the generation of the
|
||||
isolinux.cfg files.
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
from lbng.vm import detect_kernels
|
||||
from lwr.vm import detect_kernels
|
||||
|
||||
class ISOLINUXConfig:
|
||||
"""
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
# (C) Iain R. Learmonth 2015 <irl@debian.org>
|
||||
# See COPYING for terms of usage, modification and redistribution.
|
||||
#
|
||||
# lbng/vm.py - vmdebootstrap helpers
|
||||
# lwr/vm.py - vmdebootstrap helpers
|
||||
|
||||
"""
|
||||
The lbng.vm module provides helpers for calling vmdebootstrap as part of the
|
||||
The lwr.vm module provides helpers for calling vmdebootstrap as part of the
|
||||
image creation process.
|
||||
|
||||
.. note::
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
# (C) Iain R. Learmonth 2015 <irl@debian.org>
|
||||
# See COPYING for terms of usage, modification and redistribution.
|
||||
#
|
||||
# lbng/xorriso.py - xorriso helpers
|
||||
# lwr/xorriso.py - xorriso helpers
|
||||
|
||||
"""
|
||||
The lbng.xorriso module provides helpers for calling xorriso as part of the
|
||||
The lwr.xorriso module provides helpers for calling xorriso as part of the
|
||||
image creation process.
|
||||
|
||||
.. note::
|
||||
4
setup.py
4
setup.py
|
|
@ -10,7 +10,7 @@ from setuptools import setup, find_packages
|
|||
|
||||
setup(
|
||||
name='live-wrapper',
|
||||
version='0.1',
|
||||
version='0.4',
|
||||
description='Create a Debian live image based on vmdebootstrap',
|
||||
author='Iain R. Learmonth',
|
||||
author_email='irl@debian.org',
|
||||
|
|
@ -25,7 +25,7 @@ setup(
|
|||
'Topic :: System :: Installation/Setup',
|
||||
],
|
||||
packages=[
|
||||
'lbng',
|
||||
'lwr',
|
||||
],
|
||||
package_data={
|
||||
'live-wrapper': ['README', 'COPYING'],
|
||||
|
|
|
|||
4
tests.sh
4
tests.sh
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
pylint --disable="E0611" bin/lwr lbng
|
||||
pep8 bin/lbng lbng
|
||||
pylint --disable="E0611" bin/lwr lwr
|
||||
pep8 bin/lwr lwr
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue