Bug 1317084

Summary: keepass: FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Peter Oliver <mavit>
Component: grepAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: chkr, claudiorodrigo, itamar, jskarvad, jusansa1, lkundrak, lxtnow, mavit, mike, paul, pokorra.mailinglists
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: https://apps.fedoraproject.org/koschei/package/keepass
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-21 12:18:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Oliver 2016-03-11 22:50:20 UTC
Description of problem:
Package keepass fails to build from source in rawhide.

Version-Release number of selected component (if applicable):
2.31-2.fc24

Steps to Reproduce:
koji build --scratch f25 keepass-2.31-2.fc24.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://apps.fedoraproject.org/koschei/package/keepass

Comment 1 Peter Oliver 2016-03-11 22:59:46 UTC
This fails with the following error:

+ xbuild /target:KeePass /property:Configuration=Release
XBuild Engine Version 14.0
Mono, Version 4.3.2.0
Copyright (C) 2005-2013 Various Mono authors

Build started 03/11/2016 22:44:27.
__________________________________________________
/builddir/build/BUILD/keepass-2.31/KeePass.sln:  warning : /builddir/build/BUILD/keepass-2.31/KeePass/KeePass.csproj: Data at the root level is invalid. Line 1, position 1.
Project "/builddir/build/BUILD/keepass-2.31/KeePass.sln" (KeePass target(s)):
        Target ValidateSolutionConfiguration:
                Building solution configuration "Release|Mixed Platforms".
        Target KeePass:
/builddir/build/BUILD/keepass-2.31/KeePass/KeePass.csproj: error : /builddir/build/BUILD/keepass-2.31/KeePass/KeePass.csproj: Data at the root level is invalid. Line 1, position 1.
        Task "MSBuild" execution -- FAILED
        Done building target "KeePass" in project "/builddir/build/BUILD/keepass-2.31/KeePass.sln".-- FAILED
Done building project "/builddir/build/BUILD/keepass-2.31/KeePass.sln".-- FAILED

Build FAILED.

Warnings:

/builddir/build/BUILD/keepass-2.31/KeePass.sln:  warning : /builddir/build/BUILD/keepass-2.31/KeePass/KeePass.csproj: Data at the root level is invalid. Line 1, position 1.

Errors:

/builddir/build/BUILD/keepass-2.31/KeePass.sln (KeePass) ->
(KeePass target) ->

        /builddir/build/BUILD/keepass-2.31/KeePass/KeePass.csproj: error : /builddir/build/BUILD/keepass-2.31/KeePass/KeePass.csproj: Data at the root level is invalid. Line 1, position 1.

         1 Warning(s)
         1 Error(s)

Time Elapsed 00:00:00.2516390




Here, xbuild is failing because the .csproj file starts with a UTF-8 byte order mark.  I have worked around the problem by removing the BOM prior to building.

The seems to have been failing since the F24 mass rebuild.  See https://apps.fedoraproject.org/koschei/build/1372897 for a list of dependencies that changed.  Curiously, there don't appear to have been any significant changes in the mono package between the working build and the failing build, so presumably the problem must have been caused by a change in a mono dependency.

Comment 2 Timotheus Pokorra 2016-03-12 15:06:41 UTC
I can reproduce this in Rawhide.

I tried to reproduce it with the Mono 4.3.2.467 packages from Xamarin on Fedora 23, but that succeeded.

So I think it is not a Mono 4.3.2.467 error.

I see the failed koschei build even happened on Fedora 24, with Mono 4.2.2-3.fc24.

I checked the list of changed packages. There are some packages that have a change in release number. eg bash, nss, python2-setuptools and python3-setuptools, pcre-devel, grep, cups-libs and probably more.

Wait a second. I just cat the file /root/rpmbuild/BUILD/keepass-2.32/KeePass/KeePass.csproj and it says:

Binary file (standard input) matches

This error points to grep!

Ok, the problem is in BUILD/keepass-2.32/Build/PrepMonoDev.sh
the line with this content:
cat ../KeePass/KeePass.csproj.new2 | grep -v 'sgen\.exe' > ../KeePass/KeePass.csproj

I can reproduce this outside of rpmbuild:
cat /root/rpmbuild/BUILD/keepass-2.32/KeePass/KeePass.csproj | grep -v 'sgen\.exe'

file /root/rpmbuild/BUILD/keepass-2.32/KeePass/KeePass.csproj shows:
/root/rpmbuild/BUILD/keepass-2.32/KeePass/KeePass.csproj: UTF-8 Unicode (with BOM) text, with CRLF line terminators

Comment 3 Mike Goodwin 2016-04-19 15:41:52 UTC
Is this still holding up keepass from being updated to 2.32? 

I was going to file a bug for a version bump but this came up and now I'm not sure if I should.

Comment 4 Peter Oliver 2016-04-19 21:15:17 UTC
(In reply to Mike Goodwin from comment #3)
> Is this still holding up keepass from being updated to 2.32? 

No, we can work around the problem by removing the BOM before building.

> I was going to file a bug for a version bump but this came up and now I'm
> not sure if I should.

Keepass 2.32 will be included in Fedora 24, due for release in early June.

Comment 5 Jaroslav Škarvada 2016-04-19 21:29:53 UTC
Sorry, what's the grep bug?

Comment 6 Peter Oliver 2016-05-21 12:18:14 UTC
This seems to be https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23234, which was fixed in grep 2.25.