Bug 896735 - Please move /usr/share/images
Please move /usr/share/images
Status: NEW
Product: Fedora
Classification: Fedora
Component: linphone (Show other bugs)
23
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: nucleo
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-17 16:17 EST by Michael Schwendt
Modified: 2015-07-15 10:52 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
one way to change the path in ./mediastreamer2/src/ files (1.50 KB, patch)
2013-01-17 17:38 EST, Michael Schwendt
no flags Details | Diff
optional patch for autotools rebuilds (428 bytes, patch)
2013-01-17 17:38 EST, Michael Schwendt
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2013-01-17 16:17:53 EST
As I've just run into package review where a package installed directly into /usr/share/images, I submitted this query:

  $ repoquery --whatprovides /usr/share/images
  linphone-mediastreamer-0:3.5.2-5.fc18.x86_64
  linphone-0:3.5.2-4.fc18.x86_64
  linphone-mediastreamer-0:3.5.2-5.fc18.i686
  linphone-0:3.5.2-4.fc18.i686

The FHS suggests creating a subdirectory below /usr/share, which means something like /usr/share/linphone/images to use the "linphone" namespace and not occupy a generic /usr/share/images directory.

It would be good if the directory and file could be moved accordingly.
Comment 1 nucleo 2013-01-17 16:26:17 EST
If you provide patch for mediastreamer to use other path for searching and installing nowebcamCIF.jpg then I can apply it.

Talking with upstream linphone about this impossible because they don't have bugtracking system, all emails to mailing lists ignored (for example I asked help for FTBFS in rawhode and nobody answered, as always).
Comment 2 Michael Schwendt 2013-01-17 17:38:13 EST
Created attachment 680607 [details]
one way to change the path in ./mediastreamer2/src/ files

Here's what would need to be patch.

No contact with upstream isn't ideal, because it might become necessary to update the patch if the related source files changed drastically. It also means that one cannot negotiate about revised/enhanced versions of a patch. For example, one could use the $(PACKAGE_NAME) variable instead of hardcoding "linphone" in the same way the mediastreamer2/src/nowebcam.c file does, but it also does strange/fragile things like

  #ifndef PACKAGE_DATA_DIR
  #define PACKAGE_DATA_DIR "share"
  #endif

which can lead to building in a path that differs from the actual location of the packaged files.
Comment 3 Michael Schwendt 2013-01-17 17:38:54 EST
Created attachment 680608 [details]
optional patch for autotools rebuilds

This patch will only be needed if automake/autoreconf will be used to regenerate/rebuild Makefile.in files.
Comment 4 nucleo 2013-01-17 17:49:37 EST
Thanks for the patches, I will look on them.
Without upstream decision there is arbitrariness in selecting images path, it can be in %{_datadir}/linphone or maybe in %{_libdir}/medisatreamer because images is part of mediastreamer and %{_libdir}/medisatreamer/plugins is path where mediastreamer searches for plugins but this dir is not installed by 'make install'.
Comment 5 nucleo 2013-01-17 19:42:19 EST
linphone-mediastreamer can be installed without linphone this is reason why I don't whant use %{_datadir}/linphone/images dir, and use %{_libdir}/medisatreamer/images/.
But for using %{_libdir}/medisatreamer/images/ path I can't find what variable should be used instead of PACKAGE_DATA_DIR.
Comment 6 nucleo 2013-01-17 19:55:25 EST
One of solutions is build separate mediastreamer package from this sources
http://download-mirror.savannah.gnu.org/releases/linphone/mediastreamer/mediastreamer-2.8.2.tar.gz

In this sources used configure file that differs from mediastremer in linphone sources because PACKAGE_DATA_DIR defined in linphone's configure.
So I tried to change 
#define PACKAGE_DATA_DIR "${package_prefix}/share
to
#define PACKAGE_DATA_DIR "${datadir)"
in medistreamers configure and built it with --datadir=%{_libdir}/mediastreamer.

With bundled mediastreamer this don't work because there is no this #define.
Comment 7 Michael Schwendt 2013-01-19 05:48:52 EST
That's true. You can only use macros defined in config.h or the preprocessor options. There is no definition for LIBDIR yet.

If you insist on storing the image(s) in %{_libdir}/mediastreamer/images, you could add "-DPACKAGE_MEDIASTREAMER_DATA_DIR=%{_libdir}/mediastreamer" to CFLAGS and CXXFLAGS in the spec file and patch the source to use that macro instead of PACKAGE_DATA_DIR.

You could also reduce the solution to a simple packaging technique: patch the source to use something like __PACKAGE_MEDIASTREAMER_DATA_DIR__ instead of PACKAGE_DATA_DIR, and replace that special string of characters with e.g. a "sed" substitution inside the spec file's %prep section.
Comment 8 nucleo 2013-01-22 12:30:02 EST
I have filling that without ffmpeg file nowebcamCIF.jpg not used at all but I am not sure.
At least I can find reference to images and this file in libmediastreamer.so.1.0.0 only if it built with ffmpeg (ffmpeg is mandatory for video calls support).
Comment 9 Fedora Admin XMLRPC Client 2013-01-29 08:03:48 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 10 Fedora Admin XMLRPC Client 2013-05-11 17:11:55 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 11 Fedora End Of Life 2013-12-21 05:29:27 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 12 Jan Kurik 2015-07-15 10:52:52 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Note You need to log in before you can comment on or make changes to this bug.