[ovs-dev] [PATCH] build: fix rpm-fedora target breakage

Ben Pfaff blp at ovn.org
Thu Dec 1 17:57:23 UTC 2016


On Thu, Dec 01, 2016 at 09:58:10AM +0000, Stephen Finucane wrote:
> On Wed, 2016-11-30 at 20:56 -0800, Ben Pfaff wrote:
> > On Wed, Nov 30, 2016 at 10:57:25PM -0500, Lance Richardson wrote:
> > > Since commit 3deca69b08f2 ("doc: Convert AUTHORS to rST"), the rpm-
> > > fedora
> > > target fails to build with:
> > > 
> > >   *** No rule to make target `AUTHORS.rst', needed by
> > > `debian/copyright'.
> > > 
> > > Fix by adding AUTHORS.rst to the docs list to ensure that it is
> > > included in the dist archive.
> > > 
> > > Fixes: 3deca69b08f2 ("doc: Convert AUTHORS to rST")
> > > Signed-off-by: Lance Richardson <lrichard at redhat.com>
> > 
> > Not just that target, the regular old build actually fails with:
> > 
> >     The following files are in git but not the distribution:
> >     AUTHORS.rst
> > 
> > as long OVS was checked out of Git, anyway.
> > 
> > Either way, I applied this to master, and thanks for the fix.
> 
> Sorry for missing this - I can't run 'make distcheck' on my machine as
> it throws obscure "Permission denied" errors that I haven't been able
> to suss out yet. 

This particular error comes from plain "make", not "make check" or "make
distcheck".  It's emitted by this chunk of Makefile.am.  You don't see
it?  Maybe the code in the makefile needs some improvement.

    # If we're checked out from a Git repository, make sure that every
    # file that is in Git is distributed.
    #
    # We only enable this check when GNU make is in use because the
    # Makefile in datapath/linux, needed to get the list of files to
    # distribute, requires GNU make extensions.
    if GNU_MAKE
    ALL_LOCAL += dist-hook-git
    dist-hook-git: distfiles
            @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
              (cd datapath && $(MAKE) distfiles);				    \
              (cat distfiles; sed 's|^|datapath/|' datapath/distfiles) |	    \
                LC_ALL=C sort -u > all-distfiles;				    \
              (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' |	    \
                LC_ALL=C sort -u > all-gitfiles;				    \
              LC_ALL=C comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \
              if test -s missing-distfiles; then				    \
                echo "The following files are in git but not the distribution:"; \
                cat missing-distfiles;					    \
                exit 1;							    \
              fi;								    \
            fi
    CLEANFILES += all-distfiles all-gitfiles missing-distfiles
    # The following is based on commands for the Automake "distdir" target.
    distfiles: Makefile
            @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
            topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
            list='$(DISTFILES)'; \
            for file in $$list; do echo $$file; done | \
              sed -e "s|^$$srcdirstrip/||;t" \
                  -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | \
              LC_ALL=C sort -u > $@
    CLEANFILES += distfiles
    endif
    .PHONY: dist-hook-git

> Out of curiosity though, why did 'AUTHORS' (sans 'rst' suffix) not
> need to be tracked? Some form of Autotools magic?

Automake always distributes AUTHORS because the GNU standards say that
it should exist.


More information about the dev mailing list