FabioMux – openSUSE Lizards https://lizards.opensuse.org Blogs and Ramblings of the openSUSE Members Fri, 06 Mar 2020 11:29:40 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.5 zypper-upgraderepo 1.2 is out https://lizards.opensuse.org/2019/02/23/zypper-upgraderepo-1-2-is-out/ https://lizards.opensuse.org/2019/02/23/zypper-upgraderepo-1-2-is-out/#comments Sat, 23 Feb 2019 15:26:03 +0000 http://lizards.opensuse.org/?p=13401 Fixes and updates applied with this second minor version improved and extended the main functions, let’s see what’s new.

If you are new to the zypper-upgraderepo plugin, give a look to the previous article to better understand the mission and the basic usage.

Repository check

The first important change is inherent the way to check a valid repository:

  • the HTTP request sent is HEAD instead of GET in order to have a more lightweight answer from the server, being the HTML page not included in the packet;
  • the request point directly to the repodata.xml file instead of the folder, that because some server security setting could hide the directory listing and send back a 404 error although the repository works properly.

Check just a few repos

Most of the times we want to check the whole repository’s list at once, but sometimes we want to check few of them to see whether or not they are finally available or ready to be upgraded without looping through the whole list again and again. That’s where the –only-repo switch followed by a list of comma-separated numbers comes in help.

--only-repo switch

–only-repo switch

All repo by default

The disabled repositories now are shown by default and a new column highlights which of them are enabled or not, keeping their number in sync with the zypper lr output. To see only the enabled ones just use the switch –only-enabled.

Table view

Table view

Report view

Beside the table view, the switch –report introduce a new pleasant view using just two columns and spanning the right cell to more rows in order to improve the number of info and the reading quality.

Report view

Report view

Other changes

The procedure which tries to discover an alternative URL now dives back and forth the directory list in order to explore the whole tree of folders wherever the access is allowed by the server itself. The side effect is a general improvement also in repo downgrade.

The output in upgrade mode is now verbose and shows a table similar to the checking one, giving details about the changed URLs in the details column.

The server timeout error is now handled through the switch –timeout which allows tweaking the time before to consider an error any late answer from the server itself.

Final thoughts and what’s next

This plugin is practically completed, achieving all the goals needed for its main purpose no other relevant changes are scheduled, so I started thinking of other projects to work in my spare time.

Among them, there is one I am interested in: bring the power of openSUSE software search page to the command line.

However, there are some problems:

  • This website doesn’t implement any web API so will be a lot of scraping job;
  • There are missing packages while switching from the global research (selecting All distribution) to the specific distribution;
  • Packages from Packman are not included.

I have already got some ideas to solve them and did lay down several lines of code, so let’s see what happens!

]]>
https://lizards.opensuse.org/2019/02/23/zypper-upgraderepo-1-2-is-out/feed/ 1
zypper-upgraderepo-plugin is here https://lizards.opensuse.org/2018/08/07/zypper-upgraderepo-plugin-is-here/ https://lizards.opensuse.org/2018/08/07/zypper-upgraderepo-plugin-is-here/#comments Tue, 07 Aug 2018 18:55:25 +0000 http://lizards.opensuse.org/?p=13239 zypper-upgraderepo-plugin adds to zypper the ability to check the repository URLs either for the current version or the next release, and upgrade them all at once in order to upgrade the whole system from command line.

This tool started as a personal project when a day I was in the need to upgrade my distro quicker than using a traditional ISO image, Zypper was the right tool but I got a little stuck when I had to handle repositories: some of them were not yet upgraded, others changed slightly in the URL path.

Who knows how to Bash the problem is not exactly a nightmare, and so I did until I needed to make a step further.

The result is zypper-upgraderepo Ruby gem which can be integrated as a zypper plugin just installing the zypper-upgraderepo-plugin package.

Installing zypper-upgraderepo-plugin

Installing zypper-upgraderepo-plugin is as easy as:

  1. Adding my repo:
    sudo zypper ar https://download.opensuse.org/repositories/home:/FabioMux/openSUSE_Leap_42.3/home:FabioMux.repo
  2. Install the package:
    sudo zypper in zypper-upgraderepo-plugin

How to use it

Sometime we want to know the status of current repositories, the command zypper ref does a similar job but it is primarily intended to update the repository’s data and that slow down a bit the whole process.
Instead we can type:

$ zypper upgraderepo --check-current

To know whether or not all the available repositories are upgrade-ready:

$ zypper upgraderepo --check-next


As you can see from the example above all the enabled repositories are ready to upgrade except for the OSS repo which has a slightly different URL.

