From 2ff0a67e10a55f10a2ca129c694aecad4b67a920 Mon Sep 17 00:00:00 2001 From: Tarulia Date: Mon, 18 Apr 2022 02:27:41 +0200 Subject: [PATCH 1/6] Rewrite Fedora build version detection Rewrite so we don't need to constantly update with every new Fedora release. This is especially useful when Fedora and Jellyfin release cycles don't line up. Version selection is as follows: * TARGET environment variable, which is currently used already * Currently running Fedora version * Hardcoded Fallback version that can be updated occasionally --- fedora/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fedora/Makefile b/fedora/Makefile index 344c10b626..c094073bc8 100644 --- a/fedora/Makefile +++ b/fedora/Makefile @@ -9,8 +9,12 @@ TARBALL :=$(NAME)-$(subst -,~,$(VERSION)).tar.gz epel-7-x86_64_repos := https://rpm.nodesource.com/pub_16.x/el/\$$releasever/\$$basearch/ +fed_ver := $(shell rpm -E %fedora) +# fallback when not running on Fedora +fed_ver ?= 36 +TARGET ?= fedora-$(fed_ver)-x86_64 + outdir ?= $(PWD)/$(DIR)/ -TARGET ?= fedora-35-x86_64 srpm: $(DIR)/$(SRPM) tarball: $(DIR)/$(TARBALL) From 2896cfbdb2ff031f9bb73f91e7b6867963f76036 Mon Sep 17 00:00:00 2001 From: Tarulia Date: Thu, 21 Apr 2022 14:57:43 +0200 Subject: [PATCH 2/6] Adjust license in Fedora Spec according to LICENSE --- fedora/jellyfin-web.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedora/jellyfin-web.spec b/fedora/jellyfin-web.spec index ad7b2767a5..a16fcfa27d 100644 --- a/fedora/jellyfin-web.spec +++ b/fedora/jellyfin-web.spec @@ -4,7 +4,7 @@ Name: jellyfin-web Version: 10.8.0 Release: 1%{?dist} Summary: The Free Software Media System web client -License: GPLv3 +License: GPLv2 URL: https://jellyfin.org # Jellyfin Server tarball created by `make -f .copr/Makefile srpm`, real URL ends with `v%%{version}.tar.gz` Source0: jellyfin-web-%{version}.tar.gz From 390a0edf70773868d2e878c8a70c9ff01fd19c61 Mon Sep 17 00:00:00 2001 From: Tarulia Date: Thu, 21 Apr 2022 23:49:47 +0200 Subject: [PATCH 3/6] Standardise Fedora spec to packaging guidelines * move actual building process to %build * remove AutoReqProv as the package purely contains text files and fonts. There's no dependencies to begin with. This feature is also intended as sort of a "last resort" and we don't need this here. * define LICENSE as %license, which automatically puts it in a standardised directory --- fedora/jellyfin-web.spec | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/fedora/jellyfin-web.spec b/fedora/jellyfin-web.spec index a16fcfa27d..056528db2e 100644 --- a/fedora/jellyfin-web.spec +++ b/fedora/jellyfin-web.spec @@ -17,9 +17,6 @@ BuildRequires: git BuildRequires: npm %endif -# Disable Automatic Dependency Processing -AutoReqProv: no - %description Jellyfin is a free software media system that puts you in control of managing and streaming your media. @@ -27,22 +24,26 @@ Jellyfin is a free software media system that puts you in control of managing an %prep %autosetup -n jellyfin-web-%{version} -b 0 -%build - -%install %if 0%{?rhel} > 0 && 0%{?rhel} < 8 # Required for CentOS build chown root:root -R . %endif + + +%build npm ci --no-audit --unsafe-perm -%{__mkdir} -p %{buildroot}%{_datadir} -mv dist %{buildroot}%{_datadir}/jellyfin-web -%{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/jellyfin/LICENSE + + +%install +%{__mkdir} -p %{buildroot}%{_datadir}/jellyfin-web +%{__cp} -r dist/* %{buildroot}%{_datadir}/jellyfin-web + %files %defattr(644,root,root,755) %{_datadir}/jellyfin-web -%{_datadir}/licenses/jellyfin/LICENSE +%license LICENSE + %changelog * Fri Jun 10 2022 Jellyfin Packaging Team From 5d5be2500871ed35e75b2298c6777eae77bddd52 Mon Sep 17 00:00:00 2001 From: Tarulia Date: Mon, 25 Apr 2022 21:55:21 +0200 Subject: [PATCH 4/6] Move web-files to default location * when running Jellyfin as a user from a terminal without passing arguments, it would not find the web-files. This moves them to the expected/default location. * fixes #2059 --- fedora/jellyfin-web.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fedora/jellyfin-web.spec b/fedora/jellyfin-web.spec index 056528db2e..8490d60c5c 100644 --- a/fedora/jellyfin-web.spec +++ b/fedora/jellyfin-web.spec @@ -35,13 +35,13 @@ npm ci --no-audit --unsafe-perm %install -%{__mkdir} -p %{buildroot}%{_datadir}/jellyfin-web -%{__cp} -r dist/* %{buildroot}%{_datadir}/jellyfin-web +%{__mkdir} -p %{buildroot}%{_libdir}/jellyfin/jellyfin-web +%{__cp} -r dist/* %{buildroot}%{_libdir}/jellyfin/jellyfin-web %files %defattr(644,root,root,755) -%{_datadir}/jellyfin-web +%{_libdir}/jellyfin/jellyfin-web %license LICENSE From 26ec0e8e4a6703268803d40a0bea4122fb062f1f Mon Sep 17 00:00:00 2001 From: Tarulia Date: Mon, 25 Apr 2022 22:27:06 +0200 Subject: [PATCH 5/6] Use Fedora 36 image in Fedora Docker builds * fixes #2351 --- deployment/Dockerfile.fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/Dockerfile.fedora b/deployment/Dockerfile.fedora index 05ff5a7ae7..7ce3e2d05b 100644 --- a/deployment/Dockerfile.fedora +++ b/deployment/Dockerfile.fedora @@ -1,4 +1,4 @@ -FROM fedora:33 +FROM fedora:36 # Docker build arguments ARG SOURCE_DIR=/jellyfin From 08d77664a7c53ea263707ebc76debfa0b420966f Mon Sep 17 00:00:00 2001 From: Tarulia Date: Sat, 18 Jun 2022 20:29:32 +0200 Subject: [PATCH 6/6] Add make in Fedora Docker install Fedora 36 doesn't seem to ship make, so add it manually. --- deployment/Dockerfile.fedora | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/Dockerfile.fedora b/deployment/Dockerfile.fedora index 7ce3e2d05b..90df6f8584 100644 --- a/deployment/Dockerfile.fedora +++ b/deployment/Dockerfile.fedora @@ -11,7 +11,7 @@ ENV IS_DOCKER=YES # Prepare Fedora environment RUN dnf update -y \ - && dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs autoconf automake glibc-devel + && dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core nodejs autoconf automake glibc-devel make # Link to build script RUN ln -sf ${SOURCE_DIR}/deployment/build.fedora /build.sh