From c2325fa2f3d9f7a3a190d06e2012917d666519e4 Mon Sep 17 00:00:00 2001 From: canxin121 Date: Wed, 31 Jul 2024 10:55:42 +0800 Subject: [PATCH 1/2] [Fix] bypass rpmbuild ln error. --- .../lib/src/makers/rpm/make_rpm_config.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart index 87a8381c..da2d2910 100644 --- a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart +++ b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart @@ -35,6 +35,9 @@ class MakeRPMConfig extends MakeConfig { this.defattr, this.attr, this.changelog, + + // RPM ln bug fix + this.packageName, }); factory MakeRPMConfig.fromJson(Map json) { @@ -68,6 +71,7 @@ class MakeRPMConfig extends MakeConfig { defattr: json['defattr'] as String?, attr: json['attr'] as String?, changelog: json['changelog'] as String?, + packageName: json['package_name'] as String?, ); } @@ -102,6 +106,8 @@ class MakeRPMConfig extends MakeConfig { String? defattr; String? attr; String? changelog; + //RPM ln bug fix + String? packageName; @override Map toJson() { @@ -132,7 +138,7 @@ class MakeRPMConfig extends MakeConfig { 'mkdir -p %{buildroot}%{_datadir}/metainfo', 'mkdir -p %{buildroot}%{_datadir}/pixmaps', 'cp -r %{name}/* %{buildroot}%{_datadir}/%{name}', - 'ln -s %{_datadir}/%{name}/%{name} %{buildroot}%{_bindir}/%{name}', + 'ln -s %{_datadir}/%{name}/${packageName ?? "%{name}"} %{buildroot}%{_bindir}/%{name}', 'cp -r %{name}.desktop %{buildroot}%{_datadir}/applications', 'cp -r %{name}.png %{buildroot}%{_datadir}/pixmaps', 'cp -r %{name}*.xml %{buildroot}%{_datadir}/metainfo || :', From d9fd476f557a23220450ce7cc372d307aec046dc Mon Sep 17 00:00:00 2001 From: canxin121 Date: Wed, 31 Jul 2024 11:20:52 +0800 Subject: [PATCH 2/2] [Change] change the field to 'bin_name' --- .../lib/src/makers/rpm/make_rpm_config.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart index da2d2910..df536ecc 100644 --- a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart +++ b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart @@ -37,7 +37,7 @@ class MakeRPMConfig extends MakeConfig { this.changelog, // RPM ln bug fix - this.packageName, + this.binName, }); factory MakeRPMConfig.fromJson(Map json) { @@ -71,7 +71,7 @@ class MakeRPMConfig extends MakeConfig { defattr: json['defattr'] as String?, attr: json['attr'] as String?, changelog: json['changelog'] as String?, - packageName: json['package_name'] as String?, + binName: json['bin_name'] as String?, ); } @@ -107,7 +107,7 @@ class MakeRPMConfig extends MakeConfig { String? attr; String? changelog; //RPM ln bug fix - String? packageName; + String? binName; @override Map toJson() { @@ -138,7 +138,7 @@ class MakeRPMConfig extends MakeConfig { 'mkdir -p %{buildroot}%{_datadir}/metainfo', 'mkdir -p %{buildroot}%{_datadir}/pixmaps', 'cp -r %{name}/* %{buildroot}%{_datadir}/%{name}', - 'ln -s %{_datadir}/%{name}/${packageName ?? "%{name}"} %{buildroot}%{_bindir}/%{name}', + 'ln -s %{_datadir}/%{name}/${binName ?? "%{name}"} %{buildroot}%{_bindir}/%{name}', 'cp -r %{name}.desktop %{buildroot}%{_datadir}/applications', 'cp -r %{name}.png %{buildroot}%{_datadir}/pixmaps', 'cp -r %{name}*.xml %{buildroot}%{_datadir}/metainfo || :',