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

build: error: line 73: unclosed macro or bad line continuation (broken spectool) #175

Closed
ignatenkobrain opened this issue Mar 11, 2017 · 1 comment

Comments

@ignatenkobrain
Copy link
Contributor

92a8bab is the first bad commit

commit 92a8babf1b46fa40a57a0e807f949f2c0f186435
Author: Lubos Kardos <lkardos@redhat.com>
Date:   Fri Mar 11 16:43:35 2016 +0100

    Remove hopefully the last static buffer in rpm spec reading

:040000 040000 c14ffd93afc3abe8bdc34704aa914e46148def34 19759b1dbc311d12ca925ed6600114c7f0643741 M	build

/tmp/spectool_fQs3skf_Bh/spec_I_wGNXlg5X:


# RPM conditionals quirk
%undefine defined
%undefine undefined
%undefine with
%undefine without
%undefine bcond_with
%undefine bcond_without
%define defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
%define undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

%global modname git
%global srcname GitPython

Name:           %{srcname}
Version:        2.1.3
Release:        1%{?dist}
Summary:        Python Git Library

License:        BSD
URL:            https://github.com/gitpython-developers/GitPython
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz


%global _description \
GitPython is a python library used to interact with git repositories,\
high-level like git-porcelain, or low-level like git-plumbing.\
\
It provides abstractions of git objects for easy access of repository data,\
and additionally allows you to access the git repository more directly using\
either a pure python implementation, or the faster, but more resource\
intensive git command implementation.\
\
The object database implementation is optimized for handling large quantities\
of objects and large datasets, which is achieved by using\
low-level structures and data streaming.

Group: spectool
%description
%prep
cat << \EOF_/tmp/spectool_fQs3skf_Bh/spec_I_wGNXlg5X
Group: spectool
%global modname git
%global srcname GitPython

Name:           %{srcname}
Version:        2.1.3
Release:        1%{?dist}
Summary:        Python Git Library

License:        BSD
URL:            https://github.com/gitpython-developers/GitPython
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz


%global _description \
GitPython is a python library used to interact with git repositories,\
high-level like git-porcelain, or low-level like git-plumbing.\
\
It provides abstractions of git objects for easy access of repository data,\
and additionally allows you to access the git repository more directly using\
either a pure python implementation, or the faster, but more resource\
intensive git command implementation.\
\
The object database implementation is optimized for handling large quantities\
of objects and large datasets, which is achieved by using\
low-level structures and data streaming.

EOF_/tmp/spectool_fQs3skf_Bh/spec_I_wGNXlg5X

$ rpmbuild --define '_topdir /tmp/spectool_fQs3skf_Bh' --define '_sourcedir /tmp/spectool_fQs3skf_Bh' --define '_builddir /tmp/spectool_fQs3skf_Bh' --define '_srcrpmdir /tmp/spectool_fQs3skf_Bh' --define '_rpmdir /tmp/spectool_fQs3skf_Bh' --nodeps -bp /tmp/spectool_fQs3skf_Bh/spec_I_wGNXlg5X

Before

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8yo9LE
+ umask 022
+ cd /tmp/spectool_fQs3skf_Bh
/var/tmp/rpm-tmp.8yo9LE: line 44: warning: here-document at line 30 delimited by end-of-file (wanted `EOF_/tmp/spectool_fQs3skf_Bh/spec_I_wGNXlg5X')
+ cat
Group: spectool

Name:           GitPython
Version:        2.1.3
Release:        1.fc27
Summary:        Python Git Library

License:        BSD
URL:            https://github.com/gitpython-developers/GitPython
Source0:        https://github.com/gitpython-developers/GitPython/archive/2.1.3/GitPython-2.1.3.tar.gz



EOF_/tmp/spectool_fQs3skf_Bh/spec_I_wGNXlg5Xexit 0

After

error: line 73: unclosed macro or bad line continuation
@glebfm
Copy link
Contributor

glebfm commented Mar 13, 2017

Looks like spectool doesn't add a newline in the end of file.
Current fgetc approach expects '\n' in the end of every line.

I propose to switch to getline(3): http://lists.rpm.org/pipermail/rpm-maint/2017-March/005241.html

@ffesti ffesti closed this as completed in aeb58f6 Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants