Page MenuHomeFreeBSD

sysutils/deboostrap: make it use bash, mount fdescfs, ignore --configure errors
ClosedPublic

Authored by trasz on Jul 8 2020, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 9 2024, 8:03 AM
Unknown Object (File)
Feb 9 2024, 8:03 AM
Unknown Object (File)
Feb 9 2024, 8:03 AM
Unknown Object (File)
Feb 9 2024, 8:03 AM
Unknown Object (File)
Feb 9 2024, 8:03 AM
Unknown Object (File)
Feb 9 2024, 7:51 AM
Unknown Object (File)
Jan 16 2024, 7:05 PM
Unknown Object (File)
Jan 15 2024, 8:50 PM
Subscribers

Details

Summary

sysutils/deboostrap: make it use bash, mount fdescfs, ignore --configure errors

For some reason, when run with stock sh(1) the script aborts just
after 'Unpacking the base system'.

The fdescfs mount fixes 'dpkg --configure' for rsyslog. Note that
there are also some kernel patches required to make it work completely.

The fdescfs is not enough to fix everything, though, so just ignore
'dpkg --configure' errors for Bionic; they don't break anything important.

PR: ports/247698

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 32207
Build 29703: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Jul 8 2020, 7:11 PM
trasz added a reviewer: lifanov.
trasz retitled this revision from sysutils/deboostrap: make it use bash, mount fdescfs to sysutils/deboostrap: make it use bash, mount fdescfs, ignore --configure errors.Jul 8 2020, 7:59 PM
trasz edited the summary of this revision. (Show Details)
0mp added inline comments.
sysutils/debootstrap/files/patch-debootstrap
5

This should be %%LOCALBASE%%/bin/bash. Maybe add %%BASH%% here and then use REINPLACE_CMD to replace %%BASH%% with ${LOCALBASE}/bin/bash during post-patch.

emaste added inline comments.
sysutils/debootstrap/files/patch-functions
7

is it smart enough to do these in a reasonable order?

sysutils/debootstrap/files/patch-functions
7

It's not. And it processes those umounts in _reverse_ order, thus the above.

We should coordinate with the Debian folks, at least the /dev/fd is probably something that should be upstream?

In any case this seems fine to me

The changes seem fine. You may want to consider running portfmt from https://www.freshports.org/ports-mgmt/portfmt to get little things fixed like the order of RUN_DEPENDS items. But then you'll end up with a lot of unrelated style changes, which might no be desired.

This revision is now accepted and ready to land.Jul 17 2020, 4:17 PM
sysutils/debootstrap/files/patch-debootstrap
5

Actually, you may consider using a more standardized mechanism for it like USES=shebangfix.

Perhaps something along the lines of the following would work:

USES= shebangfix
SHEBANG_LANG=   bash
bash_OLD_CMD=    /bin/sh
SHEBANG_FILES= debootstrap

I think I prefer the non-shebangfix version. To me, shebangfix is mostly for adjusting paths, and here we do something semantically different: we're changing the interpreter.

We should coordinate with the Debian folks, at least the /dev/fd is probably something that should be upstream?

Done, https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/46.