[fedora-productimg-atomic] Initial import
Colin Walters
walters at fedoraproject.org
Tue Feb 17 15:01:37 UTC 2015
commit 290fc0812cf2314420971251d16150f6d79b2dc2
Author: Colin Walters <walters at verbum.org>
Date: Tue Feb 17 09:44:36 2015 -0500
Initial import
anaconda-gtk.css | 63 ++++++++++++++++++++++++++++++++++
fedora-productimg-atomic.spec | 75 +++++++++++++++++++++++++++++++++++++++++
installclass_atomic.py | 66 ++++++++++++++++++++++++++++++++++++
3 files changed, 204 insertions(+), 0 deletions(-)
---
diff --git a/anaconda-gtk.css b/anaconda-gtk.css
new file mode 100644
index 0000000..3928ad5
--- /dev/null
+++ b/anaconda-gtk.css
@@ -0,0 +1,63 @@
+ at define-color fedora #2f4265;
+
+/* logo and sidebar classes for Fedora */
+
+/* The sidebar consists of three parts: a background, a logo, and a product logo,
+ * rendered in that order. The product logo is empty by default and is intended
+ * to be overridden by a stylesheet in product.img.
+ */
+.logo-sidebar {
+ background-image: url('/usr/share/anaconda/pixmaps/sidebar-bg.png');
+ background-color: @fedora;
+ background-repeat: no-repeat;
+}
+
+/* Add a logo to the sidebar */
+.logo {
+ background-image: url('/usr/share/anaconda/pixmaps/sidebar-logo.png');
+ background-position: 50% 20px;
+ background-repeat: no-repeat;
+ background-color: transparent;
+}
+
+/* This is a placeholder to be filled by a product-specific logo. */
+.product-logo {
+ background-image: none;
+ background-color: transparent;
+}
+
+AnacondaSpokeWindow #nav-box {
+ background-color: @fedora;
+ background-image: url('/usr/share/anaconda/pixmaps/topbar-bg.png');
+ background-repeat: no-repeat;
+ color: white;
+}
+
+/* Remove the box-shadow from buttons in the nav-box because it adds a white stripe
+ * below the buttons and makes them look dumb */
+AnacondaSpokeWindow #nav-box GtkButton {
+ box-shadow: none;
+}
+
+
+/* Change the sidebar background color */
+.logo-sidebar {
+ background-color: #006eb4;
+}
+
+AnacondaSpokeWindow #nav-box {
+ background-color: #006eb4;
+}
+
+/* Move the Fedora logo to the bottom */
+.logo {
+ background-position: 50% 90%;
+}
+
+/* Add the product logo at the top */
+.product-logo {
+ background-image: url('/usr/share/anaconda/pixmaps/sidebar-logo_flavor.png');
+ background-position: 12px 10.5em;
+ background-repeat: no-repeat;
+}
+
diff --git a/fedora-productimg-atomic.spec b/fedora-productimg-atomic.spec
new file mode 100644
index 0000000..c10eada
--- /dev/null
+++ b/fedora-productimg-atomic.spec
@@ -0,0 +1,75 @@
+%global loraxtarget %{_datadir}/lorax/product
+%global loraxanacondadir %{loraxtarget}/usr/share/anaconda
+%global pixmapsource %{_datadir}/anaconda/pixmaps/cloud
+
+Name: fedora-productimg-atomic
+Version: 22
+Release: 5%{?dist}
+Summary: Installer branding and configuration for Fedora Atomic
+
+# Copyright and related rights waived via CC0
+# http://creativecommons.org/publicdomain/zero/1.0/
+License: CC0
+
+Source0: anaconda-gtk.css
+Source1: installclass_atomic.py
+
+BuildArch: noarch
+
+BuildRequires: cpio, findutils, xz
+
+Provides: lorax-product-atomic
+
+%description
+This package contains differentiated branding and configuration for Fedora
+Atomic for use in a product.img file for Anaconda, the Fedora installer. It
+is not useful on an installed system.
+
+%prep
+
+%build
+
+%install
+install -m 755 -d %{buildroot}%{loraxtarget}/run/install/product/pyanaconda/installclasses
+install -m 644 %{SOURCE1} %{buildroot}%{loraxtarget}/run/install/product/pyanaconda/installclasses
+install -m 755 -d %{buildroot}%{loraxanacondadir}/pixmaps
+install -m 644 %{SOURCE0} %{buildroot}%{loraxanacondadir}
+
+ln -sf %{pixmapsource}/sidebar-bg.png %{buildroot}%{loraxanacondadir}/pixmaps
+ln -sf %{pixmapsource}/topbar-bg.png %{buildroot}%{loraxanacondadir}/pixmaps
+
+# note filename change with this one
+ln -sf %{pixmapsource}/sidebar-logo.png %{buildroot}%{loraxanacondadir}/pixmaps/sidebar-logo_flavor.png
+
+
+%files
+%dir %{loraxtarget}/run/install/product/pyanaconda/installclasses
+%{loraxtarget}/run/install/product/pyanaconda/installclasses/*.py*
+%dir %{_datadir}/lorax/product/usr/share/anaconda
+%{_datadir}/lorax/product/usr/share/anaconda/anaconda-gtk.css
+%dir %{_datadir}/lorax/product/usr/share
+%dir %{_datadir}/lorax/product/usr
+%dir %{loraxanacondadir}/pixmaps
+%{loraxanacondadir}/pixmaps/*.png
+
+%changelog
+* Tue Nov 25 2014 Colin Walters <walters at redhat.com> - 22-1
+- Forked for atomic
+
+* Thu Nov 20 2014 Matthew Miller <mattdm at fedoraproject.org> 22-4
+- provides lorax-product-cloud
+
+* Thu Nov 20 2014 Matthew Miller <mattdm at fedoraproject.org> 22-3
+- merge changes in from f21
+
+* Fri Nov 7 2014 Matthew Miller <mattdm at fedoraproject.org> 22-1
+- bump to 22 for rawhide
+
+* Thu Nov 6 2014 Matthew Miller <mattdm at fedoraproject.org> 21-2
+- conflict with the other fedora-productimg packages
+
+* Thu Nov 6 2014 Matthew Miller <mattdm at fedoraproject.org> 21-1
+- change license to CC0
+
+* Thu Nov 6 2014 Matthew Miller <mattdm at fedoraproject.org> 21-0
+- Initial creation for Fedora 21
diff --git a/installclass_atomic.py b/installclass_atomic.py
new file mode 100644
index 0000000..58b9b37
--- /dev/null
+++ b/installclass_atomic.py
@@ -0,0 +1,66 @@
+#
+# installclass_atomic.py
+#
+# Atomic-specific partitioning defaults
+#
+# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
+#
+# This program 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 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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/>.
+#
+
+from pyanaconda.installclasses.fedora import FedoraBaseInstallClass
+from pyanaconda.constants import *
+from pyanaconda.product import *
+from pyanaconda import network
+from pyanaconda import nm
+from pyanaconda import iutil
+import types
+from pyanaconda.kickstart import getAvailableDiskSpace
+from blivet.partspec import PartSpec
+from blivet.platform import platform
+from blivet.devicelibs import swap
+from blivet.size import Size
+
+class AtomicInstallClass(FedoraBaseInstallClass):
+ name = "Atomic Host"
+
+ def setDefaultPartitioning(self, storage):
+ # 3GB is obviously arbitrary, but we have to pick some default.
+ autorequests = [PartSpec(mountpoint="/", fstype=storage.defaultFSType,
+ size=Size("1GiB"), maxSize=Size("3GiB"),
+ grow=True, lv=True)]
+
+ bootreqs = platform.setDefaultPartitioning()
+ if bootreqs:
+ autorequests.extend(bootreqs)
+
+ disk_space = getAvailableDiskSpace(storage)
+ swp = swap.swapSuggestion(disk_space=disk_space)
+ autorequests.append(PartSpec(fstype="swap", size=swp, grow=False,
+ lv=True, encrypted=True))
+
+ for autoreq in autorequests:
+ if autoreq.fstype is None:
+ if autoreq.mountpoint == "/boot":
+ autoreq.fstype = storage.defaultBootFSType
+ autoreq.size = Size("300MiB")
+ else:
+ autoreq.fstype = storage.defaultFSType
+
+ storage.autoPartitionRequests = autorequests
+
+ @property
+ def sortPriority(self):
+ """ Obviously the correct answer is 42. """
+ return 42
More information about the scm-commits
mailing list