Message ID | 1ea1494fd2e04444a28c851b0e911ef3e6b990ee.1725871687.git.tredaelli@redhat.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev] python: Avoid including generated files in dist tarball. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | fail | github build: failed |
On Mon, 9 Sep 2024 10:50:57 +0200 Timothy Redaelli <tredaelli@redhat.com> wrote: > Currently, two generated python files (dirs.py and version.py) are > included in dist tarball. > > Including dirs.py causes problems when a non-default value for prefixes are > specified in ./configure. > For example, ipsec cannot start if /usr/local is not used as prefix directory, > since dirs.py includes /usr/local. > > Including version.py causes problem when a non-default value for version > suffix is specified in ./configure, since the default one will be used instead. > > Fixes: 9e6d43ef3215 ("rhel: Make the version, displayed to the user, customizable.") > Reported-at: https://bugzilla.redhat.com/2055576 > > Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> > --- > python/automake.mk | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) make distcheck fails, so I'm sending a different approach Nacked-By: Timothy Redaelli <tredaelli@redhat.com>
diff --git a/python/automake.mk b/python/automake.mk index d0523870d..cf6b1f894 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -50,7 +50,6 @@ ovs_pyfiles = \ python/ovs/unixctl/client.py \ python/ovs/unixctl/server.py \ python/ovs/util.py \ - python/ovs/version.py \ python/ovs/vlog.py \ python/ovs/winutils.py @@ -80,7 +79,7 @@ EXTRA_DIST += \ # C extension support. EXTRA_DIST += python/ovs/_json.c -PYFILES = $(ovs_pyfiles) python/ovs/dirs.py python/setup.py $(ovstest_pyfiles) $(ovs_pytests) +PYFILES = $(ovs_pyfiles) python/setup.py $(ovstest_pyfiles) $(ovs_pytests) EXTRA_DIST += $(PYFILES) PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover) @@ -124,12 +123,14 @@ install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local ovs-uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py + rm -f $(DESTDIR)$(pkgdatadir)/python/ovs/version.py ALL_LOCAL += $(srcdir)/python/ovs/version.py $(srcdir)/python/ovs/version.py: config.status $(AM_V_GEN)$(ro_shell) > $(@F).tmp && \ echo 'VERSION = "$(VERSION)$(VERSION_SUFFIX)"' >> $(@F).tmp && \ if cmp -s $(@F).tmp $@; then touch $@; else cp $(@F).tmp $@; fi; rm $(@F).tmp +CLEANFILES += python/ovs/version.py ALL_LOCAL += $(srcdir)/python/ovs/dirs.py $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template
Currently, two generated python files (dirs.py and version.py) are included in dist tarball. Including dirs.py causes problems when a non-default value for prefixes are specified in ./configure. For example, ipsec cannot start if /usr/local is not used as prefix directory, since dirs.py includes /usr/local. Including version.py causes problem when a non-default value for version suffix is specified in ./configure, since the default one will be used instead. Fixes: 9e6d43ef3215 ("rhel: Make the version, displayed to the user, customizable.") Reported-at: https://bugzilla.redhat.com/2055576 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> --- python/automake.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)