Bug 274298 - sysutils/debootstrap: fails to setup bookworm
Summary: sysutils/debootstrap: fails to setup bookworm
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-06 07:08 UTC by Dancho Penev
Modified: 2024-02-18 16:05 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (nc)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dancho Penev 2023-10-06 07:08:45 UTC
When setup Debian bookworm debootstrap fails to install required package usr-is-merged which is "Transitional package to assert a merged-/usr system". The problem is caused by difference in implementations of "-k" option in GNU vs BSD tar, in GNU implementation when it's specified it keeps existing symbolic links while in BSD it has no effect and overrides them. Here is an workaround using GNU version:

--- a/sysutils/debootstrap/Makefile
+++ b/sysutils/debootstrap/Makefile
@@ -16,6 +16,7 @@ RUN_DEPENDS=  wget:ftp/wget \
                bash:shells/bash \
                ${LOCALBASE}/bin/grep:textproc/gnugrep \
                gpgv2:security/gnupg \
+               gtar:archivers/gtar \
                ${LOCALBASE}/share/keyrings/ubuntu-archive-keyring.gpg:security/ubuntu-keyring

 USES=          gmake perl5
@@ -43,6 +44,9 @@ post-patch:
        @${REINPLACE_CMD} -e 's,grep,${LOCALBASE}/bin/grep,g' \
                ${WRKSRC}/functions

+       @${REINPLACE_CMD} -e 's, tar , ${LOCALBASE}/bin/gtar ,g' \
+               ${WRKSRC}/functions
+
 post-install:
        ${INSTALL_MAN} ${WRKSRC}/debootstrap.8 \
                ${STAGEDIR}${MAN8PREFIX}/man/man8/debootstrap.8
Comment 1 Mina Galić freebsd_triage 2023-10-06 08:55:34 UTC
maybe you could also open a bug for our tar, referencing this
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-02-18 16:03:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=38449b84d74605ce2bedfa7b1e6e88d08d7116c4

commit 38449b84d74605ce2bedfa7b1e6e88d08d7116c4
Author:     Dancho Penev <dpslavov@hotmail.com>
AuthorDate: 2024-02-18 15:28:38 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-02-18 16:03:00 +0000

    sysutils/debootstrap: Fix when setting up Debian bookworm.

    PR:             274298
    Approved by:    nc (maintainer timeout)

 sysutils/debootstrap/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 3 Gleb Popov freebsd_committer freebsd_triage 2024-02-18 16:05:35 UTC
Pushed, thanks.