Bug 1564881

Summary: header files seem to be in btrfs/btrfs/ for rawhide
Product: [Fedora] Fedora Reporter: Lokesh Mandvekar <lsm5>
Component: btrfs-progsAssignee: Josef Bacik <josef>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: esandeen, josef, mmahut
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-08 22:30:23 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:

Description Lokesh Mandvekar 2018-04-08 15:45:45 UTC
Description of problem:

With btrfs-progs-4.16-1.fc29.x86_64, I notice that header files are now in /usr/include/btrfs/btrfs/ . Is this intentional?
Just that while building the skopeo package, if I replace btrfs/blah.h with btrfs/btrfs/blah.h in the vendored Go files, I end up with:

# github.com/containers/storage/drivers/btrfs
In file included from vendor/src/github.com/containers/storage/drivers/btrfs/btrfs.go:9:
/usr/include/btrfs/btrfs/ctree.h:33:10: fatal error: btrfs/list.h: No such file or directory
 #include <btrfs/list.h>
          ^~~~~~~~~~~~~~
compilation terminated.

Comment 1 Eric Sandeen 2018-04-08 17:14:13 UTC
A recent upstream commit (502e2a3510) did this under the install target:

@@ -579,8 +609,9 @@ install: $(libs) $(progs_install) $(INSTALLDIRS)
        $(INSTALL) -m755 -d $(DESTDIR)$(libdir)
        $(INSTALL) $(libs) $(DESTDIR)$(libdir)
        cp -a $(lib_links) $(DESTDIR)$(libdir)
-       $(INSTALL) -m755 -d $(DESTDIR)$(incdir)
-       $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir)
+       $(INSTALL) -m755 -d $(DESTDIR)$(incdir)/btrfs
+       $(INSTALL) -m644 $(libbtrfs_headers) $(DESTDIR)$(incdir)/btrfs
+       $(INSTALL) -m644 libbtrfsutil/btrfsutil.h $(DESTDIR)$(incdir)

so it added the extra /btrfs to the destination, and previously I had needed to add a btrfs/ prefix to incdir in the spec file ... 

I'll remove that and it shoulds be back to normal.  If that doesn't work I'll dig into it more.  Should be built in rawhide shortly.

Comment 2 Lokesh Mandvekar 2018-04-08 20:32:02 UTC
Awesome, thanks for the quick fix Eric!!