openSUSE Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2021
- 1 participants
- 2516 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package krb5 for openSUSE:Factory checked in at 2021-06-01 10:33:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/krb5 (Old)
and /work/SRC/openSUSE:Factory/.krb5.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "krb5"
Tue Jun 1 10:33:49 2021 rev:154 rq:894925 version:1.19.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/krb5/krb5.changes 2021-04-29 01:36:36.778426428 +0200
+++ /work/SRC/openSUSE:Factory/.krb5.new.1898/krb5.changes 2021-06-01 10:34:07.148471593 +0200
@@ -1,0 +2,8 @@
+Mon May 3 09:40:17 UTC 2021 - Rodrigo Louren��o <rzl(a)rzl.ooo>
+
+- Build with full Cyrus SASL support
+ * Negotiating SASL credentials with an EXTERNAL bind mechanism requires
+ interaction. Kerberos provides its own interaction function that skips
+ all interaction, thus preventing the mechanism from working.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ krb5.spec ++++++
--- /var/tmp/diff_new_pack.jQMdwk/_old 2021-06-01 10:34:07.800472703 +0200
+++ /var/tmp/diff_new_pack.jQMdwk/_new 2021-06-01 10:34:07.800472703 +0200
@@ -44,6 +44,7 @@
Patch8: 0008-krb5-1.9-debuginfo.patch
BuildRequires: autoconf
BuildRequires: bison
+BuildRequires: cyrus-sasl-devel
BuildRequires: keyutils
BuildRequires: keyutils-devel
BuildRequires: openldap2-devel
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libyui for openSUSE:Factory checked in at 2021-06-01 10:33:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui (Old)
and /work/SRC/openSUSE:Factory/.libyui.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui"
Tue Jun 1 10:33:49 2021 rev:63 rq:896374 version:4.2.11
Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui/libyui.changes 2021-05-05 20:39:47.794968881 +0200
+++ /work/SRC/openSUSE:Factory/.libyui.new.1898/libyui.changes 2021-06-01 10:34:05.656469053 +0200
@@ -1,0 +2,6 @@
+Wed May 26 08:21:36 UTC 2021 - Martin Vidner <mvidner(a)suse.com>
+
+- rest-api: fix crash when switching tabs (bsc#1185746)
+- 4.2.11
+
+-------------------------------------------------------------------
Old:
----
libyui-4.2.10.tar.bz2
New:
----
libyui-4.2.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libyui-bindings.spec ++++++
--- /var/tmp/diff_new_pack.Z6Kkpq/_old 2021-06-01 10:34:06.304470155 +0200
+++ /var/tmp/diff_new_pack.Z6Kkpq/_new 2021-06-01 10:34:06.308470163 +0200
@@ -20,7 +20,7 @@
Name: libyui-bindings
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
Summary: Bindings for libyui
License: LGPL-2.1-only OR LGPL-3.0-only
++++++ libyui-ncurses-pkg.spec ++++++
--- /var/tmp/diff_new_pack.Z6Kkpq/_old 2021-06-01 10:34:06.324470190 +0200
+++ /var/tmp/diff_new_pack.Z6Kkpq/_new 2021-06-01 10:34:06.328470197 +0200
@@ -19,7 +19,7 @@
Name: libyui-ncurses-pkg
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
libyui-ncurses-rest-api.spec: same change
libyui-ncurses.spec: same change
++++++ libyui-qt-graph.spec ++++++
--- /var/tmp/diff_new_pack.Z6Kkpq/_old 2021-06-01 10:34:06.384470292 +0200
+++ /var/tmp/diff_new_pack.Z6Kkpq/_new 2021-06-01 10:34:06.384470292 +0200
@@ -19,7 +19,7 @@
Name: libyui-qt-graph
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
++++++ libyui-qt-pkg.spec ++++++
--- /var/tmp/diff_new_pack.Z6Kkpq/_old 2021-06-01 10:34:06.400470319 +0200
+++ /var/tmp/diff_new_pack.Z6Kkpq/_new 2021-06-01 10:34:06.404470325 +0200
@@ -19,7 +19,7 @@
Name: libyui-qt-pkg
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
libyui-qt-rest-api.spec: same change
libyui-qt.spec: same change
libyui-rest-api.spec: same change
libyui.spec: same change
++++++ libyui-4.2.10.tar.bz2 -> libyui-4.2.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/VERSION.cmake new/libyui-4.2.11/VERSION.cmake
--- old/libyui-4.2.10/VERSION.cmake 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/VERSION.cmake 2021-05-31 16:32:50.000000000 +0200
@@ -1,6 +1,6 @@
SET( VERSION_MAJOR "4")
SET( VERSION_MINOR "2" )
-SET( VERSION_PATCH "10" )
+SET( VERSION_PATCH "11" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
SET( SONAME_MAJOR "15" )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui/src/YDialogSpy.cc new/libyui-4.2.11/libyui/src/YDialogSpy.cc
--- old/libyui-4.2.10/libyui/src/YDialogSpy.cc 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui/src/YDialogSpy.cc 2021-05-31 16:32:50.000000000 +0200
@@ -189,12 +189,13 @@
void editWidget( YWidget *widget, const string & property="Label" );
};
+
/**
* Destructor - switch off widget highlighting at the end
*/
YDialogSpyPrivate::~YDialogSpyPrivate()
{
- highlightWidget(false);
+ highlightWidget( false );
}
@@ -204,10 +205,11 @@
* @param target the target dialog which will be examined
* @param widgetTree where to display the structure
*/
-void fillWidgetTree(YDialog *target, YTree *widgetTree)
+void fillWidgetTree( YDialog *target, YTree *widgetTree )
{
YWidgetTreeItem * rootItem = new YWidgetTreeItem( target, true );
YUI_CHECK_NEW( rootItem );
+
fillTree( rootItem, target->childrenBegin(), target->childrenEnd(), 1 );
widgetTree->addItem( rootItem );
widgetTree->rebuildTree();
@@ -242,23 +244,24 @@
auto minSize = fac->createMinSize( vbox, TREE_WIDTH, TREE_HEIGHT );
minSize->setWeight( YD_VERT, TREE_VWEIGHT );
- priv->widgetTree = fac->createTree( minSize, "Widget &Tree", false );
+ priv->widgetTree = fac->createTree( minSize, "Widget &Tree", false );
priv->widgetTree->setNotify( true );
fillWidgetTree(priv->targetDialog, priv->widgetTree);
auto hbox = fac->createHBox( vbox );
priv->propButton = fac->createPushButton( hbox, "&Properties >>>" );
-
priv->addButton = fac->createMenuButton( hbox, "&Add" );
+
YItemCollection add_items;
- YMenuItem *menu_info = new YMenuItem( "Info" );
- YMenuItem *menu_buttons = new YMenuItem( "Buttons" );
- YMenuItem *menu_input = new YMenuItem( "Input" );
- YMenuItem *menu_align = new YMenuItem( "Alignment" );
- YMenuItem *menu_size = new YMenuItem( "Size" );
- YMenuItem *menu_containers = new YMenuItem( "Containers" );
- YMenuItem *menu_special = new YMenuItem( "Special" );
+ YMenuItem *menu_info = new YMenuItem( "Info" );
+ YMenuItem *menu_buttons = new YMenuItem( "Buttons" );
+ YMenuItem *menu_input = new YMenuItem( "Input" );
+ YMenuItem *menu_align = new YMenuItem( "Alignment" );
+ YMenuItem *menu_size = new YMenuItem( "Size" );
+ YMenuItem *menu_containers = new YMenuItem( "Containers" );
+ YMenuItem *menu_special = new YMenuItem( "Special" );
+
add_items.push_back( menu_info );
add_items.push_back( menu_buttons );
add_items.push_back( menu_input );
@@ -320,14 +323,14 @@
new YMenuItem( menu_special, "DumbTab" );
new YMenuItem( menu_special, "Graph" );
new YMenuItem( menu_special, "Slider" );
- new YMenuItem( menu_input, "TimeField" );
+ new YMenuItem( menu_input, "TimeField" );
new YMenuItem( menu_special, "TimezoneSelector" );
priv->addButton->addItems( add_items );
priv->deleteButton = fac->createPushButton( hbox, "&Delete" );
- priv->upButton = fac->createPushButton( hbox, "��� Up" );
- priv->downButton = fac->createPushButton( hbox, "��� Down" );
+ priv->upButton = fac->createPushButton( hbox, "��� Up" );
+ priv->downButton = fac->createPushButton( hbox, "��� Down" );
priv->propReplacePoint = fac->createReplacePoint( vbox );
fac->createEmpty( priv->propReplacePoint );
@@ -335,6 +338,7 @@
priv->selectedWidgetChanged();
}
+
/**
* Destructor
*/
@@ -344,7 +348,10 @@
priv->spyDialog->destroy();
}
-/** Is the property dialog displayed?
+
+/**
+ * Is the property dialog displayed?
+ *
* @return true if the dialog is displayed
*/
bool YDialogSpyPrivate::propertiesShown() const
@@ -352,14 +359,16 @@
return propTable != nullptr;
}
+
/**
* Highlight the currently selected widget in the spy dialog
*/
void YDialogSpyPrivate::highlightWidget(bool enable)
{
- if (targetDialog) targetDialog->highlight( enable ? selectedWidget() : nullptr);
+ if (targetDialog) targetDialog->highlight( enable ? selectedWidget() : nullptr );
}
+
/**
* Display details about the currently selected widget
*/
@@ -371,8 +380,7 @@
propReplacePoint->setWeight( YD_VERT, PROP_VWEIGHT );
auto fac = YUI::widgetFactory();
- auto minSize = fac->createMinSize( propReplacePoint,
- PROP_WIDTH, PROP_HEIGHT );
+ auto minSize = fac->createMinSize( propReplacePoint, PROP_WIDTH, PROP_HEIGHT );
auto header = new YTableHeader();
YUI_CHECK_NEW( header );
header->addColumn( "Property" );
@@ -387,6 +395,7 @@
spyDialog->recalcLayout();
}
+
/**
* Hide property details
*/
@@ -481,6 +490,7 @@
/**
* Fill the widget tree dialog
+ *
* @param parent widget tree item
* @param begin iterator pointing to the first item
* @param end iterator pointing to the last item
@@ -501,6 +511,7 @@
}
}
+
/**
* The main loop of the spy dialog
*/
@@ -511,45 +522,49 @@
while ( true )
{
auto event = priv->spyDialog->waitForEvent();
- yuiMilestone() << "event: " << event;
- if (!event) continue;
+ // yuiDebug() << "event: " << event << endl;
+ if ( ! event ) continue;
// window manager "close window" button
- if ( event->eventType() == YEvent::CancelEvent ) break;
+ if ( event->eventType() == YEvent::CancelEvent )
+ break;
else if ( event->eventType() == YEvent::MenuEvent)
{
- YMenuItem * menu_item = dynamic_cast<YMenuItem *>(event->item());
+ YMenuItem * menu_item = dynamic_cast<YMenuItem *>( event->item() );
// TODO: handle the export menu item
// if (menu_item == priv->exportMenu) continue;
// closing from menu
- if (menu_item == priv->closeItem) break;
+ if ( menu_item == priv->closeItem )
+ break;
// handle all unhandled menu items as "Add" menu items, this is much
// simpler than comparing it with the huge amount of menu item pointers
- if (menu_item)
+ if ( menu_item )
{
auto menu_label = menu_item->label();
- yuiMilestone() << "Activated menu item: " << menu_label << endl;
- priv->addWidget(menu_label);
+ // yuiDebug() << "Activated menu item: " << menu_label << endl;
+ priv->addWidget( menu_label );
}
continue;
}
// just make sure we do not use NULL in some unexpected case
- if (!event->widget()) continue;
+ if ( !event->widget() )
+ continue;
- if ( event->widget() == priv->upButton ) priv->moveSelectedUp();
- else if ( event->widget() == priv->downButton) priv->moveSelectedDown();
- else if ( event->widget() == priv->propButton ) priv->toggleProperties();
- else if ( event->widget() == priv->deleteButton) priv->deleteWidget();
- else if ( event->widget() == priv->propTable ) priv->editProperty();
- else if ( event->widget() == priv->widgetTree ) priv->selectedWidgetChanged();
+ if ( event->widget() == priv->upButton ) priv->moveSelectedUp();
+ else if ( event->widget() == priv->downButton ) priv->moveSelectedDown();
+ else if ( event->widget() == priv->propButton ) priv->toggleProperties();
+ else if ( event->widget() == priv->deleteButton ) priv->deleteWidget();
+ else if ( event->widget() == priv->propTable ) priv->editProperty();
+ else if ( event->widget() == priv->widgetTree ) priv->selectedWidgetChanged();
}
}
+
/**
* Run the spy dialog for selected UI dialog
* @param dialog UI dialog to examine
@@ -569,17 +584,19 @@
}
}
+
/**
* The currently selected wiget
* @return The currently selected widget (or nullptr if nothing is selected)
*/
YWidget * YDialogSpyPrivate::selectedWidget()
{
- auto item = dynamic_cast<YWidgetTreeItem *>(widgetTree->selectedItem());
+ auto item = dynamic_cast<YWidgetTreeItem *>( widgetTree->selectedItem() );
return item ? item->widget() : nullptr;
}
+
/**
* The selected item has been changed, refresh the UI
*/
@@ -590,32 +607,42 @@
refreshButtonStates();
}
+
/**
* Run the property editor for the current widget
*/
void YDialogSpyPrivate::editProperty()
{
- auto selected_item = dynamic_cast<YTableItem *>(propTable->selectedItem());
- if (!selected_item) return;
+ auto selected_item = dynamic_cast<YTableItem *>( propTable->selectedItem() );
+
+ if ( ! selected_item )
+ return;
auto cell = selected_item->cell(0);
yuiMilestone() << "editing property: " << cell->label();
YPropertyEditor editor(selectedWidget());
+
// update the property table when only the property has been changed
- if (editor.edit(cell->label())) refreshProperties();
+ if ( editor.edit( cell->label() ) )
+ refreshProperties();
}
+
/**
* Delete the currently selected widget
*/
void YDialogSpyPrivate::deleteWidget()
{
auto w = selectedWidget();
- if (!w) return;
+
+ if ( ! w )
+ return;
auto parent = w->parent();
- if (!parent) return;
+
+ if ( ! parent )
+ return;
yuiMilestone() << "removing widget: " << w << endl;
parent->removeChild(w);
@@ -626,11 +653,11 @@
}
// any other child left after the removal?
- if (!parent->hasChildren())
+ if ( ! parent->hasChildren() )
{
// add an Empty widget to have a valid widget tree
// e.g. empty VBoxes are not allowed
- YUI::widgetFactory()->createEmpty(parent);
+ YUI::widgetFactory()->createEmpty( parent );
}
targetDialogUpdated();
@@ -638,61 +665,74 @@
/**
* Helper method - Is the widget a VBox or Hbox?
+ *
* @param widget the widget
- * @return true if the widget is a VBox or HBox
+ * @return true if the widget is a VBox or HBox
*/
bool isBox(const YWidget *widget)
{
- return dynamic_cast<const YLayoutBox *>(widget);
+ return dynamic_cast<const YLayoutBox *>( widget );
}
+
/**
* Helper method - Is the widget a VBox?
+ *
* @param widget the widget
- * @return true if the widget is a VBox
+ * @return true if the widget is a VBox
*/
-bool isVBox(const YWidget *widget)
+bool isVBox( const YWidget *widget )
{
- auto box = dynamic_cast<const YLayoutBox *>(widget);
+ auto box = dynamic_cast<const YLayoutBox *>( widget );
+
return box && box->primary() == YD_VERT;
}
+
/**
* Move the selected widget up/left or down/right. The visual direction
* actually depends on the widget, it just moves the widget to the begining
* or the end of the container.
+ *
* @param true = up move to the begining (up/left), false = to the end (down/right)
*/
-void YDialogSpyPrivate::moveSelected(Direction direction)
+void YDialogSpyPrivate::moveSelected( Direction direction )
{
auto target_widget = selectedWidget();
- if (!target_widget) return;
+
+ if ( ! target_widget )
+ return;
auto parent = target_widget->parent();
- if (!parent || !isBox(parent)) return;
- if (direction == MOVE_UP)
+ if ( ! parent || ! isBox( parent ) )
+ return;
+
+ if ( direction == MOVE_UP )
{
// the first child cannot be moved further
- if (target_widget == parent->firstChild()) return;
+ if ( target_widget == parent->firstChild() )
+ return;
auto i = find( parent->childrenBegin(), parent->childrenEnd(), target_widget );
- if (i != parent->childrenEnd())
+
+ if ( i != parent->childrenEnd() )
{
// swap with the preceeding widget
// Note: use a temporary variable to not rely on the argument evaluation order!
auto other = i--;
- std::swap(*other, *i);
+ std::swap( *other, *i );
}
}
- else
- // moving down
+ else // moving down
{
// the last child cannot be moved further to the end
- if (target_widget == parent->lastChild()) return;
+ if ( target_widget == parent->lastChild() )
+ return;
auto i = find( parent->childrenBegin(), parent->childrenEnd(), target_widget );
- if (i != parent->childrenEnd())
+
+ if ( i != parent->childrenEnd() )
{
// swap with the succeeding widget
// Note: use a temporary variable to not rely on the argument evaluation order!
@@ -706,152 +746,159 @@
/**
* Generic handler for adding widgets
+ *
* @param type Type of the widget to add
*/
-void YDialogSpyPrivate::addWidget(const string &type)
+void YDialogSpyPrivate::addWidget( const string & type )
{
auto widget = selectedWidget();
- if (!widget) return;
+
+ if ( ! widget )
+ return;
try
{
auto f = YUI::widgetFactory();
if (type == "Bottom")
- editWidget(f->createBottom(widget));
+ editWidget( f->createBottom( widget ) );
else if (type == "BusyIndicator")
- editWidget(f->createBusyIndicator(widget, "Busy Indicator", 10000));
+ editWidget( f->createBusyIndicator( widget, "Busy Indicator", 10000 ) );
else if (type == "ButtonBox")
- editWidget(f->createButtonBox(widget));
+ editWidget( f->createButtonBox( widget ) );
else if (type == "ComboBox")
{
- auto cb = f->createComboBox(widget, "Combo Box");
+ auto cb = f->createComboBox( widget, "Combo Box" );
editWidget(cb);
- YPopupInternal::StringArray items(YPopupInternal::editNewStringArray("Menu Items"));
+ YPopupInternal::StringArray items( YPopupInternal::editNewStringArray( "Menu Items" ) );
YItemCollection add_items;
// access by reference
- for(auto&& str: items) add_items.push_back( new YMenuItem( str ) );
+ for ( auto && str: items )
+ add_items.push_back( new YMenuItem( str ) );
+
cb->addItems( add_items );
}
- else if (type == "Empty")
- editWidget(f->createEmpty(widget));
- else if (type == "Frame")
- editWidget(f->createFrame(widget, "Frame"));
- else if (type == "HBox")
- editWidget(f->createHBox(widget));
- else if (type == "Heading")
- editWidget(f->createHeading(widget, "Heading"));
- else if (type == "HSpacing")
- editWidget(f->createHSpacing(widget));
- else if (type == "HStretch")
- editWidget(f->createHStretch(widget));
- else if (type == "CheckBox")
- editWidget(f->createCheckBox(widget, "Check Box"));
- else if (type == "CheckBoxFrame")
+ else if ( type == "Empty" )
+ editWidget( f->createEmpty( widget ) );
+ else if ( type == "Frame" )
+ editWidget( f->createFrame( widget, "Frame" ) );
+ else if ( type == "HBox" )
+ editWidget( f->createHBox( widget ) );
+ else if ( type == "Heading" )
+ editWidget( f->createHeading( widget, "Heading" ) );
+ else if ( type == "HSpacing" )
+ editWidget( f->createHSpacing( widget ) );
+ else if ( type == "HStretch" )
+ editWidget( f->createHStretch( widget ) );
+ else if ( type == "CheckBox" )
+ editWidget( f->createCheckBox( widget, "Check Box" ) );
+ else if ( type == "CheckBoxFrame" )
// make it checked by default
- editWidget(f->createCheckBoxFrame(widget, "Check Box Frame", true));
- else if (type == "Image")
- editWidget(f->createImage(widget, ""));
- else if (type == "InputField")
- editWidget(f->createInputField(widget, "Input"));
- else if (type == "IntField")
- editWidget(f->createIntField(widget, "Integer Field", 0, 100, 50));
- else if (type == "Label")
- editWidget(f->createLabel(widget, "Label"));
- else if (type == "Left")
- editWidget(f->createLeft(widget));
- else if (type == "LogView")
- editWidget(f->createLogView(widget, "Log View", 12));
- else if (type == "MenuButton")
+ editWidget( f->createCheckBoxFrame( widget, "Check Box Frame", true ) );
+ else if ( type == "Image" )
+ editWidget( f->createImage( widget, "" ) );
+ else if ( type == "InputField" )
+ editWidget( f->createInputField( widget, "Input" ) );
+ else if ( type == "IntField" )
+ editWidget( f->createIntField( widget, "Integer Field", 0, 100, 50 ) );
+ else if ( type == "Label" )
+ editWidget( f->createLabel( widget, "Label" ) );
+ else if ( type == "Left" )
+ editWidget( f->createLeft( widget ) );
+ else if ( type == "LogView" )
+ editWidget( f->createLogView( widget, "Log View", 12 ) );
+ else if ( type == "MenuButton" )
{
auto menu = f->createMenuButton( widget, "Menu" );
editWidget(menu);
- YPopupInternal::StringArray items(YPopupInternal::editNewStringArray("Menu Items"));
+ YPopupInternal::StringArray items( YPopupInternal::editNewStringArray("Menu Items") );
YItemCollection add_items;
// access by reference
- for(auto&& str: items) add_items.push_back( new YMenuItem( str ) );
+ for ( auto && str: items )
+ add_items.push_back( new YMenuItem( str ) );
+
menu->addItems( add_items );
}
- else if (type == "MinHeight")
- editWidget(f->createMinHeight(widget, 10));
- else if (type == "MinWidth")
- editWidget(f->createMinWidth(widget, 10));
- else if (type == "MinSize")
- editWidget(f->createMinSize(widget, 10, 10));
- else if (type == "MultiLineEdit")
- editWidget(f->createMultiLineEdit(widget, "MultiLineEdit"));
- else if (type == "MultiSelectionBox")
+ else if ( type == "MinHeight" )
+ editWidget( f->createMinHeight( widget, 10) );
+ else if ( type == "MinWidth" )
+ editWidget( f->createMinWidth( widget, 10) );
+ else if ( type == "MinSize" )
+ editWidget( f->createMinSize( widget, 10, 10) );
+ else if ( type == "MultiLineEdit" )
+ editWidget( f->createMultiLineEdit( widget, "MultiLineEdit" ) );
+ else if ( type == "MultiSelectionBox" )
{
- auto msb = f->createMultiSelectionBox(widget, "MultiSelection Box");
- editWidget(msb);
+ auto msb = f->createMultiSelectionBox( widget, "MultiSelection Box" );
+ editWidget( msb);
// edit the item list and update the widget after pressing OK
- YPopupInternal::StringArray items(YPopupInternal::editNewStringArray("Items"));
+ YPopupInternal::StringArray items( YPopupInternal::editNewStringArray( "Items" ) );
// access by reference
- for(auto&& str: items) msb->addItem(str);
+ for ( auto && str: items )
+ msb->addItem(str);
}
- else if (type == "OutputField")
- editWidget(f->createOutputField(widget, "Output Field"));
- else if (type == "Password")
- editWidget(f->createPasswordField(widget, "Password"));
- else if (type == "ProgressBar")
- editWidget(f->createProgressBar(widget, "Progress"));
- else if (type == "PushButton")
- editWidget(f->createPushButton(widget, "Button"));
- else if (type == "RadioButton")
- editWidget(f->createRadioButton(widget, "Radio Button"));
- else if (type == "RadioButtonGroup")
- editWidget(f->createRadioButtonGroup(widget));
- else if (type == "ReplacePoint")
- editWidget(f->createReplacePoint(widget));
- else if (type == "Right")
- editWidget(f->createRight(widget));
- else if (type == "RichText")
- editWidget(f->createRichText(widget, "This is a <b>RichText</b>."));
- else if (type == "SelectionBox")
- editWidget(f->createSelectionBox(widget, "Selection Box"));
- else if (type == "Table")
+ else if ( type == "OutputField" )
+ editWidget( f->createOutputField( widget, "Output Field" ) );
+ else if ( type == "Password" )
+ editWidget( f->createPasswordField( widget, "Password" ) );
+ else if ( type == "ProgressBar" )
+ editWidget( f->createProgressBar( widget, "Progress" ) );
+ else if ( type == "PushButton" )
+ editWidget( f->createPushButton( widget, "Button" ) );
+ else if ( type == "RadioButton" )
+ editWidget( f->createRadioButton( widget, "Radio Button" ) );
+ else if ( type == "RadioButtonGroup" )
+ editWidget( f->createRadioButtonGroup( widget ) );
+ else if ( type == "ReplacePoint" )
+ editWidget( f->createReplacePoint( widget ) );
+ else if ( type == "Right" )
+ editWidget( f->createRight( widget ) );
+ else if ( type == "RichText" )
+ editWidget( f->createRichText( widget, "This is a <b>RichText</b>." ) );
+ else if ( type == "SelectionBox" )
+ editWidget( f->createSelectionBox( widget, "Selection Box" ) );
+ else if ( type == "Table" )
{
- YPopupInternal::StringArray items(YPopupInternal::editNewStringArray("Table Columns"));
+ YPopupInternal::StringArray items( YPopupInternal::editNewStringArray( "Table Columns" ) );
// abort adding if Cancel has been pressed
- if (!items.empty())
+ if ( ! items.empty() )
{
auto header = new YTableHeader();
// access by reference
- for(auto&& str: items) header->addColumn(str);
+ for ( auto && str: items )
+ header->addColumn(str);
- editWidget(f->createTable(widget, header));
+ editWidget( f->createTable( widget, header ) );
}
}
- else if (type == "Top")
- editWidget(f->createTop(widget));
- else if (type == "Tree")
- editWidget(f->createTree(widget, "Tree"));
- else if (type == "VBox")
- editWidget(f->createVBox(widget));
- else if (type == "VSpacing")
- editWidget(f->createVSpacing(widget));
- else if (type == "VStretch")
- editWidget(f->createVStretch(widget));
+ else if ( type == "Top" )
+ editWidget( f->createTop( widget ) );
+ else if ( type == "Tree" )
+ editWidget( f->createTree( widget, "Tree" ) );
+ else if ( type == "VBox" )
+ editWidget( f->createVBox( widget ) );
+ else if ( type == "VSpacing" )
+ editWidget( f->createVSpacing( widget ) );
+ else if ( type == "VStretch" )
+ editWidget( f->createVStretch( widget ) );
else
{
- YPopupInternal::message(
- "Adding \"" + type + "\" widget type is not supported.");
+ YPopupInternal::message( "Adding \"" + type + "\" widget type is not supported." );
return;
}
targetDialogUpdated();
}
- catch( const YUIException & exception )
+ catch ( const YUIException & exception )
{
- YPopupInternal::message("Could not add a new widget:\n"
- + exception.msg());
+ YPopupInternal::message( "Could not add a new widget:\n" + exception.msg() );
}
}
@@ -865,7 +912,7 @@
// refresh the spy dialog
widgetTree->deleteAllItems();
- fillWidgetTree(targetDialog, widgetTree);
+ fillWidgetTree( targetDialog, widgetTree );
}
/**
@@ -880,15 +927,16 @@
// a VBox/HBox container, set the labels according to stacking direction.
if (widget && parent && isBox(parent))
{
- upButton->setEnabled(widget != parent->firstChild());
- upButton->setLabel(isVBox(parent) ? "��� Up" : "��� Left");
- downButton->setEnabled(widget != parent->lastChild());
- downButton->setLabel(isVBox(parent) ? "��� Down" : "��� Right");
+ upButton->setEnabled( widget != parent->firstChild() );
+ upButton->setLabel( isVBox(parent) ? "��� Up" : "��� Left" );
+
+ downButton->setEnabled( widget != parent->lastChild() );
+ downButton->setLabel( isVBox(parent) ? "��� Down" : "��� Right" );
}
else
{
- upButton->setEnabled(false);
- downButton->setEnabled(false);
+ upButton->setEnabled( false );
+ downButton->setEnabled( false );
}
// TODO: Enable the [Add] menu button only when a widget can be added
@@ -906,13 +954,14 @@
* @param widget selected widget
* @param property property name
*/
-void YDialogSpyPrivate::editWidget(YWidget *widget, const string &property)
+void YDialogSpyPrivate::editWidget( YWidget *widget, const string &property )
{
// redraw the target dialog
targetDialog->recalcLayout();
- if (!widget->propertySet().contains(property)) return;
+ if ( ! widget->propertySet().contains(property) )
+ return;
- YPropertyEditor editor(widget);
- editor.edit(property);
+ YPropertyEditor editor( widget );
+ editor.edit( property );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-qt/src/QY2Styler.cc new/libyui-4.2.11/libyui-qt/src/QY2Styler.cc
--- old/libyui-4.2.10/libyui-qt/src/QY2Styler.cc 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-qt/src/QY2Styler.cc 2021-05-31 16:32:50.000000000 +0200
@@ -299,7 +299,7 @@
{
// Don't use yuiDebug() here - deadlock (reason unknown so far) in thread handling!
- qDebug() << "Registering " << widget << " for parent " << parent << "\n";
+ // qDebug() << "Registering " << widget << " for parent " << parent << "\n";
widget->installEventFilter( this );
_children[parent].push_back( widget );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-qt/src/YQDialog.cc new/libyui-4.2.11/libyui-qt/src/YQDialog.cc
--- old/libyui-4.2.10/libyui-qt/src/YQDialog.cc 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-qt/src/YQDialog.cc 2021-05-31 16:32:50.000000000 +0200
@@ -27,23 +27,26 @@
#define YUILogComponent "qt-ui"
#include <yui/YUILog.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <QDesktopWidget>
-#include <QDebug>
-#include "YQUI.h"
-#include "YQi18n.h"
+#include <yui/YApplication.h>
+#include <yui/YDialogSpy.h>
#include <yui/YEvent.h>
+
+#include <QPushButton>
+#include <QMessageBox>
+#include <QDesktopWidget>
+
+#include "QY2StyleEditor.h"
+#include "QY2Styler.h"
+
#include "YQDialog.h"
#include "YQGenericButton.h"
-#include "YQWizardButton.h"
-#include "YQWizard.h"
#include "YQMainWinDock.h"
-#include <yui/YDialogSpy.h>
-#include <yui/YApplication.h>
-#include "QY2Styler.h"
-#include "QY2StyleEditor.h"
+#include "YQUI.h"
+#include "YQWizard.h"
+#include "YQWizardButton.h"
+#include "YQi18n.h"
+
#define YQMainDialogWFlags Qt::Widget
#define YQPopupDialogWFlags Qt::Dialog
@@ -857,7 +860,6 @@
pos += parent->mapToGlobal( QPoint( 0, 0 ) );
pos = dialog->mapToParent( dialog->mapFromGlobal( pos ) );
- qDebug() << pos;
dialog->move( pos );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-qt/src/YQDialog.h new/libyui-4.2.11/libyui-qt/src/YQDialog.h
--- old/libyui-4.2.10/libyui-qt/src/YQDialog.h 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-qt/src/YQDialog.h 2021-05-31 16:32:50.000000000 +0200
@@ -30,6 +30,9 @@
#include <QEvent>
#include <QWidget>
#include <QPalette>
+#include <QEvent>
+#include <QCloseEvent>
+
#include <yui/YDialog.h>
class YQGenericButton;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-qt/src/YQWizard.cc new/libyui-4.2.11/libyui-qt/src/YQWizard.cc
--- old/libyui-4.2.10/libyui-qt/src/YQWizard.cc 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-qt/src/YQWizard.cc 2021-05-31 16:32:50.000000000 +0200
@@ -24,50 +24,37 @@
/-*/
+
#include "YQWizard.h"
+
#define YUILogComponent "qt-wizard"
#include <yui/YUILog.h>
-#include <string>
-#include <yui/YShortcut.h>
+#include <yui/YApplication.h>
+#include <yui/YEvent.h>
+#include <yui/YReplacePoint.h>
+#include <yui/YWidgetFactory.h>
-#include <QDialog>
-#include <QPainter>
-#include <QStackedWidget>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmenubar.h>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qtabwidget.h>
-#include <qtoolbutton.h>
-#include <QGraphicsDropShadowEffect>
#include <QFileInfo>
+#include <QGridLayout>
+#include <QHeaderView>
+#include <QLabel>
+#include <QLayout>
+#include <QMenuBar>
+#include <QPixmap>
+#include <QStackedWidget>
-#include "QY2ListView.h"
-#include "QY2Styler.h"
#include "QY2HelpDialog.h"
+#include "QY2ListView.h"
#include "QY2RelNotesDialog.h"
-#include <QGridLayout>
-#include <QHeaderView>
-#include <qevent.h>
+#include "QY2Styler.h"
#include "utf8.h"
+#include "YQAlignment.h"
#include "YQi18n.h"
#include "YQUI.h"
-#include "YQApplication.h"
-#include "YQDialog.h"
-#include "YQAlignment.h"
-#include "YQReplacePoint.h"
-#include "YQEmpty.h"
-#include "YQLabel.h"
#include "YQWizardButton.h"
-#include "YQWidgetFactory.h"
#include "YQSignalBlocker.h"
-#include <yui/YEvent.h>
#include "YQMainWinDock.h"
@@ -79,11 +66,11 @@
#define TEXTDOMAIN "qt"
-#define USE_ICON_ON_HELP_BUTTON 0
-YQWizard *YQWizard::main_wizard = 0;
-string YQWizard::_releaseNotesButtonId = "";
-string YQWizard::_releaseNotesButtonLabel = "";
+YQWizard * YQWizard::main_wizard = 0;
+string YQWizard::_releaseNotesButtonId = "";
+string YQWizard::_releaseNotesButtonLabel = "";
+
YQWizard::YQWizard( YWidget * parent,
const string & backButtonLabel,
@@ -100,9 +87,9 @@
, _backButtonLabel( backButtonLabel )
, _abortButtonLabel( abortButtonLabel )
, _nextButtonLabel( nextButtonLabel )
- , _helpDlg ( NULL )
- , _hotkeysDlg ( NULL )
- , _relNotesDlg ( NULL )
+ , _helpDialog( NULL )
+ , _hotkeysDialog( NULL )
+ , _relNotesDialog( NULL )
{
setObjectName( "wizard" );
setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
@@ -113,7 +100,7 @@
setWidgetRep( this );
- //either main wizard with `opt(`stepsEnabled), or sub-wizard of steps-enabled wizard
+ // either main wizard with `opt(`stepsEnabled), or sub-wizard of steps-enabled wizard
_stepsEnabled = (wizardMode == YWizardMode_Steps);
_treeEnabled = (wizardMode == YWizardMode_Tree);
@@ -161,8 +148,8 @@
setStretchFactor( indexOf( _workArea ), 1 );
setCollapsible( indexOf( _sideBar ), false );
- /* If steps are enabled, we want to delay
- the registering for after we have steps registered */
+ // If steps are enabled, we want to delay registration until after we registered steps
+
if ( !_stepsEnabled )
QY2Styler::styler()->registerWidget( this );
@@ -185,6 +172,7 @@
YQWizard::~YQWizard()
{
deleteSteps();
+
if ( this == main_wizard )
{
main_wizard = 0;
@@ -195,9 +183,9 @@
main_wizard->setSizes( sizes() );
}
- delete _helpDlg;
- delete _hotkeysDlg;
- delete _relNotesDlg;
+ delete _helpDialog;
+ delete _hotkeysDialog;
+ delete _relNotesDialog;
QY2Styler::styler()->unregisterWidget( this );
topLevelWidget()->setWindowIcon( _previousWindowIcon );
@@ -489,6 +477,7 @@
updateStepStates();
}
+
void YQWizard::copySteps( YQWizard *wizard)
{
QList<Step*> _oldSteps = wizard->stepsList();
@@ -641,7 +630,7 @@
{
YQSignalBlocker sigBlocker( _tree );
- _tree->setCurrentItem(item);
+ _tree->setCurrentItem(item);
_tree->scrollToItem(item);
}
}
@@ -661,7 +650,7 @@
void YQWizard::treeSelectionChanged()
-{ //FIXME is currentItem correct or selected.first
+{
if ( _tree )
sendTreeEvent( _tree->currentItem() );
}
@@ -694,7 +683,8 @@
QVBoxLayout *vbox = new QVBoxLayout( _workArea );
YUI_CHECK_NEW( vbox );
- // add the logo on the top
+ // Add the logo at the top
+
if (YUI::application()->showProductLogo())
{
QWidget * logoWidget = new QWidget;
@@ -759,24 +749,24 @@
// Dialog icon and heading
//
- if (titleIsOnTheLeft()) {
- QHBoxLayout *bigHBox = new QHBoxLayout();
- innerbox->addLayout( bigHBox );
-
- leftInnerBox = new QVBoxLayout();
- leftInnerBox->setObjectName( "LeftInnerBox" );
- bigHBox->addLayout( leftInnerBox );
- bigHBox->setStretchFactor( leftInnerBox, 1 );
-
- rightInnerBox = new QVBoxLayout();
- rightInnerBox->setObjectName( "RightInnerBox" );
- bigHBox->addLayout( rightInnerBox );
- bigHBox->setStretchFactor( rightInnerBox, 2 );
+ if ( titleIsOnTheLeft() )
+ {
+ QHBoxLayout *bigHBox = new QHBoxLayout();
+ innerbox->addLayout( bigHBox );
+
+ leftInnerBox = new QVBoxLayout();
+ leftInnerBox->setObjectName( "LeftInnerBox" );
+ bigHBox->addLayout( leftInnerBox );
+ bigHBox->setStretchFactor( leftInnerBox, 1 );
+
+ rightInnerBox = new QVBoxLayout();
+ rightInnerBox->setObjectName( "RightInnerBox" );
+ bigHBox->addLayout( rightInnerBox );
+ bigHBox->setStretchFactor( rightInnerBox, 2 );
}
QHBoxLayout * headingHBox = new QHBoxLayout();
YUI_CHECK_NEW( headingHBox );
- //headingHBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
leftInnerBox->addLayout( headingHBox );
_dialogIcon = new QLabel( _workArea );
@@ -792,7 +782,7 @@
_dialogHeading->setWordWrap( true );
_dialogHeading->setTextFormat( Qt::PlainText );
_dialogHeading->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert
- _dialogHeading->setObjectName( (titleIsOnTheLeft())? "DialogHeadingLeft" : "DialogHeadingTop" ) ;
+ _dialogHeading->setObjectName( titleIsOnTheLeft() ? "DialogHeadingLeft" : "DialogHeadingTop" ) ;
//
// Client area (the part that belongs to the YCP application)
@@ -902,7 +892,7 @@
YUI_CHECK_NEW( _releaseNotesButton );
hbox->addWidget( (QWidget *) _releaseNotesButton->widgetRep() );
connect( _releaseNotesButton, &pclass(_releaseNotesButton)::clicked,
- this, &pclass(this)::showReleaseNotes );
+ this, &pclass(this)::showReleaseNotes );
if (_releaseNotesButtonId == "")
@@ -959,11 +949,13 @@
return hbox;
}
+
bool YQWizard::titleIsOnTheLeft()
{
return wizardMode() == YWizardMode_TitleOnLeft;
}
+
void YQWizard::destroyButtons()
{
delete _backButton;
@@ -1037,11 +1029,13 @@
topLevelWidget()->setWindowTitle( YQUI::ui()->applicationTitle() );
}
+
string YQWizard::getDialogTitle()
{
- return toUTF8(topLevelWidget()->windowTitle());
+ return toUTF8( topLevelWidget()->windowTitle() );
}
+
void YQWizard::setDialogHeading( const string & headingText )
{
if ( _dialogHeading )
@@ -1061,10 +1055,10 @@
string YQWizard::getDialogHeading()
{
- if (_dialogHeading)
- return toUTF8(_dialogHeading->text());
- else
- return "";
+ if (_dialogHeading)
+ return toUTF8(_dialogHeading->text());
+ else
+ return "";
}
string YQWizard::debugLabel() const
@@ -1122,17 +1116,17 @@
void YQWizard::showHelp()
{
- if (!_helpDlg)
- _helpDlg = new QY2HelpDialog ( _qHelpText, NULL );
+ if ( !_helpDialog )
+ _helpDialog = new QY2HelpDialog ( _qHelpText, NULL );
else
{
- _helpDlg->setHelpText( _qHelpText );
- _helpDlg->hide(); // workaround for icewm (see: bnc #397083)
+ _helpDialog->setHelpText( _qHelpText );
+ _helpDialog->hide(); // workaround for icewm (see: bnc #397083)
}
- _helpDlg->show();
- _helpDlg->raise();
- _helpDlg->activateWindow();
+ _helpDialog->show();
+ _helpDialog->raise();
+ _helpDialog->activateWindow();
}
@@ -1172,33 +1166,34 @@
"</dl>"
);
- if (!_hotkeysDlg)
- _hotkeysDlg = new QY2HelpDialog ( _qHotkeysText , NULL );
+ if (!_hotkeysDialog)
+ _hotkeysDialog = new QY2HelpDialog ( _qHotkeysText , NULL );
- _hotkeysDlg->show();
- _hotkeysDlg->raise();
- _hotkeysDlg->activateWindow();
+ _hotkeysDialog->show();
+ _hotkeysDialog->raise();
+ _hotkeysDialog->activateWindow();
}
void YQWizard::showReleaseNotes()
{
- if (!_relNotesDlg)
- _relNotesDlg = new QY2RelNotesDialog ( NULL );
+ if (!_relNotesDialog)
+ _relNotesDialog = new QY2RelNotesDialog ( NULL );
else
{
- _relNotesDlg->hide(); // workaround for icewm (see: bnc #397083)
+ _relNotesDialog->hide(); // workaround for icewm (see: bnc #397083)
}
std::map<string,string> relnotes = YUI::application()->releaseNotes();
+
if ( relnotes.size() == 0)
{
return;
}
- _relNotesDlg->setRelNotes( relnotes );
- _relNotesDlg->show();
- _relNotesDlg->raise();
- _relNotesDlg->activateWindow();
+ _relNotesDialog->setRelNotes( relnotes );
+ _relNotesDialog->show();
+ _relNotesDialog->raise();
+ _relNotesDialog->activateWindow();
}
@@ -1348,12 +1343,14 @@
resizeClientArea();
}
+
void YQWizard::resizeClientArea()
{
QSize contentsRect = _clientArea->contentsRect().size();
_contents->setSize( contentsRect.width(), contentsRect.height() );
}
+
bool YQWizard::eventFilter( QObject * obj, QEvent * ev )
{
if ( ev->type() == QEvent::Resize && obj == _contents )
@@ -1379,7 +1376,8 @@
YQWizardButton * wizardButton = dynamic_cast<YQWizardButton *> (button);
- if ( wizardButton ) {
+ if ( wizardButton )
+ {
// QWizardButton only implements hide and show, not setVisible
if ( newLabel.empty() )
wizardButton->hide();
@@ -1445,14 +1443,14 @@
// Qt handles duplicate shortcuts, it can be kept (bnc#880983)
_releaseNotesButton->setLabel( _( "&Release Notes" ) );
- if ( _helpDlg )
- _helpDlg->retranslate();
+ if ( _helpDialog )
+ _helpDialog->retranslate();
- if ( _hotkeysDlg )
- _hotkeysDlg->retranslate();
+ if ( _hotkeysDialog )
+ _hotkeysDialog->retranslate();
- if ( _relNotesDlg )
- _relNotesDlg->retranslate();
+ if ( _relNotesDialog )
+ _relNotesDialog->retranslate();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-qt/src/YQWizard.h new/libyui-4.2.11/libyui-qt/src/YQWizard.h
--- old/libyui-4.2.10/libyui-qt/src/YQWizard.h 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-qt/src/YQWizard.h 2021-05-31 16:32:50.000000000 +0200
@@ -26,39 +26,28 @@
#ifndef YQWizard_h
#define YQWizard_h
+#include <yui/YWizard.h>
+
#include <string>
-#include <vector>
-#include <qpixmap.h>
#include <qstringlist.h>
-#include "QY2ListView.h"
-#include <QGridLayout>
#include <QSplitter>
-#include <qlabel.h>
-#include <QMenu>
-#include <QAction>
-#include <qevent.h>
-#include <yui/YWizard.h>
-#include "YQWizardButton.h"
-using std::vector;
+#include "QY2ListView.h"
+#include "YQWizardButton.h"
-class QGridLayout;
+class QAction;
+class QEvent;
class QFrame;
-class QSplitter;
class QLabel;
class QMenuBar;
class QPushButton;
-class QSpacerItem;
-class QToolButton;
class QStackedWidget;
-class YReplacePoint;
class QTreeWidgetItem;
-class YQAlignment;
-class YQReplacePoint;
-class QY2ListView;
class QY2HelpDialog;
class QY2RelNotesDialog;
+class YQAlignment;
+class YReplacePoint;
class YQWizard : public QSplitter, public YWizard
@@ -73,11 +62,11 @@
/**
* Constructor.
**/
- YQWizard( YWidget * parent,
+ YQWizard( YWidget * parent,
const std::string & backButtonLabel,
const std::string & abortButtonLabel,
const std::string & nextButtonLabel,
- YWizardMode wizardMode = YWizardMode_Standard );
+ YWizardMode wizardMode = YWizardMode_Standard );
/**
* Destructor.
@@ -590,41 +579,41 @@
QString _qHelpText;
QString _qHotkeysText;
- QY2HelpDialog * _helpDlg;
- QY2HelpDialog * _hotkeysDlg;
- QY2RelNotesDialog * _relNotesDlg;
+ QY2HelpDialog * _helpDialog;
+ QY2HelpDialog * _hotkeysDialog;
+ QY2RelNotesDialog * _relNotesDialog;
QStackedWidget * _sideBar;
QWidget * _stepsPanel;
YQWizardButton * _releaseNotesButton;
- static std::string _releaseNotesButtonId;
- static std::string _releaseNotesButtonLabel;
+ static std::string _releaseNotesButtonId;
+ static std::string _releaseNotesButtonLabel;
YQWizardButton * _helpButton;
QAction * _helpAction;
QAction * _hotkeysAction;
- QPushButton * _stepsButton;
- QPushButton * _treeButton;
- QFrame * _treePanel;
- QY2ListView * _tree;
+ QPushButton * _stepsButton;
+ QPushButton * _treeButton;
+ QFrame * _treePanel;
+ QY2ListView * _tree;
QFrame * _workArea;
QWidget * _clientArea;
- QMenuBar * _menuBar;
- QLabel * _dialogIcon;
- QLabel * _dialogLogo;
- QLabel * _dialogBanner;
- QLabel * _dialogHeading;
- YQAlignment * _contents;
- YQWizardButton * _backButton;
- YQWizardButton * _abortButton;
- YQWizardButton * _nextButton;
+ QMenuBar * _menuBar;
+ QLabel * _dialogIcon;
+ QLabel * _dialogLogo;
+ QLabel * _dialogBanner;
+ QLabel * _dialogHeading;
+ YQAlignment * _contents;
+ YQWizardButton * _backButton;
+ YQWizardButton * _abortButton;
+ YQWizardButton * _nextButton;
YReplacePoint * _contentsReplacePoint;
- QList<YQWizard::Step*> _stepsList;
+ QList<YQWizard::Step*> _stepsList;
QHash<QString,YQWizard::Step*> _stepsIDs;
QHash<QString,YQWizard::TreeItem*> _treeIDs;
QHash<QString,QMenu*> _menuIDs;
- QHash<QAction*, std::string> _menuEntryIDs;
+ QHash<QAction*, std::string> _menuEntryIDs;
QIcon _previousWindowIcon;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-qt-pkg/src/YQPatternSelector.cc new/libyui-4.2.11/libyui-qt-pkg/src/YQPatternSelector.cc
--- old/libyui-4.2.10/libyui-qt-pkg/src/YQPatternSelector.cc 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-qt-pkg/src/YQPatternSelector.cc 2021-05-31 16:32:50.000000000 +0200
@@ -41,6 +41,7 @@
#include <QHeaderView>
#include <QPushButton>
#include <QSplitter>
+#include <QLayout>
#include "YQPatternSelector.h"
#include "YQPkgConflictDialog.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/libyui-rest-api/src/YDumbTabActionHandler.cc new/libyui-4.2.11/libyui-rest-api/src/YDumbTabActionHandler.cc
--- old/libyui-4.2.10/libyui-rest-api/src/YDumbTabActionHandler.cc 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/libyui-rest-api/src/YDumbTabActionHandler.cc 2021-05-31 16:32:50.000000000 +0200
@@ -29,7 +29,7 @@
const std::string &item_label )
{
return [&] (YDumbTab *tab) {
- YItem * item = findItem( item_label, widget->itemsBegin(), widget->itemsEnd() );
+ YItem * item = findItem( item_label, tab->itemsBegin(), tab->itemsEnd() );
if ( item )
{
yuiMilestone() << "Activating Tree Item \"" << item->label() << '"' << std::endl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-bindings.spec new/libyui-4.2.11/package/libyui-bindings.spec
--- old/libyui-4.2.10/package/libyui-bindings.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-bindings.spec 2021-05-31 16:32:50.000000000 +0200
@@ -20,7 +20,7 @@
Name: libyui-bindings
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
Summary: Bindings for libyui
License: LGPL-2.1-only OR LGPL-3.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-ncurses-pkg.spec new/libyui-4.2.11/package/libyui-ncurses-pkg.spec
--- old/libyui-4.2.10/package/libyui-ncurses-pkg.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-ncurses-pkg.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-ncurses-pkg
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-ncurses-rest-api.spec new/libyui-4.2.11/package/libyui-ncurses-rest-api.spec
--- old/libyui-4.2.10/package/libyui-ncurses-rest-api.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-ncurses-rest-api.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-ncurses-rest-api
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-ncurses.spec new/libyui-4.2.11/package/libyui-ncurses.spec
--- old/libyui-4.2.10/package/libyui-ncurses.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-ncurses.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-ncurses
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-qt-graph.spec new/libyui-4.2.11/package/libyui-qt-graph.spec
--- old/libyui-4.2.10/package/libyui-qt-graph.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-qt-graph.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-qt-graph
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-qt-pkg.spec new/libyui-4.2.11/package/libyui-qt-pkg.spec
--- old/libyui-4.2.10/package/libyui-qt-pkg.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-qt-pkg.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-qt-pkg
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-qt-rest-api.spec new/libyui-4.2.11/package/libyui-qt-rest-api.spec
--- old/libyui-4.2.10/package/libyui-qt-rest-api.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-qt-rest-api.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-qt-rest-api
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-qt.spec new/libyui-4.2.11/package/libyui-qt.spec
--- old/libyui-4.2.10/package/libyui-qt.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-qt.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-qt
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui-rest-api.spec new/libyui-4.2.11/package/libyui-rest-api.spec
--- old/libyui-4.2.10/package/libyui-rest-api.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui-rest-api.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui-rest-api
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui.changes new/libyui-4.2.11/package/libyui.changes
--- old/libyui-4.2.10/package/libyui.changes 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui.changes 2021-05-31 16:32:50.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed May 26 08:21:36 UTC 2021 - Martin Vidner <mvidner(a)suse.com>
+
+- rest-api: fix crash when switching tabs (bsc#1185746)
+- 4.2.11
+
+-------------------------------------------------------------------
Mon May 3 15:34:39 UTC 2021 - Stefan Hundhammer <shundhammer(a)suse.com>
- Added pkgconfig files for libyui-qt and libyui-ncurses
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-4.2.10/package/libyui.spec new/libyui-4.2.11/package/libyui.spec
--- old/libyui-4.2.10/package/libyui.spec 2021-05-05 10:55:01.000000000 +0200
+++ new/libyui-4.2.11/package/libyui.spec 2021-05-31 16:32:50.000000000 +0200
@@ -19,7 +19,7 @@
Name: libyui
# DO NOT manually bump the version here; instead, use rake version:bump
-Version: 4.2.10
+Version: 4.2.11
Release: 0
%define so_version 15
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-installation for openSUSE:Factory checked in at 2021-06-01 10:33:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
and /work/SRC/openSUSE:Factory/.yast2-installation.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-installation"
Tue Jun 1 10:33:48 2021 rev:471 rq:896366 version:4.4.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2021-05-20 19:25:03.053944820 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-installation.new.1898/yast2-installation.changes 2021-06-01 10:34:04.156466499 +0200
@@ -1,0 +2,22 @@
+Mon May 31 08:43:52 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Modify IP forwarding network configuration using the defaults
+ defined in the control file when selecting the role (bsc#1186280)
+- 4.4.10
+
+-------------------------------------------------------------------
+Mon May 24 11:20:46 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- The InstallationData class has been moved to yast2-packager
+ (related to the previous fix, e.g. bsc#1180888)
+- 4.4.9
+
+-------------------------------------------------------------------
+Thu May 20 14:29:15 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- Logging all available product information into directory
+ /var/log/YaST2/installation_info. This should help for evaluating
+ the cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
+- 4.4.8
+
+-------------------------------------------------------------------
Old:
----
yast2-installation-4.4.7.tar.bz2
New:
----
yast2-installation-4.4.10.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.9Xjp51/_old 2021-06-01 10:34:04.760467527 +0200
+++ /var/tmp/diff_new_pack.9Xjp51/_new 2021-06-01 10:34:04.760467527 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 4.4.7
+Version: 4.4.10
Release: 0
Summary: YaST2 - Installation Parts
License: GPL-2.0-only
@@ -37,10 +37,10 @@
BuildRequires: yast2-devtools >= 3.1.10
# For firewall widgets
BuildRequires: yast2-firewall
-# Dropped Yast::LanItems
-BuildRequires: yast2-network >= 4.4.7
-# Y2Packager::MediumType
-BuildRequires: yast2-packager >= 4.2.27
+# Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable)
+BuildRequires: yast2-network >= 4.4.12
+# Y2Packager::InstallationData
+BuildRequires: yast2-packager >= 4.4.2
# for AbortException and handle direct abort
BuildRequires: yast2-ruby-bindings >= 4.0.6
# For selinux classes
@@ -70,18 +70,18 @@
Requires: pciutils
# tar-gzip some system files and untar-ungzip them after the installation (FATE #300421, #120103)
Requires: tar
-# Yast2::FsSnapshotStore::IOError
-Requires: yast2 >= 4.3.53
+# Installation::InstallationInfo
+Requires: yast2 >= 4.4.4
# CIOIgnore
Requires: yast2-bootloader
Requires: yast2-country >= 3.3.1
# Language::GetLanguageItems and other API
# Language::Set (handles downloading the translation extensions)
Requires: yast2-country-data >= 2.16.11
-# Dropped Yast::LanItems
-Requires: yast2-network >= 4.4.7
-# Y2Packager::MediumType
-Requires: yast2-packager >= 4.2.22
+# Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable)
+Requires: yast2-network >= 4.4.12
+# Y2Packager::InstallationData
+Requires: yast2-packager >= 4.4.2
# Pkg::ProvidePackage
Requires: yast2-pkg-bindings >= 3.1.33
# Proxy settings for 2nd stage (bnc#764951)
++++++ yast2-installation-4.4.7.tar.bz2 -> yast2-installation-4.4.10.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/bin/yupdate new/yast2-installation-4.4.10/bin/yupdate
--- old/yast2-installation-4.4.7/bin/yupdate 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/bin/yupdate 2021-05-31 15:51:47.000000000 +0200
@@ -35,7 +35,7 @@
class Version
MAJOR = 0
MINOR = 1
- PATCH = 2
+ PATCH = 3
STRING = "#{MAJOR}.#{MINOR}.#{PATCH}".freeze
end
@@ -191,7 +191,11 @@
"/usr/share/icons"
].freeze
- attr_reader :dir, :orig_dir
+ # @return [String] the original requested directory
+ attr_reader :orig_dir
+
+ # @return [String] expanded requested directory (i.e. symlink target)
+ attr_reader :dir
# manage the OverlayFS for this directory
# @param directory [String] the directory
@@ -204,7 +208,8 @@
# create an OverlayFS overlay for this directory if it is not writable
def create
- return if File.writable?(dir)
+ # skip non-existing or already writable directories
+ return if !File.directory?(dir) || File.writable?(dir)
msg "Adding overlay for #{orig_dir}..."
FileUtils.mkdir_p(upperdir)
@@ -262,6 +267,7 @@
OverlayFS.escape_path("workdir", dir)
end
+ # path pointing to the original directory content
def origdir
OverlayFS.escape_path("original", dir)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/package/yast2-installation.changes new/yast2-installation-4.4.10/package/yast2-installation.changes
--- old/yast2-installation-4.4.7/package/yast2-installation.changes 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/package/yast2-installation.changes 2021-05-31 15:51:47.000000000 +0200
@@ -1,4 +1,26 @@
-------------------------------------------------------------------
+Mon May 31 08:43:52 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Modify IP forwarding network configuration using the defaults
+ defined in the control file when selecting the role (bsc#1186280)
+- 4.4.10
+
+-------------------------------------------------------------------
+Mon May 24 11:20:46 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- The InstallationData class has been moved to yast2-packager
+ (related to the previous fix, e.g. bsc#1180888)
+- 4.4.9
+
+-------------------------------------------------------------------
+Thu May 20 14:29:15 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- Logging all available product information into directory
+ /var/log/YaST2/installation_info. This should help for evaluating
+ the cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
+- 4.4.8
+
+-------------------------------------------------------------------
Tue May 18 12:39:25 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
- Fallback to ncurses when a X display is not opened after 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/package/yast2-installation.spec new/yast2-installation-4.4.10/package/yast2-installation.spec
--- old/yast2-installation-4.4.7/package/yast2-installation.spec 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/package/yast2-installation.spec 2021-05-31 15:51:47.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-installation
-Version: 4.4.7
+Version: 4.4.10
Release: 0
Summary: YaST2 - Installation Parts
License: GPL-2.0-only
@@ -37,10 +37,10 @@
BuildRequires: yast2-devtools >= 3.1.10
# For firewall widgets
BuildRequires: yast2-firewall
-# Dropped Yast::LanItems
-BuildRequires: yast2-network >= 4.4.7
-# Y2Packager::MediumType
-BuildRequires: yast2-packager >= 4.2.27
+# Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable)
+BuildRequires: yast2-network >= 4.4.12
+# Y2Packager::InstallationData
+BuildRequires: yast2-packager >= 4.4.2
# for AbortException and handle direct abort
BuildRequires: yast2-ruby-bindings >= 4.0.6
# For selinux classes
@@ -70,18 +70,18 @@
Requires: pciutils
# tar-gzip some system files and untar-ungzip them after the installation (FATE #300421, #120103)
Requires: tar
-# Yast2::FsSnapshotStore::IOError
-Requires: yast2 >= 4.3.53
+# Installation::InstallationInfo
+Requires: yast2 >= 4.4.4
# CIOIgnore
Requires: yast2-bootloader
Requires: yast2-country >= 3.3.1
# Language::GetLanguageItems and other API
# Language::Set (handles downloading the translation extensions)
Requires: yast2-country-data >= 2.16.11
-# Dropped Yast::LanItems
-Requires: yast2-network >= 4.4.7
-# Y2Packager::MediumType
-Requires: yast2-packager >= 4.2.22
+# Y2Network::ProposalSettings #modify_defaults and #apply_defaults (forwarding configurable)
+Requires: yast2-network >= 4.4.12
+# Y2Packager::InstallationData
+Requires: yast2-packager >= 4.4.2
# Pkg::ProvidePackage
Requires: yast2-pkg-bindings >= 3.1.33
# Proxy settings for 2nd stage (bnc#764951)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/src/lib/installation/clients/inst_doit.rb new/yast2-installation-4.4.10/src/lib/installation/clients/inst_doit.rb
--- old/yast2-installation-4.4.7/src/lib/installation/clients/inst_doit.rb 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/src/lib/installation/clients/inst_doit.rb 2021-05-31 15:51:47.000000000 +0200
@@ -19,6 +19,8 @@
# current contact information at www.novell.com.
# ------------------------------------------------------------------------------
+require "installation/installation_info"
+
module Yast
# Asks user to really do the installation/update.
class InstDoitClient < Client
@@ -64,6 +66,11 @@
false,
false
)
+
+ # Log all information about the installation/update
+ ::Installation::InstallationInfo.instance.write(
+ Mode.update ? "Starting update" : "Starting installation"
+ )
end
@confirmed ? :next : :back
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/src/lib/installation/clients/installation.rb new/yast2-installation-4.4.10/src/lib/installation/clients/installation.rb
--- old/yast2-installation-4.4.7/src/lib/installation/clients/installation.rb 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/src/lib/installation/clients/installation.rb 2021-05-31 15:51:47.000000000 +0200
@@ -30,6 +30,7 @@
# $Id$
require "ui/wizards/layout"
+require "y2packager/installation_data"
module Yast
class InstallationClient < Client
@@ -48,6 +49,9 @@
Yast.import "ProductFeatures"
Yast.import "ProductControl"
+ # register the installation data dump callback
+ Y2Packager::InstallationData.new.register_callback
+
# log the inst-sys identification for easier debugging
log_os_release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/src/lib/installation/select_system_role.rb new/yast2-installation-4.4.10/src/lib/installation/select_system_role.rb
--- old/yast2-installation-4.4.7/src/lib/installation/select_system_role.rb 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/src/lib/installation/select_system_role.rb 2021-05-31 15:51:47.000000000 +0200
@@ -22,6 +22,7 @@
require "ui/text_helpers"
require "installation/services"
require "installation/system_role"
+require "y2network/proposal_settings"
Yast.import "GetInstArgs"
Yast.import "Packages"
@@ -227,7 +228,8 @@
role = SystemRole.select(role_id)
role.overlay_features
- adapt_services(role)
+ role.adapt_services
+ role.adapt_network
select_packages
end
@@ -257,17 +259,6 @@
Yast::Pkg.PkgSolve(false)
end
- # for given role sets in {::Installation::Services} list of services to enable
- # according to its config. Do not use alone and use apply_role instead.
- def adapt_services(role)
- services = role["services"] || []
-
- to_enable = services.map { |s| s["name"] }
- log.info "enable for #{role.id} these services: #{to_enable.inspect}"
-
- Installation::Services.enabled = to_enable
- end
-
# Return the list of defined roles
#
# @param [Boolean] refresh Refresh system roles cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/src/lib/installation/system_role.rb new/yast2-installation-4.4.10/src/lib/installation/system_role.rb
--- old/yast2-installation-4.4.7/src/lib/installation/system_role.rb 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/src/lib/installation/system_role.rb 2021-05-31 15:51:47.000000000 +0200
@@ -1,5 +1,5 @@
# encoding: utf-8
-
+#
# ------------------------------------------------------------------------------
# Copyright (c) 2017 SUSE LLC
#
@@ -22,6 +22,7 @@
require "yast"
require "installation/services"
require "installation/system_role_handlers_runner"
+require "y2network/proposal_settings"
Yast.import "ProductControl"
Yast.import "ProductFeatures"
@@ -166,6 +167,7 @@
role["additional_dialogs"] = raw_role["additional_dialogs"]
role["services"] = raw_role["services"] || []
+ role["network"] = raw_role["network"] || {}
role["no_default"] = raw_role["no_default"] || false
role
@@ -185,9 +187,7 @@
#
# @return [Array] the list of services to be enable
def adapt_services
- return [] if !self["services"]
-
- to_enable = self["services"].map { |s| s["name"] }
+ to_enable = (self["services"] || []).map { |s| s["name"] }
log.info "enable for #{id} these services: #{to_enable.inspect}"
@@ -212,5 +212,13 @@
NON_OVERLAY_ATTRIBUTES.each { |a| features.delete(a) }
Yast::ProductFeatures.SetOverlay(features)
end
+
+ def adapt_network
+ settings = Y2Network::ProposalSettings.instance
+ network = Yast::ProductFeatures.GetSection("network")
+
+ settings.modify_defaults(network.merge(self["network"] || {}))
+ settings.apply_defaults
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.4.7/test/system_role_test.rb new/yast2-installation-4.4.10/test/system_role_test.rb
--- old/yast2-installation-4.4.7/test/system_role_test.rb 2021-05-18 17:00:33.000000000 +0200
+++ new/yast2-installation-4.4.10/test/system_role_test.rb 2021-05-31 15:51:47.000000000 +0200
@@ -3,6 +3,7 @@
require_relative "./test_helper"
require "installation/services"
require "installation/system_role"
+require "y2network/proposal_settings"
describe Installation::SystemRole do
let(:system_roles) do
@@ -17,7 +18,13 @@
"id" => "role_two",
"services" => [{ "name" => "service_one" }, { "name" => "service_two" }],
"order" => "100"
+ },
+ {
+ "id" => "role_three",
+ "network" => { "ipv4_forward" => true, "ipv6_forward" => true },
+ "order" => "50"
}
+
]
end
@@ -30,26 +37,27 @@
it "returns the roles from the control file" do
raw_roles = described_class.raw_roles
- expect(raw_roles.size).to eql 2
+ expect(raw_roles.size).to eql 3
expect(raw_roles.first["id"]).to eql "role_one"
end
end
describe ".ids" do
it "returns a list with all the role ids declared in the control file" do
- expect(described_class.ids).to match_array(["role_one", "role_two"])
+ expect(described_class.ids).to match_array(["role_one", "role_two", "role_three"])
end
end
describe ".all" do
it "returns an array of SystemRole objects for all the declared roles " do
- expect(described_class.all.size).to eql(2)
+ expect(described_class.all.size).to eql(3)
expect(described_class.all.last.class).to eql(described_class)
end
it "returns array sorted by order" do
- expect(described_class.all.first.id).to eql("role_two")
- expect(described_class.all[1].id).to eql("role_one")
+ expect(described_class.all.first.id).to eql("role_three")
+ expect(described_class.all[1].id).to eql("role_two")
+ expect(described_class.all[2].id).to eql("role_one")
end
end
@@ -127,6 +135,28 @@
end
end
+ describe "#adapt_network" do
+ let(:settings) { Y2Network::ProposalSettings.instance }
+ let(:role) { described_class.find("role_three") }
+ before do
+ allow(Yast::ProductFeatures).to receive(:GetSection)
+ allow(Yast::ProductFeatures).to receive(:GetSection).with("network")
+ .and_return("ipv6_forward" => false)
+ end
+
+ it "modifies the network proposal settings with defaults from the control file" do
+ expect(settings).to receive(:modify_defaults)
+ .with("ipv4_forward" => true, "ipv6_forward" => true)
+
+ role.adapt_network
+ end
+
+ it "applies the network proposal settings defaults" do
+ expect(settings).to receive(:apply_defaults)
+ role.adapt_network
+ end
+ end
+
describe "#overlay_features" do
it "overlays the product features with the ones defined in the control file for this role" do
role = described_class.find("role_one")
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2021-06-01 10:33:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
and /work/SRC/openSUSE:Factory/.yast2-packager.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager"
Tue Jun 1 10:33:48 2021 rev:411 rq:896350 version:4.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2021-04-23 17:50:43.790804924 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new.1898/yast2-packager.changes 2021-06-01 10:34:01.552462066 +0200
@@ -1,0 +2,15 @@
+Thu May 27 07:43:27 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- Use the "armv7hl" packages on the "armv7l" architecture
+ (bsc#1183795)
+- 4.4.3
+
+-------------------------------------------------------------------
+Mon May 24 11:16:11 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- Logging all available product information into directory
+ /var/log/YaST2/installation_info. This should help for evaluating
+ the cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
+- 4.4.2
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-4.4.1.tar.bz2
New:
----
yast2-packager-4.4.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.LrBoFn/_old 2021-06-01 10:34:03.408465225 +0200
+++ /var/tmp/diff_new_pack.LrBoFn/_new 2021-06-01 10:34:03.408465225 +0200
@@ -17,7 +17,7 @@
Name: yast2-packager
-Version: 4.4.1
+Version: 4.4.3
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
@@ -36,8 +36,8 @@
BuildRequires: yast2-storage-ng >= 4.0.141
# break the yast2-packager -> yast2-storage-ng -> yast2-packager build cycle
#!BuildIgnore: yast2-packager
-# Y2Packager::Repositories
-BuildRequires: yast2 >= 4.2.60
+# Installation::InstallationInfo
+BuildRequires: yast2 >= 4.4.4
# raw_name
BuildRequires: yast2-pkg-bindings >= 4.2.8
# Augeas lenses
@@ -48,8 +48,8 @@
Requires: yast2-country-data >= 2.16.3
# raw_name
Requires: yast2-pkg-bindings >= 4.2.8
-# Y2Packager::Repositories
-Requires: yast2 >= 4.2.60
+# Installation::InstallationInfo
+Requires: yast2 >= 4.4.4
# unzipping license file
Requires: unzip
# HTTP, FTP, HTTPS modules (inst_productsources.ycp)
++++++ yast2-packager-4.4.1.tar.bz2 -> yast2-packager-4.4.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.4.1/package/yast2-packager.changes new/yast2-packager-4.4.3/package/yast2-packager.changes
--- old/yast2-packager-4.4.1/package/yast2-packager.changes 2021-04-22 10:20:01.000000000 +0200
+++ new/yast2-packager-4.4.3/package/yast2-packager.changes 2021-05-31 13:51:21.000000000 +0200
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Thu May 27 07:43:27 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- Use the "armv7hl" packages on the "armv7l" architecture
+ (bsc#1183795)
+- 4.4.3
+
+-------------------------------------------------------------------
+Mon May 24 11:16:11 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
+
+- Logging all available product information into directory
+ /var/log/YaST2/installation_info. This should help for evaluating
+ the cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
+- 4.4.2
+
+-------------------------------------------------------------------
Thu Apr 22 07:51:02 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
- Revert copying the libzypp cache to the target system and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.4.1/package/yast2-packager.spec new/yast2-packager-4.4.3/package/yast2-packager.spec
--- old/yast2-packager-4.4.1/package/yast2-packager.spec 2021-04-22 10:20:01.000000000 +0200
+++ new/yast2-packager-4.4.3/package/yast2-packager.spec 2021-05-31 13:51:21.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-packager
-Version: 4.4.1
+Version: 4.4.3
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
@@ -36,8 +36,8 @@
BuildRequires: yast2-storage-ng >= 4.0.141
# break the yast2-packager -> yast2-storage-ng -> yast2-packager build cycle
#!BuildIgnore: yast2-packager
-# Y2Packager::Repositories
-BuildRequires: yast2 >= 4.2.60
+# Installation::InstallationInfo
+BuildRequires: yast2 >= 4.4.4
# raw_name
BuildRequires: yast2-pkg-bindings >= 4.2.8
# Augeas lenses
@@ -48,8 +48,8 @@
Requires: yast2-country-data >= 2.16.3
# raw_name
Requires: yast2-pkg-bindings >= 4.2.8
-# Y2Packager::Repositories
-Requires: yast2 >= 4.2.60
+# Installation::InstallationInfo
+Requires: yast2 >= 4.4.4
# unzipping license file
Requires: unzip
# HTTP, FTP, HTTPS modules (inst_productsources.ycp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.4.1/src/lib/y2packager/installation_data.rb new/yast2-packager-4.4.3/src/lib/y2packager/installation_data.rb
--- old/yast2-packager-4.4.1/src/lib/y2packager/installation_data.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-4.4.3/src/lib/y2packager/installation_data.rb 2021-05-31 13:51:21.000000000 +0200
@@ -0,0 +1,99 @@
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# 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, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "installation/installation_info"
+require "y2packager/medium_type"
+require "y2packager/product_reader"
+require "y2packager/resolvable"
+
+Yast.import "Mode"
+Yast.import "Pkg"
+
+module Y2Packager
+ # Class for dumping the general installation data.
+ class InstallationData
+ # Register the callback for dumping the general installation data
+ def register_callback
+ # already registered
+ return if ::Installation::InstallationInfo.instance.callback?("packager")
+
+ ::Installation::InstallationInfo.instance.add_callback("packager") do
+ data = {
+ "mode" => Yast::Mode.mode,
+ "medium_type" => Y2Packager::MediumType.type_value,
+ "repositories" => repositories,
+ "services" => services,
+ "available_base_products" => available_base_products,
+ "products" => products
+ }
+
+ add_update_data(data) if Yast::Mode.update
+
+ data
+ end
+ end
+
+ private
+
+ def products
+ Y2Packager::Resolvable.find(kind: :product).map do |product|
+ {
+ "name" => product.name,
+ "version" => product.version,
+ "display_name" => product.display_name,
+ "status" => product.status,
+ "vendor" => product.vendor,
+ "repository" => product.source,
+ "path" => product.path
+ }
+ end
+ end
+
+ def available_base_products
+ Y2Packager::ProductReader.new.available_base_products.map do |product|
+ {
+ "name" => product.name,
+ "version" => product.version,
+ "display_name" => product.display_name,
+ "vendor" => product.vendor
+ }
+ end
+ end
+
+ def repositories
+ Yast::Pkg.SourceGetCurrent(false).map do |repo|
+ Yast::Pkg.SourceGeneralData(repo)
+ end
+ end
+
+ def services
+ Yast::Pkg.ServiceAliases.map do |s|
+ Yast::Pkg.ServiceGet(s)
+ end
+ end
+
+ # add update data
+ def add_update_data(data)
+ # evaluating root partitions in upgrade
+ Yast.import "RootPart"
+ data["root_partitions"] = Yast::RootPart.rootPartitions
+ data["selected_root_partition"] = Yast::RootPart.selectedRootPartition
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.4.1/src/lib/y2packager/medium_type.rb new/yast2-packager-4.4.3/src/lib/y2packager/medium_type.rb
--- old/yast2-packager-4.4.1/src/lib/y2packager/medium_type.rb 2021-04-22 10:20:01.000000000 +0200
+++ new/yast2-packager-4.4.3/src/lib/y2packager/medium_type.rb 2021-05-31 13:51:21.000000000 +0200
@@ -33,6 +33,15 @@
@type ||= detect_medium_type
end
+ # Returns the cached medium type value. If the medium detection has not been
+ # called yet (via the `type` method) then it returns `nil`.
+ #
+ # @see .type
+ # @return [Symbol,nil] Symbol describing the medium or `nil`
+ def type_value
+ @type
+ end
+
# Possible types for type value
POSSIBLE_TYPES = [:online, :offline, :standard].freeze
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.4.1/src/lib/y2packager/solvable_pool.rb new/yast2-packager-4.4.3/src/lib/y2packager/solvable_pool.rb
--- old/yast2-packager-4.4.1/src/lib/y2packager/solvable_pool.rb 2021-04-22 10:20:01.000000000 +0200
+++ new/yast2-packager-4.4.3/src/lib/y2packager/solvable_pool.rb 2021-05-31 13:51:21.000000000 +0200
@@ -10,14 +10,18 @@
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# ------------------------------------------------------------------------------
+require "etc"
require "solv"
+require "yast"
module Y2Packager
# This is a wrapper for the Solv::Pool class
class SolvablePool
+ include Yast::Logger
+
def initialize
@pool = Solv::Pool.new
- @pool.setarch
+ @pool.setarch(arch)
end
#
@@ -35,5 +39,23 @@
end
attr_reader :pool
+
+ private
+
+ # detect the system architecture
+ # @return [String] the machine architecture, equivalent to "uname -m"
+ def arch
+ # get the machine architecture name ("uname -m")
+ arch = Etc.uname[:machine]
+ log.info "Detected system architecture: #{arch}"
+
+ # use "armv7hl" packages on "armv7l" (bsc#1183795)
+ if arch == "armv7l"
+ arch = "armv7hl"
+ log.info "Using #{arch} package architecture"
+ end
+
+ arch
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.4.1/test/installation_data_test.rb new/yast2-packager-4.4.3/test/installation_data_test.rb
--- old/yast2-packager-4.4.1/test/installation_data_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-packager-4.4.3/test/installation_data_test.rb 2021-05-31 13:51:21.000000000 +0200
@@ -0,0 +1,26 @@
+require_relative "test_helper"
+require "y2packager/installation_data"
+
+describe Y2Packager::InstallationData do
+ describe "#register_callback" do
+ it "adds the default product callback" do
+ expect(::Installation::InstallationInfo.instance)
+ .to receive(:callback?).with("packager").and_return(false)
+
+ expect(::Installation::InstallationInfo.instance)
+ .to receive(:add_callback).with("packager")
+
+ subject.register_callback
+ end
+
+ it "does not add the callback if it is already defined" do
+ expect(::Installation::InstallationInfo.instance)
+ .to receive(:callback?).with("packager").and_return(true)
+
+ expect(::Installation::InstallationInfo.instance)
+ .to_not receive(:add_callback)
+
+ subject.register_callback
+ end
+ end
+end
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2021-06-01 10:33:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng"
Tue Jun 1 10:33:47 2021 rev:117 rq:896349 version:4.4.11
Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2021-05-23 23:30:47.676690010 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1898/libstorage-ng.changes 2021-06-01 10:34:00.452460193 +0200
@@ -1,0 +2,14 @@
+Mon May 31 11:30:21 UTC 2021 - aschnell(a)suse.com
+
+- merge gh#openSUSE/libstorage-ng#809
+- work on image mode
+- 4.4.11
+
+--------------------------------------------------------------------
+Fri May 28 06:34:26 UTC 2021 - aschnell(a)suse.com
+
+- merge gh#openSUSE/libstorage-ng#808
+- adjust partition names from set_source
+- 4.4.10
+
+--------------------------------------------------------------------
Old:
----
libstorage-ng-4.4.9.tar.xz
New:
----
libstorage-ng-4.4.11.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.vNld9k/_old 2021-06-01 10:34:00.932461011 +0200
+++ /var/tmp/diff_new_pack.vNld9k/_new 2021-06-01 10:34:00.932461011 +0200
@@ -18,7 +18,7 @@
%define libname %{name}1
Name: libstorage-ng
-Version: 4.4.9
+Version: 4.4.11
Release: 0
Summary: Library for storage management
License: GPL-2.0-only
++++++ libstorage-ng-4.4.9.tar.xz -> libstorage-ng-4.4.11.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/LIBVERSION new/libstorage-ng-4.4.11/LIBVERSION
--- old/libstorage-ng-4.4.9/LIBVERSION 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/LIBVERSION 2021-05-31 13:30:21.000000000 +0200
@@ -1 +1 @@
-1.53.1
+1.54.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/VERSION new/libstorage-ng-4.4.11/VERSION
--- old/libstorage-ng-4.4.9/VERSION 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/VERSION 2021-05-31 13:30:21.000000000 +0200
@@ -1 +1 @@
-4.4.9
+4.4.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/configure.ac new/libstorage-ng-4.4.11/configure.ac
--- old/libstorage-ng-4.4.9/configure.ac 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/configure.ac 2021-05-31 13:30:21.000000000 +0200
@@ -150,6 +150,7 @@
integration-tests/bcache/Makefile
integration-tests/misc/Makefile
integration-tests/pools/Makefile
+ integration-tests/image/Makefile
bindings/Makefile
bindings/python/Makefile
bindings/python/examples/Makefile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/integration-tests/Makefile.am new/libstorage-ng-4.4.11/integration-tests/Makefile.am
--- old/libstorage-ng-4.4.9/integration-tests/Makefile.am 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/integration-tests/Makefile.am 2021-05-31 13:30:21.000000000 +0200
@@ -3,7 +3,7 @@
#
SUBDIRS = partition-tables partitions filesystems mount-points md lvm \
- plain-encryption luks bcache pools misc
+ plain-encryption luks bcache pools misc image
python_PYTHON = storageitu.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/integration-tests/image/Makefile.am new/libstorage-ng-4.4.11/integration-tests/image/Makefile.am
--- old/libstorage-ng-4.4.9/integration-tests/image/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.11/integration-tests/image/Makefile.am 2021-05-31 13:30:21.000000000 +0200
@@ -0,0 +1,10 @@
+#
+# Makefile.am for libstorage/integration-tests/image
+#
+
+integration_testsdir = /usr/lib/libstorage-ng/integration-tests/image
+
+integration_tests_SCRIPTS = *.py
+
+EXTRA_DIST = $(integration_tests_SCRIPTS)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/integration-tests/image/create.py new/libstorage-ng-4.4.11/integration-tests/image/create.py
--- old/libstorage-ng-4.4.9/integration-tests/image/create.py 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.11/integration-tests/image/create.py 2021-05-31 13:30:21.000000000 +0200
@@ -0,0 +1,54 @@
+#!/usr/bin/python3
+
+# requirements:
+
+
+from storage import *
+from storageitu import *
+
+
+def create_partition(gpt, size):
+
+ for slot in gpt.get_unused_partition_slots():
+
+ if not slot.primary_possible:
+ continue
+
+ region = slot.region
+ region.set_length(int(size / region.get_block_size()))
+ region = gpt.align(region)
+ partition = gpt.create_partition(slot.name, region, PartitionType_PRIMARY)
+ return partition
+
+ raise "no slot for partition found"
+
+
+set_logger(get_logfile_logger())
+
+environment = Environment(False, ProbeMode_NONE, TargetMode_IMAGE)
+
+storage = Storage(environment)
+storage.set_rootprefix("/mnt")
+
+staging = storage.get_staging()
+
+# TODO find free loop device
+
+disk = Disk.create(staging, "/dev/loop0", 3 * GiB)
+disk.set_image_filename("/tmp/test.image")
+
+gpt = to_gpt(disk.create_partition_table(PtType_GPT))
+
+partition1 = create_partition(gpt, 1 * GiB)
+file_system1 = partition1.create_filesystem(FsType_EXT4)
+mount_point1 = file_system1.create_mount_point("/")
+
+partition2 = create_partition(gpt, 1.5 * GiB)
+file_system2 = partition2.create_filesystem(FsType_XFS)
+mount_point2 = file_system2.create_mount_point("/data")
+
+print(staging)
+
+commit(storage)
+
+# TODO allow cleanup: unmount, deactivate loop devices, ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/DevicegraphImpl.cc new/libstorage-ng-4.4.11/storage/DevicegraphImpl.cc
--- old/libstorage-ng-4.4.9/storage/DevicegraphImpl.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/DevicegraphImpl.cc 2021-05-31 13:30:21.000000000 +0200
@@ -474,6 +474,9 @@
remove_edge(old_edge);
+ Device* target = graph[target_vertex].get();
+ target->get_impl().has_new_parent();
+
return new_edge;
}
@@ -493,6 +496,9 @@
remove_edge(old_edge);
+ Device* target = graph[target_vertex].get();
+ target->get_impl().has_new_parent();
+
return new_edge;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/DeviceImpl.cc new/libstorage-ng-4.4.11/storage/Devices/DeviceImpl.cc
--- old/libstorage-ng-4.4.9/storage/Devices/DeviceImpl.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/DeviceImpl.cc 2021-05-31 13:30:21.000000000 +0200
@@ -245,6 +245,12 @@
void
+ Device::Impl::has_new_parent()
+ {
+ }
+
+
+ void
Device::Impl::parent_has_new_region(const Device* parent)
{
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/DeviceImpl.h new/libstorage-ng-4.4.11/storage/Devices/DeviceImpl.h
--- old/libstorage-ng-4.4.9/storage/Devices/DeviceImpl.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/DeviceImpl.h 2021-05-31 13:30:21.000000000 +0200
@@ -146,6 +146,8 @@
virtual ResizeInfo detect_resize_info(const BlkDevice* blk_device = nullptr) const = 0;
+ virtual void has_new_parent();
+
virtual void parent_has_new_region(const Device* parent);
virtual uf_t used_features(UsedFeaturesDependencyType used_features_dependency_type) const { return 0; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/Disk.cc new/libstorage-ng-4.4.11/storage/Devices/Disk.cc
--- old/libstorage-ng-4.4.9/storage/Devices/Disk.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/Disk.cc 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -166,6 +166,20 @@
}
+ const string&
+ Disk::get_image_filename() const
+ {
+ return get_impl().get_image_filename();
+ }
+
+
+ void
+ Disk::set_image_filename(const string& image_filename)
+ {
+ get_impl().set_image_filename(image_filename);
+ }
+
+
vector<Disk*>
Disk::get_all(Devicegraph* devicegraph)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/Disk.h new/libstorage-ng-4.4.11/storage/Devices/Disk.h
--- old/libstorage-ng-4.4.9/storage/Devices/Disk.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/Disk.h 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -141,6 +141,17 @@
bool is_nvme() const;
/**
+ * Get the filename for the underlying image. Only for TargetMode::IMAGE.
+ */
+ const std::string& get_image_filename() const;
+
+ /**
+ * Set the filename for the underlying image. The file must not exist already.
+ * Only for TargetMode::IMAGE.
+ */
+ void set_image_filename(const std::string& image_filename);
+
+ /**
* Find a Disk by its name. Only the name returned by get_name() is
* considered.
*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/DiskImpl.cc new/libstorage-ng-4.4.11/storage/Devices/DiskImpl.cc
--- old/libstorage-ng-4.4.9/storage/Devices/DiskImpl.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/DiskImpl.cc 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -40,6 +40,7 @@
#include "storage/UsedFeatures.h"
#include "storage/Prober.h"
#include "storage/Utils/Format.h"
+#include "storage/Utils/SystemCmd.h"
namespace storage
@@ -234,6 +235,7 @@
{
vector<Action::Base*> actions;
actions.push_back(new Action::Create(get_sid()));
+ actions.push_back(new Action::Activate(get_sid()));
actiongraph.add_chain(actions);
}
else
@@ -332,17 +334,66 @@
Text
Disk::Impl::do_create_text(Tense tense) const
{
+ // only used for TargetMode::IMAGE
+
Text text = tenser(tense,
// TRANSLATORS: displayed before action,
- // %1$s is replaced by the device name (e.g. /dev/vda),
+ // %1$s is replaced by the device name (e.g. /dev/loop0),
// %2$s is replaced by the size (e.g. 20.00 GiB)
_("Create hard disk %1$s (%2$s)"),
// TRANSLATORS: displayed during action,
- // %1$s is replaced by the device name (e.g. /dev/vda),
+ // %1$s is replaced by the device name (e.g. /dev/loop0),
// %2$s is replaced by the size (e.g. 20.00 GiB)
_("Creating hard disk %1$s (%2$s)"));
return sformat(text, get_displayname(), get_size_text());
}
+
+ void
+ Disk::Impl::do_create()
+ {
+ // only used for TargetMode::IMAGE
+
+ if (image_filename.empty())
+ ST_THROW(Exception("image filename empty"));
+
+ string cmd_line = DD_BIN " if='" DEV_ZERO_FILE "' of=" + quote(image_filename) +
+ " obs=" + to_string(get_region().get_block_size()) + " seek=" +
+ to_string(get_region().get_length()) + " count=0 conv=excl";
+
+ SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+ }
+
+
+ Text
+ Disk::Impl::do_activate_text(Tense tense) const
+ {
+ // only used for TargetMode::IMAGE
+
+ Text text = tenser(tense,
+ // TRANSLATORS: displayed before action,
+ // %1$s is replaced by the device name (e.g. /dev/loop0),
+ // %2$s is replaced by the size (e.g. 20.00 GiB)
+ _("Activate hard disk %1$s (%2$s)"),
+ // TRANSLATORS: displayed during action,
+ // %1$s is replaced by the device name (e.g. /dev/loop0),
+ // %2$s is replaced by the size (e.g. 20.00 GiB)
+ _("Activating hard disk %1$s (%2$s)"));
+
+ return sformat(text, get_displayname(), get_size_text());
+ }
+
+
+ void
+ Disk::Impl::do_activate() const
+ {
+ // only used for TargetMode::IMAGE
+
+ string cmd_line = LOSETUP_BIN " --sector-size " + to_string(get_region().get_block_size()) + " " +
+ quote(get_name()) + " " + quote(image_filename);
+
+ SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+ }
+
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/DiskImpl.h new/libstorage-ng-4.4.11/storage/Devices/DiskImpl.h
--- old/libstorage-ng-4.4.9/storage/Devices/DiskImpl.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/DiskImpl.h 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -85,6 +85,9 @@
bool is_pmem() const;
bool is_nvme() const;
+ const string& get_image_filename() const { return image_filename; }
+ void set_image_filename(const string& image_filename) { Impl::image_filename = image_filename; }
+
static void probe_disks(Prober& prober);
virtual void probe_pass_1a(Prober& prober) override;
@@ -101,6 +104,10 @@
virtual void process_udev_ids(vector<string>& udev_ids) const override;
virtual Text do_create_text(Tense tense) const override;
+ virtual void do_create() override;
+
+ virtual Text do_activate_text(Tense tense) const override;
+ virtual void do_activate() const override;
private:
@@ -111,6 +118,8 @@
ZoneModel zone_model = ZoneModel::NONE;
+ string image_filename;
+
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/PartitionImpl.cc new/libstorage-ng-4.4.11/storage/Devices/PartitionImpl.cc
--- old/libstorage-ng-4.4.9/storage/Devices/PartitionImpl.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/PartitionImpl.cc 2021-05-31 13:30:21.000000000 +0200
@@ -515,6 +515,15 @@
void
+ Partition::Impl::update_name()
+ {
+ const Partitionable* partitionable = get_partitionable();
+
+ set_name(name_and_number_to_device(partitionable->get_name(), get_number()));
+ }
+
+
+ void
Partition::Impl::update_sysfs_name_and_path()
{
const Partitionable* partitionable = get_partitionable();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/PartitionImpl.h new/libstorage-ng-4.4.11/storage/Devices/PartitionImpl.h
--- old/libstorage-ng-4.4.9/storage/Devices/PartitionImpl.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/PartitionImpl.h 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -101,6 +101,7 @@
const string& get_uuid() const { return uuid; }
void set_uuid(const string& uuid) { Impl::uuid = uuid; }
+ void update_name();
void update_sysfs_name_and_path();
void update_udev_paths_and_ids();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/PartitionTableImpl.cc new/libstorage-ng-4.4.11/storage/Devices/PartitionTableImpl.cc
--- old/libstorage-ng-4.4.9/storage/Devices/PartitionTableImpl.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/PartitionTableImpl.cc 2021-05-31 13:30:21.000000000 +0200
@@ -234,6 +234,20 @@
}
+ void
+ PartitionTable::Impl::has_new_parent()
+ {
+ for (Partition* partition : get_partitions())
+ {
+ partition->get_impl().update_name();
+ partition->get_impl().update_sysfs_name_and_path();
+ partition->get_impl().update_udev_paths_and_ids();
+
+ // TODO topology? at least block size? could cascade to even more devices
+ }
+ }
+
+
bool
PartitionTable::Impl::equal(const Device::Impl& rhs_base) const
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/PartitionTableImpl.h new/libstorage-ng-4.4.11/storage/Devices/PartitionTableImpl.h
--- old/libstorage-ng-4.4.9/storage/Devices/PartitionTableImpl.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/PartitionTableImpl.h 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -68,6 +68,8 @@
Partitionable* get_partitionable();
const Partitionable* get_partitionable() const;
+ virtual void has_new_parent() override;
+
virtual bool equal(const Device::Impl& rhs) const override = 0;
virtual void log_diff(std::ostream& log, const Device::Impl& rhs_base) const override = 0;
virtual void print(std::ostream& out) const override = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Devices/PartitionableImpl.cc new/libstorage-ng-4.4.11/storage/Devices/PartitionableImpl.cc
--- old/libstorage-ng-4.4.9/storage/Devices/PartitionableImpl.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Devices/PartitionableImpl.cc 2021-05-31 13:30:21.000000000 +0200
@@ -31,12 +31,10 @@
#include "storage/Devices/ImplicitPt.h"
#include "storage/Holders/User.h"
#include "storage/Devicegraph.h"
-#include "storage/Action.h"
#include "storage/Utils/XmlFile.h"
#include "storage/Utils/Enum.h"
#include "storage/Utils/StorageTmpl.h"
#include "storage/Utils/StorageDefines.h"
-#include "storage/Utils/SystemCmd.h"
#include "storage/Utils/CallbacksImpl.h"
#include "storage/SystemInfo/SystemInfo.h"
#include "storage/StorageImpl.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Environment.h new/libstorage-ng-4.4.11/storage/Environment.h
--- old/libstorage-ng-4.4.9/storage/Environment.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Environment.h 2021-05-31 13:30:21.000000000 +0200
@@ -41,11 +41,21 @@
READ_MOCKUP // fake probe - for testsuite
};
- //! Is the target a disk, chroot, or image?
+
+ /**
+ * Enum with target modes.
+ */
enum class TargetMode {
- DIRECT, // direct target
- CHROOT, // the target is chrooted, e.g. inst-sys
- IMAGE // the target is image based
+
+ /** Direct target. */
+ DIRECT,
+
+ /** The target is chrooted, e.g. inst-sys. */
+ CHROOT,
+
+ /** The target is image based. Experimental. */
+ IMAGE
+
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/EnvironmentImpl.h new/libstorage-ng-4.4.11/storage/EnvironmentImpl.h
--- old/libstorage-ng-4.4.9/storage/EnvironmentImpl.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/EnvironmentImpl.h 2021-05-31 13:30:21.000000000 +0200
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2018-2020] SUSE LLC
+ * Copyright (c) [2018-2021] SUSE LLC
*
* All Rights Reserved.
*
@@ -64,9 +64,10 @@
private:
- bool read_only;
- ProbeMode probe_mode;
- TargetMode target_mode;
+ const bool read_only;
+ const ProbeMode probe_mode;
+ const TargetMode target_mode;
+
string devicegraph_filename;
string arch_filename;
string mockup_filename;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Holders/Holder.h new/libstorage-ng-4.4.11/storage/Holders/Holder.h
--- old/libstorage-ng-4.4.9/storage/Holders/Holder.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Holders/Holder.h 2021-05-31 13:30:21.000000000 +0200
@@ -72,9 +72,10 @@
/**
* Set the source device of the holder. Experimental.
*
- * So far this function does not adjust the devices connected to the holder. E.g.
- * setting a disk as source for a partition table does not adjust the device names
- * of the partitions. This may change in the future.
+ * So far it is undefined whether this function adjusts the devices connected to
+ * the holder. E.g. setting a disk as source for a partition table adjusts the
+ * device names of the partitions but not the topology. This may change in the
+ * future.
*
* @throw Exception
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/SystemInfo/CmdBlkid.cc new/libstorage-ng-4.4.11/storage/SystemInfo/CmdBlkid.cc
--- old/libstorage-ng-4.4.9/storage/SystemInfo/CmdBlkid.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/SystemInfo/CmdBlkid.cc 2021-05-31 13:30:21.000000000 +0200
@@ -40,7 +40,7 @@
Blkid::Blkid()
{
- SystemCmd cmd(BLKID_BIN " -c '/dev/null'", SystemCmd::DoThrow);
+ SystemCmd cmd(BLKID_BIN " -c '" DEV_NULL_FILE "'", SystemCmd::DoThrow);
parse(cmd.stdout());
}
@@ -48,7 +48,7 @@
Blkid::Blkid(const string& device)
{
- SystemCmd cmd(BLKID_BIN " -c '/dev/null' " + quote(device), SystemCmd::DoThrow);
+ SystemCmd cmd(BLKID_BIN " -c '" DEV_NULL_FILE "' " + quote(device), SystemCmd::DoThrow);
parse(cmd.stdout());
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/storage/Utils/StorageDefines.h new/libstorage-ng-4.4.11/storage/Utils/StorageDefines.h
--- old/libstorage-ng-4.4.9/storage/Utils/StorageDefines.h 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/storage/Utils/StorageDefines.h 2021-05-31 13:30:21.000000000 +0200
@@ -42,6 +42,13 @@
#define EFIVARS_DIR SYSFS_DIR "/firmware/efi/efivars"
+// files
+
+#define DEV_NULL_FILE DEV_DIR "/null"
+#define DEV_ZERO_FILE DEV_DIR "/zero"
+#define DEV_URANDOM_FILE DEV_DIR "/urandom"
+
+
// commands
#define SH_BIN "/bin/sh"
@@ -99,6 +106,8 @@
#define TEST_BIN "/usr/bin/test"
#define STAT_BIN "/usr/bin/stat"
+#define LOSETUP_BIN "/sbin/losetup"
+
#define LSATTR_BIN "/usr/bin/lsattr"
#define CHATTR_BIN "/usr/bin/chattr"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/testsuite/Makefile.am new/libstorage-ng-4.4.11/testsuite/Makefile.am
--- old/libstorage-ng-4.4.9/testsuite/Makefile.am 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/testsuite/Makefile.am 2021-05-31 13:30:21.000000000 +0200
@@ -19,7 +19,7 @@
md1.test md2.test md3.test md4.test md5.test encryption1.test \
encryption2.test lvm1.test lvm-pv-usable-size.test graphviz.test \
copy-individual.test mountpoint.test bcache1.test graph.test \
- restore.test
+ restore.test set-source.test
AM_DEFAULT_SOURCE_EXT = .cc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/testsuite/disk.cc new/libstorage-ng-4.4.11/testsuite/disk.cc
--- old/libstorage-ng-4.4.9/testsuite/disk.cc 2021-05-21 16:52:25.000000000 +0200
+++ new/libstorage-ng-4.4.11/testsuite/disk.cc 2021-05-31 13:30:21.000000000 +0200
@@ -50,5 +50,5 @@
Actiongraph actiongraph(storage, lhs, rhs);
- BOOST_CHECK_EQUAL(actiongraph.get_commit_actions().size(), 1);
+ BOOST_CHECK_EQUAL(actiongraph.get_commit_actions().size(), 2);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.9/testsuite/set-source.cc new/libstorage-ng-4.4.11/testsuite/set-source.cc
--- old/libstorage-ng-4.4.9/testsuite/set-source.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.11/testsuite/set-source.cc 2021-05-31 13:30:21.000000000 +0200
@@ -0,0 +1,63 @@
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE libstorage
+
+#include <boost/test/unit_test.hpp>
+
+#include "storage/Utils/HumanString.h"
+#include "storage/Devices/DiskImpl.h"
+#include "storage/Devices/Gpt.h"
+#include "storage/Holders/Holder.h"
+#include "storage/Devicegraph.h"
+#include "storage/Storage.h"
+#include "storage/Environment.h"
+
+
+using namespace std;
+using namespace storage;
+
+
+BOOST_AUTO_TEST_CASE(test1)
+{
+ Environment environment(true, ProbeMode::NONE, TargetMode::DIRECT);
+
+ Storage storage(environment);
+
+ Devicegraph* staging = storage.get_staging();
+
+ Disk* sda = Disk::create(staging, "/dev/sda");
+ sda->set_size(16 * GiB);
+ sda->get_impl().set_sysfs_name("sda");
+ sda->get_impl().set_sysfs_path("/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda");
+ sda->get_impl().set_udev_paths({ "pci-0000:00:1f.2-ata-1.0" });
+ sda->get_impl().set_udev_ids({ "scsi-SATA_VBOX_HARDDISK_VB098dbc19-95da593f" });
+
+ Disk* sdb = Disk::create(staging, "/dev/sdb");
+ sdb->set_size(16 * GiB);
+ sdb->get_impl().set_sysfs_name("sdb");
+ sdb->get_impl().set_sysfs_path("/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb");
+ sdb->get_impl().set_udev_paths({ "pci-0000:00:1f.2-ata-2.0" });
+ sdb->get_impl().set_udev_ids({ "scsi-SATA_VBOX_HARDDISK_VB20a8f410-8a3f17dc" });
+
+ Gpt* gpt = to_gpt(sda->create_partition_table(PtType::GPT));
+ Partition* sda1 = gpt->create_partition("/dev/sda1", Region(2048, 1048576, 512), PartitionType::PRIMARY);
+
+ BOOST_CHECK_EQUAL(sda1->get_name(), "/dev/sda1");
+ BOOST_CHECK_EQUAL(sda1->get_sysfs_name(), "sda1");
+ BOOST_CHECK_EQUAL(sda1->get_sysfs_path(), "/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1");
+ BOOST_CHECK_EQUAL(sda1->get_udev_paths().size(), 1);
+ BOOST_CHECK_EQUAL(sda1->get_udev_paths()[0], "pci-0000:00:1f.2-ata-1.0-part1");
+ BOOST_CHECK_EQUAL(sda1->get_udev_ids().size(), 1);
+ BOOST_CHECK_EQUAL(sda1->get_udev_ids()[0], "scsi-SATA_VBOX_HARDDISK_VB098dbc19-95da593f-part1");
+
+ Holder* holder = staging->find_holder(sda->get_sid(), gpt->get_sid());
+ holder->set_source(sdb);
+
+ BOOST_CHECK_EQUAL(sda1->get_name(), "/dev/sdb1");
+ BOOST_CHECK_EQUAL(sda1->get_sysfs_name(), "sdb1");
+ BOOST_CHECK_EQUAL(sda1->get_sysfs_path(), "/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1");
+ BOOST_CHECK_EQUAL(sda1->get_udev_paths().size(), 1);
+ BOOST_CHECK_EQUAL(sda1->get_udev_paths()[0], "pci-0000:00:1f.2-ata-2.0-part1");
+ BOOST_CHECK_EQUAL(sda1->get_udev_ids().size(), 1);
+ BOOST_CHECK_EQUAL(sda1->get_udev_ids()[0], "scsi-SATA_VBOX_HARDDISK_VB20a8f410-8a3f17dc-part1");
+}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2021-06-01 10:33:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
and /work/SRC/openSUSE:Factory/.yast2-network.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network"
Tue Jun 1 10:33:46 2021 rev:454 rq:896337 version:4.4.12
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2021-05-15 23:17:00.164545081 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new.1898/yast2-network.changes 2021-06-01 10:33:59.316458259 +0200
@@ -1,0 +2,14 @@
+Fri May 28 13:51:57 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Allow to modify the network IP forwarding configuration defining
+ the defaults in the control file (bsc#1186280)
+- 4.4.12
+
+-------------------------------------------------------------------
+Mon May 24 10:47:46 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Fix error when determining the removed interfaces in order to
+ remove their associated routes too (bsc#1186082)
+- 4.4.11
+
+-------------------------------------------------------------------
Old:
----
yast2-network-4.4.10.tar.bz2
New:
----
yast2-network-4.4.12.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.XVqhlE/_old 2021-06-01 10:33:59.848459165 +0200
+++ /var/tmp/diff_new_pack.XVqhlE/_new 2021-06-01 10:33:59.852459172 +0200
@@ -17,7 +17,7 @@
Name: yast2-network
-Version: 4.4.10
+Version: 4.4.12
Release: 0
Summary: YaST2 - Network Configuration
License: GPL-2.0-only
++++++ yast2-network-4.4.10.tar.bz2 -> yast2-network-4.4.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/package/yast2-network.changes new/yast2-network-4.4.12/package/yast2-network.changes
--- old/yast2-network-4.4.10/package/yast2-network.changes 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/package/yast2-network.changes 2021-05-31 12:26:49.000000000 +0200
@@ -1,4 +1,18 @@
-------------------------------------------------------------------
+Fri May 28 13:51:57 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Allow to modify the network IP forwarding configuration defining
+ the defaults in the control file (bsc#1186280)
+- 4.4.12
+
+-------------------------------------------------------------------
+Mon May 24 10:47:46 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
+
+- Fix error when determining the removed interfaces in order to
+ remove their associated routes too (bsc#1186082)
+- 4.4.11
+
+-------------------------------------------------------------------
Wed May 12 16:46:00 UTC 2021 - Knut Anderssen <kanderssen(a)suse.com>
- Write IP addresses in order preventing an alias to set the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/package/yast2-network.spec new/yast2-network-4.4.12/package/yast2-network.spec
--- old/yast2-network-4.4.10/package/yast2-network.spec 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/package/yast2-network.spec 2021-05-31 12:26:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-network
-Version: 4.4.10
+Version: 4.4.12
Release: 0
Summary: YaST2 - Network Configuration
License: GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/network/clients/network_proposal.rb new/yast2-network-4.4.12/src/lib/network/clients/network_proposal.rb
--- old/yast2-network-4.4.10/src/lib/network/clients/network_proposal.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/network/clients/network_proposal.rb 2021-05-31 12:26:49.000000000 +0200
@@ -46,6 +46,7 @@
textdomain "installation"
settings.refresh_packages
+ settings.apply_defaults
end
def description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/network/clients/save_network.rb new/yast2-network-4.4.12/src/lib/network/clients/save_network.rb
--- old/yast2-network-4.4.10/src/lib/network/clients/save_network.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/network/clients/save_network.rb 2021-05-31 12:26:49.000000000 +0200
@@ -296,6 +296,7 @@
if !Mode.autoinst
NetworkAutoconfiguration.instance.configure_dns
+ NetworkAutoconfiguration.instance.configure_routing
configure_network_manager
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/network/network_autoconfiguration.rb new/yast2-network-4.4.12/src/lib/network/network_autoconfiguration.rb
--- old/yast2-network-4.4.10/src/lib/network/network_autoconfiguration.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/network/network_autoconfiguration.rb 2021-05-31 12:26:49.000000000 +0200
@@ -147,6 +147,12 @@
Host.Write
end
+ def configure_routing
+ return if config.routing == Lan.system_config.routing
+
+ Lan.write_config(only: [:routing])
+ end
+
private
# Makes DHCP setup persistent
@@ -175,7 +181,7 @@
# @param devnames [Array] list of device names
# @return true when changes were successfully applied
def activate_changes(devnames)
- Lan.write_config
+ Lan.write_config(only: [:connections])
reload_config(devnames)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/y2network/autoinst_profile/routing_section.rb new/yast2-network-4.4.12/src/lib/y2network/autoinst_profile/routing_section.rb
--- old/yast2-network-4.4.10/src/lib/y2network/autoinst_profile/routing_section.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/y2network/autoinst_profile/routing_section.rb 2021-05-31 12:26:49.000000000 +0200
@@ -82,8 +82,8 @@
def init_from_hashes(hash)
super
ip_forward = hash["ip_forward"]
- @ipv4_forward = hash["ipv4_forward"] || ip_forward
- @ipv6_forward = hash["ipv6_forward"] || ip_forward
+ @ipv4_forward = hash.fetch("ipv4_forward", ip_forward)
+ @ipv6_forward = hash.fetch("ipv6_forward", ip_forward)
@routes = routes_from_hash(hash)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/y2network/interface.rb new/yast2-network-4.4.12/src/lib/y2network/interface.rb
--- old/yast2-network-4.4.10/src/lib/y2network/interface.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/y2network/interface.rb 2021-05-31 12:26:49.000000000 +0200
@@ -95,6 +95,11 @@
# https://ruby-doc.org/core-2.3.3/Object.html#method-i-eql-3F
alias_method :eql?, :==
+ # Used by Array or Hash in order to compare equality of elements (bsc#1186082)
+ def hash
+ name.hash
+ end
+
# Complete configuration of the interface
#
# @return [Hash<String, String>] option, value hash map
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/y2network/interfaces_collection.rb new/yast2-network-4.4.12/src/lib/y2network/interfaces_collection.rb
--- old/yast2-network-4.4.10/src/lib/y2network/interfaces_collection.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/y2network/interfaces_collection.rb 2021-05-31 12:26:49.000000000 +0200
@@ -150,5 +150,13 @@
def +(other)
self.class.new(to_a + other.to_a)
end
+
+ # Returns a new collection including only the elements that are not in the given collection
+ #
+ # @param other [InterfacesCollection] Other interfaces collection
+ # @return [InterfacesCollection] New interfaces collection
+ def -(other)
+ self.class.new(to_a - other.to_a)
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/y2network/proposal_settings.rb new/yast2-network-4.4.12/src/lib/y2network/proposal_settings.rb
--- old/yast2-network-4.4.10/src/lib/y2network/proposal_settings.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/y2network/proposal_settings.rb 2021-05-31 12:26:49.000000000 +0200
@@ -33,6 +33,11 @@
# @return [Boolean] network service to be used after the installation
attr_accessor :selected_backend
attr_accessor :virt_bridge_proposal
+ attr_accessor :ipv4_forward
+ attr_accessor :ipv6_forward
+ attr_accessor :defaults_applied
+
+ DEFAULTS = [:ipv4_forward, :ipv6_forward].freeze
# Constructor
def initialize
@@ -45,6 +50,27 @@
@selected_backend = autoinst_backend
@virt_bridge_proposal = autoinst_disabled_proposal? ? false : true
+ @defaults_applied = false
+ end
+
+ # Modifies the proposal according to the given settings
+ #
+ # @param settings [Hash] network default settings to be loaded
+ def modify_defaults(settings = network_section)
+ load_features(settings)
+ @defaults_applied = false
+ end
+
+ # Modifies the current network configuration according to the proposal. It does not touch the
+ # network configuration if the proposal settings were already applied
+ def apply_defaults
+ return if defaults_applied
+ return @defaults_applied = true if DEFAULTS.all? { |o| public_send(o).nil? }
+
+ Yast::Lan.read_config(report: false) unless yast_config
+ yast_config.routing.forward_ipv4 = ipv4_forward unless ipv4_forward.nil?
+ yast_config.routing.forward_ipv6 = ipv6_forward unless ipv6_forward.nil?
+ @defaults_applied = true
end
def current_backend
@@ -164,6 +190,36 @@
private
+ # Convenience method to load some features from a installation control file section
+ #
+ # @param source [Hash] network section to be loaded
+ def load_features(source = network_section)
+ return unless source.is_a?(Hash)
+
+ source.keys.each { |k| load_feature(k, k, source: source) }
+ end
+
+ # Reads a feature from a given hash and assign it to the corresponding object attribute
+ #
+ # @param feature [String, Symbol] feature name to be read
+ # @param to [String, Symbol] attribute name where to store the feature value
+ # @param source [Hash] from where to read the feature
+ def load_feature(feature, to, source: network_section)
+ return unless respond_to?("#{to}=")
+
+ value = source[feature.to_s]
+ public_send("#{to}=", value)
+ end
+
+ # Convenience method to read the control file network section
+ def network_section
+ Yast::ProductFeatures.GetSection("network")
+ end
+
+ def yast_config
+ Yast::Lan.yast_config
+ end
+
def autoinst_backend
auto_config = Yast::Lan.autoinst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/src/lib/y2network/wicked/config_writer.rb new/yast2-network-4.4.12/src/lib/y2network/wicked/config_writer.rb
--- old/yast2-network-4.4.10/src/lib/y2network/wicked/config_writer.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/src/lib/y2network/wicked/config_writer.rb 2021-05-31 12:26:49.000000000 +0200
@@ -73,7 +73,7 @@
end
# Actions needed for removed interfaces
- removed_ifaces = old_config ? old_config.interfaces.to_a - config.interfaces.to_a : []
+ removed_ifaces = old_config ? old_config.interfaces - config.interfaces : []
removed_ifaces.each do |iface|
file = routes_file_for(iface)
file.remove
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/test/save_network_test.rb new/yast2-network-4.4.12/test/save_network_test.rb
--- old/yast2-network-4.4.10/test/save_network_test.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/test/save_network_test.rb 2021-05-31 12:26:49.000000000 +0200
@@ -60,6 +60,7 @@
.and_return(propose_bridge)
allow(Yast::NetworkAutoconfiguration.instance).to receive(:configure_dns)
allow(Yast::NetworkAutoconfiguration.instance).to receive(:configure_hosts)
+ allow(Yast::NetworkAutoconfiguration.instance).to receive(:configure_routing)
allow(Yast::Lan).to receive(:yast_config).and_return(yast_config)
allow(Yast::Lan).to receive(:system_config).and_return(system_config)
allow(Yast::Lan).to receive(:write_config)
@@ -170,12 +171,21 @@
context "if the hosts are not configured by AutoYaST" do
it "configures the /etc/hosts automatically" do
allow(Yast::NetworkAutoYast.instance).to receive(:configure_hosts).and_return(false)
- expect(Yast::NetworkAutoconfiguration.instance).to_not receive(:configure_dns)
+ expect(Yast::NetworkAutoconfiguration.instance).to receive(:configure_hosts)
subject.main
end
end
end
+ context "in case of not written previously" do
+ it "configures dns, hosts and routing according to the proposal" do
+ expect(Yast::NetworkAutoconfiguration.instance).to receive(:configure_dns)
+ expect(Yast::NetworkAutoconfiguration.instance).to receive(:configure_routing)
+ expect(Yast::NetworkAutoconfiguration.instance).to receive(:configure_hosts)
+ subject.main
+ end
+ end
+
context "when the backend is network manager" do
let(:selected_backend) { :network_manager }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/test/y2network/interfaces_collection_test.rb new/yast2-network-4.4.12/test/y2network/interfaces_collection_test.rb
--- old/yast2-network-4.4.10/test/y2network/interfaces_collection_test.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/test/y2network/interfaces_collection_test.rb 2021-05-31 12:26:49.000000000 +0200
@@ -158,4 +158,24 @@
expect(new_collection.to_a).to eq([eth0, br0])
end
end
+
+ describe "#-" do
+ let(:fake_interfaces) { 24.times.map { |i| Y2Network::PhysicalInterface.new("iface#{i}") } }
+ let(:interfaces) do
+ fake_interfaces + [br0, wlan0]
+ end
+
+ let(:other) { Y2Network::InterfacesCollection.new(fake_interfaces[0..18] + [br0]) }
+ let(:other2) { Y2Network::InterfacesCollection.new(fake_interfaces) }
+
+ it "returns a new collection with the interfaces which are only present in the object" do
+ new_collection = collection - other
+ # Using hash comparison
+ expect(new_collection.to_a).to eq(fake_interfaces[19..23] + [wlan0])
+
+ # Usin eql? comparison
+ new_collection -= other2
+ expect(new_collection.to_a).to eq([wlan0])
+ end
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.10/test/y2network/proposal_settings_test.rb new/yast2-network-4.4.12/test/y2network/proposal_settings_test.rb
--- old/yast2-network-4.4.10/test/y2network/proposal_settings_test.rb 2021-05-13 11:44:11.000000000 +0200
+++ new/yast2-network-4.4.12/test/y2network/proposal_settings_test.rb 2021-05-31 12:26:49.000000000 +0200
@@ -425,4 +425,70 @@
end
end
end
+
+ describe "#modify_defaults" do
+ let(:settings) { described_class.create_instance }
+ let(:feature) { { "network" => { "ipv4_forward" => true } } }
+
+ context "in case of defined IP forwarding features in the control file" do
+ context "and no specific section is given" do
+ it "uses the profile network section" do
+ expect(settings).to receive(:load_features).with(feature["network"])
+ settings.modify_defaults
+ end
+ end
+
+ it "sets the IPv4 forwarding settings according to the feature value" do
+ settings.modify_defaults
+ expect(settings.ipv4_forward).to eql(true)
+ expect(settings.ipv6_forward).to eql(nil)
+ end
+
+ it "sets the IPv6 forwarding settings according to the feature value" do
+ role_feature = { "network" => { "ipv6_forward" => true } }
+ settings.modify_defaults(role_feature["network"])
+ expect(settings.ipv6_forward).to eql(true)
+ end
+
+ it "sets the modified defaults as not applied" do
+ settings.defaults_applied = true
+ settings.modify_defaults
+ expect(settings.defaults_applied).to eql(false)
+ end
+ end
+ end
+
+ describe "#apply_defaults" do
+ let(:settings) { described_class.create_instance }
+ let(:config) { Y2Network::Config.new(source: "test", routing: routing) }
+ let(:routing) { Y2Network::Routing.new(forward_ipv4: false, forward_ipv6: false, tables: []) }
+ let(:feature) { { "network" => { "ipv4_forward" => true } } }
+
+ before do
+ allow(Yast::Lan).to receive(:yast_config).and_return(config)
+ settings.modify_defaults
+ end
+
+ context "when the network defaults were already applied" do
+ it "does not touch any network configuration" do
+ settings.defaults_applied = true
+ expect(Yast::Lan).to_not receive(:yast_config)
+ settings.apply_defaults
+ end
+ end
+
+ context "when the network defaults has not been applied yet" do
+ it "modifies the current network config with the modified defaults" do
+ expect(routing.forward_ipv4).to eql(false)
+ settings.apply_defaults
+ expect(routing.forward_ipv4).to eql(true)
+ end
+
+ it "sets the modified defaults as already applied" do
+ expect(settings.defaults_applied).to eql(false)
+ settings.apply_defaults
+ expect(settings.defaults_applied).to eql(true)
+ end
+ end
+ end
end
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2 for openSUSE:Factory checked in at 2021-06-01 10:33:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
and /work/SRC/openSUSE:Factory/.yast2.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2"
Tue Jun 1 10:33:46 2021 rev:511 rq:895495 version:4.4.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes 2021-05-07 16:45:47.664279006 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new.1898/yast2.changes 2021-06-01 10:33:57.556455263 +0200
@@ -1,0 +2,15 @@
+Tue May 25 07:19:14 UTC 2021 - Jos�� Iv��n L��pez Gonz��lez <jlopez(a)suse.com>
+
+- Add Yast2::Equatable mixin to avoid troubles with classes that
+ overloads the comparison methods (related to bsc#1186082).
+- 4.4.5
+
+-------------------------------------------------------------------
+Fri May 7 15:10:14 UTC 2021 - Stefan Schubert <schubi(a)suse.de>
+
+- Logging all available product information into directory
+ /var/log/YaST2/installation_info. This should help for evaluating the
+ cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
+- 4.4.4
+
+-------------------------------------------------------------------
Old:
----
yast2-4.4.3.tar.bz2
New:
----
yast2-4.4.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.0PiK2U/_old 2021-06-01 10:33:58.200456360 +0200
+++ /var/tmp/diff_new_pack.0PiK2U/_new 2021-06-01 10:33:58.200456360 +0200
@@ -17,7 +17,7 @@
Name: yast2
-Version: 4.4.3
+Version: 4.4.5
Release: 0
Summary: YaST2 Main Package
License: GPL-2.0-only
++++++ yast2-4.4.3.tar.bz2 -> yast2-4.4.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/general/src/data/country.ycp new/yast2-4.4.5/library/general/src/data/country.ycp
--- old/yast2-4.4.3/library/general/src/data/country.ycp 2021-05-05 12:48:16.000000000 +0200
+++ new/yast2-4.4.5/library/general/src/data/country.ycp 2021-05-25 10:07:11.000000000 +0200
@@ -57,7 +57,6 @@
"EC" : _("Ecuador"),
"EE" : _("Estonia"),
"EG" : _("Egypt"),
- "ES" : _("Catalonia"),
"ES" : _("Spain"),
"FI" : _("Finland"),
"FO" : _("Faroe Islands"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/general/src/data/country_long.ycp new/yast2-4.4.5/library/general/src/data/country_long.ycp
--- old/yast2-4.4.3/library/general/src/data/country_long.ycp 2021-05-05 12:48:16.000000000 +0200
+++ new/yast2-4.4.5/library/general/src/data/country_long.ycp 2021-05-25 10:07:11.000000000 +0200
@@ -53,7 +53,7 @@
"bn_BD" : _("Bangladesh"),
"br_FR" : _("France"),
"bs_BA" : _("Bosnia and Herzegowina"),
- "ca_ES" : _("Catalonia"),
+ "ca_ES" : _("Spain"),
"cs_CZ" : _("Czech Republic"),
"cy_GB" : _("Great Britain"),
"da_DK" : _("Denmark"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/general/src/lib/installation/installation_info.rb new/yast2-4.4.5/library/general/src/lib/installation/installation_info.rb
--- old/yast2-4.4.3/library/general/src/lib/installation/installation_info.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-4.4.5/library/general/src/lib/installation/installation_info.rb 2021-05-25 10:07:11.000000000 +0200
@@ -0,0 +1,129 @@
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# 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, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "singleton"
+require "yaml"
+
+require "yast"
+
+module Installation
+ #
+ # Class which collects all installation/update information in order
+ # to write it into the /var/log/YaST2/installation_info directory
+ # when the process has been finished correctly or the process has
+ # crashed.
+ #
+ # The implementation uses a callback mechanism to allow easily extending the
+ # logged data, it avoids circular dependencies between packages and easily handles
+ # optional YaST modules (e.g. the registration module is not present in the
+ # openSUSE Leap installer).
+ #
+ # The callbacks also ensure that we really log the current values at the time
+ # of writing the dump file.
+ #
+ # @example Registering a custom callback
+ # ::Installation::InstallationInfo.instance.add_callback("my_module") do
+ # {
+ # "foo" => foo.value,
+ # "bar" => bar.value
+ # }
+ # end
+ #
+ # @example Dumping the data when an error occurs
+ # if failed
+ # ::Installation::InstallationInfo.instance.write(
+ # "Setting foo option failed",
+ # additional_info: "File foo does not exist"
+ # )
+ # end
+ class InstallationInfo
+ include Singleton
+ include Yast::Logger
+
+ LOGDIR = "/var/log/YaST2/installation_info/".freeze
+
+ include Yast::Logger
+
+ def initialize
+ # index of the saved file to have unique file names
+ self.index = 0
+
+ # Function calls which has been set by other modules,
+ # these functions will be called while generating the output.
+ # The return value (usually a Hash) of each call will be logged into the output file.
+ # Uses "id" => block mapping
+ @callbacks = {}
+ end
+
+ # Register a block which will be called while generating the data file.
+ #
+ # @param name [String] id of the function call, using the same id
+ # will overwrite the previous setting, use the module/package name
+ # to avoid conflicts
+ def add_callback(name, &block)
+ return unless block_given?
+
+ log.info("Adding callback #{name.inspect}")
+ callbacks[name] = block
+ end
+
+ # is the callback already registered?
+ # @param name [String] name of the callback
+ # @return [Boolean] `true` if registered, `false` otherwise
+ def callback?(name)
+ callbacks.key?(name)
+ end
+
+ # Collects the data and writes the dump into an YAML file.
+ #
+ # @param description [String] description of data, e.g. what happened
+ # @param additional_info [Object] optional additional information
+ # @param path [String,nil] path to the saved dump file,
+ # uses the default path if `nil`
+ # @return [String] path to the written file
+ def write(description, additional_info: nil, path: nil)
+ file = path || File.join(LOGDIR, "dump_#{Process.pid}_#{format("%03d", index)}.yml")
+ log.info("Writing installation information to #{file}")
+
+ # the collected data
+ data = {
+ "description" => description
+ }
+
+ data["additional_info"] = additional_info if additional_info
+
+ @callbacks.each do |name, callback|
+ data[name] = callback.call
+ end
+
+ ::FileUtils.mkdir_p(File.dirname(file))
+ File.write(file, data.to_yaml)
+
+ # increase the file counter for the next file
+ self.index += 1
+
+ file
+ end
+
+ protected
+
+ attr_reader :callbacks
+ attr_accessor :index
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/general/src/lib/yast2/equatable.rb new/yast2-4.4.5/library/general/src/lib/yast2/equatable.rb
--- old/yast2-4.4.3/library/general/src/lib/yast2/equatable.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-4.4.5/library/general/src/lib/yast2/equatable.rb 2021-05-25 10:07:11.000000000 +0200
@@ -0,0 +1,104 @@
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# 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, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+module Yast2
+ # Mixin for classes that require to define a custom comparison
+ #
+ # By default, the methods #==, #eql? and #equal? in Object subclasses return true if both objects
+ # are the same (point to the same object in memory). Actually #eql? should return true if both
+ # objects refer to the same hash key. But in practice, two objects have the same hash key if they
+ # are the very same object. There are some exceptions like String, which returns the same hash key
+ # if they have the same value.
+ #
+ # The #eql? and #hash methods must be related. That is, if two objects are #eql?, then they should
+ # have the same #hash. This is important, otherwise we could have unexpected results in certain
+ # operations like subtracting Arrays. When performing the difference of two Arrays, the method
+ # used for comparing the objects in the Array depends on the Array length (see source code of
+ # Array#difference). If both Arrays have more than SMALL_ARRAY_LEN (i.e., 16) elements, then
+ # the #hash method is used. Otherwise it uses #eql?. This is one of the reason why #eql? and #hash
+ # should be paired.
+ #
+ # @example
+ # class Foo
+ # include Equatable
+ #
+ # attr_reader :attr1, :attr2
+ #
+ # eql_attr :attr1
+ #
+ # def initialize(attr1, attr2)
+ # @attr1 = attr1
+ # @attr2 = attr2
+ # end
+ # end
+ #
+ # foo1 = Foo.new("a", "b")
+ # foo2 = Foo.new("a", "c")
+ #
+ # foo1 == foo2 #=> true
+ # foo1.eql?(foo2) #=> true
+ # foo1.equal?(foo2) #=> false
+ module Equatable
+ def self.included(base)
+ base.extend(ClassMethods)
+ end
+
+ # Class methods for defining the attributes to consider when comparing objects
+ module ClassMethods
+ # Inherited classes must remember the attributes for comparison from its parent class
+ def inherited(subclass)
+ subclass.eql_attr(*eql_attrs)
+ end
+
+ # Name of the attributes to consider when comparing objects
+ #
+ # @return [Array<Symbol>]
+ def eql_attrs
+ @eql_attrs || []
+ end
+
+ # Saves the name of the attributes to use when comparing objects
+ #
+ # @param names [Array<Symbol>]
+ def eql_attr(*names)
+ @eql_attrs ||= []
+ @eql_attrs += names
+ end
+ end
+
+ # Hash key to identify objects
+ #
+ # Objects with the same values for their eql_attrs have the same hash
+ #
+ # @return [Integer]
+ def hash
+ ([[:class, self.class]] + self.class.eql_attrs.map { |m| [m, send(m)] }).to_h.hash
+ end
+
+ # Whether the objects have the same hash key
+ #
+ # @param other [Object]
+ # @return [Boolean]
+ def eql?(other)
+ hash == other.hash
+ end
+
+ alias_method :==, :eql?
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/general/test/installation/installation_info_test.rb new/yast2-4.4.5/library/general/test/installation/installation_info_test.rb
--- old/yast2-4.4.3/library/general/test/installation/installation_info_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-4.4.5/library/general/test/installation/installation_info_test.rb 2021-05-25 10:07:11.000000000 +0200
@@ -0,0 +1,79 @@
+require "tempfile"
+require "yaml"
+
+require_relative "../test_helper"
+require "installation/installation_info"
+
+describe Installation::InstallationInfo do
+ # create a new anonymous subclass inheriting from the singleton class,
+ # this ensures we use a fresh instance for each test and we do not modify
+ # the global singleton instance
+ subject { Class.new(Installation::InstallationInfo).instance }
+
+ describe "#add_callback" do
+ it "remembers the callback block" do
+ expect { subject.add_callback("test") { puts "foo" } }.to change { subject.callback?("test") }
+ .from(false).to(true)
+ end
+
+ it "does not save missing block" do
+ subject.add_callback("test")
+
+ expect(subject.callback?("test")).to eq(false)
+ end
+ end
+
+ describe "#callback?" do
+ it "returns true for a defined callback name" do
+ subject.add_callback("test") { puts "foo" }
+
+ expect(subject.callback?("test")).to eq(true)
+ end
+
+ it "returns false for an undefined callback name" do
+ expect(subject.callback?("foo")).to eq(false)
+ end
+ end
+
+ describe "#write" do
+ before do
+ allow(File).to receive(:write)
+ allow(FileUtils).to receive(:mkdir_p)
+ end
+
+ it "evaluates all callbacks" do
+ foo = false
+ bar = false
+ subject.add_callback("foo") { foo = true }
+ subject.add_callback("bar") { bar = true }
+
+ subject.write("test")
+
+ expect(foo).to eq(true)
+ expect(bar).to eq(true)
+ end
+
+ it "saves the data to an YAML file" do
+ # unmock the File.write call
+ allow(File).to receive(:write).and_call_original
+
+ # write to a tempfile
+ tmpfile = Tempfile.new
+ begin
+ subject.write("test", path: tmpfile)
+
+ # check the file is not empty
+ expect(File.stat(tmpfile).size).to be > 0
+
+ # it can be parsed without errors
+ data = nil
+ expect { data = YAML.load_file(tmpfile) }.to_not raise_error
+
+ # expected data structure
+ expect(data).to be_a Hash
+ ensure
+ tmpfile.unlink
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/general/test/yast2/equatable_test.rb new/yast2-4.4.5/library/general/test/yast2/equatable_test.rb
--- old/yast2-4.4.3/library/general/test/yast2/equatable_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-4.4.5/library/general/test/yast2/equatable_test.rb 2021-05-25 10:07:11.000000000 +0200
@@ -0,0 +1,147 @@
+#!/usr/bin/env rspec
+
+# Copyright (c) [2021] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# 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, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "../test_helper"
+require "yast2/equatable"
+
+describe Yast2::Equatable do
+ describe ".eql_attrs" do
+ class EquatableTest1
+ include Yast2::Equatable
+ end
+
+ context "when no attributes have been added for comparison" do
+ it "returns an empty list" do
+ expect(EquatableTest1.eql_attrs).to be_empty
+ end
+ end
+
+ context "when some attributes have been added for comparison" do
+ before do
+ EquatableTest1.eql_attr :foo, :bar
+ end
+
+ it "returns a list with the name of the attributes for comparison" do
+ expect(EquatableTest1.eql_attrs).to contain_exactly(:foo, :bar)
+ end
+ end
+ end
+
+ describe "#eql?" do
+ class EquatableTest
+ include Yast2::Equatable
+
+ attr_reader :attr1, :attr2, :attr3
+
+ eql_attr :attr1, :attr2
+
+ def initialize(attr1, attr2, attr3)
+ @attr1 = attr1
+ @attr2 = attr2
+ @attr3 = attr3
+ end
+ end
+
+ subject { EquatableTest.new("a", 10, :foo) }
+
+ context "when giving the same object" do
+ let(:other) { subject }
+
+ it "returns true" do
+ expect(subject.eql?(other)).to eq(true)
+ end
+ end
+
+ context "when giving an object of the same class" do
+ context "and the attributes for comparison are equal" do
+ let(:other) { EquatableTest.new("a", 10, :other) }
+
+ it "returns true" do
+ expect(subject.eql?(other)).to eq(true)
+ end
+ end
+
+ context "and any of the attributes for comparison is not equal" do
+ let(:other) { EquatableTest.new("b", 10, :other) }
+
+ it "returns false" do
+ expect(subject.eql?(other)).to eq(false)
+ end
+ end
+ end
+
+ context "when giving an object of another class" do
+ let(:other) { "Another class" }
+
+ it "returns false" do
+ expect(subject.eql?(other)).to eq(false)
+ end
+ end
+
+ context "with a subclass object" do
+ class EquatableTestDerived < EquatableTest; end
+
+ subject { EquatableTestDerived.new("a", 10, :foo) }
+
+ context "when comparing with a parent class object" do
+ let(:other) { EquatableTest.new("a", 10, :foo) }
+
+ it "returns false" do
+ expect(subject.eql?(other)).to eq(false)
+ end
+ end
+
+ context "when adding more attributes for comparison" do
+ class EquatableTestDerived
+ eql_attr :attr3
+ end
+
+ context "and any of the parent attributes for comparison is not equal" do
+ let(:other) { EquatableTestDerived.new("a", 11, :foo) }
+
+ it "returns false" do
+ expect(subject.eql?(other)).to eq(false)
+ end
+ end
+
+ context "and the parent attributes for comparison are equal" do
+ let(:other) { EquatableTestDerived.new("a", 10, attr3) }
+
+ context "but the new attributes for comparison are not equal" do
+ let(:attr3) { :bar }
+
+ it "returns false" do
+ expect(subject.eql?(other)).to eq(false)
+ end
+ end
+
+ context "and the new attributes for comparison are equal" do
+ let(:attr3) { :foo }
+
+ it "returns true" do
+ expect(subject.eql?(other)).to eq(true)
+ end
+ end
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/packages/src/modules/Product.rb new/yast2-4.4.5/library/packages/src/modules/Product.rb
--- old/yast2-4.4.3/library/packages/src/modules/Product.rb 2021-05-05 12:48:16.000000000 +0200
+++ new/yast2-4.4.5/library/packages/src/modules/Product.rb 2021-05-25 10:07:11.000000000 +0200
@@ -29,6 +29,7 @@
require "yast"
require "y2packager/product_reader"
require "y2packager/resolvable"
+require "installation/installation_info"
module Yast
class ProductClass < Module
@@ -126,6 +127,11 @@
if products.empty?
log.error "No base product found"
+ # Logging all information about the product evaluation
+ ::Installation::InstallationInfo.instance.write(
+ "No base product found",
+ additional_info: { "required_product_status" => required_status }
+ )
raise "No base product found"
elsif products.size > 1
log.warn "More than one base product found!"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/library/packages/test/product_test.rb new/yast2-4.4.5/library/packages/test/product_test.rb
--- old/yast2-4.4.3/library/packages/test/product_test.rb 2021-05-05 12:48:16.000000000 +0200
+++ new/yast2-4.4.5/library/packages/test/product_test.rb 2021-05-25 10:07:11.000000000 +0200
@@ -290,6 +290,7 @@
it "reports that no base product was found" do
allow(Yast::Stage).to receive(:stage).and_return("initial")
allow(Yast::Mode).to receive(:mode).and_return("installation")
+ allow_any_instance_of(Installation::InstallationInfo).to receive(:write)
SUPPORTED_METHODS.each do |method_name|
Yast.y2milestone "Yast::Product.#{method_name}"
@@ -307,6 +308,7 @@
it "reports that no base product was found" do
allow(Yast::Stage).to receive(:stage).and_return("normal")
allow(Yast::Mode).to receive(:mode).and_return("normal")
+ allow_any_instance_of(Installation::InstallationInfo).to receive(:write)
SUPPORTED_METHODS.each do |method_name|
Yast.y2milestone "Yast::Product.#{method_name}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/package/yast2.changes new/yast2-4.4.5/package/yast2.changes
--- old/yast2-4.4.3/package/yast2.changes 2021-05-05 12:48:16.000000000 +0200
+++ new/yast2-4.4.5/package/yast2.changes 2021-05-25 10:07:11.000000000 +0200
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Tue May 25 07:19:14 UTC 2021 - Jos�� Iv��n L��pez Gonz��lez <jlopez(a)suse.com>
+
+- Add Yast2::Equatable mixin to avoid troubles with classes that
+ overloads the comparison methods (related to bsc#1186082).
+- 4.4.5
+
+-------------------------------------------------------------------
+Fri May 7 15:10:14 UTC 2021 - Stefan Schubert <schubi(a)suse.de>
+
+- Logging all available product information into directory
+ /var/log/YaST2/installation_info. This should help for evaluating the
+ cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
+- 4.4.4
+
+-------------------------------------------------------------------
Mon May 3 14:35:49 UTC 2021 - David Diaz <dgonzalez(a)suse.com>
- Do not crash when a client execution return false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-4.4.3/package/yast2.spec new/yast2-4.4.5/package/yast2.spec
--- old/yast2-4.4.3/package/yast2.spec 2021-05-05 12:48:16.000000000 +0200
+++ new/yast2-4.4.5/package/yast2.spec 2021-05-25 10:07:11.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2
-Version: 4.4.3
+Version: 4.4.5
Release: 0
Summary: YaST2 Main Package
License: GPL-2.0-only
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-apparmor for openSUSE:Factory checked in at 2021-06-01 10:33:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-apparmor (Old)
and /work/SRC/openSUSE:Factory/.yast2-apparmor.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-apparmor"
Tue Jun 1 10:33:45 2021 rev:81 rq:895204 version:4.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-apparmor/yast2-apparmor.changes 2021-05-02 18:36:05.108955706 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-apparmor.new.1898/yast2-apparmor.changes 2021-06-01 10:33:56.692453791 +0200
@@ -1,0 +2,6 @@
+Mon May 24 14:49:39 UTC 2021 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Do not crash when the profiles list is empty (bsc#1186330).
+- 4.4.1
+
+-------------------------------------------------------------------
Old:
----
yast2-apparmor-4.4.0.tar.bz2
New:
----
yast2-apparmor-4.4.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-apparmor.spec ++++++
--- /var/tmp/diff_new_pack.o5ZVIm/_old 2021-06-01 10:33:57.244454732 +0200
+++ /var/tmp/diff_new_pack.o5ZVIm/_new 2021-06-01 10:33:57.248454738 +0200
@@ -17,7 +17,7 @@
Name: yast2-apparmor
-Version: 4.4.0
+Version: 4.4.1
Release: 0
Summary: YaST2 - Plugins for AppArmor Profile Management
License: GPL-2.0-only
++++++ yast2-apparmor-4.4.0.tar.bz2 -> yast2-apparmor-4.4.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-apparmor-4.4.0/package/yast2-apparmor.changes new/yast2-apparmor-4.4.1/package/yast2-apparmor.changes
--- old/yast2-apparmor-4.4.0/package/yast2-apparmor.changes 2021-04-30 18:13:10.000000000 +0200
+++ new/yast2-apparmor-4.4.1/package/yast2-apparmor.changes 2021-05-24 17:41:49.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon May 24 14:49:39 UTC 2021 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Do not crash when the profiles list is empty (bsc#1186330).
+- 4.4.1
+
+-------------------------------------------------------------------
Tue Apr 20 13:51:55 UTC 2021 - Ladislav Slez��k <lslezak(a)suse.cz>
- 4.4.0 (bsc#1185510)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-apparmor-4.4.0/package/yast2-apparmor.spec new/yast2-apparmor-4.4.1/package/yast2-apparmor.spec
--- old/yast2-apparmor-4.4.0/package/yast2-apparmor.spec 2021-04-30 18:13:10.000000000 +0200
+++ new/yast2-apparmor-4.4.1/package/yast2-apparmor.spec 2021-05-24 17:41:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-apparmor
-Version: 4.4.0
+Version: 4.4.1
Release: 0
Summary: YaST2 - Plugins for AppArmor Profile Management
Url: https://github.com/yast/yast-apparmor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-apparmor-4.4.0/src/lib/apparmor/profiles.rb new/yast2-apparmor-4.4.1/src/lib/apparmor/profiles.rb
--- old/yast2-apparmor-4.4.0/src/lib/apparmor/profiles.rb 2021-04-30 18:13:10.000000000 +0200
+++ new/yast2-apparmor-4.4.1/src/lib/apparmor/profiles.rb 2021-05-24 17:41:49.000000000 +0200
@@ -203,6 +203,8 @@
end
def dialog_content
+ profile = visible_profiles.first&.last
+
VBox(
# Header
Heading(_('Profile List')),
@@ -217,13 +219,19 @@
# Footer buttons
HBox(
HWeight(1,
- PushButton(Id(:setEnforce),
- ((table_items.first.params[1] == "enforce") ? Opt(:disabled) : Opt()),
- _("S&et to 'enforce'"))),
+ PushButton(
+ Id(:setEnforce),
+ profile.nil? || profile.status == "enforce" ? Opt(:disabled) : Opt(),
+ _("S&et to 'enforce'")
+ )
+ ),
HWeight(1,
- PushButton(Id(:setComplain),
- ((table_items.first.params[1] == "complain") ? Opt(:disabled) : Opt()),
- _("Set to '&complain'"))),
+ PushButton(
+ Id(:setComplain),
+ profile.nil? || profile.status == "complain" ? Opt(:disabled) : Opt(),
+ _("Set to '&complain'")
+ )
+ ),
HStretch(),
HWeight(1, PushButton(Id(:finish), Yast::Label.FinishButton))
)
@@ -240,14 +248,25 @@
)
end
+ # Returns the list of visible profiles
+ #
+ # Each element of the array is another array with the profile name
+ # and a profile object.
+ #
+ # [["apache2", #<AppArmor::Profile...>], ["dovecot", #<AppArmor::Profile...>]]
+ #
+ # @return [Array<Array<String,Profile>>]
+ def visible_profiles
+ if @active
+ @profiles.active
+ else
+ @profiles.all
+ end
+ end
+
def table_items
- profs = if @active
- @profiles.active
- else
- @profiles.all
- end
arr = []
- profs.each do |_n, pr|
+ visible_profiles.each do |_n, pr|
arr.push(pr.to_array)
end
arr.map { |i| Item(*i) }
@@ -283,12 +302,15 @@
def entries_table_handler
selected_item = Yast::UI.QueryWidget(Id(:entries_table), :CurrentItem)
- if((a)profiles.all[selected_item].status == "enforce")
+ selected_profile = @profiles.all[selected_item]
+
+ if selected_profile.nil? || selected_profile.status == "enforce"
Yast::UI.ChangeWidget(Id(:setEnforce), :Enabled, false)
else
Yast::UI.ChangeWidget(Id(:setEnforce), :Enabled, true)
end
- if((a)profiles.all[selected_item].status == "complain")
+
+ if selected_profile.nil? || selected_profile.status == "complain"
Yast::UI.ChangeWidget(Id(:setComplain), :Enabled, false)
else
Yast::UI.ChangeWidget(Id(:setComplain), :Enabled, true)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-trans for openSUSE:Factory checked in at 2021-06-01 10:33:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-trans (Old)
and /work/SRC/openSUSE:Factory/.yast2-trans.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-trans"
Tue Jun 1 10:33:44 2021 rev:213 rq:895091 version:84.87.20210522.fa639d2702
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-trans/yast2-trans.changes 2021-05-19 17:48:52.901660046 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-trans.new.1898/yast2-trans.changes 2021-06-01 10:33:55.912452463 +0200
@@ -1,0 +2,37 @@
+Mon May 24 05:13:27 UTC 2021 - git(a)opensuse.org
+
+- Update to version 84.87.20210522.fa639d2702:
+ * New POT for text domain 'installation'.
+ * Translated using Weblate (Portuguese (Brazil))
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Dutch)
+ * Translated using Weblate (French)
+ * Translated using Weblate (Catalan)
+ * Translated using Weblate (Japanese)
+ * New POT for text domain 'storage'.
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Slovak)
+ * New POT for text domain 'migration'.
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Slovak)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (French)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (German)
+ * Translated using Weblate (German)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (German)
+ * Translated using Weblate (Japanese)
+ * Translated using Weblate (German)
+
+-------------------------------------------------------------------
Old:
----
yast2-trans-84.87.20210516.482fe91bc6.tar.xz
New:
----
yast2-trans-84.87.20210522.fa639d2702.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-trans.spec ++++++
--- /var/tmp/diff_new_pack.lBhhfD/_old 2021-06-01 10:33:56.484453438 +0200
+++ /var/tmp/diff_new_pack.lBhhfD/_new 2021-06-01 10:33:56.488453445 +0200
@@ -17,7 +17,7 @@
Name: yast2-trans
-Version: 84.87.20210516.482fe91bc6
+Version: 84.87.20210522.fa639d2702
Release: 0
Summary: YaST2 - Translation Container Package
License: GPL-2.0-or-later
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.lBhhfD/_old 2021-06-01 10:33:56.536453526 +0200
+++ /var/tmp/diff_new_pack.lBhhfD/_new 2021-06-01 10:33:56.536453526 +0200
@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/yast/yast-translations.git</param>
- <param name="changesrevision">482fe91bc6b2d29f83e683bb2e3f93cbdddb7f3a</param></service></servicedata>
\ No newline at end of file
+ <param name="changesrevision">fa639d2702ea9d999015d8e85cbb11de99ce98ff</param></service></servicedata>
\ No newline at end of file
++++++ yast2-trans-84.87.20210516.482fe91bc6.tar.xz -> yast2-trans-84.87.20210522.fa639d2702.tar.xz ++++++
/work/SRC/openSUSE:Factory/yast2-trans/yast2-trans-84.87.20210516.482fe91bc6.tar.xz /work/SRC/openSUSE:Factory/.yast2-trans.new.1898/yast2-trans-84.87.20210522.fa639d2702.tar.xz differ: char 27, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package kdump for openSUSE:Factory checked in at 2021-06-01 10:33:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdump (Old)
and /work/SRC/openSUSE:Factory/.kdump.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdump"
Tue Jun 1 10:33:43 2021 rev:117 rq:895992 version:0.9.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/kdump/kdump.changes 2021-04-10 15:26:27.486313577 +0200
+++ /work/SRC/openSUSE:Factory/.kdump.new.1898/kdump.changes 2021-06-01 10:33:54.644450305 +0200
@@ -1,0 +2,22 @@
+Fri May 28 10:33:45 UTC 2021 - Petr Tesa����k <ptesarik(a)suse.com>
+
+- Fix use of DNS in the panic environment (bsc#1183070):
+ * kdump-avoid-endless-loop-on-EAI_AGAIN.patch: Avoid an endless
+ loop when resolving a hostname fails with EAI_AGAIN.
+ * kdump-install-real-resolv.conf.patch: Install /etc/resolv.conf
+ using its resolved path.
+
+-------------------------------------------------------------------
+Fri May 28 09:51:58 UTC 2021 - Petr Tesa����k <ptesarik(a)suse.com>
+
+- kdump-fix-incorrect-exit-code-checking.patch: Fix incorrect exit
+ code checking after "local" with assignment (bsc#1184616,
+ LTC#192282)
+
+-------------------------------------------------------------------
+Fri May 28 09:36:47 UTC 2021 - Petr Tesa����k <ptesarik(a)suse.com>
+
+- kdump-do-not-iterate-past-end-of-string.patch: Fix a crash caused
+ by iterating past end of string (bsc#1186037).
+
+-------------------------------------------------------------------
New:
----
kdump-avoid-endless-loop-on-EAI_AGAIN.patch
kdump-do-not-iterate-past-end-of-string.patch
kdump-fix-incorrect-exit-code-checking.patch
kdump-install-real-resolv.conf.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdump.spec ++++++
--- /var/tmp/diff_new_pack.wg8Gxe/_old 2021-06-01 10:33:55.128451129 +0200
+++ /var/tmp/diff_new_pack.wg8Gxe/_new 2021-06-01 10:33:55.132451136 +0200
@@ -37,6 +37,10 @@
Patch10: %{name}-on-error-option-yesno.patch
Patch11: %{name}-mounts.cc-Include-sys-ioctl.h.patch
Patch12: %{name}-Add-bootdev-to-dracut-command-line.patch
+Patch13: %{name}-do-not-iterate-past-end-of-string.patch
+Patch14: %{name}-fix-incorrect-exit-code-checking.patch
+Patch15: %{name}-avoid-endless-loop-on-EAI_AGAIN.patch
+Patch16: %{name}-install-real-resolv.conf.patch
BuildRequires: asciidoc
BuildRequires: cmake
BuildRequires: gcc-c++
@@ -93,6 +97,10 @@
%patch10 -p1
%patch11 -p1
%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
%build
export CXXFLAGS="%{optflags} -std=c++11"
++++++ kdump-avoid-endless-loop-on-EAI_AGAIN.patch ++++++
From: Petr Pavlu <petr.pavlu(a)suse.com>
Date: Thu Mar 25 12:48:54 2021 +0100
Subject: Avoid an endless loop when resolving a hostname fails with EAI_AGAIN
References: bsc#1183070
Upstream: merged
Git-commit: 716883423f45acf3271c200353dce074d6ffc5be
Method Routable::resolve() invokes function getaddrinfo() to obtain a
network address for a given hostname. This operation can fail with the
error code EAI_AGAIN to indicate that the name server encountered a
temporary failure. Routable::resolve() reacts to this situation by
calling getaddrinfo() again which can result in an endless loop if the
function continues to return this error code. It is not guaranteed that
the underlying reason for EAI_AGAIN will go away in some bounded time.
The patch removes the EAI_AGAIN loop in Routable::resolve() and updates
the retry code in Routable::check() to repeatedly attempt resolving a
hostname until it succeeds or a specified timeout for network operations
is reached.
---
kdumptool/routable.cc | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)
--- a/kdumptool/routable.cc
+++ b/kdumptool/routable.cc
@@ -17,6 +17,7 @@
* 02110-1301, USA.
*/
+#include <algorithm>
#include <string.h>
#include <unistd.h>
@@ -36,6 +37,8 @@
#include "stringutil.h"
#include "debug.h"
+using std::min;
+
//{{{ NetLink ------------------------------------------------------------------
#define NETLINK_DEF_RECV_MAX 1024
@@ -470,9 +473,7 @@ bool Routable::resolve(void)
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_RAW;
- do {
- res = getaddrinfo(raw_host.c_str(), NULL, &hints, &m_ai);
- } while (res == EAI_AGAIN);
+ res = getaddrinfo(raw_host.c_str(), NULL, &hints, &m_ai);
if (res == 0)
return true;
@@ -480,7 +481,8 @@ bool Routable::resolve(void)
if (res == EAI_SYSTEM)
throw KSystemError("Name resolution failed", errno);
- if (res != EAI_NONAME && res != EAI_FAIL && res != EAI_NODATA)
+ if (res != EAI_NONAME && res != EAI_FAIL && res != EAI_NODATA &&
+ res != EAI_AGAIN)
throw KGaiError("Name resolution failed", res);
return false;
@@ -489,13 +491,33 @@ bool Routable::resolve(void)
// -----------------------------------------------------------------------------
bool Routable::check(int timeout)
{
+ // Resolve the target hostname. An attempt is made regularly until the
+ // hostname can be resolved or a specified timeout for network operations
+ // is reached.
+ struct timespec tstop;
+ clock_gettime(CLOCK_MONOTONIC, &tstop);
+ tstop.tv_sec += timeout;
+
+ while (!resolve()) {
+ struct timespec tsnow;
+ clock_gettime(CLOCK_MONOTONIC, &tsnow);
+ int interval = (tstop.tv_sec - tsnow.tv_sec) * 1000;
+ interval += (tstop.tv_nsec - tsnow.tv_nsec) / 1000000L;
+ if (interval <= 0)
+ return false;
+
+ // Sleep, at most for 1 second.
+ struct timespec wait_period;
+ interval = min(interval, 1000);
+ wait_period.tv_sec = interval / 1000;
+ wait_period.tv_nsec = (interval % 1000) * 1000 * 1000;
+ nanosleep(&wait_period, NULL);
+ }
+
+ // Check there is an existing route.
NetLink nl(RTMGRP_IPV4_ROUTE | RTMGRP_IPV6_ROUTE);
nl.setTimeout(timeout);
- while (!resolve())
- if (nl.waitRouteChange() != 0)
- return false;
-
while (!hasRoute())
if (nl.waitRouteChange() != 0)
return false;
++++++ kdump-do-not-iterate-past-end-of-string.patch ++++++
From: Petr Tesarik <ptesarik(a)suse.com>
Date: Fri May 28 11:30:48 2021 +0200
Subject: URLParser::extractAuthority(): Do not iterate past end of string
References: bsc#1186037
Upstream: merged
Git-commit: 208ed364ac926f800f37874d08e5b2c26547974e
If there is no '/', '?' or '#' at the end of the authority part of
the URL, kdumptool must not crash.
Signed-off-by: Petr Tesarik <ptesarik(a)suse.com>
---
kdumptool/urlparser.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kdumptool/urlparser.cc
+++ b/kdumptool/urlparser.cc
@@ -117,7 +117,7 @@ string URLParser::extractAuthority(strin
it += 2;
string::iterator const start = it;
- while (*it != '/' && *it != '?' && *it != '#')
+ while (it != end && *it != '/' && *it != '?' && *it != '#')
++it;
return string(start, it);
++++++ kdump-fix-incorrect-exit-code-checking.patch ++++++
Author: Petr Tesarik <ptesarik(a)suse.com>
Date: Tue May 25 12:48:08 2021 +0200
Subject: Fix incorrect exit code checking after "local" with assignment
References: bsc#1184616 LTC#192282
Upstream: merged
Git-commit: 33abc7c481f62c23727505eafa354253088dae8d
The "local" keyword cannot be combined with the assignment if the
exit status is needed later. The exit status of the whole
statement is that of the "local" built-in (always zero),
regardless of the the exit status of the assignment.
Acked-by: Petr Tesarik <ptesarik(a)suse.com>
---
init/load.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/init/load.sh
+++ b/init/load.sh
@@ -312,7 +312,8 @@ function load_kdump_fadump()
# Find the desired kernel and initrd
function find_kernel()
{
- local output=$($KDUMPTOOL find_kernel)
+ local output
+ output=$($KDUMPTOOL find_kernel)
test $? -eq 0 || return 1
kdump_kernel=$(echo "$output" | grep ^Kernel | cut -f 2)
@@ -325,7 +326,8 @@ function find_kernel()
# Rebuild the kdump initramfs if necessary
function rebuild_kdumprd()
{
- local output=$(mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" 2>&1)
+ local output
+ output=$(mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" 2>&1)
if [ $? -ne 0 ] ; then
echo "$output"
return 1
++++++ kdump-install-real-resolv.conf.patch ++++++
From: Petr Pavlu <petr.pavlu(a)suse.com>
Date: Thu Mar 25 12:43:32 2021 +0100
Subject: Install /etc/resolv.conf using its resolved path
References: bsc#1183070
Upstream: merged
Git-commit: b8439e03d4479f3ffa4b42961a5da18f4b819122
Resolve /etc/resolv.conf first to install directly the target file if it
is a symlink. This simplifies the setup and avoids any problems when the
real resolv.conf could be in a location that gets hidden by a mount done
in the kdump environment, for instance, /etc/resolv.conf ->
/run/netconfig/resolv.conf with tmpfs getting mounted on /run.
---
init/module-setup.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/init/module-setup.sh
+++ b/init/module-setup.sh
@@ -308,7 +308,15 @@ install() {
inst_multiple makedumpfile makedumpfile-R.pl kdumptool \
$KDUMP_REQUIRED_PROGRAMS
- inst_simple /etc/resolv.conf
+
+ # Install /etc/resolv.conf to provide initial DNS configuration. The file
+ # is resolved first to install directly the target file if it is a symlink.
+ # The real resolv.conf could be in a location that gets hidden by a mount
+ # done in the kdump environment, for instance, /etc/resolv.conf ->
+ # /run/netconfig/resolv.conf with tmpfs getting mounted on /run.
+ local resolv=$(realpath /etc/resolv.conf)
+ inst_simple "$resolv" /etc/resolv.conf
+
inst_simple /usr/share/zoneinfo/UTC
inst_simple /etc/localtime
}
1
0