# The URL used in the openSUSE Leap 42.3
http://download.opensuse.org/distribution/leap/42.3/repo/oss/suse/
# The suggested one for openSUSE Leap 15.0
http://download.opensuse.org/distribution/leap/15.0/repo/oss/

Let’s try again overriding the URL without make any real change:

$ zypper upgraderepo --check-next \
--override-url 8,http://download.opensuse.org/distribution/leap/15.0/repo/oss/

Once everything is ok, and after performed a backup including all the repositories, it’s time to upgrade all the repository at once:

$ sudo zypper upgraderepo --upgrade \
--override-url 8,http://download.opensuse.org/distribution/leap/15.0/repo/oss/

Conclusions

That’s all with the basic commands, more information is available in the wiki page of zypper-upgraderepo gem where all the commands are intended with the only use of the gem, but installing the plugin they are also available as zypper subcommands like shown above, also a man page is available as

$ zypper help upgraderepo

]]>
https://lizards.opensuse.org/2018/08/07/zypper-upgraderepo-plugin-is-here/feed/ 2
wxRuby is now on BuildService https://lizards.opensuse.org/2013/03/22/wxruby-is-now-on-buildservice/ Fri, 22 Mar 2013 09:29:12 +0000 http://lizards.opensuse.org/?p=9331 I am happy to announce that i succeded in compiling wxRuby 2.0.1 on my Buildservice account and it is available to be installed in just one click for openSUSE 12.2 and 12.3.

wxRuby is an old but working library based on wxWidgets toolkit, till some day ago the dependency from SWIG 1.3.38 and some small errors raised during the manual compilation, made the use of this library the worst nightmare for beginners who was looking for a fast approach to GUI based programming in Ruby.

After some day spent to investigate about a possible upgrade of the SWIG dependency to the current 2.0 version, i produced some patches to fix this and the other annoying compiling errors, and finally, thanks to the Buildservice infrastructure, a wxRuby RPM compiled from sources with the relative patches are now availables for all openSUSE users!

As far i googled this should be the first distro to have a precompiled and working wxruby gem among its repositories (being compiled from sources the gem is generated for 32 and 64 bits architecture from Buildservice itself), so Rubyists take a look on software.opensuse.org, select the package coming from my home project account and enjoy!

]]>
Recompiling wxRuby https://lizards.opensuse.org/2010/09/04/recompiling-wxruby/ Sat, 04 Sep 2010 12:55:35 +0000 http://lizards.opensuse.org/?p=4532 Who uses Ruby might be interested to try this interesting multiplatform library that allows the development of GUI (Graphic User Interface) with a considerable visual impact and compatible with the three most popular Operating Systems: Linux (via GTK) Windows (with Native controls) and OSX (via Aqua). (This article is also available for italian users)

Usually need install the wxGTK libraries and the gem wxruby (or wxruby-ruby19 if using ruby 1.9) and start creating your own scripts.

$ sudo zypper in wxGTK wxGTK-gl
$ sudo gem install wxruby

But sometimes we could find an Error for a wrong compatibilty between the installed version of the wxGTK libraries and the wrapper library included in the gem.

/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so:
symbol _ZN13wxAuiNotebook14ShowWindowMenuEv, version WXU_2.8.5 not defined in file libwx_gtk2u_aui-2.8.so.0 with link time reference -
/usr/lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so

When an error like this appear, the unique solution is recompile the gem.

What we need:

  • rubygems: Tool for manage the ruby’s gems;
  • rake: the Ruby’s version of the popular make, will help us to compile wxRuby;
  • wxGTK, wxGTK-gl, wxGTK-devel: Library and headers needed for run our scripts and produce the object’s file;
  • SWIG: Build the wrapper classes in Ruby from the C++ sources, wxRuby 2.0.1 need the version 1.3.8;
  • gcc-c++: The C++ compiler used for build the wrapper library;
  • wxRuby: We have to download the source’s package directly from Rubyforge.

Added the repository which contains the Ruby extensions (warning to the portion of the address that refers the version of openSUSE), we can proceed with the installation confirming the request of the dependent packages:

$ sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/openSUSE_11.3/ RubyExtensions
$ sudo zypper ref
$ sudo zypper install rubygems rubygem-rake gcc-c++ wxGTK-devel rubygem-ffi-swig-generator make

It’s time to download the sources of SWIG version 1.3.38 from sourceforge, then uncompress and install it:

tar -xvf swig-1.3.38.tar.gz
cd swig-1.3.38
./configure && make
sudo make install

All the packages are ready, we have to set some environment variables before continue:

export SWIG_CMD=/usr/local/bin/swig
export WXRUBY_EXCLUDED=GLCanvas
export WXRUBY_VERSION=2.0.1

