From patchwork Sat Jan 7 07:49:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 1722656 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=HLEmeJ5C; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=IH2p5RGu; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Npss92PCKz23fj for ; Sat, 7 Jan 2023 18:53:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Iu2KptSJN01f4emsIUgCFzV7vY82oVWqD0kElZMmbV8=; b=HLEmeJ5CoRA6to C5HujenFnPgPoQhFBLuXQ/xYMwetIB0bWOG4tTLGyi1QyirY+n3Iv/uo2bTRGd5AGGJqid2d3SdCm rqGAFe0Cxy6H39IqnA09tps7zTLK1WWoDy+YoEv99iaJjOAiO3O8LGJYN4GgGs85PB6MdkGlxibT+ LX969fyTQqjhd32WzQQIRYTZNPyhLJ6u2zFPYWIEY1sRbpxj6xTq2ODEa+NZscxStgWSGY+K4/Y5b sHC4k719sR78MRXEqViX7Y2t2shqR18bQ0PoOzB9c5SKf0tWLoh2zGpwv6Zth/RpwDWKqP9b3Ey+l RQvotYYHgZ5uCqYVHCuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pE3yz-003PdK-Ud; Sat, 07 Jan 2023 07:51:14 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pE3xt-003PC3-Mg for openwrt-devel@lists.openwrt.org; Sat, 07 Jan 2023 07:50:07 +0000 Received: by mail-pl1-x630.google.com with SMTP id w3so4083593ply.3 for ; Fri, 06 Jan 2023 23:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jqMtmbHLAeUfTDBB1YY0omG/knyzhiDU4OSlFqxA/Uk=; b=IH2p5RGutbEDQOJahKecOT9tIN676kSpgc+gWZWQtTRwl7vk7Q2PE5iW7egHnMfSj6 hWUcU6mBs4EBRLS+c9RfjYudhK+7ZFtVVWNClIBsumuIpcz3as8fgJx+8vAJ7j36s1q2 o6sJo2zjYj0qek3NBif2nWTl9Ri+FUpe/rF0NHWs9KtuUY8rPMKloj86L4h5iWvBGaCF lFpXPTXGjXrAq78A9Ix3VhinYHiSf78YtogW7nZcA7Zaf+RM5r6x40tz6VwxGvs4nFmZ S02txc/BA5M8ZWTwcgiX4z5CaV7PNNp/8K41Ub6tC40PrhCuM8pr7brq/GrKfAV5aOb4 JMZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jqMtmbHLAeUfTDBB1YY0omG/knyzhiDU4OSlFqxA/Uk=; b=4wDbWl9anhOdUreaGfi+URtDS6g3ELtZFFHO7+K4Ji5nlihwhOFY7sAD3UimGij3aD EHQWO/0vdikASfpxNQ1li1XfiWwGbNkygdLzsuoMWWMdfGnt8EJ6Gv6zYMEDPdKy3YGJ NQ8rZhOeSp+BvxGIWfNvvMcSzYqZUyoMjaUXc3IHt73NYCfGru97zEAeWy8N8UOO+Y/z ITeLZBzAZY7nTgPfibKef8Ub2NFg9Y+4gX/YaGXF7OZ+DRTk1bs7ZG8GOVZS6KzpVMUE KfGsMjpkbgRK0E9jQbXOP1hbFLglYZpgV9gRMUXCRlqde6DmPYhg+rP8LaFXp0uqPPd1 Fjag== X-Gm-Message-State: AFqh2kqLFVcG0KnAj2Bu0eG+H3F6vRx+++Zd/myXxjXRb+k7s3CS7MlR 8xHyv0XOkOqDF9Uo+nmeBMhi+8o+V64= X-Google-Smtp-Source: AMrXdXt0n9v7aEGAAmqD3ejCtYlrCexGQTNNvmaPz7UprcoN5c5aGDazavtm1JAjD5wNKy0ERrnrQA== X-Received: by 2002:a05:6a20:a59c:b0:a2:17a6:3e86 with SMTP id bc28-20020a056a20a59c00b000a217a63e86mr71037699pzb.55.1673077803792; Fri, 06 Jan 2023 23:50:03 -0800 (PST) Received: from localhost ([2600:1700:38c1:1d7f:f66d:4ff:fe3c:3ceb]) by smtp.gmail.com with ESMTPSA id 14-20020a630c4e000000b00478f87eaa44sm1856640pgm.35.2023.01.06.23.50.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2023 23:50:03 -0800 (PST) From: Brian Norris To: openwrt-devel@lists.openwrt.org Cc: Brian Norris Subject: [PATCH v2 6/7] coreutils: Import from packages feed Date: Fri, 6 Jan 2023 23:49:44 -0800 Message-Id: <20230107074945.2140362-6-computersforpeace@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230107074945.2140362-1-computersforpeace@gmail.com> References: <20230107074945.2140362-1-computersforpeace@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230106_235005_770532_C4954BFA X-CRM114-Status: GOOD ( 15.59 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I need to express a per-target dependency on the 'base64' utility, and that's seemingly impossible to do for busybox. Pull in coreutils to make that easier. Signed-off-by: Brian Norris --- * New in v2 Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:630 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [computersforpeace[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org I need to express a per-target dependency on the 'base64' utility, and that's seemingly impossible to do for busybox. Pull in coreutils to make that easier. Signed-off-by: Brian Norris --- * New in v2 (no changes since v1) package/utils/coreutils/Makefile | 153 ++++++++++++++++++ .../patches/001-no_docs_man_tests.patch | 93 +++++++++++ 2 files changed, 246 insertions(+) create mode 100644 package/utils/coreutils/Makefile create mode 100644 package/utils/coreutils/patches/001-no_docs_man_tests.patch diff --git a/package/utils/coreutils/Makefile b/package/utils/coreutils/Makefile new file mode 100644 index 000000000000..d1af3ce962f1 --- /dev/null +++ b/package/utils/coreutils/Makefile @@ -0,0 +1,153 @@ +# +# Copyright (C) 2008-2014 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:=coreutils +PKG_VERSION:=9.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/coreutils +PKG_HASH:=61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423 + +PKG_MAINTAINER:=Jo-Philipp Wich +PKG_LICENSE:=GPL-3.0-or-later +PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:gnu:coreutils + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +COREUTILS_APPLETS := \ + base32 base64 basename basenc b2sum cat chcon chgrp chmod chown chroot \ + cksum comm cp csplit cut date dd df dir dircolors dirname du echo env \ + expand expr factor false fmt fold groups head hostid id install join \ + kill link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl \ + nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd \ + readlink realpath rm rmdir runcon seq sha1sum sha224sum sha256sum \ + sha384sum sha512sum shred shuf sleep sort split stat stdbuf stty sum \ + sync tac tail tee test timeout touch tr true truncate tsort tty uname \ + unexpand uniq unlink uptime users vdir wc who whoami yes + +DIR_BIN := \ + base64 cat chgrp chmod chown cp date dd df echo false kill link ln ls \ + mkdir mknod mktemp mv nice printenv pwd rm rmdir sleep stat stty sync \ + touch true uname + +DIR_USR_BIN := \ + basename chcon cksum comm cut dirname du env expand expr factor fold \ + groups head hostid id install logname md5sum mkfifo nl nohup nproc od \ + paste printf readlink realpath runcon seq sha1sum sha256sum sha512sum \ + shred shuf sort split sum tac tail tee test timeout tr truncate tty \ + unexpand uniq unlink uptime users wc who whoami yes + +DIR_USR_SBIN := \ + chroot + +# BusyBox does not provide these yet +DIR_OTHERS := \ + base32 b2sum basenc csplit dir dircolors fmt join numfmt pathchk pinky \ + pr ptx sha224sum sha384sum stdbuf tsort vdir + +$(eval $(foreach a,$(DIR_BIN),ALTS_$(a):=300:/bin/$(a):/usr/libexec/$(a)-coreutils$(newline))) +$(eval $(foreach a,$(DIR_USR_BIN),ALTS_$(a):=300:/usr/bin/$(a):/usr/libexec/$(a)-coreutils$(newline))) +$(eval $(foreach a,$(DIR_USR_SBIN),ALTS_$(a):=300:/usr/sbin/$(a):/usr/libexec/$(a)-coreutils$(newline))) + +DEPENDS_sort = +libpthread +DEPENDS_timeout = +librt +DEPENDS_expr = +libgmp +DEPENDS_factor = +libgmp +DEPENDS_cp = +libacl +DEPENDS_dir = +libacl +libcap +DEPENDS_install = +libacl +DEPENDS_ls = +libacl +libcap +DEPENDS_mv = +libacl +DEPENDS_vdir = +libacl +libcap + +FILES_stdbuf := usr/lib/coreutils/libstdbuf.so + +define Package/coreutils/Default + SECTION:=utils + CATEGORY:=Utilities + TITLE:=The GNU core utilities + URL:=http://www.gnu.org/software/coreutils/ +endef + +define Package/coreutils + $(call Package/coreutils/Default) + TITLE:=The GNU core utilities + MENU:=1 +endef + +define Package/coreutils/description + Full versions of standard GNU utilities. If an equivalent Busybox applet is + available, you should consider compiling that instead as Busybox applets are + usually smaller, at the expense of reduced functionality. +endef + +define GenPlugin + define Package/$(1) + $(call Package/coreutils/Default) + DEPENDS:=coreutils $(DEPENDS_$(2)) + TITLE:=Utility $(2) from the GNU core utilities + ALTERNATIVES:=$(ALTS_$(2)) + endef + + define Package/$(1)/description + Full version of standard GNU $(2) utility. + endef +endef + +$(foreach a,$(COREUTILS_APPLETS),$(eval $(call GenPlugin,coreutils-$(a),$(a)))) + +CONFIGURE_VARS += \ + gl_cv_func_mbrtowc_incomplete_state=yes \ + gl_cv_func_mbrtowc_retval=yes \ + gl_cv_func_wcrtomb_retval=yes \ + ac_cv_header_selinux_context_h=no \ + ac_cv_header_selinux_flash_h=no \ + ac_cv_header_selinux_selinux_h=no \ + ac_cv_search_setfilecon=no + +CONFIGURE_ARGS += \ + --disable-xattr \ + --enable-install-program=su \ + --enable-threads=posix \ + --enable-acl \ + --disable-assert \ + --disable-rpath \ + --disable-libsmack \ + --enable-libcap \ + --without-linux-crypto \ + --without-openssl \ + --$(if $(CONFIG_USE_MUSL),with,without)-included-regex \ + --without-selinux \ + --with-gmp + +define Package/coreutils/install + true +endef + +define BuildPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/$(if $(ALTS_$(2)),libexec,bin) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/$(if $(ALTS_$(2)),libexec/$(2)-coreutils,bin/$(2)) + $(foreach f,$(FILES_$(2)), + $(INSTALL_DIR) $$(1)/$(dir $(f)) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f) + ) + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +$(eval $(call BuildPackage,coreutils)) + +$(foreach a,$(COREUTILS_APPLETS),$(eval $(call BuildPlugin,coreutils-$(a),$(a)))) diff --git a/package/utils/coreutils/patches/001-no_docs_man_tests.patch b/package/utils/coreutils/patches/001-no_docs_man_tests.patch new file mode 100644 index 000000000000..e4feaf5cd9a4 --- /dev/null +++ b/package/utils/coreutils/patches/001-no_docs_man_tests.patch @@ -0,0 +1,93 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -17,7 +17,7 @@ + + ALL_RECURSIVE_TARGETS = + +-SUBDIRS = po . gnulib-tests ++SUBDIRS = po + + EXTRA_DIST = \ + .mailmap \ +@@ -210,6 +210,3 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib + + include $(top_srcdir)/lib/local.mk + include $(top_srcdir)/src/local.mk +-include $(top_srcdir)/doc/local.mk +-include $(top_srcdir)/man/local.mk +-include $(top_srcdir)/tests/local.mk +--- a/Makefile.in ++++ b/Makefile.in +@@ -4115,11 +4115,7 @@ RECURSIVE_TARGETS = all-recursive check- + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +-am__can_run_installinfo = \ +- case $$AM_UPDATE_INFO_DIR in \ +- n|no|NO) false;; \ +- *) (install-info --version) >/dev/null 2>&1;; \ +- esac ++am__can_run_installinfo = false + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ +@@ -4369,10 +4365,10 @@ am__DIST_COMMON = $(doc_coreutils_TEXINF + $(top_srcdir)/build-aux/missing \ + $(top_srcdir)/build-aux/test-driver \ + $(top_srcdir)/build-aux/texinfo.tex \ +- $(top_srcdir)/build-aux/ylwrap $(top_srcdir)/doc/local.mk \ +- $(top_srcdir)/lib/alloca.c $(top_srcdir)/lib/config.hin \ +- $(top_srcdir)/lib/local.mk $(top_srcdir)/man/local.mk \ +- $(top_srcdir)/src/local.mk $(top_srcdir)/src/single-binary.mk \ ++ $(top_srcdir)/build-aux/ylwrap \ ++ $(top_srcdir)/lib/alloca.c \ ++ $(top_srcdir)/lib/local.mk \ ++ $(top_srcdir)/src/local.mk \ + $(top_srcdir)/tests/local.mk ABOUT-NLS AUTHORS COPYING \ + ChangeLog INSTALL NEWS README THANKS TODO build-aux/compile \ + build-aux/config.guess build-aux/config.rpath \ +@@ -4479,7 +4475,7 @@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ + ERRNO_H = @ERRNO_H@ + ETAGS = @ETAGS@ + EXEEXT = @EXEEXT@ +-EXTRA_MANS = @EXTRA_MANS@ ++EXTRA_MANS = + FLOAT_H = @FLOAT_H@ + FNMATCH_H = @FNMATCH_H@ + GETADDRINFO_LIB = @GETADDRINFO_LIB@ +@@ -6057,7 +6053,7 @@ libexecdir = @libexecdir@ + lispdir = @lispdir@ + localedir = @localedir@ + localstatedir = @localstatedir@ +-man1_MANS = @man1_MANS@ ++man1_MANS = + mandir = @mandir@ + mkdir_p = @mkdir_p@ + oldincludedir = @oldincludedir@ +@@ -6080,7 +6076,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + ALL_RECURSIVE_TARGETS = distcheck-hook check-root +-SUBDIRS = po . gnulib-tests ++SUBDIRS = po + + #if GNU_MAKE + # [nicer features that work only with GNU Make] +@@ -8272,7 +8268,7 @@ all: $(BUILT_SOURCES) + .SUFFIXES: .1 .c .dvi .log .o .obj .pl .pl$(EXEEXT) .ps .sh .sh$(EXEEXT) .trs .x .xpl .xpl$(EXEEXT) .y + am--refresh: Makefile + @: +-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk $(am__configure_deps) ++$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +@@ -8294,7 +8290,7 @@ Makefile: $(srcdir)/Makefile.in $(top_bu + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + esac; +-$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(top_srcdir)/doc/local.mk $(top_srcdir)/man/local.mk $(top_srcdir)/tests/local.mk $(am__empty): ++$(top_srcdir)/lib/local.mk $(srcdir)/lib/gnulib.mk $(top_srcdir)/src/local.mk $(srcdir)/src/cu-progs.mk $(top_srcdir)/src/single-binary.mk $(am__empty): + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck