Faça downgrade do Gedit no Fedora 23

2

Estou executando o Fedora 23 e preciso fazer downgrade para o gedit 3.10.4 e as versões correspondentes de gedit-plugins e gedit-r-plugin .

Esta resposta fornece código para fazer isso no Ubuntu. Eu estou tentando fazer a mesma coisa no Fedora 23.

Editar:

Resumirei todos os comandos da resposta de Serge abaixo (e os dos comentários). De uma instalação limpa do F23, eu faço:

sudo dnf install @development-tools fedora-packager rpmdevtools
sudo /usr/sbin/useradd makerpm
sudo usermod -a -G mock makerpm
sudo passwd makerpm

(então eu atribuo uma senha para o usuário makerpm e faço logout e faço login como makerpm). Então, eu baixei o gedit-3.10.4 dos arquivos do Fedora (link na resposta de Serge). Então

su -
cd /home/makerpm/
cd Download
sh downgradgedit.sh

Agora eu recebo:

[root@localhost Downloads]# sh downgradgedit.sh
warning: gedit-3.10.4-1.fc20.src.rpm: Header V3 RSA/SHA256 Signature, key ID 246110c1: NOKEY
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root
(Stripping trailing CRs from patch; use --binary to disable.)
patching file gedit.spec
downgradgedit.sh: line 32: $'\r': command not found
error: Failed build dependencies:
    autoconf is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    automake is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    enchant-devel >= 1.2.0 is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    glib2-devel >= 2.37.5 is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    gnome-common is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    gobject-introspection-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    gsettings-desktop-schemas-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    gtk3-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    gtksourceview3-devel >= 3.9.91 is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    intltool is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    iso-codes-devel >= 0.35 is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    itstool is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    libSM-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    libattr-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    libpeas-devel >= 1.7.0 is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    libtool is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    pygobject3-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    python3-devel is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    yelp-tools is needed by gedit-2:3.10.4-1.local.fc23.x86_64
    zeitgeist-devel >= 0.9.12 is needed by gedit-2:3.10.4-1.local.fc23.x86_64

para que eu:

dnf install autoconf automake enchant-devel glib2-devel gnome-common gobject-introspection-devel gsettings-desktop-schemas-devel gtk3-devel gtksourceview3-devel intltool iso-codes-devel itstool libSM-devel libattr-devel libpeas-devel libtool pygobject3-devel python3-devel yelp-tools zeitgeist-devel 

então, eu sh downgradgedit.sh (esse tempo sai sem problema):

Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.PxbsBL
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd gedit-3.10.4
+ /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/gedit-3.10.4-1.local.fc23.x86_64
+ exit 0

Em seguida, faça:

su -
cd 
sudo dnf install ~/rpmbuild/RPMS/x86_64/gedit-3.10.4-1.local.fc23.x86_64.rpm
sudo dnf install ~/rpmbuild/RPMS/x86_64/geditdevel3.10.4-1.local.fc23.x86_64.rpm. 

Depois desse cd para o diretório onde você tem gedit-plugins-3.10.1-1.fc20.src.rpm :

cd /home/makerpm/Downloads/
sudo yum-builddep gedit-plugins-3.10.1-1.fc20.src.rpm
rpmbuild --rebuild gedit-plugins-3.10.1-1.fc20.src.rpm 

Então faça

sudo dnf install ~/rpmbuild/RPMS/x86_64/gedit-plugins-3.10.1-1.fc23.x86_64.rpm

agora o lançamento de gedit lança a versão desejada de gedit . O terminal-plugin é ainda visível na lista de plugins. Mas ativá-lo faz com que:

GLib-GIO-ERROR **: Settings schema 'org.gnome.Terminal.Legacy.Profile' does not contain a key named 'word-chars'
Trace/breakpoint trap (core dumped)
    
por user189035 28.05.2016 / 08:52

1 resposta

1

Prepare seu sistema conforme descrito aqui: link

Faça o login como um usuário de compilação e baixe o rpm fonte do gedit-3.10.4 dos arquivos do Fedora: link

instale quaisquer dependências de compilação:

$ sudo yum-builddep gedit-3.10.4-1.fc20.src.rpm

e construa o rpm binário:

$ rpmbuild --rebuild gedit-3.10.4-1.fc20.src.rpm

Seus pacotes binários estariam na pasta ~/rpmbuild/RPMS/<arch>

Repita o download da fonte e recompile para qualquer outro pacote que você precisar.

Você pode omitir a criação de um usuário especial para compilações e criar tudo usando sua própria conta, se desejar.

Editar: Obviamente, ao construir plugins, você precisará dos pacotes de desenvolvimento do gedit-3.10.4 a serem instalados. Portanto, antes de resolver deps com yum-builddep para plugins src rpm, instale os pacotes devel que você obterá a partir da reconstrução do gedit.

Edit2:

De acordo com a discussão nos comentários, o recém-construído gedit-3.10.4-1 não funciona devido a incompatibilidade com versões recentes de gnome . Aqui está o script que aplica o patch para confirmar link com rejeições corrigidas.

#!/bin/bash
rpm -i gedit-3.10.4-1.fc20.src.rpm || exit 1
patch -d ~/rpmbuild/SPECS -p0 <<'EOF'
--- gedit.spec.orig 2014-07-21 18:27:05.000000000 +0400
+++ gedit.spec  2016-06-03 01:27:32.294149403 +0300
@@ -25,7 +25,7 @@
 Name:      gedit
 Epoch:     2
 Version:   3.10.4
-Release:   1%{?dist}
+Release:   1.local%{?dist}
 License:   GPLv2+ and GFDL
 Group:     Applications/Editors
 #VCS: git:git://git.gnome.org/gedit
@@ -41,6 +41,7 @@
 %endif

 Patch4: gedit-disable-python3.patch
+Patch999: gedit-remove-enable-delete.patch

 BuildRequires: gnome-common
 BuildRequires: glib2-devel >= %{glib2_version}
@@ -124,6 +125,7 @@
 %if !%{with_python3}
 %patch4 -p1 -b .disable-python
 %endif
+%patch999 -p1 -b .remove-enable-delete

 autoreconf -i -f
 intltoolize -f
EOF

cat >~/rpmbuild/SOURCES/gedit-remove-enable-delete.patch <<'EOF'
From 3bed781fca0f128d0c960f095aca3dfd30c0923d Mon Sep 17 00:00:00 2001
From: Paolo Borelli <[email protected]>
Date: Tue, 3 Mar 2015 09:05:46 +0100
Subject: [PATCH] Remove checking nautilus "enable-delete" setting

Nautilus removed this setting
---
 plugins/filebrowser/gedit-file-browser-plugin.c    | 15 ---------
 plugins/filebrowser/gedit-file-browser-widget.c    | 36 +---------------------
 ...ome.gedit.plugins.filebrowser.gschema.xml.in.in |  3 --
 3 files changed, 1 insertion(+), 53 deletions(-)

diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/gedit-file-browser-plugin.c
index 412757b..62c932f 100644
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
+++ b/plugins/filebrowser/gedit-file-browser-plugin.c
@@ -52,7 +52,6 @@
 #define NAUTILUS_BASE_SETTINGS     "org.gnome.nautilus.preferences"
 #define NAUTILUS_FALLBACK_SETTINGS "org.gnome.gedit.plugins.filebrowser.nautilus"
 #define NAUTILUS_CLICK_POLICY_KEY  "click-policy"
-#define NAUTILUS_ENABLE_DELETE_KEY "enable-delete"
 #define NAUTILUS_CONFIRM_TRASH_KEY "confirm-trash"

 #define TERMINAL_BASE_SETTINGS     "org.gnome.desktop.default-applications.terminal"
@@ -72,7 +71,6 @@ struct _GeditFileBrowserPluginPrivate
    gboolean        confirm_trash;

    guint           click_policy_handle;
-   guint           enable_delete_handle;
    guint           confirm_trash_handle;
 };

@@ -354,13 +352,6 @@ install_nautilus_prefs (GeditFileBrowserPlugin *plugin)
                  G_CALLBACK (on_click_policy_changed),
                  plugin);

-   /* Bind enable-delete */
-   g_settings_bind (priv->nautilus_settings,
-            NAUTILUS_ENABLE_DELETE_KEY,
-            priv->tree_widget,
-            "enable-delete",
-            G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
-
    /* Get confirm_trash */
    prefb = g_settings_get_boolean (priv->nautilus_settings,
                    NAUTILUS_CONFIRM_TRASH_KEY);
@@ -599,12 +590,6 @@ gedit_file_browser_plugin_deactivate (GeditWindowActivatable *activatable)
                         priv->click_policy_handle);
    }

-   if (priv->enable_delete_handle)
-   {
-       g_signal_handler_disconnect (priv->nautilus_settings,
-                        priv->enable_delete_handle);
-   }
-
    if (priv->confirm_trash_handle)
    {
        g_signal_handler_disconnect (priv->nautilus_settings,
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index 72a3da6..bd5a2d7 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -65,7 +65,6 @@ enum
    PROP_0,

    PROP_FILTER_PATTERN,
-   PROP_ENABLE_DELETE
 };

 /* Signals */
@@ -152,15 +151,11 @@ struct _GeditFileBrowserWidgetPrivate
    GtkWidget *location_next_menu;
    GtkWidget *current_location_menu_item;

-   gboolean enable_delete;
-
    GCancellable *cancellable;

    GdkCursor *busy_cursor;
 };

