Merge pull request #12577 from neheb/shado
added libxcrypt and used for shadow-utils
This commit is contained in:
commit
8873f055d4
2 changed files with 61 additions and 10 deletions
55
libs/libxcrypt/Makefile
Normal file
55
libs/libxcrypt/Makefile
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libxcrypt
|
||||||
|
PKG_VERSION:=4.4.16
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/besser82/libxcrypt/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=a98f65b8baffa2b5ba68ee53c10c0a328166ef4116bce3baece190c8ce01f375
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=
|
||||||
|
PKG_LICENSE:=LGPL-2.1-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING.LIB
|
||||||
|
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/libxcrypt
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
URL:=https://github.com/besser82/libxcrypt
|
||||||
|
TITLE:=Extended crypt library
|
||||||
|
BUILDONLY:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libxcrypt/description
|
||||||
|
libxcrypt is a modern library for one-way hashing of passwords. It supports
|
||||||
|
a wide variety of both modern and historical hashing methods: yescrypt,
|
||||||
|
gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5,
|
||||||
|
sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. It provides the traditional
|
||||||
|
Unix crypt and crypt_r interfaces, as well as a set of extended interfaces
|
||||||
|
pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt,
|
||||||
|
crypt_gensalt_rn, and crypt_gensalt_ra.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-failure-tokens \
|
||||||
|
--disable-xcrypt-compat-files \
|
||||||
|
--disable-obsolete-api \
|
||||||
|
--enable-hashes=solaris
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/libxcrypt
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrypt.{a,la} $(1)/usr/lib/libxcrypt
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*crypt.pc $(1)/usr/lib/pkgconfig/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,libxcrypt))
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=shadow
|
PKG_NAME:=shadow
|
||||||
PKG_VERSION:=4.8.1
|
PKG_VERSION:=4.8.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION)
|
||||||
|
@ -22,6 +22,7 @@ PKG_CPE_ID:=cpe:/a:debian:shadow
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_BUILD_DEPENDS:=libxcrypt
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
@ -41,7 +42,7 @@ CONFIGURE_ARGS += \
|
||||||
--without-attr \
|
--without-attr \
|
||||||
--without-tcb \
|
--without-tcb \
|
||||||
--without-nscd \
|
--without-nscd \
|
||||||
--with$(if $(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),,out)-bcrypt
|
--with-bcrypt
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
ac_cv_func_ruserok=no
|
ac_cv_func_ruserok=no
|
||||||
|
@ -124,19 +125,14 @@ define Package/shadow-common/conffiles
|
||||||
/etc/login.defs
|
/etc/login.defs
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
#hack to get libxcrypt working
|
||||||
|
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/libxcrypt $(TARGET_LDFLAGS)
|
||||||
|
|
||||||
define Package/shadow-common/install
|
define Package/shadow-common/install
|
||||||
$(INSTALL_DIR) $(1)/etc
|
$(INSTALL_DIR) $(1)/etc
|
||||||
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
|
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
|
||||||
$(SED) 's,SU_NAME,#SU_NAME,g' $(1)/etc/login.defs
|
$(SED) 's,SU_NAME,#SU_NAME,g' $(1)/etc/login.defs
|
||||||
ifeq ($(CONFIG_USE_MUSL),y)
|
|
||||||
ifeq ($(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),y)
|
|
||||||
$(SED) 's,#ENCRYPT_METHOD DES,ENCRYPT_METHOD BCRYPT,g' $(1)/etc/login.defs
|
$(SED) 's,#ENCRYPT_METHOD DES,ENCRYPT_METHOD BCRYPT,g' $(1)/etc/login.defs
|
||||||
else
|
|
||||||
$(SED) 's,#ENCRYPT_METHOD DES,ENCRYPT_METHOD MD5,g' $(1)/etc/login.defs
|
|
||||||
endif # CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK
|
|
||||||
else
|
|
||||||
$(SED) 's,#ENCRYPT_METHOD DES,ENCRYPT_METHOD SHA512,g' $(1)/etc/login.defs
|
|
||||||
endif # CONFIG_USE_MUSL
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/shadow-utils/install
|
define Package/shadow-utils/install
|
||||||
|
|
Loading…
Reference in a new issue