From 211c2630433638a30ac0e0b614e82419267c66c2 Mon Sep 17 00:00:00 2001 From: Aikawa Yataro Date: Mon, 19 Aug 2024 07:36:51 +0000 Subject: [PATCH 1/3] fix: failed to resolve dependencies with aarch64 RPM package dependencies on aarch64 will not be resolved if library names are specified without architecture we could use `%{?_isa}` macro, however it looks like specifying library names as dependencies is generally avoided --- build/resources/rpm/SPECS/build.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index 86a7cfdd..0babdb75 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -5,8 +5,6 @@ Summary: Open-source & Free Git Gui Client License: MIT URL: https://sourcegit-scm.github.io/ Source: https://github.com/sourcegit-scm/sourcegit/archive/refs/tags/v%_version.tar.gz -Requires: libX11.so.6 -Requires: libSM.so.6 %define _build_id_links none From 90edabeb32a6ec608f2863c73fd1079ebcca3ded Mon Sep 17 00:00:00 2001 From: Aikawa Yataro Date: Mon, 19 Aug 2024 08:02:35 +0000 Subject: [PATCH 2/3] fix: update RPM dependencies --- build/resources/rpm/SPECS/build.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index 0babdb75..ba47aed4 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -5,6 +5,8 @@ Summary: Open-source & Free Git Gui Client License: MIT URL: https://sourcegit-scm.github.io/ Source: https://github.com/sourcegit-scm/sourcegit/archive/refs/tags/v%_version.tar.gz +Requires: libX11 +Requires: libSM %define _build_id_links none From 6267101eaf653405545976a6a7ce565174bd65a7 Mon Sep 17 00:00:00 2001 From: Aikawa Yataro Date: Mon, 19 Aug 2024 08:04:28 +0000 Subject: [PATCH 3/3] refactor: instead of a hardcoded path, use the `-r` when creating a relative link --- build/resources/rpm/SPECS/build.spec | 2 +- build/scripts/package.linux.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index ba47aed4..289cbe39 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -19,7 +19,7 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/usr/share/applications mkdir -p %{buildroot}/usr/share/icons cp -f ../../../SourceGit/* %{buildroot}/opt/sourcegit/ -ln -sf ../../opt/sourcegit/sourcegit %{buildroot}/%{_bindir} +ln -rsf %{buildroot}/opt/sourcegit/sourcegit %{buildroot}/%{_bindir} cp -r ../../_common/applications %{buildroot}/%{_datadir} cp -r ../../_common/icons %{buildroot}/%{_datadir} chmod 755 -R %{buildroot}/opt/sourcegit diff --git a/build/scripts/package.linux.sh b/build/scripts/package.linux.sh index 04309018..5eceffd6 100755 --- a/build/scripts/package.linux.sh +++ b/build/scripts/package.linux.sh @@ -60,7 +60,7 @@ mkdir -p resources/deb/usr/bin mkdir -p resources/deb/usr/share/applications mkdir -p resources/deb/usr/share/icons cp -f SourceGit/* resources/deb/opt/sourcegit -ln -sf ../../opt/sourcegit/sourcegit resources/deb/usr/bin +ln -rsf resources/deb/opt/sourcegit/sourcegit resources/deb/usr/bin cp -r resources/_common/applications resources/deb/usr/share cp -r resources/_common/icons resources/deb/usr/share sed -i -e "s/^Version:.*/Version: $VERSION/" -e "s/^Architecture:.*/Architecture: $arch/" resources/deb/DEBIAN/control