Hello community,
here is the log from the commit of package yast2-bootloader for openSUSE:Factory
checked in at Tue Apr 13 22:02:15 CEST 2010.
--------
--- yast2-bootloader/yast2-bootloader.changes 2010-03-31 12:06:47.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-bootloader/yast2-bootloader.changes 2010-04-13 17:05:38.000000000 +0200
@@ -1,0 +2,12 @@
+Tue Apr 13 14:15:33 CEST 2010 - juhliarik@suse.cz
+
+- added fix for troubles with using uuid names (bnc#594482)
+- 2.19.12
+
+-------------------------------------------------------------------
+Thu Apr 8 15:55:40 CEST 2010 - juhliarik@suse.cz
+
+- added patch for enable/disable SELinux (fate#309275)
+- 2.19.11
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-bootloader-2.19.10.tar.bz2
New:
----
yast2-bootloader-2.19.12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.Zlvetq/_old 2010-04-13 22:01:53.000000000 +0200
+++ /var/tmp/diff_new_pack.Zlvetq/_new 2010-04-13 22:01:53.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-bootloader (Version 2.19.10)
+# spec file for package yast2-bootloader (Version 2.19.12)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,11 +19,11 @@
Name: yast2-bootloader
-Version: 2.19.10
+Version: 2.19.12
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-bootloader-2.19.10.tar.bz2
+Source0: yast2-bootloader-2.19.12.tar.bz2
Prefix: /usr
@@ -67,7 +67,7 @@
This package contains the YaST2 component for bootloader configuration.
%prep
-%setup -n yast2-bootloader-2.19.10
+%setup -n yast2-bootloader-2.19.12
%build
%{prefix}/bin/y2tool y2autoconf
@@ -119,5 +119,4 @@
/usr/share/YaST2/scrconf/*.scr
/var/adm/fillup-templates/*
/usr/share/YaST2/schema/autoyast/rnc/bootloader.rnc
-
%changelog
++++++ yast2-bootloader-2.19.10.tar.bz2 -> yast2-bootloader-2.19.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.19.10/VERSION new/yast2-bootloader-2.19.12/VERSION
--- old/yast2-bootloader-2.19.10/VERSION 2010-03-31 12:10:13.000000000 +0200
+++ new/yast2-bootloader-2.19.12/VERSION 2010-04-13 14:16:27.000000000 +0200
@@ -1 +1 @@
-2.19.10
+2.19.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.19.10/src/modules/BootStorage.ycp new/yast2-bootloader-2.19.12/src/modules/BootStorage.ycp
--- old/yast2-bootloader-2.19.10/src/modules/BootStorage.ycp 2010-02-11 13:51:00.000000000 +0100
+++ new/yast2-bootloader-2.19.12/src/modules/BootStorage.ycp 2010-04-13 15:55:27.000000000 +0200
@@ -81,6 +81,32 @@
global map multipath_mapping = $[];
+// FIXME: it is ugly hack because y2-storage doesn't known
+// to indicate that it finish (create partitions) proposed partitioning of disk in installation
+/** bnc#594482 - grub config not using uuid
+ * Indicate if storage already finish partitioning of disk
+ * if some partition includes any keyword "create"
+ * the value is the first found partition with flag "create" e.g. /dev/sda2
+ * empty string means all partitions are created
+ */
+string proposed_partition = "";
+
+/** bnc#594482 - grub config not using uuid
+ * 0 - if all devices in variable all_devices are created.
+ * 1 - if partition with flag "create" was found in MapDevices()
+ * 2 - if proposed_partition was created or flag "create" was deleted
+ * by y2-storage. the value is set in CheckProposedPartition ()
+ */
+integer all_devices_created = 0;
+
+/** bnc#594482 - grub config not using uuid
+ * 0 - if all devices in variable all_partitions and all_disks are created
+ * 1 - if partition with flag "create" was found in MapDevices()
+ * 2 - if proposed_partition was created or flag "create" was deleted
+ * by y2-storage. the value is set in CheckProposedPartition ()
+ */
+integer all_partitions_created = 0;
+
/**
* mountpoints for perl-Bootloader
*/
@@ -182,6 +208,14 @@
foreach (map p, (list<map>)(v["partitions"]:[]),
{
+ // bnc#594482 - grub config not using uuid
+ // if there is "not created" partition and flag for "it" is not set
+ if ((p["create"]:nil == true) && (Mode::installation()))
+ {
+ if (proposed_partition == "")
+ proposed_partition = p["device"]:"";
+ all_devices_created = 1;
+ }
// map partition by uuid
if ((p["uuid"]:nil != "") && (p["uuid"]:nil != nil))
{
@@ -218,7 +252,11 @@
}); // end of foreach (map p, (list<map>)(v["partitions"]:[]),
}); // end of foreach (string k, map v, devices,
-
+ if (Mode::installation() && all_devices_created == 2)
+ {
+ all_devices_created = 0;
+ y2milestone("set status for all_devices to \"created\"");
+ }
y2debug("device name mapping to kernel names: %1", all_devices);
}
@@ -253,9 +291,69 @@
return ret;
}
+/** bnc#594482 - grub config not using uuid
+ * Function check if proposed_partition still includes
+ * flag "create"
+ *
+ * @param map tm
+ * @return true if partition is still not created
+ */
+
+boolean CheckProposedPartition (map tm)
+{
+
+ boolean ret = true;
+ if (!Mode::installation())
+ {
+ y2debug("Skip CheckProposedPartition() -> it is not running installation");
+ return false;
+ }
+ if (size(tm) == 0 || proposed_partition == "")
+ {
+ y2debug("proposed_partition is empty: %1", proposed_partition);
+ return false;
+ }
+ map dp = Storage::GetDiskPartition (proposed_partition);
+ string disk = dp["disk"]:"";
+ list <map> partitions = (list<map>)tm[disk,"partitions"]:[];
+ foreach (map p, partitions,
+ {
+ if (p["device"]:"" == proposed_partition)
+ {
+ if (p["create"]:nil != true)
+ {
+ proposed_partition = "";
+ y2milestone("proposed_partition is already created: %1", p);
+ if (all_devices_created == 1)
+ all_devices_created = 2;
+ if (all_partitions_created == 1)
+ all_partitions_created = 2;
+ ret = false;
+ } else {
+ y2milestone("proposed_partition: %1 is NOT created", proposed_partition);
+ }
+ break;
+ }
+ });
+ return ret;
+}
+
+/** bnc#594482 - grub config not using uuid
+ * Check if it is necessary rebuild all_devices
+ *
+ * @return true -> rebuild all_devices
+ */
+boolean RebuildMapDevices()
+{
+ boolean ret = false;
+ boolean ret_CheckProposedPartition = CheckProposedPartition((map)Storage::GetTargetMap());
+ if (!ret_CheckProposedPartition && all_devices_created == 2)
+ return true;
+ return ret;
+}
/**
* Init and fullfil internal data for perl-Bootloader
@@ -266,7 +364,7 @@
global boolean InitMapDevices ()
{
boolean ret = false;
- if (disk_change_time_InitBootloader != Storage::GetTargetChangeTime())
+ if (disk_change_time_InitBootloader != Storage::GetTargetChangeTime() || RebuildMapDevices())
{
y2milestone("Init internal data from storage");
MapDevices();
@@ -277,7 +375,22 @@
return ret;
}
+/** bnc#594482 - grub config not using uuid
+ * Check if it is necessary rebuild all_partitions and all_disks
+ *
+ * @return true -> rebuild all_partitions and all_disks
+ */
+
+boolean RebuilMapAllPartitions()
+{
+ boolean ret = false;
+ boolean ret_CheckProposedPartition = CheckProposedPartition((map)Storage::GetTargetMap());
+ if (!ret_CheckProposedPartition && all_partitions_created == 2)
+ return true;
+
+ return ret;
+}
/**
* bnc #468922 - problem with longtime running the parsing a huge number of disks
@@ -290,7 +403,8 @@
{
boolean ret = false;
if ((disk_change_time_MapAllPartitions != Storage::GetTargetChangeTime())
- || (size(all_partitions) < 1) || (size(target_map) < 1))
+ || (size(all_partitions) < 1) || (size(target_map) < 1)
+ || RebuilMapAllPartitions())
{
// save last change time from storage for MapAllPartitions()
disk_change_time_MapAllPartitions = Storage::GetTargetChangeTime();
@@ -304,11 +418,24 @@
{
foreach (map p, (list<map>)(v["partitions"]:[]),
{
+ // bnc#594482 - grub config not using uuid
+ // if there is "not created" partition and flag for "it" is not set
+ if ((p["create"]:nil == true) && (Mode::installation()))
+ {
+ if (proposed_partition == "")
+ proposed_partition = p["device"]:"";
+ all_partitions_created = 1;
+ }
all_partitions[p["device"]:""] = p;
});
});
ret = true;
}
+ if (Mode::installation() && all_partitions_created == 2)
+ {
+ all_partitions_created = 0;
+ y2milestone("set status for all_partitions to \"created\"");
+ }
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-2.19.10/src/modules/Bootloader.ycp new/yast2-bootloader-2.19.12/src/modules/Bootloader.ycp
--- old/yast2-bootloader-2.19.10/src/modules/Bootloader.ycp 2010-02-11 16:18:09.000000000 +0100
+++ new/yast2-bootloader-2.19.12/src/modules/Bootloader.ycp 2010-04-08 16:44:49.000000000 +0200
@@ -12,7 +12,7 @@
* Jiri Srain
* Olaf Dabrunz
*
- * $Id: Bootloader.ycp 60802 2010-02-11 15:16:50Z juhliarik $
+ * $Id: Bootloader.ycp 61621 2010-04-08 14:45:52Z juhliarik $
*
*/
@@ -61,6 +61,9 @@
global define void DelDuplicatedSections();
global define void ResolveSymlinksInSections();
void createSELinuxDir ();
+ void handleSELinuxPAM ();
+ void enableSELinuxPAM ();
+ void disableSELinuxPAM ();
/**
* Write is repeating again
* Because of progress bar during inst_finish
@@ -565,6 +568,7 @@
ret = ret && blWrite ();
// FATE#305557: Enable SELinux for 11.2
createSELinuxDir ();
+ handleSELinuxPAM ();
if (! ret)
{
y2error ("Installing bootloader failed");
@@ -695,6 +699,7 @@
ret = ret && blWrite ();
// FATE#305557: Enable SELinux for 11.2
createSELinuxDir ();
+ handleSELinuxPAM ();
if (! ret)
{
y2error ("Installing bootloader failed");
@@ -1521,4 +1526,60 @@
}
}
+/** Fate #309275 SELinux: enable pam_selinux when switching on SELinux in yast2_bootloader
+ * Function take care about enable/disable SELinuc
+ *
+ */
+void handleSELinuxPAM ()
+{
+ y2milestone("handleSELinuxPAM called");
+ if (Mode::normal() || Mode::installation())
+ {
+ if (BootCommon::enable_selinux)
+ {
+ y2milestone("call enableSELinuxPAM");
+ enableSELinuxPAM ();
+ } else {
+ y2milestone("call disableSELinuxPAM");
+ disableSELinuxPAM ();
+ }
+ } else {
+ y2milestone("Skip changing SELinux/AppArmor PAM config -> wrong mode");
+ }
+
+}
+
+
+/** Fate #309275 SELinux: enable pam_selinux when switching on SELinux in yast2_bootloader
+ * Function enable SELinux
+ *
+ */
+void enableSELinuxPAM ()
+{
+ string cmd_enable_se = "pam-config -a --selinux 2>/dev/null";
+ string cmd_disable_aa = "pam-config -d --apparmor 2>/dev/null";
+
+ map out = (map) SCR::Execute (.target.bash, cmd_disable_aa);
+ y2debug("result of disabling the AppArmor PAM module is %1", out);
+
+ out = (map) SCR::Execute (.target.bash, cmd_enable_se);
+ y2debug("result of enabling the SELinux PAM module is %1", out);
+}
+
+/** Fate #309275 SELinux: enable pam_selinux when switching on SELinux in yast2_bootloader
+ * Function disable SELinux
+ *
+ */
+void disableSELinuxPAM ()
+{
+ string cmd_disable_se = "pam-config -d --selinux 2>/dev/null";
+ string cmd_enable_aa = "pam-config -a --apparmor 2>/dev/null";
+
+ map out = (map) SCR::Execute (.target.bash, cmd_disable_se);
+ y2debug("result of disabling the SELinux PAM module is %1", out);
+
+ out = (map) SCR::Execute (.target.bash, cmd_enable_aa);
+ y2debug("result of enabling the AppArmor PAM module is %1", out);
+}
+
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org