Message ID | 20240419213216.518041-3-angelo.compagnucci@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Fix fail2ban | expand |
Am 19.04.24 um 23:32 schrieb Angelo Compagnucci: > When installing a wheel in pep517 compatibility mode, the pyinstaller.py is > invoked with the --data parameter which point to the directory in which data > files should be installed. > Actually the --data parameter points to the /usr subdirectory which is indeed > wrong cause it shall point to the root directory where the wheel will be > installed. > This fixes the problem of having configuration files installed in /usr/etc > instead of /etc. > > Fixes: > http://autobuild.buildroot.net/results/36ac5278d19195a21c3d02d087965e08f49228ef > > Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> Tested-by: Fiona Klute <fiona.klute+wiwa@gmx.de> Testing included: Build for aarch64, configuring fail2ban for sshd, testing that a host indeed gets banned after repeated failed login attempts (password auth), with syslog-ng (the default fail2ban patterns don't work with Busybox syslogd) and nftables. > --- > package/pkg-python.mk | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/package/pkg-python.mk b/package/pkg-python.mk > index 839f728e2f..4f9bee4b90 100644 > --- a/package/pkg-python.mk > +++ b/package/pkg-python.mk > @@ -70,7 +70,7 @@ PKG_PYTHON_PEP517_INSTALL_TARGET_CMD = \ > --purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \ > --headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \ > --scripts=$(TARGET_DIR)/usr/bin \ > - --data=$(TARGET_DIR)/usr > + --data=$(TARGET_DIR) > > PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \ > $(TOPDIR)/support/scripts/pyinstaller.py \ > @@ -79,7 +79,7 @@ PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \ > --purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \ > --headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \ > --scripts=$(STAGING_DIR)/usr/bin \ > - --data=$(STAGING_DIR)/usr > + --data=$(STAGING_DIR) > > PKG_PYTHON_PEP517_DEPENDENCIES = \ > host-python-pypa-build \
diff --git a/package/pkg-python.mk b/package/pkg-python.mk index 839f728e2f..4f9bee4b90 100644 --- a/package/pkg-python.mk +++ b/package/pkg-python.mk @@ -70,7 +70,7 @@ PKG_PYTHON_PEP517_INSTALL_TARGET_CMD = \ --purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \ --headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \ --scripts=$(TARGET_DIR)/usr/bin \ - --data=$(TARGET_DIR)/usr + --data=$(TARGET_DIR) PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \ $(TOPDIR)/support/scripts/pyinstaller.py \ @@ -79,7 +79,7 @@ PKG_PYTHON_PEP517_INSTALL_STAGING_CMD = \ --purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \ --headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \ --scripts=$(STAGING_DIR)/usr/bin \ - --data=$(STAGING_DIR)/usr + --data=$(STAGING_DIR) PKG_PYTHON_PEP517_DEPENDENCIES = \ host-python-pypa-build \
When installing a wheel in pep517 compatibility mode, the pyinstaller.py is invoked with the --data parameter which point to the directory in which data files should be installed. Actually the --data parameter points to the /usr subdirectory which is indeed wrong cause it shall point to the root directory where the wheel will be installed. This fixes the problem of having configuration files installed in /usr/etc instead of /etc. Fixes: http://autobuild.buildroot.net/results/36ac5278d19195a21c3d02d087965e08f49228ef Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com> --- package/pkg-python.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)