[Debian-med-packaging] libroadrunner: .gitattributes prevents gbp import-orig from importing original files

Andreas Tille andreas at an3as.eu
Wed Feb 1 12:36:41 UTC 2017


Hi,

I have just created the packaging git[1] via

   mkdir libroadrunner
   cd libroadrunner
   git init
   gbp import-orig --pristine-tar ../libroadrunner_1.4.8.orig.tar.gz

and added some debian/ dir.  When trying `gbp buildpackage` the original
tarball is reproduced correctly but I get

...
 libroadrunner-1.4.8/source/testing/run_cpp_tests.bat
 libroadrunner-1.4.8/source/testing/run_cpp_tests.sh
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/libroadrunner_1.4.8-1.diff.4FVHiE
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-buildpackage: error: dpkg-source -i.git -I.git -b libroadrunner-1.4.8 gave error exit status 2
gbp:error: '~/bin/git-pbuilder' failed: it exited with 2

After checking for example

   source/testing/run_cpp_tests.sh

I agree with dpkg-buildpackage that the file has changed - it was
converted to UNIX line endings instead of the DOS ones.

When checking I noticed that upstream tarball contains a file

   .gitattributes

containing things like

# Set the deifault behavior, in case people don't have core.autocrlf set.
*        text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.

# C/C++
*.c      text
*.cpp    text
...

so this file instructs Git to do what I observed - but this is wrong for
gbp since it just leaves you with a broken repository which is not ready
for building a package.

My question is:  Is there any obvious workaround I'm just missing?  I
was checking out the upstream branch, removed .gitattributes, copied
all files from tarball and commited these, restored .gitattributes and
merged the changes into the master branch.

I could imagine simply removing .gitattributes from the upstream tarball
(OK, I could ask upstream to do so for sure) but changing the upstream
tarball just for doing this does not seem to be the best idea either.

Both methods are somehow leading to a working repository - but is there
any better way for this?

Kind regards

       Andreas.


[1] https://anonscm.debian.org/git/debian-med/libroadrunner.git

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list