-static void set_enable_delete             (GeditFileBrowserWidget *obj,
-                       gboolean                enable);
 static void on_model_set                       (GObject                *gobject,
                        GParamSpec             *arg1,
                        GeditFileBrowserWidget *obj);
@@ -439,9 +434,6 @@ gedit_file_browser_widget_get_property (GObject   *object,
        case PROP_FILTER_PATTERN:
            g_value_set_string (value, obj->priv->filter_pattern_str);
            break;
-       case PROP_ENABLE_DELETE:
-           g_value_set_boolean (value, obj->priv->enable_delete);
-           break;
        default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
            break;
@@ -462,9 +454,6 @@ gedit_file_browser_widget_set_property (GObject     *object,
            gedit_file_browser_widget_set_filter_pattern (obj,
                                                          g_value_get_string (value));
            break;
-       case PROP_ENABLE_DELETE:
-           set_enable_delete (obj, g_value_get_boolean (value));
-           break;
        default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
            break;
@@ -489,13 +478,6 @@ gedit_file_browser_widget_class_init (GeditFileBrowserWidgetClass *klass)
                                  "The filter pattern",
                                  "",
                                  G_PARAM_READWRITE));
-   g_object_class_install_property (object_class, PROP_ENABLE_DELETE,
-                    g_param_spec_boolean ("enable-delete",
-                                  "Enable delete",
-                                  "Enable permanently deleting items",
-                                  TRUE,
-                                  G_PARAM_READWRITE |
-                                  G_PARAM_CONSTRUCT));

    signals[LOCATION_ACTIVATED] =
        g_signal_new ("location-activated",
@@ -795,19 +777,6 @@
    gtk_combo_box_set_active (GTK_COMBO_BOX (obj->priv->combo), 0);
 }

-static void
-set_enable_delete (GeditFileBrowserWidget *obj,
-          gboolean                enable)
-{
-   GAction *action;
-   obj->priv->enable_delete = enable;
-
-   action = g_simple_action_group_lookup (obj->priv->action_group,
-                                          "delete");
-
-   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), enable);
-}
-
 static gboolean
 filter_real (GeditFileBrowserStore  *model,
         GtkTreeIter            *iter,
@@ -1036,8 +1005,6 @@ gedit_file_browser_widget_init (GeditFileBrowserWidget *obj)
                                    "browser",
                                    G_ACTION_GROUP (obj->priv->action_group));

-   set_enable_delete (obj, obj->priv->enable_delete);
-
    gtk_widget_init_template (GTK_WIDGET (obj));

    g_signal_connect (obj->priv->previous_button, "button-press-event",
@@ -2967,8 +2934,7 @@ on_treeview_key_press_event (GeditFileBrowserView   *treeview,
        event->keyval == GDK_KEY_KP_Delete)
    {

-       if ((event->state & modifiers) == GDK_SHIFT_MASK &&
-           obj->priv->enable_delete)
+       if ((event->state & modifiers) == GDK_SHIFT_MASK)
        {
            delete_selected_files (obj, FALSE);
            return TRUE;
diff --git a/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in b/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
index cc76ab8..7a384c7 100644
--- a/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
+++ b/plugins/filebrowser/org.gnome.gedit.plugins.filebrowser.gschema.xml.in.in
@@ -51,9 +51,6 @@
     <key name="click-policy" enum="org.gnome.gedit.plugins.filebrowser.nautilus.ClickPolicy">
       <default>'double'</default>
     </key>
-    <key name="enable-delete" type="b">
-      <default>false</default>
-    </key>
     <key name="confirm-trash" type="b">
       <default>true</default>
     </key>
EOF
rpmbuild -ba ~/rpmbuild/SPECS/gedit.spec

O script supõe que gedit-3.10.4-1.fc20.src.rpm esteja no diretório atual. Após a compilação, você encontrará os pacotes binários no diretório ~/rpmbuild/RPMS , bem como os novos e corrigidos SRPM em ~/rpmbuild/SRPMS

Depois de fazer as mesmas etapas em uma instalação FC23 chrooted, não tenho problemas com o plug-in do terminal:

Editar3:

comooOPtemproblemascomoprocedimento,crieiumrepositóriogithubcomscriptdeconstruçãoeRPMsresultante: link

    
por 28.05.2016 / 10:16

Tags