{"id":8787,"date":"2022-03-20T22:58:50","date_gmt":"2022-03-21T03:58:50","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=8787"},"modified":"2024-02-12T18:45:25","modified_gmt":"2024-02-12T23:45:25","slug":"building-gerbera-on-fedora","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=8787","title":{"rendered":"Building Gerbera on Fedora"},"content":{"rendered":"<p>There is a great deal of documentation available for <a href=\"https:\/\/docs.gerbera.io\/en\/stable\/compile.html\" target=\"_blank\" rel=\"noopener\">building Gerbera from source<\/a> on a variety of Linux flavors. Unfortunately, Fedora isn&#8217;t one of those (and the package names don&#8217;t exactly match up to let you replace &#8220;apt-get&#8221; with &#8220;yum&#8221; and be done). So I am quickly documenting the process we followed to build Gerbera from source.<\/p>\n<p>The Fedora build of Gerbera has the binaries in \/usr\/bin and the manual build places the gerbera binary in \/usr\/local\/bin &#8212; the build updates the unit file to reflect this change, but this means you want to back up any customizations you&#8217;ve made to the unit file <em>before<\/em> running &#8220;make install&#8221;.<\/p>\n<p>You need the build system &#8212; cmake, g++, etc and the devel packages from the following table as required by your build options<\/p>\n<p>Additional packages that we needed to install: automake, autoconf, libtool<\/p>\n<table width=\"909\">\n<tbody>\n<tr>\n<td width=\"133\"><strong>Library<\/strong><\/td>\n<td width=\"143\"><strong>Fedora Package<\/strong><\/td>\n<td width=\"119\"><strong>Required?<\/strong><\/td>\n<td width=\"213\"><strong>Note<\/strong><\/td>\n<td width=\"190\"><strong>Compile-time option<\/strong><\/td>\n<td width=\"111\"><strong>Default<\/strong><\/td>\n<\/tr>\n<tr>\n<td>libpupnp<\/td>\n<td>libupnp-devel<\/td>\n<td>XOR libnpupnp<\/td>\n<td>pupnp<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>libnpupnp<\/td>\n<td><a href=\"https:\/\/www.lesbonscomptes.com\/upmpdcli\/pages\/downloads.html\" target=\"_blank\" rel=\"noopener\">Build from source (if needed)<\/a><\/td>\n<td>XOR libupnp<\/td>\n<td>I was only able to locate this as a source, not available from Fedora repos<\/td>\n<td>WITH_NPUPNP<\/td>\n<td>Disabled<\/td>\n<\/tr>\n<tr>\n<td>libuuid<\/td>\n<td>libuuid-devel<\/td>\n<td>Required<\/td>\n<td>Not required on *BSD<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>pugixml<\/td>\n<td>pugixml-devel<\/td>\n<td>Required<\/td>\n<td>XML file and data support<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>libiconv<\/td>\n<td>glibc-headers<\/td>\n<td>Required<\/td>\n<td>Charset conversion<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>sqlite3<\/td>\n<td>sqlite-devel<\/td>\n<td>Required<\/td>\n<td>Database storage<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>zlib<\/td>\n<td>zlib-devel<\/td>\n<td>Required<\/td>\n<td>Data compression<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>fmtlib<\/td>\n<td>fmt-devel<\/td>\n<td>Required<\/td>\n<td>Fast string formatting<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>spdlog<\/td>\n<td>spdlog-devel<\/td>\n<td>Required<\/td>\n<td>Runtime logging<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>duktape<\/td>\n<td>duktape-devel<\/td>\n<td>Optional<\/td>\n<td>Scripting Support<\/td>\n<td>WITH_JS<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>mysql<\/td>\n<td>mariadb-devel<\/td>\n<td>Optional<\/td>\n<td>Alternate database storage<\/td>\n<td>WITH_MYSQL<\/td>\n<td>Disabled<\/td>\n<\/tr>\n<tr>\n<td>curl<\/td>\n<td>libcurl-devel<\/td>\n<td>Optional<\/td>\n<td>Enables web services<\/td>\n<td>WITH_CURL<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>taglib<\/td>\n<td>taglib-devel<\/td>\n<td>Optional<\/td>\n<td>Audio tag support<\/td>\n<td>WITH_TAGLIB<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>libmagic<\/td>\n<td>file-devel<\/td>\n<td>Optional<\/td>\n<td>File type detection<\/td>\n<td>WITH_MAGIC<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>libmatroska<\/td>\n<td>libmatroska-devel<\/td>\n<td>Optional<\/td>\n<td>MKV metadata required for MKV<\/td>\n<td>WITH_MATROSKA<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>libebml<\/td>\n<td>libebml-devel<\/td>\n<td>Optional<\/td>\n<td>MKV metadata required for MKV<\/td>\n<td>WITH_MATROSKA<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>ffmpeg\/libav<\/td>\n<td>ffmpeg-free-devel<\/td>\n<td>Optional<\/td>\n<td>File metadata<\/td>\n<td>WITH_AVCODEC<\/td>\n<td>Disabled<\/td>\n<\/tr>\n<tr>\n<td>libexif<\/td>\n<td>libexif-devel<\/td>\n<td>Optional<\/td>\n<td>JPEG Exif metadata<\/td>\n<td>WITH_EXIF<\/td>\n<td>Enabled<\/td>\n<\/tr>\n<tr>\n<td>libexiv2<\/td>\n<td>exiv2-devel<\/td>\n<td>Optional<\/td>\n<td>Exif, IPTC, XMP metadata<\/td>\n<td>WITH_EXIV2<\/td>\n<td>Disabled<\/td>\n<\/tr>\n<tr>\n<td>lastfmlib<\/td>\n<td>liblastfm-devel<\/td>\n<td>Optional<\/td>\n<td>Enables scrobbling<\/td>\n<td>WITH_LASTFM<\/td>\n<td>Disabled<\/td>\n<\/tr>\n<tr>\n<td>ffmpegthumbnailer<\/td>\n<td>ffmpegthumbnailer-devel<\/td>\n<td>Optional<\/td>\n<td>Generate video thumbnails<\/td>\n<td>WITH_FFMPEGTHUMBNAILER<\/td>\n<td>Disabled<\/td>\n<\/tr>\n<tr>\n<td>inotify<\/td>\n<td>glibc-headers<\/td>\n<td>Optional<\/td>\n<td>Efficient file monitoring<\/td>\n<td>WITH_INOTIFY<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>libavformat<\/td>\n<td>libavformat-free-devel<\/td>\n<td>Required for 2.0<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>libavutil<\/td>\n<td>libavutil-free-devel<\/td>\n<td>Required for 2.0<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>libavcodec<\/td>\n<td>libavcodec-free-devel<\/td>\n<td>Required for 2.0<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Then follow the generalized instructions &#8212; cd into the folder where you want to run the build and run (customizing the cmake line as you wish):<\/p>\n<pre><span class=\"n\">git<\/span> <span class=\"n\">clone<\/span> <span class=\"n\">https<\/span><span class=\"p\">:<\/span><span class=\"o\">\/\/<\/span><span class=\"n\">github<\/span><span class=\"o\">.<\/span><span class=\"n\">com<\/span><span class=\"o\">\/<\/span><span class=\"n\">gerbera<\/span><span class=\"o\">\/<\/span><span class=\"n\">gerbera<\/span><span class=\"o\">.<\/span><span class=\"n\">git<\/span>\r\n<span class=\"n\">mkdir<\/span> <span class=\"n\">build<\/span>\r\n<span class=\"n\">cd<\/span> <span class=\"n\">build<\/span>\r\ncmake ..\/gerbera -DWITH_MAGIC=1 -DWITH_MYSQL=1 -DWITH_CURL=1 -DWITH_INOTIFY=1 -DWITH_JS=1 -DWITH_TAGLIB=1 -DWITH_AVCODEC=1 -DWITH_FFMPEGTHUMBNAILER=0 -DWITH_EXIF=1 -DWITH_EXIV2=1 -DWITH_SYSTEMD=1 -DWITH_LASTFM=0 -DWITH_DEBUG=1\r\n<span class=\"n\">make<\/span> <span class=\"o\">-<\/span><span class=\"n\">j4<\/span>\r\n<span class=\"n\">sudo<\/span> <span class=\"n\">make<\/span> <span class=\"n\">install<\/span><\/pre>\n<p>As with the Gerbera binary, the Fedora build places the web content in \/usr\/share\/gerbera and the manual build places the web content into \/usr\/local\/share\/gerbera &#8212; yes, you can change the paths in the build, and I&#8217;m sure you can clue Gerbera into the new web file location. I opted for the quick\/easy\/lazy solution of running<\/p>\n<pre>mv \/usr\/share\/gerbera \/usr\/share\/gerbera\/old\r\nln -s \/usr\/local\/share\/gerbera \/usr\/share\/<\/pre>\n<p>To symlink the location my config <em>thinks<\/em> the web components should be located to the new files.<\/p>\n<p>On the first start of Gerbera, SQL scripts may be run to update the database &#8212; don&#8217;t stop or kill the service during this process there&#8217;s no checkpoint restart of the upgrade process. We backed up \/etc\/gerbera\/gerbera.db prior to starting our Gerbera installation. We&#8217;ve also wiped the database files to start from scratch and test changes that impacted how items are ingested into the database.<\/p>\n<p><em>Fin.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a great deal of documentation available for building Gerbera from source on a variety of Linux flavors. Unfortunately, Fedora isn&#8217;t one of those (and the package names don&#8217;t exactly match up to let you replace &#8220;apt-get&#8221; with &#8220;yum&#8221; and be done). So I am quickly documenting the process we followed to build Gerbera &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,63,30],"tags":[1569,1567,1568,47,1562],"class_list":["post-8787","post","type-post","status-publish","format-standard","hentry","category-coding","category-home-automation","category-system-administration","tag-build-from-source","tag-cmake","tag-compiling","tag-fedora","tag-gerbera"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8787"}],"version-history":[{"count":4,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8787\/revisions"}],"predecessor-version":[{"id":10687,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8787\/revisions\/10687"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}