summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2013-05-04 14:50:38 +0100
committerRoger Leigh <rleigh@debian.org>2013-05-04 17:17:18 +0100
commit257af8af0398c0e60fc5aea40834912fe73b1f9b (patch)
tree079395e9ffe8a5b4b61a95c98dde64ff799301ac /lib
parentcde565540a403c751115b1bc2edc444e59ab4422 (diff)
downloadschroot-257af8af0398c0e60fc5aea40834912fe73b1f9b.tar.gz
sbuild::chroot: Remove concrete implementations of chroot types
Diffstat (limited to 'lib')
-rw-r--r--lib/sbuild/Makefile.am16
-rw-r--r--lib/sbuild/chroot/block-device.cc74
-rw-r--r--lib/sbuild/chroot/block-device.h73
-rw-r--r--lib/sbuild/chroot/btrfs-snapshot.cc61
-rw-r--r--lib/sbuild/chroot/btrfs-snapshot.h58
-rw-r--r--lib/sbuild/chroot/custom.cc60
-rw-r--r--lib/sbuild/chroot/custom.h64
-rw-r--r--lib/sbuild/chroot/directory.cc74
-rw-r--r--lib/sbuild/chroot/directory.h72
-rw-r--r--lib/sbuild/chroot/file.cc61
-rw-r--r--lib/sbuild/chroot/file.h59
-rw-r--r--lib/sbuild/chroot/loopback.cc65
-rw-r--r--lib/sbuild/chroot/loopback.h63
-rw-r--r--lib/sbuild/chroot/lvm-snapshot.cc61
-rw-r--r--lib/sbuild/chroot/lvm-snapshot.h59
-rw-r--r--lib/sbuild/chroot/plain.cc52
-rw-r--r--lib/sbuild/chroot/plain.h58
17 files changed, 0 insertions, 1030 deletions
diff --git a/lib/sbuild/Makefile.am b/lib/sbuild/Makefile.am
index 9cadff99..aa4926de 100644
--- a/lib/sbuild/Makefile.am
+++ b/lib/sbuild/Makefile.am
@@ -22,8 +22,6 @@ lib_sbuild_public_h_sources = \
lib/sbuild/auth/auth.h \
lib/sbuild/auth/deny.h \
lib/sbuild/chroot/chroot.h \
- lib/sbuild/chroot/custom.h \
- lib/sbuild/chroot/directory.h \
lib/sbuild/chroot/facet/custom.h \
lib/sbuild/chroot/facet/directory.h \
lib/sbuild/chroot/facet/directory-base.h \
@@ -41,8 +39,6 @@ lib_sbuild_public_h_sources = \
lib/sbuild/chroot/facet/source-setup.h \
lib/sbuild/chroot/facet/storage.h \
lib/sbuild/chroot/facet/userdata.h \
- lib/sbuild/chroot/file.h \
- lib/sbuild/chroot/plain.h \
lib/sbuild/chroot/config.h \
lib/sbuild/ctty.h \
lib/sbuild/custom-error.h \
@@ -81,7 +77,6 @@ if BUILD_BLOCKDEV
lib_sbuild_public_blockdev_base_h_sources = \
lib/sbuild/chroot/facet/block-device-base.h
lib_sbuild_public_blockdev_h_sources = \
- lib/sbuild/chroot/block-device.h \
lib/sbuild/chroot/facet/block-device.h
endif
@@ -89,19 +84,16 @@ if BUILD_LVMSNAP
lib_sbuild_public_blockdev_base_h_sources = \
lib/sbuild/chroot/facet/block-device-base.h
lib_sbuild_public_lvmsnap_h_sources = \
- lib/sbuild/chroot/lvm-snapshot.h \
lib/sbuild/chroot/facet/lvm-snapshot.h
endif
if BUILD_BTRFSSNAP
lib_sbuild_public_btrfssnap_h_sources = \
- lib/sbuild/chroot/btrfs-snapshot.h \
lib/sbuild/chroot/facet/btrfs-snapshot.h
endif
if BUILD_LOOPBACK
lib_sbuild_public_loopback_h_sources = \
- lib/sbuild/chroot/loopback.h \
lib/sbuild/chroot/facet/loopback.h
endif
@@ -119,8 +111,6 @@ lib_sbuild_public_cc_sources = \
lib/sbuild/auth/auth.cc \
lib/sbuild/auth/deny.cc \
lib/sbuild/chroot/chroot.cc \
- lib/sbuild/chroot/custom.cc \
- lib/sbuild/chroot/directory.cc \
lib/sbuild/chroot/facet/custom.cc \
lib/sbuild/chroot/facet/directory.cc \
lib/sbuild/chroot/facet/directory-base.cc \
@@ -138,8 +128,6 @@ lib_sbuild_public_cc_sources = \
lib/sbuild/chroot/facet/source-setup.cc \
lib/sbuild/chroot/facet/storage.cc \
lib/sbuild/chroot/facet/userdata.cc \
- lib/sbuild/chroot/file.cc \
- lib/sbuild/chroot/plain.cc \
lib/sbuild/chroot/config.cc \
lib/sbuild/ctty.cc \
lib/sbuild/environment.cc \
@@ -171,7 +159,6 @@ if BUILD_BLOCKDEV
lib_sbuild_public_blockdev_base_cc_sources = \
lib/sbuild/chroot/facet/block-device-base.cc
lib_sbuild_public_blockdev_cc_sources = \
- lib/sbuild/chroot/block-device.cc \
lib/sbuild/chroot/facet/block-device.cc
endif
@@ -179,19 +166,16 @@ if BUILD_LVMSNAP
lib_sbuild_public_blockdev_base_cc_sources = \
lib/sbuild/chroot/facet/block-device-base.cc
lib_sbuild_public_lvmsnap_cc_sources = \
- lib/sbuild/chroot/lvm-snapshot.cc \
lib/sbuild/chroot/facet/lvm-snapshot.cc
endif
if BUILD_BTRFSSNAP
lib_sbuild_public_btrfssnap_cc_sources = \
- lib/sbuild/chroot/btrfs-snapshot.cc \
lib/sbuild/chroot/facet/btrfs-snapshot.cc
endif
if BUILD_LOOPBACK
lib_sbuild_public_loopback_cc_sources = \
- lib/sbuild/chroot/loopback.cc \
lib/sbuild/chroot/facet/loopback.cc
endif
diff --git a/lib/sbuild/chroot/block-device.cc b/lib/sbuild/chroot/block-device.cc
deleted file mode 100644
index 6b12b1e9..00000000
--- a/lib/sbuild/chroot/block-device.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/block-device.h>
-#include <sbuild/chroot/facet/block-device.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/lvm-snapshot.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#include <sbuild/chroot/facet/storage.h>
-#ifdef SBUILD_FEATURE_UNION
-#include <sbuild/chroot/facet/fsunion.h>
-#endif // SBUILD_FEATURE_UNION
-#include "format-detail.h"
-#include "util.h"
-
-#include <cassert>
-#include <cerrno>
-#include <cstring>
-
-#include <boost/format.hpp>
-
-using boost::format;
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- block_device::block_device ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("block-device")));
- }
-
- block_device::~block_device ()
- {
- }
-
- block_device::block_device (const block_device& rhs):
- chroot(rhs)
- {
- }
-
-#ifdef SBUILD_FEATURE_LVMSNAP
- block_device::block_device (const lvm_snapshot& rhs):
- chroot(rhs)
- {
- facet::storage::ptr bdev = facet::block_device::create(*get_facet_strict<facet::lvm_snapshot>());
- replace_facet<facet::storage>(bdev);
- }
-#endif // SBUILD_FEATURE_LVMSNAP
-
- }
-}
diff --git a/lib/sbuild/chroot/block-device.h b/lib/sbuild/chroot/block-device.h
deleted file mode 100644
index ebbf1d77..00000000
--- a/lib/sbuild/chroot/block-device.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_BLOCK_DEVICE_H
-#define SBUILD_CHROOT_BLOCK_DEVICE_H
-
-#include <sbuild/config.h>
-#include <sbuild/chroot/chroot.h>
-#include <sbuild/chroot/lvm-snapshot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
-
- /**
- * A chroot stored on an unmounted block device.
- *
- * The device will be mounted on demand.
- */
- class block_device : public chroot
- {
- public:
- /// Exception type.
- typedef chroot::error error;
-
- protected:
- /// The constructor.
- block_device ();
-
- /// The copy constructor.
- block_device (const block_device& rhs);
-
-#ifdef SBUILD_FEATURE_LVMSNAP
- /// The copy constructor.
- block_device (const lvm_snapshot& rhs);
-#endif
-
- friend class chroot;
-#ifdef SBUILD_FEATURE_LVMSNAP
- friend class lvm_snapshot;
-#endif
-
- public:
- /// The destructor.
- virtual ~block_device ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_BLOCK_DEVICE_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/btrfs-snapshot.cc b/lib/sbuild/chroot/btrfs-snapshot.cc
deleted file mode 100644
index 69274e7d..00000000
--- a/lib/sbuild/chroot/btrfs-snapshot.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/btrfs-snapshot.h>
-#include <sbuild/chroot/directory.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#include <sbuild/chroot/facet/storage.h>
-#include "format-detail.h"
-#include "lock.h"
-
-#include <cassert>
-#include <cerrno>
-
-#include <boost/format.hpp>
-
-using std::endl;
-using boost::format;
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- btrfs_snapshot::btrfs_snapshot ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("btrfs-snapshot")));
- }
-
- btrfs_snapshot::btrfs_snapshot (const btrfs_snapshot& rhs):
- chroot(rhs)
- {
- }
-
- btrfs_snapshot::~btrfs_snapshot ()
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/btrfs-snapshot.h b/lib/sbuild/chroot/btrfs-snapshot.h
deleted file mode 100644
index 9e357061..00000000
--- a/lib/sbuild/chroot/btrfs-snapshot.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_BTRFS_SNAPSHOT_H
-#define SBUILD_CHROOT_BTRFS_SNAPSHOT_H
-
-#include <sbuild/chroot/chroot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
- /**
- * A chroot stored on an BTRFS logical volume (LV).
- *
- * A snapshot LV will be created and mounted on demand.
- */
- class btrfs_snapshot : public chroot
- {
- protected:
- /// The constructor.
- btrfs_snapshot ();
-
- /// The copy constructor.
- btrfs_snapshot (const btrfs_snapshot& rhs);
-
- friend class chroot;
-
- public:
- /// The destructor.
- virtual ~btrfs_snapshot ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_BTRFS_SNAPSHOT_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/custom.cc b/lib/sbuild/chroot/custom.cc
deleted file mode 100644
index 73a71f47..00000000
--- a/lib/sbuild/chroot/custom.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/custom.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#include <sbuild/chroot/facet/storage.h>
-#include "format-detail.h"
-#include "lock.h"
-
-#include <cassert>
-#include <cerrno>
-#include <cstring>
-
-#include <boost/format.hpp>
-
-using boost::format;
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- custom::custom ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("custom")));
- }
-
- custom::custom (const custom& rhs):
- chroot(rhs)
- {
- }
-
- custom::~custom ()
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/custom.h b/lib/sbuild/chroot/custom.h
deleted file mode 100644
index a3734b1f..00000000
--- a/lib/sbuild/chroot/custom.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_CUSTOM_H
-#define SBUILD_CHROOT_CUSTOM_H
-
-#include <sbuild/chroot/chroot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
-
- /**
- * A chroot stored with custom parameters.
- *
- * This chroot specifies no behaviour or policy. It is entirely
- * configured using user options and setup scripts. The intent is
- * to permit the prototyping of and experimentation with new chroot
- * types without requiring a "full" class definition and associated
- * infrastructural work. It also makes schroot extensible without
- * requiring any C++ coding.
- */
- class custom : public chroot
- {
- protected:
- /// The constructor.
- custom ();
-
- /// The copy constructor.
- custom (const custom& rhs);
-
- friend class chroot;
-
- public:
- /// The destructor.
- virtual ~custom ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_CUSTOM_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/directory.cc b/lib/sbuild/chroot/directory.cc
deleted file mode 100644
index 0315489e..00000000
--- a/lib/sbuild/chroot/directory.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/directory.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/btrfs-snapshot.h>
-#include <sbuild/chroot/facet/directory.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#ifdef SBUILD_FEATURE_UNION
-#include <sbuild/chroot/facet/fsunion.h>
-#endif // SBUILD_FEATURE_UNION
-#include "format-detail.h"
-#include "lock.h"
-
-#include <cassert>
-#include <cerrno>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#include <unistd.h>
-
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- directory::directory ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("directory")));
- }
-
- directory::directory (const directory& rhs):
- chroot(rhs)
- {
- }
-
-#ifdef SBUILD_FEATURE_BTRFSSNAP
- directory::directory (const btrfs_snapshot& rhs):
- chroot(rhs)
- {
- facet::storage::ptr dir = facet::directory::create(*get_facet_strict<facet::btrfs_snapshot>());
- replace_facet<facet::storage>(dir);
- }
-#endif // SBUILD_FEATURE_BTRFSSNAP
-
- directory::~directory ()
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/directory.h b/lib/sbuild/chroot/directory.h
deleted file mode 100644
index 2892e9e3..00000000
--- a/lib/sbuild/chroot/directory.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_DIRECTORY_H
-#define SBUILD_CHROOT_DIRECTORY_H
-
-#include <sbuild/config.h>
-#include <sbuild/chroot/chroot.h>
-#ifdef SBUILD_FEATURE_BTRFSSNAP
-#include <sbuild/chroot/btrfs-snapshot.h>
-#endif
-
-namespace sbuild
-{
- namespace chroot
- {
-
- /**
- * A chroot located in the filesystem.
- *
- * It runs setup scripts and can provide multiple sessions
- * using the union facet.
- */
- class directory : public chroot
- {
- protected:
- /// The constructor.
- directory ();
-
- /// The copy constructor.
- directory (const directory& rhs);
-
-#ifdef SBUILD_FEATURE_BTRFSSNAP
- /// The copy constructor.
- directory (const btrfs_snapshot& rhs);
-#endif
-
- friend class chroot;
-#ifdef SBUILD_FEATURE_BTRFSSNAP
- friend class btrfs_snapshot;
-#endif
-
- public:
- /// The destructor.
- virtual ~directory ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_DIRECTORY_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/file.cc b/lib/sbuild/chroot/file.cc
deleted file mode 100644
index 5f31644f..00000000
--- a/lib/sbuild/chroot/file.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/file.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/file.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#include <sbuild/chroot/facet/storage.h>
-#include "format-detail.h"
-#include "lock.h"
-
-#include <cassert>
-#include <cerrno>
-#include <cstring>
-
-#include <boost/format.hpp>
-
-using boost::format;
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- file::file ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("file")));
- }
-
- file::file (const file& rhs):
- chroot(rhs)
- {
- }
-
- file::~file ()
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/file.h b/lib/sbuild/chroot/file.h
deleted file mode 100644
index aadc6cf4..00000000
--- a/lib/sbuild/chroot/file.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_FILE_H
-#define SBUILD_CHROOT_FILE_H
-
-#include <sbuild/chroot/chroot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
-
- /**
- * A chroot stored in a file archive (tar with optional compression).
- *
- * The archive will be unpacked and repacked on demand.
- */
- class file : public chroot
- {
- protected:
- /// The constructor.
- file ();
-
- /// The copy constructor.
- file (const file& rhs);
-
- friend class chroot;
-
- public:
- /// The destructor.
- virtual ~file ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_FILE_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/loopback.cc b/lib/sbuild/chroot/loopback.cc
deleted file mode 100644
index a4d9b9b6..00000000
--- a/lib/sbuild/chroot/loopback.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/loopback.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#include <sbuild/chroot/facet/mountable.h>
-#include <sbuild/chroot/facet/storage.h>
-#ifdef SBUILD_FEATURE_UNION
-#include <sbuild/chroot/facet/fsunion.h>
-#endif // SBUILD_FEATURE_UNION
-#include "format-detail.h"
-#include "lock.h"
-#include "util.h"
-
-#include <cassert>
-#include <cerrno>
-#include <cstring>
-
-#include <boost/format.hpp>
-
-using boost::format;
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- loopback::loopback ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("loopback")));
- }
-
- loopback::~loopback ()
- {
- }
-
- loopback::loopback (const loopback& rhs):
- chroot(rhs)
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/loopback.h b/lib/sbuild/chroot/loopback.h
deleted file mode 100644
index 501cf31b..00000000
--- a/lib/sbuild/chroot/loopback.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_LOOPBACK_H
-#define SBUILD_CHROOT_LOOPBACK_H
-
-#include <sbuild/config.h>
-#include <sbuild/chroot/chroot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
- /**
- * A chroot stored in a file for loopback mounting.
- *
- * The file will be mounted on demand.
- */
- class loopback : public chroot
- {
- public:
- /// Exception type.
- typedef chroot::error error;
-
- protected:
- /// The constructor.
- loopback ();
-
- /// The copy constructor.
- loopback (const loopback& rhs);
-
- friend class chroot;
-
- public:
- /// The destructor.
- virtual ~loopback ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_LOOPBACK_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/lvm-snapshot.cc b/lib/sbuild/chroot/lvm-snapshot.cc
deleted file mode 100644
index ac1dd253..00000000
--- a/lib/sbuild/chroot/lvm-snapshot.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/lvm-snapshot.h>
-#include <sbuild/chroot/block-device.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/session.h>
-#include <sbuild/chroot/facet/session-clonable.h>
-#include <sbuild/chroot/facet/source-clonable.h>
-#include <sbuild/chroot/facet/mountable.h>
-#include <sbuild/chroot/facet/storage.h>
-#include "format-detail.h"
-
-#include <cassert>
-#include <cerrno>
-
-#include <boost/format.hpp>
-
-using std::endl;
-using boost::format;
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- lvm_snapshot::lvm_snapshot ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("lvm-snapshot")));
- }
-
- lvm_snapshot::lvm_snapshot (const lvm_snapshot& rhs):
- chroot(rhs)
- {
- }
-
- lvm_snapshot::~lvm_snapshot ()
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/lvm-snapshot.h b/lib/sbuild/chroot/lvm-snapshot.h
deleted file mode 100644
index 6e49b509..00000000
--- a/lib/sbuild/chroot/lvm-snapshot.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_LVM_SNAPSHOT_H
-#define SBUILD_CHROOT_LVM_SNAPSHOT_H
-
-#include <sbuild/chroot/chroot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
-
- /**
- * A chroot stored on an LVM logical volume (LV).
- *
- * A snapshot LV will be created and mounted on demand.
- */
- class lvm_snapshot : public chroot
- {
- protected:
- /// The constructor.
- lvm_snapshot ();
-
- /// The copy constructor.
- lvm_snapshot (const lvm_snapshot& rhs);
-
- friend class chroot;
-
- public:
- /// The destructor.
- virtual ~lvm_snapshot ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_LVM_SNAPSHOT_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */
diff --git a/lib/sbuild/chroot/plain.cc b/lib/sbuild/chroot/plain.cc
deleted file mode 100644
index 4c95c44d..00000000
--- a/lib/sbuild/chroot/plain.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#include <config.h>
-
-#include <sbuild/chroot/plain.h>
-#include <sbuild/chroot/facet/factory.h>
-#include <sbuild/chroot/facet/storage.h>
-#include "format-detail.h"
-#include "lock.h"
-
-#include <cerrno>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#include <unistd.h>
-
-using namespace sbuild;
-
-namespace sbuild
-{
- namespace chroot
- {
-
- plain::plain ():
- chroot()
- {
- add_facet(std::dynamic_pointer_cast<facet::storage>(facet::factory::create("plain")));
- }
-
- plain::~plain ()
- {
- }
-
- }
-}
diff --git a/lib/sbuild/chroot/plain.h b/lib/sbuild/chroot/plain.h
deleted file mode 100644
index 3d93c6de..00000000
--- a/lib/sbuild/chroot/plain.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
- *
- * schroot is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * schroot is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- *********************************************************************/
-
-#ifndef SBUILD_CHROOT_PLAIN_H
-#define SBUILD_CHROOT_PLAIN_H
-
-#include <sbuild/chroot/chroot.h>
-
-namespace sbuild
-{
- namespace chroot
- {
-
- /**
- * A chroot located in the filesystem (scripts disabled).
- *
- * This doesn't run any setup scripts and doesn't provide any
- * session support. If you need any of these functions, the
- * directory chroot type is more suited to your needs.
- */
- class plain : public chroot
- {
- protected:
- /// The constructor.
- plain ();
-
- friend class chroot;
-
- public:
- /// The destructor.
- virtual ~plain ();
- };
-
- }
-}
-
-#endif /* SBUILD_CHROOT_PLAIN_H */
-
-/*
- * Local Variables:
- * mode:C++
- * End:
- */