diff mbox series

[ovs-dev] python: don't ship dirs.py in tarball

Message ID 98261e51f50ced45e2071e1fd47e419e59f5e8fb.1648230990.git.tredaelli@redhat.com
State Changes Requested
Headers show
Series [ovs-dev] python: don't ship dirs.py in tarball | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Timothy Redaelli March 25, 2022, 5:56 p.m. UTC
Currently dirs.py is included in released tarball (make dist), but it
should be generated during build, since it includes the prefix that may
change by configure --prefix and other options.

This commit removes dirs.py from EXTRA_DIST so it's not included in
released tarball (make dist).

Reported-at: https://bugzilla.redhat.com/2055576
Fixes: 943c4a325045 ("python: set ovs.dirs variables with build system values")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 python/automake.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ilya Maximets March 28, 2022, 2:38 p.m. UTC | #1
On 3/25/22 18:56, Timothy Redaelli wrote:
> Currently dirs.py is included in released tarball (make dist), but it
> should be generated during build, since it includes the prefix that may
> change by configure --prefix and other options.
> 
> This commit removes dirs.py from EXTRA_DIST so it's not included in
> released tarball (make dist).
> 
> Reported-at: https://bugzilla.redhat.com/2055576
> Fixes: 943c4a325045 ("python: set ovs.dirs variables with build system values")
> 
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
>  python/automake.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Hi, Timothy.  Thanks for the patches!

The change itself looks OK to me, but it seems that it uncovers
some other dependency issue that leads to a broken 'make distcheck'
target:

make[1]: Entering directory '/ovs/openvswitch-2.17.90/_build/sub'
sed -f ../../build-aux/extract-odp-netlink-h < ../../datapath/linux/compat/include/linux/openvswitch.h > include/odp-netlink.h
sed \
        -e '/^##/d' \
        -e 's,[@]pkgdatadir[@],/ovs/openvswitch-2.17.90/_inst/share/openvswitch,g' \
        -e 's,[@]RUNDIR[@],/ovs/openvswitch-2.17.90/_inst/var/run/openvswitch,g' \
        -e 's,[@]LOGDIR[@],/ovs/openvswitch-2.17.90/_inst/var/log/openvswitch,g' \
        -e 's,[@]bindir[@],/ovs/openvswitch-2.17.90/_inst/bin,g' \
        -e 's,[@]sysconfdir[@],/ovs/openvswitch-2.17.90/_inst/etc,g' \
        -e 's,[@]DBDIR[@],/ovs/openvswitch-2.17.90/_inst/etc/openvswitch,g' \
        <  ../../python/ovs/dirs.py.template > ../../python/ovs/dirs.py.tmp && \
mv ../../python/ovs/dirs.py.tmp ../../python/ovs/dirs.py
/bin/sh: line 2: ../../python/ovs/dirs.py.tmp: Permission denied
make[1]: *** [Makefile:7320: ../../python/ovs/dirs.py] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/ovs/openvswitch-2.17.90/_build/sub'
make: *** [Makefile:5629: distcheck] Error 1

And the second patch you sent hits exactly the same problem.

Could you, please, take a look?

Best regards, Ilya Maximets.


> diff --git a/python/automake.mk b/python/automake.mk
> index 767512f17..c32ac3b6a 100644
> --- a/python/automake.mk
> +++ b/python/automake.mk
> @@ -42,6 +42,9 @@ ovs_pyfiles = \
>  	python/ovs/version.py \
>  	python/ovs/vlog.py \
>  	python/ovs/winutils.py
> +
> +EXTRA_DIST += $(ovs_pyfiles) $(ovstest_pyfiles)
> +
>  # These python files are used at build time but not runtime,
>  # so they are not installed.
>  EXTRA_DIST += \
> @@ -59,7 +62,6 @@ EXTRA_DIST += \
>  EXTRA_DIST += python/ovs/_json.c
>  
>  PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles)
> -EXTRA_DIST += $(PYFILES)
>  PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover)
>  
>  FLAKE8_PYFILES += \
diff mbox series

Patch

diff --git a/python/automake.mk b/python/automake.mk
index 767512f17..c32ac3b6a 100644
--- a/python/automake.mk
+++ b/python/automake.mk
@@ -42,6 +42,9 @@  ovs_pyfiles = \
 	python/ovs/version.py \
 	python/ovs/vlog.py \
 	python/ovs/winutils.py
+
+EXTRA_DIST += $(ovs_pyfiles) $(ovstest_pyfiles)
+
 # These python files are used at build time but not runtime,
 # so they are not installed.
 EXTRA_DIST += \
@@ -59,7 +62,6 @@  EXTRA_DIST += \
 EXTRA_DIST += python/ovs/_json.c
 
 PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles)
-EXTRA_DIST += $(PYFILES)
 PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover)
 
 FLAKE8_PYFILES += \