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

spec-cleaner destroys multiline %{expand: } macros #280

Closed
dcermak opened this issue Apr 28, 2020 · 4 comments
Closed

spec-cleaner destroys multiline %{expand: } macros #280

dcermak opened this issue Apr 28, 2020 · 4 comments
Assignees
Labels

Comments

@dcermak
Copy link
Contributor

dcermak commented Apr 28, 2020

I have tried to run spec-cleaner on a spec file that includes the following %{expand: } macro:

%global _description %{expand:
RStudio is an integrated development environment (IDE) for R. It includes a
console, syntax-highlighting editor that supports direct code execution, as
well as tools for plotting, history, debugging and workspace management.
}

Unfortunately spec-cleaner completely destroys the resulting spec file by splitting the first line from the rest.

The full spec file is this one: https://src.fedoraproject.org/rpms/rstudio/raw/master/f/rstudio.spec

@scarabeusiv
Copy link
Contributor

Feel free to improve the expand parsing.
This is really convluted way to do multiline declarations tbh... It should be something like

%define variable blablabla \
   blabla line2 \
   blabla line3

@scarabeusiv
Copy link
Contributor

You can prepare minimal testcase so we can have it in to observe the issue with CI.

@dcermak
Copy link
Contributor Author

dcermak commented Apr 28, 2020

This "spec file" triggers the issue:

Name:           rstudio

%global _description %{expand:
RStudio is an integrated development environment (IDE) for R. It includes a
console, syntax-highlighting editor that supports direct code execution, as
well as tools for plotting, history, debugging and workspace management.
}

%description %_description
This package provides common files for %{name}-desktop and %{name}-server.

spec-cleaner moves creates currently this output:

# spec file for package breaker
#
# Copyright (c) 2020 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/
#


%global _description %{expand:
Name:           rstudio
RStudio is an integrated development environment (IDE) for R. It includes a
console, syntax-highlighting editor that supports direct code execution, as
well as tools for plotting, history, debugging and workspace management.
}

%description %{_description}
This package provides common files for %{name}-desktop and %{name}-server.

%changelog

@scarabeusiv
Copy link
Contributor

I was more thinging about creating PR with the samples as inlined in https://github.com/rpm-software-management/spec-cleaner/blob/master/TESTSUITE.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants