Skip to content

MDEV-36531 Enable Feedback Plugin for DEB Packages #4021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 11.8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions debian/mariadb-server.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,23 @@ EOF
chown 0:0 $dc
chmod 0600 $dc

feedback_cnf=$mariadb_cfgdir/mariadb.conf.d/feedback.cnf
if [ ! -f $feedback_cnf ]; then
if db_input high mariadb-server/feedback_optin; then
db_go || true
fi
db_get mariadb-server/feedback_optin
{
echo "# THIS IS A GENERATED FILE. ALL CHANGES TO IT MIGHT BE LOST.";
echo "[server]";
if [ "$RET" = true ]; then
echo "feedback=ON";
else
echo "feedback=OFF";
fi
} >> $feedback_cnf
fi

# If there is a real AppArmor profile, we reload it.
# If the default empty profile is installed, then we remove any old
# profile that may be loaded.
Expand Down
10 changes: 10 additions & 0 deletions debian/mariadb-server.templates
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ _Description: Remove all MariaDB databases?
If you're removing the MariaDB package in order to later install a more
recent version or if a different mariadb-server package is already
using it, the data should be kept.

Template: mariadb-server/feedback_optin
Type: boolean
Default: false
_Description: Enable the Feedback plugin and submit anonymous usage information?
Feedback plugin for MariaDB, if enabled, collects basic anonymous
statistical information. This information is used by the developers to
improve MariaDB. Enabling this plugin is an easy way to help with MariaDB
development. Collected statistics, and more information on the plugin,
can be viewed at http://mariadb.org/feedback_plugin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://mariadb.org/feedback_plugin says 404 not found. The MR in Debian links to https://mariadb.org/about/statistics/ which seems to redirect to https://mariadb.org/about/#usage-statistics, which links to pages that are all broken.

58 changes: 56 additions & 2 deletions win/packaging/extra.wxs.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
<!-- Disable advertised shortcuts weirdness -->
<Property Id="DISABLEADVTSHORTCUTS" Secure="yes" Value="1"/>

<!-- Activate feedback plugin-->
<Property Id="FEEDBACK" Secure="yes"/>


<!-- Quick configuration : set default storage engine to innodb, use strict sql_mode -->
<Property Id="STDCONFIG" Secure="yes" Value="1"/>

Expand Down Expand Up @@ -167,6 +171,43 @@
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
</Dialog>

Copy link
Member

@vaintroub vaintroub Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think dedicating full extra dialog to something that unimportant is bad user experience. It should be less clicking, not more clicking, and definitely not for feedback plugin. So, can you instead place that checkbox into an existing dialog, where database properties are configured? Now, that UTF8 checkbox is effectively a no-op, and needs to go, its screen real estate can be used by something else, e.g feedback thing. It needs of course less text, so we can cut
"wishful thinking" text, only leaving "collects anonymous statistical information" , which is accurate, and IMO enough .

Clarification- it turns out, in the last 10 years, This information was not used by the developers to improve MariaDB. Enabling this plugin was not an easy way to help with MariaDB development. Collected statistics, and more information on the plugin, could not be viewed at http://mariadb.org/feedback_plugin, most of the times.
I'm not sure how now it is going to change, but based on experience, can we be less generous with optimism and advertisement.

Also, please fix the comment. This checkbox was never ever enabled by default, I'm not sure what the comment was referring to.

<!-- Feedback dialog -->
<Dialog Id="Feedback" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">

<Control Id="CheckBoxFeedback" Type="CheckBox" X="8" Y="61" Width="360" Height="12" Property="FEEDBACK" CheckBoxValue="1" TabSkip="no">
<Text>{\Font1}Enable the Feedback plugin and submit anonymous usage information</Text>
</Control>

<Control Id="Text" Type="Text" X="23" Y="82" Width="290" Height="55">
<Text>Feedback plugin for MariaDB, if enabled, collects basic anonymous statistical information. This information is used by the developers to improve MariaDB. Enabling this plugin is an easy way to help with MariaDB development. Collected statistics, and more information on the plugin, can be viewed at http://mariadb.org/feedback_plugin</Text>
</Control>

<Control Id="MoreInfo" Type="PushButton" X="23" Y="140" Width="56" Height="17" Text="More Info" ToolTip="http://mariadb.org/feedback_plugin" >
<Publish Property="WixShellExecTarget" Value="http://mariadb.org/feedback_plugin" Order="1">1</Publish>
<Publish Event="DoAction" Value="LaunchUrl" Order="2">1</Publish>
</Control>


<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&amp;Back">
<Publish Event="NewDialog" Value="ServicePortDlg">1</Publish>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="&amp;Next">
<Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
<Text>Submit usage information</Text>
</Control>
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
<Text>{\WixUI_Font_Title}[ProductName] setup</Text>
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
</Dialog>

<!-- Error popup dialog -->
<Dialog Id="WarningDlg" Width="320" Height="85" Title="[ProductName] Setup" NoMinimize="yes">
Expand Down Expand Up @@ -327,7 +368,7 @@
</Publish>
<Publish Event="DoAction" Value="CheckDatabaseProperties">NOT WarningText</Publish>
<Publish Event="SpawnDialog" Value="WarningDlg">WarningText</Publish>
<Publish Event="NewDialog" Value="VerifyReadyDlg">Not WarningText</Publish>
<Publish Event="NewDialog" Value="Feedback">Not WarningText</Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="no" Text="Cancel">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
Expand Down Expand Up @@ -358,7 +399,7 @@
NOT Installed AND UpgradableServiceFound
</Publish>

<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServicePortDlg" Order="3" ><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="Feedback" Order="3" ><![CDATA[&DBInstance=3 AND NOT !DBInstance=3]]></Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3"> <![CDATA[OLDERVERSIONBEINGUPGRADED <>""]]></Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ConfirmDataCleanupDlg" Order="1" ><![CDATA[(&DBInstance=2) AND (!DBInstance=3)]]></Publish>

Expand Down Expand Up @@ -456,6 +497,19 @@
Key="innodb_buffer_pool_size"
Value="[BUFFERPOOLSIZE]M" />
</Component>
<Component Id="C.feedback" Guid="*" Directory="DATADIR">
<Condition>FEEDBACK</Condition>
<RegistryValue Root='HKLM'
Key='SOFTWARE\@CPACK_WIX_PACKAGE_NAME@'
Name='FEEDBACK' Value='1' Type='string' KeyPath='yes'/>
<IniFile Id="Ini5"
Action="createLine"
Directory="DATADIR"
Section="mysqld"
Name="my.ini"
Key="feedback"
Value="OFF" />
</Component>

<Component Id="C.utf8" Guid="*" Directory="DATADIR">
<Condition>UTF8</Condition>
Expand Down