The second instruction is important for ignore all the references to the openGL library, which are not availables in unicode version.

The next step is download the wxRuby’s source from Rubyforge and start to compile

tar -xvf wxruby-2.0.1.tar.gz
cd wxruby-2.0.1
rake

After this procedure end you can remove the old gem and build & install the new:

rake gem
sudo gem install wxruby-2.0.1-x86-linux.gem

Personally, I needed recompile wxRuby in openSUSE 11.2; with the new version (11.3) standard packages work fine, anyway i wished share my experience for someone could meet the same trouble in the future :))

]]>
Some KDE 4 tips you should know https://lizards.opensuse.org/2009/08/13/some-kde-4-tips-you-should-know/ https://lizards.opensuse.org/2009/08/13/some-kde-4-tips-you-should-know/#comments Thu, 13 Aug 2009 00:00:16 +0000 http://lizards.opensuse.org/?p=1530 KDE 4 is definitively my daily desktop environment, although it’s not yet mature like the 3.5.x branch i consider it enough stable and usable, but sometime the default settings and the few time available, don’t help us to appreciate it, so let’s resume some little tip for beginners that feel lost with everything new and don’t want waste their time.

(This article is also available for italian users)

  • If you want Delete/Move items over the panel click the Plasma icon in the right edge: a second panel will help you to insert other plasmoids, resize the panel, align it, activate the auto-hide, and plus will be enabled the drag’n drop over any item for change their positions
  • The Show Desktop icon is one of the most feature i use, unfortunately it’s hide between the other plasmoids and his place is taken from the Show Dashboard. If you need see quickly your desktop then right click over the panel and select Panel Settings > Add Object then select Windows and Tasks and drag Show Desktop plasmoid over the panel. Add a key shortuct is easy: right click over the icon submitted and select Show Desktop Settings then click over the button and insert it (if Win + D sound more familiar you can use it too)
  • Link your software over the main Panel or the Desktop with few steps: just search it into the main menu (Alt + F1) and drag’n drop over the Panel/Desktop. If a folder is dragged from Dolphin/Konqueror over the Desktop you may create, through the popup menu, a Folder View, a Lancelot menu or just an icon that will start a dolphin’s session
  • You don’t like the Plasma Desktop? Switch back to the old style just selecting the Folder View under Desktop Settings > Type
  • Everyone has just installed KDE 4 want see the Cube and probabily this effect it’s already activated through KWin, then press CTRL + F11, switch the faces with the arrow keys and select your desktop pressing Return
  • KSnapshot doesn’t popup with PrtScr? If you miss this feature, then fix it: launch systemsettings, select Input Actions and create a new global shortcut (Command/URL) into the tree list through the contextual menu, fill the multiline text field with a comment, set PrtScr as key, and insert the command ksnapshot, then save. With the same system you can associate your favorite software with a combo key (think on it if you want launch dolphin with Win + E or kfind with Win + F)
  • The Grid View is something useful for watch and select any window opened in your desktop, try it with Ctrl + F9 or Ctrl + F10 if you want see the windows opened in every Desktop. This feature is also available for align the Desktops in the same view (Ctrl + F8)
  • KDE 4 seem slow? Before say it try to disable some effect under systemsettings > Desktop. Usually i disable the effects related to the windows minimization (slow redesign) and move (transparence), but if your system is very old, before to leave KDE 4 disable them completely
  • How to show/hide the invisible files? Both in Dolphin or Konqueror switch their visualization with Alt + .
  • Klipper improve the clipboard’s system: use Ctrl + Alt + V for paste one of the last ten, twenty,… items already copied, it support also the actions (Ctrl + Alt + X for enable/disable) configurables through regular expressions, they allow to open the string selected with a particular program. Try this feature selecting this: http://www.opensuse.org
  • Tired to navigate the main menu? Krunner can help you: call it with Alt + F2 and begin to write in the text box a part of the application’s name you would like start and it will search the string between the whole menu. Krunner can also open a folder, search between contacts or bookmarks, convert units or execute little math operations, look the official page on KDE.org for more details.
  • Some plasmoid look very useful, not only gadgets for fill your Desktop: webmaster should love the Color Picker and keep it fix in the main panel; the Timer will help us to manage our time counting down a configurable interval; Notes is a post-it system; Quick Access is another way to reach our files and folder and navigate between them directly from the main panel.

That’s all for now, hope it help to enjoy a bit more this fantastic Desktop Environment, any new hint is welcome, just leave a comment below 😉

]]>
https://lizards.opensuse.org/2009/08/13/some-kde-4-tips-you-should-know/feed/ 4