Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Dan McGregor <danismostlikely@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Daniel McGregor <daniel.mcgregor@vecima.com>
Subject: [PATCH 1/2] tar: make gtar always gnu tar
Date: Thu, 30 Apr 2026 10:17:01 -0600	[thread overview]
Message-ID: <20260430161702.77076-1-danismostlikely@gmail.com> (raw)

From: Daniel McGregor <daniel.mcgregor@vecima.com>

Previously, gtar was a symlink to tar. It followed update-alternatives,
when what we most likely want is for gtar to always be GNU tar, and tar
to be whatever update-alternatives decides.

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
---
 meta/recipes-extended/tar/tar_1.35.bb | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-extended/tar/tar_1.35.bb b/meta/recipes-extended/tar/tar_1.35.bb
index 042baa035c9..ce7076ae606 100644
--- a/meta/recipes-extended/tar/tar_1.35.bb
+++ b/meta/recipes-extended/tar/tar_1.35.bb
@@ -18,20 +18,22 @@ PACKAGECONFIG:append:class-target = " ${@bb.utils.filter('DISTRO_FEATURES', 'acl
 PACKAGECONFIG[acl] = "--with-posix-acls,--without-posix-acls,acl"
 PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
 
-EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir}"
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${sbindir} --program-prefix=g"
 
 CACHED_CONFIGUREVARS += "tar_cv_path_RSH=no"
 
 do_install () {
     autotools_do_install
-    ln -s tar ${D}${bindir}/gtar
+    ln -s gtar ${D}${bindir}/tar
+    ln -s grmt ${D}${sbindir}/rmt
 }
 
 do_install:append:class-target() {
+    rm ${D}${bindir}/tar
+    rm ${D}${sbindir}/rmt
     if [ "${base_bindir}" != "${bindir}" ]; then
         install -d ${D}${base_bindir}
-        mv ${D}${bindir}/tar ${D}${base_bindir}/tar
-        mv ${D}${bindir}/gtar ${D}${base_bindir}/gtar
+        mv ${D}${bindir}/gtar ${D}${base_bindir}
         rmdir ${D}${bindir}/
     fi
 }
@@ -72,19 +74,27 @@ do_install_ptest() {
 
 PACKAGES =+ "${PN}-rmt"
 
-FILES:${PN}-rmt = "${sbindir}/rmt*"
+FILES:${PN}-rmt = "${sbindir}/grmt*"
 
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
 ALTERNATIVE:${PN} = "tar"
+ALTERNATIVE:${PN}-doc = "tar.1 rmt.8"
 ALTERNATIVE:${PN}-rmt = "rmt"
 ALTERNATIVE:${PN}:class-nativesdk = ""
 ALTERNATIVE:${PN}-rmt:class-nativesdk = ""
 
 ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_TARGET[tar] = "${base_bindir}/gtar"
 ALTERNATIVE_LINK_NAME[rmt] = "${sbindir}/rmt"
+ALTERNATIVE_TARGET[rmt] = "${sbindir}/grmt"
+
+ALTERNATIVE_LINK_NAME[tar.1] = "${mandir}/man1/tar.1"
+ALTERNATIVE_TARGET[tar.1] = "${mandir}/man1/gtar.1"
+ALTERNATIVE_LINK_NAME[rmt.8] = "${mandir}/man8/rmt.8"
+ALTERNATIVE_TARGET[rmt.8] = "${mandir}/man8/grmt.8"
 
 PROVIDES:append:class-native = " tar-replacement-native"
 NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"


             reply	other threads:[~2026-04-30 16:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 16:17 Dan McGregor [this message]
2026-04-30 16:17 ` [PATCH 2/2] python3-requests: Increase chardet upper limit Dan McGregor
2026-04-30 16:30   ` Patchtest results for " patchtest
2026-04-30 17:51   ` [OE-core] " Tim Orling
2026-04-30 17:59     ` Dan McGregor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260430161702.77076-1-danismostlikely@gmail.com \
    --to=danismostlikely@gmail.com \
    --cc=daniel.mcgregor@vecima.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox