Skip to content

Commit 41395f3

Browse files
rockdrillahnyman
authored andcommitted
shadow: adjust with glibc and libcrypt-compat
glibc 2.39 has removed libcrypt completely. solution: link against libxcrypt built with glibc compatibility. Signed-off-by: Konstantin Demin <[email protected]>
1 parent ef3b572 commit 41395f3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

utils/shadow/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ PKG_CPE_ID:=cpe:/a:debian:shadow
2222

2323
PKG_INSTALL:=1
2424
PKG_BUILD_PARALLEL:=1
25-
PKG_BUILD_DEPENDS:=libxcrypt
25+
PKG_BUILD_DEPENDS:=USE_MUSL:libxcrypt
2626

2727
include $(INCLUDE_DIR)/package.mk
2828
include $(INCLUDE_DIR)/nls.mk
2929

30+
ifneq ($(CONFIG_USE_MUSL),)
31+
#hack to get libxcrypt working
32+
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/libxcrypt $(TARGET_LDFLAGS)
33+
endif
34+
3035
# getsubids wants libsubid.so.5
3136
SHADOW_APPLETS := \
3237
chage chfn chgpasswd chpasswd chsh expiry faillog gpasswd \
@@ -101,7 +106,7 @@ Package/shadow-utils/description = $(Package/shadow/description)
101106
define Package/shadow-common
102107
$(call Package/shadow/Default)
103108
TITLE:=Shared definitions for the PLD Linux shadow utilities
104-
DEPENDS:= libbsd $(ICONV_DEPENDS) $(INTL_DEPENDS)
109+
DEPENDS:= +USE_GLIBC:libcrypt-compat libbsd $(ICONV_DEPENDS) $(INTL_DEPENDS)
105110
HIDDEN:=1
106111
endef
107112

@@ -125,9 +130,6 @@ define Package/shadow-common/conffiles
125130
/etc/login.defs
126131
endef
127132

128-
#hack to get libxcrypt working
129-
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/libxcrypt $(TARGET_LDFLAGS)
130-
131133
define Package/shadow-common/install
132134
$(INSTALL_DIR) $(1)/etc
133135
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/

0 commit comments

Comments
 (0)