ports/sysutils/debootstrap/files/patch-Makefile
Edward Tomasz Napierala 19753ff1c0 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
Reviewed by:	0mp (earlier version)
Approved by:	maintainer timeout (2 weeks)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D25594
2020-07-19 12:54:59 +00:00

21 lines
644 B
Text

--- Makefile.orig 2019-07-06 11:22:30 UTC
+++ Makefile
@@ -5,14 +5,12 @@ all:
clean:
-DSDIR=$(DESTDIR)/usr/share/debootstrap
+DSDIR=$(DESTDIR)%%DATADIR%%
install:
mkdir -p $(DSDIR)/scripts
- mkdir -p $(DESTDIR)/usr/sbin
+ mkdir -p $(DESTDIR)%%PREFIX%%/sbin
cp -a scripts/* $(DSDIR)/scripts/
- install -o root -g root -m 0644 functions $(DSDIR)/
+ cp -a functions $(DSDIR)/
- sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap
- chown root:root $(DESTDIR)/usr/sbin/debootstrap
- chmod 0755 $(DESTDIR)/usr/sbin/debootstrap
+ sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)%%PREFIX%%/sbin/debootstrap