Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed RPM SPEC file Changelog not being read issue #236

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dart:io';

import 'package:intl/intl.dart';
import 'package:flutter_app_packager/src/api/app_package_maker.dart';

class MakeRPMConfig extends MakeConfig {
Expand Down Expand Up @@ -105,6 +105,9 @@ class MakeRPMConfig extends MakeConfig {

@override
Map<String, dynamic> toJson() {
DateTime now = DateTime.now();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly unnecessary duplicate variable? You could just use currentDate

Copy link

@MarkieMark MarkieMark Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or now even simpler :-) )

As for the cp error, it seems it just needs the ../ relative path adding to the cp commands; so that ll131-143 would read

'%install': [
            'mkdir -p %{buildroot}%{_bindir}',
            'mkdir -p %{buildroot}%{_datadir}/%{name}',
            'mkdir -p %{buildroot}%{_datadir}/applications',
            'mkdir -p %{buildroot}%{_datadir}/metainfo',
            'mkdir -p %{buildroot}%{_datadir}/pixmaps',
            'cp -r ../%{name}/* %{buildroot}%{_datadir}/%{name}',
            'ln -s %{_datadir}/%{name}/%{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 || :',
            'update-mime-database %{_datadir}/mime &> /dev/null || :',
            '%undefine __brp_add_determinism',
          ].join('\n'),

(including the %undefine that hangs); maybe you could please test whether that is a complete resolution of the regression for you as it seems it is for me?

String formattedDate = DateFormat('EEE MMM dd yyyy').format(now);
final rpmVersion = appVersion.toString();
return {
'SPEC': {
'preamble': {
Expand Down Expand Up @@ -150,6 +153,7 @@ class MakeRPMConfig extends MakeConfig {
'inline-body': {
'%defattr': '(-,root,root)',
'%attr': '(4755, root, root) %{_datadir}/pixmaps/%{name}.png',
'%changelog': '\n* $formattedDate $packager <$packagerEmail> - $rpmVersion\n- $changelog',
},
},
'DESKTOP': {
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_app_packager/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
pubspec_parse: ^1.1.0
shell_executor: ^0.1.6
yaml: ^3.1.0
intl: ^0.20.0

dev_dependencies:
dependency_validator: ^3.0.0
Expand Down