Commit 15d857e9 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Merge branch 'release-0.17' into debian-release-0.17

parents 1a1bfbd4 9447e99e
2015-01-09, v0.17rc1
* Add support for btrfs
* Add support for xfs
* Add support for CoreOS
* Make all errors one line long
* Create man pages for snf-image-{update,create}-helper
* Shrink the helper VM
* Check the md5sum after downloading the helper VM
* Fix bugs
2014-10-30, v0.16.3 2014-10-30, v0.16.3
* pithcat: Set the default umask to 007 and fix the initialization of * pithcat: Set the default umask to 007 and fix the initialization of
the backend the backend
......
...@@ -11,21 +11,32 @@ BUILDDIR = _build ...@@ -11,21 +11,32 @@ BUILDDIR = _build
PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help: help:
@echo "Please use \`make <target>' where <target> is one of" @echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files" @echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories" @echo " dirhtml to make HTML files named index.html in directories"
@echo " pickle to make pickle files" @echo " singlehtml to make a single large HTML file"
@echo " json to make JSON files" @echo " pickle to make pickle files"
@echo " htmlhelp to make HTML files and a HTML help project" @echo " json to make JSON files"
@echo " qthelp to make HTML files and a qthelp project" @echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " qthelp to make HTML files and a qthelp project"
@echo " changes to make an overview of all changed/added/deprecated items" @echo " devhelp to make HTML files and a Devhelp project"
@echo " linkcheck to check all external links for integrity" @echo " epub to make an epub"
@echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean: clean:
-rm -rf $(BUILDDIR)/* -rm -rf $(BUILDDIR)/*
...@@ -40,6 +51,11 @@ dirhtml: ...@@ -40,6 +51,11 @@ dirhtml:
@echo @echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle: pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo @echo
...@@ -65,12 +81,60 @@ qthelp: ...@@ -65,12 +81,60 @@ qthelp:
@echo "To view the help file:" @echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/snf-image.qhc" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/snf-image.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/snf-image"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/snf-image"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex: latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo @echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ @echo "Run \`make' in that directory to run these through (pdf)latex" \
"run these through (pdf)latex." "(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes: changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
......
...@@ -191,7 +191,7 @@ Windows setup. On \*BSD systems ``/etc/master.passwd`` is altered, ...@@ -191,7 +191,7 @@ Windows setup. On \*BSD systems ``/etc/master.passwd`` is altered,
that will recreate the aforementioned file during the first boot. The list of that will recreate the aforementioned file during the first boot. The list of
users whose passwords will changed is determined by the users whose passwords will changed is determined by the
*SNF_IMAGE_PROPERTY_USERS* variable (see :ref:`image-properties`). For this *SNF_IMAGE_PROPERTY_USERS* variable (see :ref:`image-properties`). For this
task to run *SNF_IMAGE_TARGET* and *SNF_IMAGE_PASSWORD* variables need to be task to run *SNF_IMAGE_TARGET* and *SNF_IMAGE_PASSWD* variables need to be
present. present.
**FilesystemResizeMounted**: Injects a script into a Windows image file system **FilesystemResizeMounted**: Injects a script into a Windows image file system
...@@ -208,43 +208,43 @@ task to run. ...@@ -208,43 +208,43 @@ task to run.
only environment variable required is *SNF_IMAGE_TARGET*. only environment variable required is *SNF_IMAGE_TARGET*.
+-------------------------------+---+--------------------------------------------+--------------------------------------------------+ +-------------------------------+---+--------------------------------------------+-------------------------------------------+
| | | Dependencies | Enviromental Variables [#]_ | | | | Dependencies | Enviromental Variables [#]_ |
+ Name | +------------------+-------------------------+-------------------------+------------------------+ + Name | +------------------+-------------------------+-------------------------+-----------------+
| |Pr.| Run-After | Run-Before | Required | Optional | | |Pr.| Run-After | Run-Before | Required | Optional |
+===============================+===+==================+=========================+=========================+========================+ +===============================+===+==================+=========================+=========================+=================+
|FixPartitionTable |10 | |FilesystemResizeUnmounted|DEV | | |FixPartitionTable |10 | |FilesystemResizeUnmounted|DEV | |
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|FilesystemResizeUnmounted |20 |FixPartitionTable |MountImage |DEV | | |FilesystemResizeUnmounted |20 |FixPartitionTable |MountImage |DEV | |
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|MountImage |30 | |UmountImage |DEV | | |MountImage |30 | |UmountImage |DEV | |
| | | | |TARGET | | | | | | |TARGET | |
| | | | |PROPERTY_ROOT_PARTITION | | | | | | |PROPERTY_ROOT_PARTITION | |
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|AddSwap |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY | |AddSwap |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY|
| | | | | |PROPERTY_SWAP | | | | | | |PROPERTY_SWAP |
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|DeleteSSHKeys |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY | |DeleteSSHKeys |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|DisableRemoteDesktopConnections|40 |EnforcePersonality|UmountImage |TARGET |PROPERTY_OSFAMILY | |DisableRemoteDesktopConnections|40 |EnforcePersonality|UmountImage |TARGET |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|InstallUnattend |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY | |InstallUnattend |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|SELinuxAutorelabel |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY | |SELinuxAutorelabel |40 |MountImage |EnforcePersonality |TARGET |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|AssignHostname |50 |InstallUnattend |EnforcePersonality |TARGET | | |AssignHostname |50 |InstallUnattend |EnforcePersonality |TARGET | |
| | | | |HOSTNAME |PROPERTY_OSFAMILY | | | | | |HOSTNAME |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|ChangePassword |50 |InstallUnattend |EnforcePersonality |TARGET |PROPERTY_USERS | |ChangePassword |50 |InstallUnattend |EnforcePersonality |TARGET |PROPERTY_USERS |
| | | | | |PROPERTY_OSFAMILY | | | | | | |PROPERTY_OSFAMILY|
| | | | | |PASSWORD | | | | | | |PASSWD |
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|FilesystemResizeMounted |50 |InstallUnattend |EnforcePersonality |TARGET |PROPERTY_OSFAMILY | |FilesystemResizeMounted |50 |InstallUnattend |EnforcePersonality |TARGET |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|EnforcePersonality |60 |MountImage |UmountImage |TARGET |PERSONALITY | |EnforcePersonality |60 |MountImage |UmountImage |TARGET |PERSONALITY |
| | | | | |PROPERTY_OSFAMILY | | | | | | |PROPERTY_OSFAMILY|
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
|UmountImage |80 |MountImage | |TARGET | | |UmountImage |80 |MountImage | |TARGET | |
+-------------------------------+---+------------------+-------------------------+-------------------------+------------------------+ +-------------------------------+---+------------------+-------------------------+-------------------------+-----------------+
.. [#] all environment variables are prefixed with *SNF_IMAGE_* .. [#] all environment variables are prefixed with *SNF_IMAGE_*
...@@ -213,3 +213,21 @@ latex_documents = [ ...@@ -213,3 +213,21 @@ latex_documents = [
# If false, no module index is generated. # If false, no module index is generated.
#latex_use_modindex = True #latex_use_modindex = True
# -- Options for manual page output -------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('man/snf-image-update-helper', 'snf-image-update-helper',
"Update snf-image's helper files",
'Synnefo development team <synnefo-devel@googlegroups.com>', 1),
('man/snf-image-create-helper', 'snf-image-create-helper',
'Create a new helper image for snf-image',
'Synnefo development team <synnefo-devel@googlegroups.com>', 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
...@@ -92,7 +92,7 @@ To install snf-image from source, download the provided source package: ...@@ -92,7 +92,7 @@ To install snf-image from source, download the provided source package:
.. code-block:: console .. code-block:: console
$ wget http://apt.dev.grnet.gr/wheezy/snf-image_<VERSION>.orig.tar.gz $ wget https://apt.dev.grnet.gr/wheezy/snf-image_<VERSION>.orig.tar.gz
Untar, configure and build the source: Untar, configure and build the source:
......
...@@ -156,7 +156,7 @@ Optional properties ...@@ -156,7 +156,7 @@ Optional properties
exists in the above-mentioned location. For more information on "answer exists in the above-mentioned location. For more information on "answer
files" please refer to :ref:`windows-deployment`. files" please refer to :ref:`windows-deployment`.
* **PASSWORD_HASHING_METHOD=md5|sha1|blowfish|sha256|sha512** * **PASSWD_HASHING_METHOD=md5|sha1|blowfish|sha256|sha512**
This property can be used on Unix instances to specify the method to be used This property can be used on Unix instances to specify the method to be used
to hash the users password. By default this is determined by the type of the to hash the users password. By default this is determined by the type of the
instance. For Linux and FreeBSD instances ``sha512`` is used, for OpenBSD instance. For Linux and FreeBSD instances ``sha512`` is used, for OpenBSD
......
:orphan:
snf-image-create-helper manual page
===================================
Synopsis
--------
**snf-image-create-helper** [OPTIONS]
Description
-----------
Run multistrap and create a small Debian image populated with the
snf-image-helper package. This image is needed by ganeti's \`snf-image' guest
OS type to work.
Options
-------
-d DIRECTORY
Use this directory to host the created files instead of the default
[default: $HELPER_DIR]
-h Print this message
-p PACKAGE
Install this deb package in the helper image, instead of the default
-y Assume Yes to all queries and do not prompt
Files
-----
/etc/default/snf-image
Configuration file
/etc/snf-image/multistrap.conf
Multistrap configuration file
/etc/snf-image/apt.pref.d
Directory hosting APT preference files to be used during multistrap
:orphan:
snf-image-update-helper manual page
===================================
Synopsis
--------
**snf-image-update-helper** [OPTIONS]
Description
-----------
Download a fixed snf-image-helper image and install it under $HELPER_DIR.
Options
-------
-h Print this message
-u URL
Download URL to use for the helper image instead of the default
-y Assume Yes to all queries and do not prompt
-f Force the installation even if the snf-image and helper versions don't match
files
-----
/etc/default/snf-image
Configuration file for snf-image
/etc/defaults/snf-image-update-helper
Contains the default download URL
...@@ -12,53 +12,53 @@ that have been tested with *snf-image* and provided here for testing purposes: ...@@ -12,53 +12,53 @@ that have been tested with *snf-image* and provided here for testing purposes:
* Debian Wheezy Base System * Debian Wheezy Base System
[`diskdump <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.meta>`_]
* Debian Desktop * Debian Desktop
[`diskdump <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.meta>`_]
* CentOS 6.x * CentOS 6.x
[`diskdump <http://cdn.synnefo.org/centos-6-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/centos-6-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/centos-6-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/centos-6-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/centos-6-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/centos-6-x86_64.diskdump.meta>`_]
* Fedora Desktop 20 * Fedora Desktop 20
[`diskdump <http://cdn.synnefo.org/fedora-20-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/fedora-20-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/fedora-20-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/fedora-20-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/fedora-20-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/fedora-20-x86_64.diskdump.meta>`_]
* Ubuntu Desktop LTS 14.04 * Ubuntu Desktop LTS 14.04
[`diskdump <http://cdn.synnefo.org/ubuntu_desktop-14.04-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/ubuntu_desktop-14.04-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/ubuntu_desktop-14.04-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/ubuntu_desktop-14.04-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/ubuntu_desktop-14.04-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/ubuntu_desktop-14.04-x86_64.diskdump.meta>`_]
* Kubuntu LTS 14.04 * Kubuntu LTS 14.04
[`diskdump <http://cdn.synnefo.org/kubuntu-14.10-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/kubuntu-14.10-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/kubuntu-14.10-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/kubuntu-14.10-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/kubuntu-14.10-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/kubuntu-14.10-x86_64.diskdump.meta>`_]
* Ubuntu Server LTS 14.04 * Ubuntu Server LTS 14.04
[`diskdump <http://cdn.synnefo.org/ubuntu_server-14.04-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/ubuntu_server-14.04-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/ubuntu_server-14.04-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/ubuntu_server-14.04-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/ubuntu_server-14.04-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/ubuntu_server-14.04-x86_64.diskdump.meta>`_]
* OpenSUSE Desktop 13.1 * OpenSUSE Desktop 13.1
[`diskdump <http://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump.meta>`_]
* Oracle Linux 6.5 * Oracle Linux 6.5
[`diskdump <http://cdn.synnefo.org/oraclelinux-6.5-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/oraclelinux-6.5-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/oraclelinux-6.5-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/oraclelinux-6.5-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/oraclelinux-6.5-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/oraclelinux-6.5-x86_64.diskdump.meta>`_]
* FreeBSD 9.2 * FreeBSD 9.2
[`diskdump <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.meta>`_]
* OpenBSD 5.5 * OpenBSD 5.5
[`diskdump <http://cdn.synnefo.org/openbsd-5.5-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/openbsd-5.5-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/openbsd-5.5-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/openbsd-5.5-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/openbsd-5.5-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/openbsd-5.5-x86_64.diskdump.meta>`_]
* NetBSD 6.1 * NetBSD 6.1
[`diskdump <http://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump>`_] [`diskdump <https://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump>`_]
[`md5sum <http://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump.md5sum>`_] [`md5sum <https://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump.md5sum>`_]
[`metadata <http://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump.meta>`_] [`metadata <https://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump.meta>`_]
Sample Usage Sample Usage
^^^^^^^^^^^^ ^^^^^^^^^^^^
......
__version__ = "0.16.3" __version__ = "0.17rc1"
...@@ -37,8 +37,10 @@ DUMPFS_OPENBSD=dumpfs.openbsd ...@@ -37,8 +37,10 @@ DUMPFS_OPENBSD=dumpfs.openbsd
DATE="date -u" # Time in UTC DATE="date -u" # Time in UTC
EATMYDATA=eatmydata EATMYDATA=eatmydata
MOUNT="mount -n" MOUNT="mount -n"
HIVEXGET="hivexget" HIVEXGET=hivexget
HIVEXREGEDIT="hivexregedit" HIVEXREGEDIT=hivexregedit
BTRFS=btrfs
XFS_GROWFS=xfs_growfs
CLEANUP=( ) CLEANUP=( )
ERRORS=( ) ERRORS=( )
...@@ -181,7 +183,9 @@ system_poweroff() { ...@@ -181,7 +183,9 @@ system_poweroff() {
get_base_distro() { get_base_distro() {
local root_dir=$1 local root_dir=$1
if [ -e "$root_dir/etc/debian_version" ]; then if [ -d "$root_dir/etc/coreos" ]; then
echo "coreos"
elif [ -e "$root_dir/etc/debian_version" ]; then
echo "debian" echo "debian"
elif [ -e "$root_dir/etc/redhat-release" ]; then elif [ -e "$root_dir/etc/redhat-release" ]; then
echo "redhat" echo "redhat"
...@@ -413,7 +417,7 @@ create_partition() { ...@@ -413,7 +417,7 @@ create_partition() {
# For GPT # For GPT
start=${start:0:${#start}-1} # remove the s at the end start=${start:0:${#start}-1} # remove the s at the end
end=${end:0:${#end}-1} # remove the s at the end end=${end:0:${#end}-1} # remove the s at the end
$SGDISK -a 1 -n "$id":"$start":"$end" -t "$id":"$ptype" "$device" $SGDISK -a 1 -n "$id":"$start":"$end" -t "$id":"$ptype" -c "$id":"$name" "$device"
fi fi
} }
...@@ -502,6 +506,19 @@ bsd2linux() { ...@@ -502,6 +506,19 @@ bsd2linux() {
log_error "Couldn't find out mapping for BSD partition: \`$partition' in \`$device'" log_error "Couldn't find out mapping for BSD partition: \`$partition' in \`$device'"
} }
find_mount_target() {
local device
device="$1"
while read entry; do
set $entry
if [ "$device" = "$1" -o "$device" = "$(readlink -f "$1")" ]; then
echo "$2"
break
fi
done <<< "$(cat /proc/mounts)"
}
mount_all() { mount_all() {
local osfamily target fs device fstab entry duid opts types num local osfamily target fs device fstab entry duid opts types num
osfamily="$1" osfamily="$1"
...@@ -510,7 +527,7 @@ mount_all() { ...@@ -510,7 +527,7 @@ mount_all() {
case "$osfamily" in case "$osfamily" in
linux) linux)
fs="ext[234]|msdos|vfat|ntfs" fs="ext[234]|msdos|vfat|ntfs|btrfs|xfs"
;; ;;
freebsd) freebsd)
fs="ufs|msdosfs|ntfs" fs="ufs|msdosfs|ntfs"
......
...@@ -85,7 +85,7 @@ if [[ "$ptype" == ext[234] ]]; then ...@@ -85,7 +85,7 @@ if [[ "$ptype" == ext[234] ]]; then
elif [[ "$ptype" == "freebsd-ufs" ]]; then elif [[ "$ptype" == "freebsd-ufs" ]]; then
$GROWFS_UFS -y "$device" $GROWFS_UFS -y "$device"
else else
warn "Don't know how to resize partition \`$id' with file system \`$ptype'." warn "Don't know how to resize unmounted partition \`$id' with file system \`$ptype'."
fi fi
exit 0 exit 0
......
...@@ -68,13 +68,18 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = "windows" ]; then ...@@ -68,13 +68,18 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = "windows" ]; then
exit 0 exit 0
fi fi
if [ ! -f "$SNF_IMAGE_TARGET/etc/fstab" ]; then if [ ! -d "$SNF_IMAGE_TARGET/etc" ]; then
log_error "\`/etc/fstab' is missing from the root partition." \ log_error "\`/etc' is missing from the root partition." \
"Please check if the value for image property \`ROOT_PARTITION'" \ "Please check if the value for image property \`ROOT_PARTITION'" \
"(=$SNF_IMAGE_PROPERTY_ROOT_PARTITION) is valid." "(=$SNF_IMAGE_PROPERTY_ROOT_PARTITION) is valid."
fi fi
mount_all "$SNF_IMAGE_PROPERTY_OSFAMILY" "$SNF_IMAGE_DEV" "$SNF_IMAGE_TARGET" if [ -f "$SNF_IMAGE_TARGET/etc/fstab" ]; then
mount_all "$SNF_IMAGE_PROPERTY_OSFAMILY" "$SNF_IMAGE_DEV" "$SNF_IMAGE_TARGET"
else
warn "\`/etc/fstab' is missing from the root partition." \
"Unable to mount any other device."
fi
exit 0 exit 0
......
...@@ -66,6 +66,8 @@ linux_hostname() { ...@@ -66,6 +66,8 @@ linux_hostname() {
else else
distro=$(get_base_distro "$target") distro=$(get_base_distro "$target")
case "$distro" in case "$distro" in
coreos)
echo "$hostname" > "$target/etc/hostname";;
redhat) redhat)
sed -i -e "s/HOSTNAME=.*$/HOSTNAME=$hostname/g" "$target/etc/sysconfig/network";; sed -i -e "s/HOSTNAME=.*$/HOSTNAME=$hostname/g" "$target/etc/sysconfig/network";;
slackware|suse) slackware|suse)
...@@ -95,7 +97,9 @@ linux_hostname() { ...@@ -95,7 +97,9 @@ linux_hostname() {
# Some Linux distributions assign the hostname to 127.0.1.1 in order to be # Some Linux distributions assign the hostname to 127.0.1.1 in order to be
# resolvable to an IP address. Lets replace this if found in /etc/hosts # resolvable to an IP address. Lets replace this if found in /etc/hosts
sed -i -e "s/^[[:blank:]]*127\.0\.1\.1[[:blank:]].\+$/127.0.1.1\t$hostname/" "$target/etc/hosts" if [ -f "$target/etc/hosts" ]; then
sed -i -e "s/^[[:blank:]]*127\.0\.1\.1[[:blank:]].\+$/127.0.1.1\t$hostname/" "$target/etc/hosts"
fi
} }