[Dev] [PATCH] [libre/gnome-boxes] Hide download button

theova theova at bluewin.ch
Thu Jan 2 10:16:41 GMT 2020


Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org> schrieb am Sat, 21. Dec 19 17:02:
>On Fri, 20 Dec 2019 13:47:22 +0100
>theova <theova at bluewin.ch> wrote:
>> gnome-boxes has buttons to download and install non-free GNU/Linux
>> distributions (as in previous versions). It is not possible to do
>> that, e message "unsupported protocol https" pops up. Thus I'm not
>> sure if this is a freedom issue?
>Ideally it would be better to fix the issue. Users (me included) are
>probably not expecting such buttons in the first place.
>
>Is your PKGBUILD fixing it in prepare() ? or does it still need to be
>fixed in a subsequent patch?
Here is a new patch to face this issue.

As only non-free OS are downloadable through the download functionality,
I decided to hide the download button completely.

Working on x86_64 as expected, i686 and armv7h build fine.
-------------- next part --------------
From: Theo von Arx <theova at member.fsf.org>
Date: Thu, 2 Jan 2020 10:57:50 +0100
Subject: [PATCH] [libre/gnome-boxes] Hide download button

- Add a patch to hide the download button as only nonfree OS can be downloaded
- Add rationale
- Bump pkrel
- Remove recommendation of nonfree OS
---
 libre/gnome-boxes/PKGBUILD                   | 16 +++++++++++-----
 libre/gnome-boxes/hide_download_button.patch | 13 +++++++++++++
 2 files changed, 24 insertions(+), 5 deletions(-)
 create mode 100644 libre/gnome-boxes/hide_download_button.patch

diff --git a/libre/gnome-boxes/PKGBUILD b/libre/gnome-boxes/PKGBUILD
index 1717a9923..638585df8 100644
--- a/libre/gnome-boxes/PKGBUILD
+++ b/libre/gnome-boxes/PKGBUILD
@@ -5,9 +5,13 @@
 # Contributor: Daniel Milewski <niitotantei at gmail.com>
 # Contributor : André Silva <emulatorman at hyperbola.info>

+# Parabola changes and rationale:
+# - Remove download links of nonfree OS
+# - Replace Windows with Parabola in documention
+
 pkgname=gnome-boxes
 pkgver=3.34.2
-pkgrel=1
+pkgrel=2
 pkgrel+=.par1
 pkgdesc="Simple GNOME application to access remote or virtual systems"
 pkgdesc+=", without suggestions (and logos) of nonfree operating systems"
@@ -25,9 +29,11 @@ _commit=2edb94153b163759d18195c511d6cf5212fd1bfe  # tags/v3.34.2^0
 source=("git+https://gitlab.gnome.org/GNOME/gnome-boxes.git#commit=$_commit"
         "git+https://gitlab.gnome.org/GNOME/gtk-frdp.git"
         "git+https://gitlab.gnome.org/felipeborges/libovf-glib.git")
+source+=(hide_download_button.patch)
 sha256sums=('SKIP'
             'SKIP'
             'SKIP')
+sha256sums+=('74f0d30e4ca280afe4c1f532ecc2856e8ee850a0e3d1812138536b4b9e7e2e7f')

 pkgver() {
   cd $pkgname
@@ -42,10 +48,10 @@ prepare() {
   git config --local submodule.subprojects/libovf-glib.url "$srcdir/libovf-glib"
   git submodule update

-  # remove distro logos
-  find ./data/osinfo/ -type f -name '*.xml' -exec sed -i '/<os /,/\/os>/ d' {} +
-  echo "" > ./data/osinfo/recommended-downloads.xml
-  # touch ./data/osinfo/meson.build
+  # remove recommended downloads of nonfree OS
+  sed -i /os_id/d ./data/recommended-downloads.xml
+  # Make download button invisible
+  patch -Np1 -i ../hide_download_button.patch
   # I'd rather not use Windows as example in user docs
   find ./help/ -type f \( -name '*.po' -o -name '*.page' \) -exec \
        sed -Ei 's/(Microsoft )?Windows(™)?/Parabola/' {} +
diff --git a/libre/gnome-boxes/hide_download_button.patch b/libre/gnome-boxes/hide_download_button.patch
new file mode 100644
index 000000000..44f0521f8
--- /dev/null
+++ b/libre/gnome-boxes/hide_download_button.patch
@@ -0,0 +1,13 @@
+diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui
+index 94c8a802..a5bfb774 100644
+--- a/data/ui/wizard-source.ui
++++ b/data/ui/wizard-source.ui
+@@ -60,7 +60,7 @@
+
+             <child>
+               <object class="GtkButton" id="download_an_os_button">
+-                <property name="visible">True</property>
++                <property name="visible">False</property>
+                 <signal name="clicked" handler="on_download_an_os_button_clicked"/>
+                 <style>
+                   <class name="boxes-menu-row"/>
--
2.24.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20200102/33aeca12/attachment-0001.sig>


More information about the Dev mailing list