Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
From 7b5e0f0097faebdcc6a8b783237bbba7a983147a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Fri, 31 Mar 2023 14:52:19 +0200
|
||||
Subject: [PATCH] Use setuptools instead of distutils
|
||||
|
||||
distutils is removed from Python 3.12+:
|
||||
https://peps.python.org/pep-0632/
|
||||
|
||||
Upstream: https://github.com/libpwquality/libpwquality/commit/7b5e0f0097faebdcc6a8b783237bbba7a983147a
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
libpwquality.spec.in | 11 ++---------
|
||||
python/Makefile.am | 2 +-
|
||||
python/setup.py.in | 6 +++---
|
||||
3 files changed, 6 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/libpwquality.spec.in b/libpwquality.spec.in
|
||||
index 70a6f53..0809126 100644
|
||||
--- a/libpwquality.spec.in
|
||||
+++ b/libpwquality.spec.in
|
||||
@@ -33,9 +33,11 @@ BuildRequires: gettext
|
||||
BuildRequires: pam-devel
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-devel
|
||||
+BuildRequires: python2-setuptools
|
||||
%endif
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
+BuildRequires: python3-setuptools
|
||||
%endif
|
||||
|
||||
URL: https://github.com/libpwquality/libpwquality/
|
||||
@@ -103,15 +105,6 @@ cp -a . %{py3dir}
|
||||
pushd %{py3dir}
|
||||
%endif
|
||||
%if %{with python3}
|
||||
-# setuptools >= 60 changes the environment to use its bundled copy of distutils
|
||||
-# by default, not the Python-bundled one. To run the Python's standard library
|
||||
-# distutils, the environment variable must be set.
|
||||
-# Although technically setuptools is not needed for this package, if it's
|
||||
-# pulled by another package, it changes the environment and consequently,
|
||||
-# the build fails. This was reported in:
|
||||
-# https://github.com/pypa/setuptools/issues/3143
|
||||
-export SETUPTOOLS_USE_DISTUTILS=stdlib
|
||||
-
|
||||
%configure \
|
||||
--with-securedir=%{_moduledir} \
|
||||
--with-pythonsitedir=%{python3_sitearch} \
|
||||
diff --git a/python/Makefile.am b/python/Makefile.am
|
||||
index 1d00c0c..6e51744 100644
|
||||
--- a/python/Makefile.am
|
||||
+++ b/python/Makefile.am
|
||||
@@ -14,7 +14,7 @@ all-local:
|
||||
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
|
||||
|
||||
install-exec-local:
|
||||
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
|
||||
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix}
|
||||
|
||||
clean-local:
|
||||
rm -rf py$(PYTHONREV)
|
||||
diff --git a/python/setup.py.in b/python/setup.py.in
|
||||
index a741b91..f934c50 100755
|
||||
--- a/python/setup.py.in
|
||||
+++ b/python/setup.py.in
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
import os
|
||||
|
||||
-from distutils.core import setup, Extension
|
||||
-from distutils.command.build_ext import build_ext as _build_ext
|
||||
-from distutils.command.sdist import sdist as _sdist
|
||||
+from setuptools import setup, Extension
|
||||
+from setuptools.command.build_ext import build_ext as _build_ext
|
||||
+from setuptools.command.sdist import sdist as _sdist
|
||||
|
||||
def genconstants(headerfile, outputfile):
|
||||
hf = open(headerfile, 'r')
|
||||
20
package/libpwquality/Config.in
Normal file
20
package/libpwquality/Config.in
Normal file
@@ -0,0 +1,20 @@
|
||||
config BR2_PACKAGE_LIBPWQUALITY
|
||||
bool "libpwquality"
|
||||
select BR2_PACKAGE_CRACKLIB
|
||||
help
|
||||
This is a library for password quality checks and generation
|
||||
of random passwords that pass the checks. This library uses
|
||||
the cracklib and cracklib dictionaries to perform some of
|
||||
the checks.
|
||||
|
||||
https://github.com/libpwquality/libpwquality
|
||||
|
||||
if BR2_PACKAGE_LIBPWQUALITY
|
||||
|
||||
config BR2_PACKAGE_LIBPWQUALITY_TOOLS
|
||||
bool "install tools"
|
||||
help
|
||||
Install libpwquality command line tools generating/checking
|
||||
passwords.
|
||||
|
||||
endif
|
||||
3
package/libpwquality/libpwquality.hash
Normal file
3
package/libpwquality/libpwquality.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 6fcf18b75d305d99d04d2e42982ed5b787a081af2842220ed63287a2d6a10988 libpwquality-1.4.5.tar.bz2
|
||||
sha256 aa44d09f651bf99b56253187c7778a240740c767d28453ab7fdc9804c842baee COPYING
|
||||
46
package/libpwquality/libpwquality.mk
Normal file
46
package/libpwquality/libpwquality.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
#
|
||||
# libpwquality
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBPWQUALITY_VERSION = 1.4.5
|
||||
LIBPWQUALITY_SOURCE = libpwquality-$(LIBPWQUALITY_VERSION).tar.bz2
|
||||
LIBPWQUALITY_SITE = https://github.com/libpwquality/libpwquality/releases/download/libpwquality-$(LIBPWQUALITY_VERSION)
|
||||
LIBPWQUALITY_LICENSE = BSD-3-Clause or GPL-2.0+
|
||||
LIBPWQUALITY_INSTALL_STAGING = YES
|
||||
LIBPWQUALITY_DEPENDENCIES = cracklib
|
||||
LIBPWQUALITY_LICENSE_FILES = COPYING
|
||||
# We're patching python/Makefile.am
|
||||
LIBPWQUALITY_AUTORECONF = YES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
LIBPWQUALITY_CONF_OPTS += --enable-python-bindings
|
||||
LIBPWQUALITY_DEPENDENCIES += python3 host-python-setuptools
|
||||
LIBPWQUALITY_MAKE_ENV += $(PKG_PYTHON_SETUPTOOLS_ENV)
|
||||
else
|
||||
LIBPWQUALITY_CONF_OPTS += --disable-python-bindings
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
LIBPWQUALITY_CONF_OPTS += --enable-pam --with-securedir=/lib/security
|
||||
LIBPWQUALITY_DEPENDENCIES += linux-pam
|
||||
else
|
||||
LIBPWQUALITY_CONF_OPTS += --disable-pam
|
||||
endif
|
||||
|
||||
# Static link with cracklib requires -lz if zlib is enabled
|
||||
ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_ZLIB),yy)
|
||||
LIBPWQUALITY_CONF_ENV += LIBS="-lz"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBPWQUALITY_TOOLS),)
|
||||
define LIBPWQUALITY_REMOVE_TOOLS
|
||||
rm -f $(TARGET_DIR)/usr/bin/pwmake
|
||||
rm -f $(TARGET_DIR)/usr/bin/pwscore
|
||||
endef
|
||||
|
||||
LIBPWQUALITY_POST_INSTALL_TARGET_HOOKS += LIBPWQUALITY_REMOVE_TOOLS
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user