mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 15:02:01 +08:00
dc52894904
Large version jump from 4.8.1 to 4.19.4 (latest upstream LTS).
Build changes:
- Refresh patches/004-fix-su-controoling-term.patch: su.c moved the
ioctl() call from line 1122 to 1169 and changed (char *) 0 to
(char *) NULL; update patch context and re-canonicalise through
quilt (blank context line spacing).
- New CONFIGURE_ARGS:
* --disable-logind: 4.19.4 added an optional libsystemd-based
logind integration which OpenWrt doesn't ship.
* --without-libbsd: shadow's configure now hard-fails on missing
readpassphrase() unless libbsd is found; the in-tree
lib/readpassphrase.c fallback is enabled by --without-libbsd.
* --without-sssd: avoid dragging in an sssd build dep.
* --disable-subordinate-ids: 4.19.4 builds libsubid (subuid/subgid
runtime API) unconditionally when subids are enabled, and its
libtool -export-symbols-regex generates a version script that
binutils 2.40+ rejects against libxcrypt's versioned
crypt_checksalt@@XCRYPT_4.3 symbol. Disabling subordinate-ids
skips libsubid entirely; OpenWrt doesn't ship libsubid.
- Drop newgidmap, newuidmap, lastlog and groups from SHADOW_APPLETS:
newgidmap/newuidmap are only built when subordinate-ids are
enabled, lastlog defaults to disabled in 4.19.4, and the groups
binary was removed from shadow upstream (use coreutils).
Test coverage:
- Replace the per-applet --version check in test.sh with per-applet
functional tests:
pwck -> 'pwck -r' read-only consistency check; accept
non-zero exit since the CI container's /etc/passwd
trips minor warnings.
grpck -> 'grpck -r' read-only consistency check.
chage -> 'chage -l root' lists password aging info.
useradd -> 'useradd -D' dumps defaults without modifying state.
passwd -> 'passwd -S root' prints the password status line.
faillog -> create empty /var/log/faillog then 'faillog -a'
must emit a header line.
login/su -> PAM-interactive; presence covered by generic tests.
Other applets -> verify binary presence (CI's generic tests
already check stripped, no build paths, linked-libs).
- Add test-version.sh as a generic-version-check override: shadow
tools don't honour --version (only --help), so the framework's
probe finds no PKG_VERSION match in any binary and would otherwise
fail Generic tests for every sub-package.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
165 lines
3.9 KiB
Makefile
165 lines
3.9 KiB
Makefile
#
|
|
# Copyright (C) 2008-2015 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=shadow
|
|
PKG_VERSION:=4.19.4
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
PKG_SOURCE_URL:=https://github.com/shadow-maint/shadow/releases/download/$(PKG_VERSION)
|
|
PKG_HASH:=ce57a313e315a0a7cb04a8f50cc20753e994e487bbe9b78a2a824ca75cb486c0
|
|
|
|
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
|
|
PKG_LICENSE:=BSD-3-Clause
|
|
PKG_LICENSE_FILES:=COPYING
|
|
PKG_CPE_ID:=cpe:/a:debian:shadow
|
|
|
|
PKG_INSTALL:=1
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_BUILD_DEPENDS:=libxcrypt
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/nls.mk
|
|
|
|
SHADOW_APPLETS := \
|
|
chage chfn chgpasswd chpasswd chsh expiry faillog gpasswd \
|
|
groupadd groupdel groupmems groupmod grpck grpconv grpunconv \
|
|
login logoutd newgrp newusers nologin \
|
|
passwd pwck pwconv pwunconv su \
|
|
useradd userdel usermod vipw
|
|
|
|
CONFIGURE_ARGS += \
|
|
--without-audit \
|
|
--without-libpam \
|
|
--without-selinux \
|
|
--without-acl \
|
|
--without-attr \
|
|
--without-tcb \
|
|
--without-nscd \
|
|
--without-sssd \
|
|
--without-libbsd \
|
|
--disable-logind \
|
|
--disable-subordinate-ids \
|
|
--with-bcrypt
|
|
|
|
CONFIGURE_VARS += \
|
|
ac_cv_func_ruserok=no
|
|
|
|
define Package/shadow/Default
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
TITLE:=The PLD Linux shadow utilities
|
|
URL:=https://github.com/shadow-maint/shadow
|
|
endef
|
|
|
|
define Package/shadow
|
|
$(call Package/shadow/Default)
|
|
TITLE+= (all)
|
|
DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u))
|
|
HIDDEN:=1
|
|
endef
|
|
|
|
define Package/shadow/description
|
|
Full versions of standard shadow utilities. Normally, you would not
|
|
use this package, since the functionality in BusyBox is more than
|
|
sufficient and much smaller.
|
|
endef
|
|
|
|
define Package/shadow/install
|
|
true
|
|
endef
|
|
|
|
define Package/shadow-utils
|
|
$(call Package/shadow/Default)
|
|
endef
|
|
|
|
define Package/shadow-utils/config
|
|
menu "Select shadow utilities"
|
|
depends on PACKAGE_shadow-utils
|
|
|
|
config shadow-all
|
|
bool "Include all PLD shadow utilities"
|
|
select PACKAGE_shadow
|
|
default y
|
|
|
|
comment "Utilities"
|
|
|
|
$(foreach u,$(SHADOW_APPLETS), \
|
|
config PACKAGE_shadow-$(u)
|
|
prompt "Full PLD version of $(u) utility"
|
|
|
|
)
|
|
|
|
endmenu
|
|
|
|
endef
|
|
|
|
Package/shadow-utils/description = $(Package/shadow/description)
|
|
|
|
define Package/shadow-common
|
|
$(call Package/shadow/Default)
|
|
TITLE:=Shared definitions for the PLD Linux shadow utilities
|
|
DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS)
|
|
HIDDEN:=1
|
|
endef
|
|
|
|
define GenPlugin
|
|
define Package/shadow-$(1)
|
|
$(call Package/shadow/Default)
|
|
TITLE:=Utility $(1) from the PLD Linux shadow utilities
|
|
DEPENDS:=+shadow-common
|
|
HIDDEN:=1
|
|
endef
|
|
|
|
define Package/shadow-$(1)/description
|
|
Full version of standard $(1) utility. Normally, you would not use this
|
|
package, since the functionality in BusyBox is more than sufficient.
|
|
endef
|
|
endef
|
|
|
|
$(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
|
|
|
|
define Package/shadow-common/conffiles
|
|
/etc/login.defs
|
|
endef
|
|
|
|
#hack to get libxcrypt working
|
|
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/libxcrypt $(TARGET_LDFLAGS)
|
|
|
|
define Package/shadow-common/install
|
|
$(INSTALL_DIR) $(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,#ENCRYPT_METHOD DES,ENCRYPT_METHOD BCRYPT,g' $(1)/etc/login.defs
|
|
endef
|
|
|
|
define Package/shadow-utils/install
|
|
true
|
|
endef
|
|
|
|
define BuildPlugin
|
|
define Package/shadow-$(1)/install
|
|
[ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
|
|
$(INSTALL_DIR) $$(1)/usr/sbin; \
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \
|
|
} || { \
|
|
$(INSTALL_DIR) $$(1)/usr/bin; \
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \
|
|
}
|
|
endef
|
|
|
|
$$(eval $$(call BuildPackage,shadow-$(1)))
|
|
endef
|
|
|
|
$(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
|
|
|
|
$(eval $(call BuildPackage,shadow-utils))
|
|
$(eval $(call BuildPackage,shadow-common))
|
|
$(eval $(call BuildPackage,shadow))
|