[elbe-devel] [PATCH 6/8] elbepack: commands: drop internal buildchroot command
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Jul 8 11:23:59 CEST 2024
The buildchroot command is a remnant from the time before the SOAP
service managing all buildenv interaction.
Nowadays it is only a maintenance burden, remove it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
debian/python3-elbe-buildenv.install | 1 -
docs/elbe-buildchroot.rst | 99 ------------------------------
docs/elbe-init.rst | 4 +-
docs/elbe.rst | 3 -
elbepack/commands/buildchroot.py | 109 ---------------------------------
newsfragments/+buildchroot.removal.rst | 1 +
6 files changed, 2 insertions(+), 215 deletions(-)
diff --git a/debian/python3-elbe-buildenv.install b/debian/python3-elbe-buildenv.install
index 9a9611b893eb..07139432f151 100644
--- a/debian/python3-elbe-buildenv.install
+++ b/debian/python3-elbe-buildenv.install
@@ -1,5 +1,4 @@
usr/lib/python3.*/*-packages/elbepack/commands/adjustpkgs.py
-usr/lib/python3.*/*-packages/elbepack/commands/buildchroot.py
usr/lib/python3.*/*-packages/elbepack/commands/chroot.py
usr/lib/python3.*/*-packages/elbepack/commands/db.py
usr/lib/python3.*/*-packages/elbepack/commands/fetch_initvm_pkgs.py
diff --git a/docs/elbe-buildchroot.rst b/docs/elbe-buildchroot.rst
deleted file mode 100644
index cc91dc455f60..000000000000
--- a/docs/elbe-buildchroot.rst
+++ /dev/null
@@ -1,99 +0,0 @@
-************************
-elbe-buildchroot
-************************
-
-NAME
-====
-
-elbe-buildchroot - Build a root filesystem.
-
-SYNOPSIS
-========
-
- ::
-
- elbe buildchroot [ OPTIONS ] <xmlfile>
-
-<xmlfile>
- The XML describing the Elbe project.
-
-DESCRIPTION
-===========
-
-*elbe buildchroot* builds a root filesystem using the settings specified
-in the given XML file. This command has to be run as root **inside the
-Elbe build VM**.
-
-By default, also an ISO image for a binary CD-ROM will be generated,
-which will contain all packages installed into the root filesystem. It
-can also be used as an installation source. For details, please refer to
-``elbe-mkcdrom(1)``. Optionally, a source CD-ROM image can be generated,
-too.
-
-OPTIONS
-=======
-
--t, --target <targetdir>
- Target directory for the build. The directory must not exist before
- calling this command. Defaults to *./build*
-
--o, --output <logfile>
- Name of the file to write the build report to. If not specified, the
- report is written to stdout.
-
--n, --name <projectname>
- Override the name of the project (used in the build report),
-
---build-bin
- Build Debian binary cdrom. All binaries used are built onto the
- cdrom. And this iso image can later be used to reproduce the images.
-
---build-sources
- Build a Debian source CD-ROM image, containing the source packages
- used by the project.
-
---debug
- Enables a few features that allow for better debugging of the build
- process.
-
---buildtype <buildtype>
- Override the build type specified in the XML file. (Not recommended)
-
---cdrom-size <N> ISO Cdrom size, after which a new volume is generated.
-
---skip-validation
- Skip the validation of the XML file. (Not recommended)
-
---skip-debootstrap
- Skip debootstrap.
-
---skip-pkglist
- Ignore changes to the pkglist, and don’t rebuild the buildimage. (Not
- recommended)
-
---skip-cdrom
- Obsolete option, from the time, before --build-bin and
- --build-sources existed.
-
-EXAMPLES
-========
-
-- Build a root filesystem from *myarm.xml* in */root/myarm*. Log to
- *myarm.txt*. Do not build any ISO-Images.
-
- ::
-
- # elbe buildchroot --output myarm.txt --target /root/myarm myarm.xml
-
-- Build a root filesystem from *myarm.xml* in */root/myarm*. Log to
- *myarm.txt*. Also build source and binary ISO-Images.
-
- ::
-
- # elbe buildchroot --output myarm.txt --target /root/myarm \
- --build-sources --build-bin myarm.xml
-
-ELBE
-====
-
-Part of the ``elbe(1)`` suite
diff --git a/docs/elbe-init.rst b/docs/elbe-init.rst
index a7ecaf3189a8..9b825d4ebb57 100644
--- a/docs/elbe-init.rst
+++ b/docs/elbe-init.rst
@@ -28,9 +28,7 @@ This command generates a project directory for an Elbe build virtual
machine.
When *make* is executed in that directory, a VM is started, which
-installs Debian and the Elbe build environment. If the XML file contains
-a *target* section, then the target root filesystem will be built inside
-the virtual machine using ``elbe-buildchroot(1)``.
+installs Debian and the Elbe build environment.
The build VM can be started by executing *make run* (or *make run-con*,
if a serial console is enough). After that, the virtual machine can be
diff --git a/docs/elbe.rst b/docs/elbe.rst
index 56067b32e72e..b40b8accbb0e 100644
--- a/docs/elbe.rst
+++ b/docs/elbe.rst
@@ -32,9 +32,6 @@ Elbe COMMANDS
``elbe-control(1)``
low-level interface to projects inside the initvm.
-``elbe-buildchroot(1)``
- build a root filesystem.
-
``elbe-check_updates(1)``
check whether package updates are available for a given project.
diff --git a/elbepack/commands/buildchroot.py b/elbepack/commands/buildchroot.py
deleted file mode 100644
index 6fe328ca634c..000000000000
--- a/elbepack/commands/buildchroot.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# ELBE - Debian Based Embedded Rootfilesystem Builder
-# SPDX-License-Identifier: GPL-3.0-or-later
-# SPDX-FileCopyrightText: 2013-2017 Linutronix GmbH
-# SPDX-FileCopyrightText: 2015 Matthias Buehler <Matthias.Buehler at de.trumpf.com>
-
-import logging
-import subprocess
-import sys
-from optparse import OptionParser
-
-from sqlalchemy.exc import OperationalError
-
-from elbepack.cdroms import CDROM_SIZE
-from elbepack.db import ElbeDB
-from elbepack.elbeproject import ElbeProject
-from elbepack.elbexml import ValidationError
-from elbepack.log import elbe_logging
-
-
-def run_command(argv):
- oparser = OptionParser(
- usage='usage: %prog buildchroot [options] <xmlfile>')
-
- oparser.add_option('-t', '--target', dest='target',
- help='directoryname of target')
-
- oparser.add_option('-o', '--output', dest='output',
- help='name of logfile')
-
- oparser.add_option('-n', '--name', dest='name',
- help='name of the project (included in the report)')
-
- oparser.add_option('--skip-pbuild', action='store_true',
- dest='skip_pbuild', default=False,
- help='skip building packages from <pbuilder> list')
-
- oparser.add_option(
- '--build-bin',
- action='store_true',
- dest='build_bin',
- default=False,
- help='Build Binary Repository CDROM, for exact Reproduction')
-
- oparser.add_option('--build-sources', action='store_true',
- dest='build_sources', default=False,
- help='Build Source CD')
-
- oparser.add_option('--buildtype', dest='buildtype',
- help='Override the buildtype')
-
- oparser.add_option(
- '--cdrom-size',
- action='store',
- dest='cdrom_size',
- default=CDROM_SIZE,
- help='Source ISO CD size in bytes')
-
- oparser.add_option('--skip-validation', action='store_true',
- dest='skip_validation', default=False,
- help='Skip xml schema validation')
-
- oparser.add_option('--skip-pkglist', action='store_true',
- dest='skip_pkglist', default=False,
- help='ignore changes of the package list')
-
- oparser.add_option('--skip-cdrom', action='store_true',
- dest='skip_cdrom', default=False,
- help='(now obsolete) Skip cdrom iso generation')
-
- (opt, args) = oparser.parse_args(argv)
-
- if len(args) != 1:
- print('wrong number of arguments')
- oparser.print_help()
- sys.exit(26)
-
- if not opt.target:
- print('No target specified')
- sys.exit(27)
-
- if opt.skip_cdrom:
- print('WARNING: Skip CDROMS is now the default, '
- 'use --build-bin to build binary CDROM')
-
- with elbe_logging({'files': opt.output}):
- try:
- project = ElbeProject(opt.target, args[0], opt.name,
- opt.buildtype, opt.skip_validation)
- except ValidationError:
- logging.exception('XML validation failed. Bailing out')
- sys.exit(28)
-
- try:
- project.build(
- opt.build_bin,
- opt.build_sources,
- opt.cdrom_size,
- opt.skip_pkglist,
- opt.skip_pbuild)
- except subprocess.CalledProcessError as ce:
- logging.error('Command in project build failed: %s', ce.cmd)
- sys.exit(29)
-
- try:
- db = ElbeDB()
- db.save_project(project)
- except OperationalError:
- logging.exception('Failed to save project in database')
- sys.exit(30)
diff --git a/newsfragments/+buildchroot.removal.rst b/newsfragments/+buildchroot.removal.rst
new file mode 100644
index 000000000000..67d497d89b71
--- /dev/null
+++ b/newsfragments/+buildchroot.removal.rst
@@ -0,0 +1 @@
+The *internal* command `elbe buildchroot`.
--
2.45.2
More information about the elbe-devel
mailing list