commit efb69e3117f041262da396e0699c582c5d809d30b07f89444de0d3a0f87743f5 Author: Paolo Stivanin Date: Mon Nov 11 19:39:48 2024 +0000 update to 2.3.0 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/gerbera?expand=0&rev=64 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/config.xml b/config.xml new file mode 100644 index 0000000..f1ef462 --- /dev/null +++ b/config.xml @@ -0,0 +1,165 @@ + + + + + + + + + + Gerbera + uuid:ebc72883-bdd4-432e-be5f-87051d2d0091 + /etc/gerbera + /usr/share/gerbera/web + + 1800 + + + gerbera.db + + + + + upnp:class derivedfrom "object.item" and last_updated > "@last7" + + + upnp:class derivedfrom "object.item" and last_modified > "@last7" + + + + + 128 + 5 + yes + no + 8 + + + * + + video + + + + + + + /usr/share/gerbera/js/common.js + /usr/share/gerbera/js/playlists.js + + /usr/share/gerbera/js/import.js + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + audio/mpeg + no + yes + no + + + + + video/mpeg + yes + yes + yes + + + + + + + diff --git a/gerbera-2.1.0.tar.gz b/gerbera-2.1.0.tar.gz new file mode 100644 index 0000000..b990ca9 --- /dev/null +++ b/gerbera-2.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50af65e5570930b543176d6a2906ba2bd36fd548716818024285d79eb4977a1d +size 5828980 diff --git a/gerbera-2.2.0.tar.gz b/gerbera-2.2.0.tar.gz new file mode 100644 index 0000000..92afaca --- /dev/null +++ b/gerbera-2.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c77f4a8ccbed5e18499c0854803fec65ae2f26af633818b52584651fbd3eec13 +size 6138157 diff --git a/gerbera-2.3.0.tar.gz b/gerbera-2.3.0.tar.gz new file mode 100644 index 0000000..73f9d7b --- /dev/null +++ b/gerbera-2.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9f7956d9e94a9b8ded7de809ba8496ad1a2279b624ab121652dff2a28a1a69e +size 6255947 diff --git a/gerbera.changes b/gerbera.changes new file mode 100644 index 0000000..f2fc206 --- /dev/null +++ b/gerbera.changes @@ -0,0 +1,519 @@ +------------------------------------------------------------------- +Mon Nov 11 13:45:55 UTC 2024 - Friedrich Haubensak + +- update to 2.3.0: + NEW + * Higher cross site scripting security in web ui + * Styles for xml documents when shown in browser + * Configuration of additional target mimetype properties for transcoding (e.g. needed for PCM output) + * Configuration of DLNA profile mappings for a client + * Display media details in web ui + * Image and thumbnail profiles support PNG images + * Page layout of items page with splitter and resize button + * Orientation for images and videos in resource attributes + * Additional client filtering options with friendlyName, modelName, manufacturer + * Configuration option to block clients + * Upnp classes are assigned to containers in physical tree (PC Directory) depending on the majority of children (only in grb-mode) + * Nested iterations are now supported in Config UI + * UPnP Search support for integer and date comparison + * Failed UPnP requests return error messages + FIXES + * Warning in case import function does not return new ids. + * Config values are implemented now. + * Renaming of files or folders in grb-mode + * Nested arrays can be shown in config ui. + * Made UDN mandatory for UPnP announcements to work + +------------------------------------------------------------------- +Sat Aug 3 13:53:03 UTC 2024 - hui + +- update to 2.2.0: + NEW + * Configuration for case sensitive media tags (allow making them insensitive) + * Configuration options for playlist layout + * Configuration option to activate IN_ATTRIB event for, e.g. permission changes on disk incl. retry if that fails + * WebUI: New design for home page and login screen + * Allow metadata handler to be disabled, add charset support + * UPnP specification files (description.xml, cds.xml) now reflect client quirks + * Search for upnp:lastPlaybackTime, upnp:playbackCount and play_group + * Additional command line options for logging (--syslog and --rotatelog) + * TagLib messages are logged with gerbera now. They also show up with debug-mode="taglib". + * LibExiv2 messages are logged with gerbera now. They also show up with debug-mode="exiv2". + * LibExif messages are logged with gerbera now. They also show up with debug-mode="exif". + * ffmpeg messages are logged with gerbera now. They also show up with debug-mode="ffmpeg". + FIXES + * Album artist handling in default js layout + * Build with ffmpegthumbnailer but without ffmpeg + * Changed repository for ubuntu and debian to https://pkg.gerbera.io/ + * Autologout from UI + * Finally SIGHUP can be used to reload gerbera without restarting + +------------------------------------------------------------------- +Thu May 9 19:55:55 UTC 2024 - Dirk Müller + +- update to 2.1.0: + * Add ctypes include + * Add issue template + * Autoscan: avoid errors from parent directories + * Avoid crash when parent was not created yet. + * Bring back custom headers as client specific headers + * BUGFIX: common.js boxSetup check Video/AllDates for Dates + * Build Support for NPUPNP + * Bump express from 4.18.2 to 4.19.2 in /gerbera-web + * Bump follow-redirects from 1.15.3 to 1.15.4 in /gerbera-web + * Bump follow-redirects from 1.15.4 to 1.15.6 in /gerbera-web + * Bump xml2js and parse-bmfont-xml in /gerbera-web + * clang-tidy and cppcheck fixes + * clang-tidy fixes + * Cleanup FileRequestHandler + * CMake: Use presets + * Config: Refactor handling of integer types + * Correct two typos. + * debian12: fix script error + * Docker image usability + * Docker: update alpine version + * Enhances default javascript files to check config file + options + * Expand firewall advice in docs + * Fix build-deb.sh for releases + * Fix findAutoscanDirectory + * Gerbera welcomes 2024 + * Gerbera-web: update chromedriver for tests + * github workflows: make cmake stuff consistent + * Import: Safely handle second scan + * Import: Safely handle second scan - 2 + * matroska_handler: update API calls to work with + libebml/libmatroska 2.0 + * MetadataHandler: Refactor static methods + * Metafile: handle instance + * Minor fixes to RST documentation + * Provide BoxKeys also for scripts + * Refactor config and enums to reduce nesting + * Refactor parser files + * Safely handle suppressed file types + * Scripting: print2 function with log level support + * some fixes + * Sqlite: Harden delete + * Take configuration into account when creating virtual-layout + (built-in + JS) + * Update Conan to v2 + * Update screenshots to latest version + * Update various library versions + * Update workflow actions + * WebUI: Add Item View + * Webui: update vendor libraries + +------------------------------------------------------------------- +Mon Feb 5 13:23:17 UTC 2024 - Dominique Leuenberger + +- Generate the pre script usingn sysusers_generate. + +------------------------------------------------------------------- +Mon Feb 5 11:53:56 UTC 2024 - Dominique Leuenberger + +- Actually run the generated sysusers script as part of pre (do not + manually provide the user() symbol, taken care of bu + rpm/sysusers. + +------------------------------------------------------------------- +Mon Feb 5 07:37:46 UTC 2024 - Paolo Stivanin + +- Adapt to RPM 4.19 on Tumbleweed. + +------------------------------------------------------------------- +Mon Jan 8 07:14:18 UTC 2024 - Paolo Stivanin + +- Update to 2.0.0: + NEW: + * Staged importing that allows updating the virtual layout instead of deleting + and recreating it each time (import-mode="grb") + * Config options as command line arguments (--set-option OPT=VAL with --print-options) + * Allow configuration of follow-symlinks per autoscan directory + * Configuration of containers in virtual layout: title can be changed, some nodes can be disabled + * New mode of loading Javascript plugins with cleanup of global variables + * Generation of example configuration via command line option --create-example-config + * Case insensitive sorting for databases + * New config options for URL handling and host redirection + * Use .nomedia to hide directory, incl. config option + * Support for UPnP commands GetFeatureList and GetSortExtensionCapabilities + FIXES: + * Autoscan: Keep track of renamed directories + * Runtime issues in request handling + * Configurable handling of HOME directory + * Transcoding: parsing issue of requests + * Stability for sqlite database access + * Browsing on Samsung devices +- Drop upstreamed gerbera-1.12.1-buildfix-support-fmtlib-10.patch. + +------------------------------------------------------------------- +Sun Dec 31 19:15:11 UTC 2023 - Andreas Stieger + +- fix build on Tumbleweed with fmtlib 10 (boo#1218445) + add gerbera-1.12.1-buildfix-support-fmtlib-10.patch + +------------------------------------------------------------------- +Fri Oct 6 07:21:59 UTC 2023 - Paolo Stivanin + +- Use better macro for selecting a newer GCC on Leap. + +------------------------------------------------------------------- +Thu Jun 15 11:44:52 UTC 2023 - Dominique Leuenberger + +- Fix usage of %sysusers_create_package: the macro takes two + parameters. + +------------------------------------------------------------------- +Fri Jan 6 08:07:12 UTC 2023 - Paolo Stivanin + +- Update to 1.12.1: + * Debug options for specialized messages + * Configure offset of lastPlayedPosition (aka Samsung bookmark) + * Calling null IOHandler + * Encoding of ticks ' as ' for Bose + * ffmpeg and transcoding in docker container + * Tests failing on openSuSE > 15.3 and others +- Drop 2759.patch + +------------------------------------------------------------------- +Mon Dec 5 08:25:00 UTC 2022 - Paolo Stivanin + +- Add 2759.patch: fix tests execution issues. +- Remove disable-test.patch + +------------------------------------------------------------------- +Tue Nov 29 14:19:26 UTC 2022 - Paolo Stivanin + +- Update to 1.12.0: + * Support for NFO files as additional resources: Set up in resources + and place nfo-files (https://kodi.wiki/view/NFO_files/Templates) next to your media files. + * Tweaking mimetypes for clients + * Editing Flags in web UI + * More statistics on web UI + * Add support for ip subnets in client config + * Defaults for virtual container upnp class + * Configuration for SQLite database modes + * Offline mode for initial scan large libraries +- Add disable-test.patch until https://github.com/gerbera/gerbera/issues/2755 + is fixed. These two tests (UpnpClientsTest.getHostName and ParserTest.SortTrackNumber) + were added with this release. +- Remove 2635.patch +- Remove fix-fmt9.patch + +------------------------------------------------------------------- +Sat Oct 15 09:52:05 UTC 2022 - Paolo Stivanin + +- Add fix-fmt9.patch + +------------------------------------------------------------------- +Wed May 25 09:36:13 UTC 2022 - Paolo Stivanin + +- Update 2635.patch + +------------------------------------------------------------------- +Wed May 18 09:23:12 UTC 2022 - Paolo Stivanin + +- Add 2635.patch: this fixes and issue on i586 and x86 + +------------------------------------------------------------------- +Mon May 9 06:10:54 UTC 2022 - Paolo Stivanin + +- Update to 1.11.0: + * New features: + - Database: Clients and statistics are stored database so restart + does not empty client list. Client grouping for play statistics. + - Search: Support searching playlists containers + - Search: Respect ContainerID when performing search + - Import: item class filtering and mapping by file properties + allows more sophisticated virtual structure + - Transcoding: Support filtering transcoding profiles by resource properties + (like codecs) avoids transcoding if client can play files + - DLNA: Detect DNLA profiles by resource attributes to specify more detailled + profile for handling in client + - File type support for WavPack improved: More metadata read with + special library if compiled in. + * Fixes: + - Playlist: Fix parser error + - Playlist: Handle end of file properly + - Browsing: Sort containers first + - Search: search result is sort by title now + - Import: Timestamps in future are not stored for containers + - Lots of others fixes: https://github.com/gerbera/gerbera/releases/tag/v1.11.0 + +------------------------------------------------------------------- +Mon Mar 21 15:35:03 UTC 2022 - Paolo Stivanin + +- Update to 1.10.0: + * show subdir of recursive autoscan in directory tree + * add screenshots for grid view + * add all metadata to search capabilities + * search title in metadata instead of file name + * reuse Request Handler + * lots of other fixes: https://github.com/gerbera/gerbera/releases/tag/v1.10.0 +- Remove fix_for_smt_gt8.patch + +------------------------------------------------------------------- +Fri Jan 14 06:44:40 UTC 2022 - Paolo Stivanin + +- Use %sysusers_create_package on Tumbleweed +- Add fix_for_smt_gt8.patch + +------------------------------------------------------------------- +Thu Oct 7 12:51:58 UTC 2021 - Paolo Stivanin + +- Update to 1.9.2: +* Titles of search results can be configured +* Containers in virtual layout can be defined as search result, so, + e.g. albums, located in several places are only found once +* Metadata, like artist, appearing multiple times are now stored + in that way and can be sent to UPnP clients as separate entries + as well or addressed in layout scripts. If you have a custom js + import script which updates metadata you have to modify it using + the new properties (see doc on scripting) +* DLNA profile can be configured using video and audio codec, + allow devices to pick supported streams +* DLNA profile can be set for transcoding + +------------------------------------------------------------------- +Tue Sep 21 12:33:17 UTC 2021 - Paolo Stivanin + +- Fix spec file +- Add config.xml +- Remove unneeded tmpfile + +------------------------------------------------------------------- +Tue Sep 21 09:51:10 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_gerbera.service.patch + +------------------------------------------------------------------- +Thu Sep 2 07:25:06 UTC 2021 - Paolo Stivanin + +- Update to 1.9.1: + * lots of small code-related fixes + https://github.com/gerbera/gerbera/releases/tag/v1.9.1 + +------------------------------------------------------------------- +Thu Aug 5 05:35:30 UTC 2021 - Paolo Stivanin + +- Update to 1.9.0: + * New or Improved features: + + Many more things have been added to configuration (order of + resources for album art, DLNA profiles, upnp properties). + Please consult https://docs.gerbera.io/en/stable/config-overview.html + for the exact usage + + Gerbera now can display dynamic containers, i.e. its contents + are calculated as you click. This may show you recently add + or changed media + + Gerbera now supports client specific transcoding, i.e. video + is only transcode for your older devices, newer can stream it + as it is + + The compatibility with Samsung TV sets was increase again + + Minor media and upnp additions in search allow you to make + the most out of your files + * Refactoring of Code in Database Layer: this means that after + the upgrade to 1.9.0 it's not possible to downgrade + * Lots of small bug fixed + (https://github.com/gerbera/gerbera/releases/tag/v1.9.0) + +------------------------------------------------------------------- +Fri Jun 18 09:04:07 UTC 2021 - Paolo Stivanin + +- Update to 1.8.2: + * Enhance structured layout with configuration + * string_view to string conversions + * pass SearchLexer by value + * return std::nullopt for std::optional + * remove pointless const_cast + * Improve handling of default config values + * several clang-tidy and manual cleanups + * Fix parseSortStatement + * mostly pass by value changes + * Revert last_write_time to seconds since 1970 + * Encoding of web editor arguments + * clang-analyzer and misc + * Search query sign from beginning + * manual destructor changes + * Fix double truncation of playlist name + * Generate correct statement for metadata table + * Make transactions for SQLite thread safe + +------------------------------------------------------------------- +Wed May 19 08:20:28 UTC 2021 - Paolo Stivanin + +- Update to 1.8.1: + * Mysql transactions + * Support creation_time on FFmpeg handler + * Bump lodash from 4.17.19 to 4.17.21 in /gerbera-web + * Synchronize threads properly + * add missing optional header for GCC11 + * remove several implicit fs::path conversions + * Concatenate multivalue field with entrySeparator + * remove push_back branch + * change some size_t to bool + * remove some pointless lambdas + * remove std::distance where empty is sufficient + * Implement SAMSUNG X_GetFeatureList + * More chrono optimizations + * algorithm cleanups + * Determine container art image from files + * massive std::chrono conversion + * string_view conversions + * Add support for Windows Media Player + * Conan: Tidy up CMake conan integration + * Implement UPnP SortCriteria + * Avoid needless process elevation requirement on illumos + * Only use music tracks as container art source + * Work around undefined syscalls on solaroid systems + * Documentation for exiv2 meta data usage + * Clean compilation and errno fix + * Enable ContainerArt for PC Directory + * auto&& conversions + * fs::path conversions + * Cleanup path handling + * add -d, -u and -P commandline options to docs + * Fixed required versions of libupnp and libnpupnp + * fix UPNP_USING_CHUNKED breaks npupnp compatibility + * clang-tidy: replace typedef with using + * Add cmdline options -u, -d and -P + * Fix transcoded media ends before file is complete + +------------------------------------------------------------------- +Sat Apr 17 13:57:49 UTC 2021 - Paolo Stivanin + +- Update to 1.8.0: + * Significant improvement in import speeds with large collections + * Handle Samsung X_SetBookmark action, for saving position of viewed + media, when enabled by flag + * New search support for containers, i.e. Albums, Artists and Genres + * Extract metadata information from mp3 files with ID3v1 tags, + not just v2 + * Added a retry when binding to interfaces, should make Gerbera + much more reliable to start with slow network startup. + * Fix build with GCC11 + * Beautify titles which are generated from file names + +------------------------------------------------------------------- +Thu Mar 4 07:28:55 UTC 2021 - Paolo Stivanin + +- Gerbera requires GCC >= 8.0 to compile, therefore we need to specify + a higher version than the default one (7.5.0) on 15.sp3 + +------------------------------------------------------------------- +Tue Mar 2 15:19:53 UTC 2021 - Paolo Stivanin + +- Update to 1.7.0: + * display thumbnails, album art and container images + * set additional import options for directories on filesystem page + * page to edit configuration (most of it), your settings + are stored in the database + * charset can be specific to import library + * resource configuration can be used for container images + * additional metadata stored from import scan + * multiple disks distinguished by part_number field + * modification time for autoscan directories now reflects sub directories + and reduces startup footprint + * All functions have been moved to common.js + * A custom script file can be set in config.xml. It may contain + additional functions or overwrites for the existing ones - if needed + * Most entries from configuration can be accessed via + new global variable config. + * lots of fixes: + https://github.com/gerbera/gerbera/releases/tag/v1.7.0 + +------------------------------------------------------------------- +Thu Oct 15 14:22:53 UTC 2020 - Paolo Stivanin + +- Update to 1.6.4: + * Fix regression introduced in 1.6.2 in SQL generation + * Fix a regression introduced in 1.6.2 when adding resources + * Fixed a regression where some files could be removed from the + library on a restart due to a race + * Fixed a crash in ffmpeg hander where metadata date field + was non-numeric + * Add Samsung X_SetBookmark stub + * Bump jimp + * UI: Dont update mimetype to empty + * minor fixes + +------------------------------------------------------------------- +Mon Sep 28 15:17:30 UTC 2020 - Paolo Stivanin + +- Update to 1.6.1: + * fixed mime type retrieval for symlinks with libmagic + * Actions: Run docker build on tags too + * Bump js stuff to fix security warnings + * Color folders with children instead of badges saying true + * Improve Resource Handling + * Add subtitle as resource and update entries with resources attached, + improve ContentHandler + * Bump elliptic from 6.5.2 to 6.5.3 in /gerbera-web + * fix upnp header include + * std::algorithm conversions + * v1.6.0: https://github.com/gerbera/gerbera/releases/tag/v1.6.0 + +------------------------------------------------------------------- +Sat May 23 13:53:22 UTC 2020 - Jan Engelhardt + +- Generalize description. Use %autosetup. + +------------------------------------------------------------------- +Thu May 21 07:01:03 UTC 2020 - Paolo Stivanin + +- Update to 1.5.0 + * Client Auto detection and DLNA quirks always enabled + * C++ Standardisation + * UI Enhancements + * Transcoding Enhancements + * Expat has been replaced with pugixml + * Spdlog is now used for logging + * upnp min version 1.12.0 + * Lots of bug fixes and improvements all around + +Detailed changelong: https://github.com/gerbera/gerbera/releases/tag/v1.5.0 + +------------------------------------------------------------------- +Mon Jul 22 16:20:14 UTC 2019 - Sebastien CHAVAUX + +- Update to version 1.3.2: + * Allow to set the manufacturer and the modelURL via config file (#477), thanks @joerg-krause + * Fix find_program taglib-config when cross-compiling (#476), thanks @joerg-krause + * Update config-import.rst (#475), thanks @ghlupe2 + * Add Gerbera version to UI (#469), thanks @elmodaddyb + * cmake/FindFFMPEG: do not quieten messages when using pkg-config (#466), thanks @joerg-krause + * Fixture upgrade (#465), thanks @elmodaddyb + * Update js cookie (#464), thanks @elmodaddyb + * Add virtualUrl to AlbumArt resource for consistent resource URIs (#460), thanks @elmodaddyb + * Use exiv2 header that include all headers (#457), thanks @nicolas-s + * Update vendor dependencies (#455), thanks @elmodaddyb + * Docs: Bump version (#452), thanks @v00d00 + * feat: provide a way to toggle DLNA-seeking with a config (#450), thanks @rtm-ctrlz + * main: bugfix interface CLI option (#451), thanks @edzius + * Generate config.xml with XML Declaration (#447), thanks @elmodaddyb + +------------------------------------------------------------------- +Wed May 15 10:43:21 UTC 2019 - Sebastien CHAVAUX + +- Update to version 1.3.1: + * Build system improvements, thanks @ffontaine + * Fixes for DLNA Headers handling + * Add support for TXXX AuxData extraction from MP3 + * Fix External URL resource generation, thanks @elmodaddyb + * Latest NPM Updates, thanks @elmodaddyb + +------------------------------------------------------------------- +Thu Nov 15 18:48:37 UTC 2018 - Tomáš Chvátal + +- Do not build against mysql - sqlite3 for tiny db is enough +- Use exiv2 instead of exif + +------------------------------------------------------------------- +Fri Jun 2 02:34:59 UTC 2017 - avvissu@yandex.by + +- Update to gerbera.conf.in + +------------------------------------------------------------------- +Tue May 30 14:17:15 UTC 2017 - avvissu@yandex.by + +- Initial package + diff --git a/gerbera.spec b/gerbera.spec new file mode 100644 index 0000000..d94b474 --- /dev/null +++ b/gerbera.spec @@ -0,0 +1,164 @@ +# +# spec file for package gerbera +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%if 0%{?suse_version} && 0%{?suse_version} < 1590 +%global force_gcc_version 12 +%endif + +Name: gerbera +Version: 2.3.0 +Release: 0 +Summary: UPnP Media Server +License: GPL-2.0-only +Group: Productivity/Multimedia/Other +URL: https://gerbera.io +Source0: https://github.com/gerbera/gerbera/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: config.xml +Source2: gerbera.sysusers.in +Patch0: harden_gerbera.service.patch +BuildRequires: ccache +BuildRequires: cmake >= 3.13 +BuildRequires: fdupes +BuildRequires: file-devel +BuildRequires: hicolor-icon-theme +BuildRequires: pkgconfig +BuildRequires: sysuser-tools +BuildRequires: pkgconfig(duktape) +BuildRequires: pkgconfig(exiv2) +BuildRequires: pkgconfig(gmock) +BuildRequires: pkgconfig(gmock_main) +BuildRequires: pkgconfig(gtest) +BuildRequires: pkgconfig(gtest_main) +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libebml) +BuildRequires: pkgconfig(libffmpegthumbnailer) +BuildRequires: pkgconfig(libmatroska) +BuildRequires: pkgconfig(libswscale) +BuildRequires: pkgconfig(libupnp) >= 1.14.6 +BuildRequires: pkgconfig(pugixml) +BuildRequires: pkgconfig(spdlog) >= 1.8.1 +BuildRequires: pkgconfig(sqlite3) >= 3.7.11 +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(taglib) >= 1.12 +BuildRequires: pkgconfig(uuid) +BuildRequires: pkgconfig(zlib) +Requires: logrotate +%{?systemd_requires} +%sysusers_requires +BuildRequires: gcc%{?force_gcc_version}-c++ >= 12 + +%description +Gerbera is a UPnP media server which allows streaming digital +media through a network and consume it on a variety of UPnP +compatible devices. + +%prep +%autosetup -p1 + +rm -f web/.gitignore + +# server test hardcodes alpha strings +sed -i -e '/test_server/d' test/CMakeLists.txt +sed -i -e 's/@USER@/gerbera/' %{SOURCE2} +sed -i -e 's/@GROUP@/gerbera/' %{SOURCE2} + +%build +%cmake \ + -DWITH_JS=1 \ + -DWITH_TAGLIB=1 \ + -DWITH_MAGIC=1 \ + -DWITH_AVCODEC=1 \ + -DWITH_EXIF=0 \ + -DWITH_EXIV2=1 \ +%if 0%{?force_gcc_version} + -DCMAKE_CXX_COMPILER=%{_bindir}/g++-%{?force_gcc_version} \ +%endif + -DWITH_FFMPEGTHUMBNAILER=1 \ + -DWITH_INOTIFY=1 \ + -DWITH_SYSTEMD=1 \ + -DWITH_TESTS=1 \ + -Wno-dev +%cmake_build + +%install +%cmake_install + +mkdir -p %{buildroot}%{_sysconfdir}/gerbera +touch %{buildroot}%{_sysconfdir}/gerbera/{gerbera.db,gerbera.html} +mkdir -p %{buildroot}%{_localstatedir}/log/gerbera +touch %{buildroot}%{_localstatedir}/log/%{name} +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d +cat > %{buildroot}%{_sysconfdir}/logrotate.d/%{name} << 'EOF' +%{_localstatedir}/log/gerbera/gerbera { +create 644 gerbera gerbera + monthly + compress + missingok +} +EOF + +install -d %{buildroot}%{_sbindir} +ln -s service %{buildroot}%{_sbindir}/rc%{name} + +install -p -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/gerbera/config.xml +install -p -D -m0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/gerbera.conf + +%sysusers_generate_pre %{buildroot}%{_sysusersdir}/gerbera.conf gerbera gerbera.conf + +%check +%ctest + +%pre -f %{name}.pre +%service_add_pre %{name}.service + +%post +%service_add_post %{name}.service + +%preun +%service_del_preun %{name}.service + +%postun +%service_del_postun %{name}.service + +%files +%license LICENSE.md +%doc AUTHORS CONTRIBUTING.md ChangeLog.md +%attr(-,gerbera,gerbera)%dir %{_sysconfdir}/%{name}/ +%attr(-,gerbera,gerbera)%config(noreplace) %{_sysconfdir}/%{name}/* +%attr(-,gerbera,gerbera) %{_localstatedir}/log/%{name} +%dir %{_sysconfdir}/logrotate.d +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%{_bindir}/%{name} +%{_sbindir}/rc%{name} +%{_unitdir}/gerbera.service +%{_sysusersdir}/gerbera.conf +%{_mandir}/man?/%{name}.?%{?ext_man} +%{_datadir}/gerbera/mysql-upgrade.xml +%{_datadir}/gerbera/mysql.sql +%{_datadir}/gerbera/sqlite3-upgrade.xml +%{_datadir}/gerbera/sqlite3.sql +%dir %{_datadir}/gerbera +%dir %{_datadir}/gerbera/js +%dir %{_datadir}/gerbera/web +%{_datadir}/gerbera/js/* +%{_datadir}/gerbera/web/* + +%changelog diff --git a/gerbera.sysusers.in b/gerbera.sysusers.in new file mode 100644 index 0000000..47e49f0 --- /dev/null +++ b/gerbera.sysusers.in @@ -0,0 +1,2 @@ +u gerbera - "Gerbera daemon user" /var/lib/gerbera - +m gerbera video - - - diff --git a/harden_gerbera.service.patch b/harden_gerbera.service.patch new file mode 100644 index 0000000..e111a00 --- /dev/null +++ b/harden_gerbera.service.patch @@ -0,0 +1,25 @@ +Index: gerbera-1.12.0/scripts/systemd/gerbera.service.cmake +=================================================================== +--- gerbera-1.12.0.orig/scripts/systemd/gerbera.service.cmake ++++ gerbera-1.12.0/scripts/systemd/gerbera.service.cmake +@@ -4,6 +4,20 @@ After=${SYSTEMD_AFTER_TARGET} + Wants=${SYSTEMD_WANTS_TARGET} + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++PrivateDevices=true ++ProtectHostname=true ++ProtectClock=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++ReadWritePaths=/usr/share/gerbera/ /etc/gerbera/ /var/log/gerbera ++# end of automatic additions + Type=simple + User=gerbera + Group=gerbera