Tue Jun 14 09:08:31 2022 UTC ()
bootstrap: Default to PREFER_PKGSRC=yes on OpenBSD


(nia)
diff -r1.15 -r1.16 pkgsrc/bootstrap/README.OpenBSD
diff -r1.310 -r1.311 pkgsrc/bootstrap/bootstrap

cvs diff -r1.15 -r1.16 pkgsrc/bootstrap/README.OpenBSD (expand / switch to unified diff)

--- pkgsrc/bootstrap/README.OpenBSD 2022/06/14 05:04:23 1.15
+++ pkgsrc/bootstrap/README.OpenBSD 2022/06/14 09:08:31 1.16
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: README.OpenBSD,v 1.15 2022/06/14 05:04:23 charlotte Exp $ 1$NetBSD: README.OpenBSD,v 1.16 2022/06/14 09:08:31 nia Exp $
2 2
3Please read the general README file as well. 3Please read the general README file as well.
4 4
5# Instructions 5# Instructions
6 6
7pkgsrc bootstrap installs several tools whose names happen to match 7pkgsrc bootstrap installs several tools whose names happen to match
8programs already provided by OpenBSD. The two sets of package tools are 8programs already provided by OpenBSD. The two sets of package tools are
9not interchangeable, so you'll need to decide which ones should appear 9not interchangeable, so you'll need to decide which ones should appear
10earlier in your PATH -- probably pkgsrc paths before system ones. 10earlier in your PATH -- probably pkgsrc paths before system ones.
11 11
12Once that's settled, you might think about moving OpenBSD's native 12Once that's settled, you might think about moving OpenBSD's native
13package tools out of the way so they can't get invoked by mistake, 13package tools out of the way so they can't get invoked by mistake,
14perhaps like so: 14perhaps like so:
@@ -16,18 +16,18 @@ perhaps like so: @@ -16,18 +16,18 @@ perhaps like so:
16 # cd /usr/sbin && for i in pkg_*; do mv $i $i.orig; done 16 # cd /usr/sbin && for i in pkg_*; do mv $i $i.orig; done
17 17
18But you probably don't want to do this, because it would (for instance) 18But you probably don't want to do this, because it would (for instance)
19also prevent OpenBSD's pkg_add(1) from being invoked on purpose by 19also prevent OpenBSD's pkg_add(1) from being invoked on purpose by
20fw_update(1). 20fw_update(1).
21 21
22# Status 22# Status
23 23
24pkgsrc bootstrap has been tested on OpenBSD 7.1 (amd64, i386) with the 24pkgsrc bootstrap has been tested on OpenBSD 7.1 (amd64, i386) with the
25system-provided clang. Earlier version/platform/compiler combinations 25system-provided clang. Earlier version/platform/compiler combinations
26have previously been reported to work. 26have previously been reported to work.
27 27
28If the bootstrap fails for you, try adding `--prefer-pkgsrc yes` to your 28If the bootstrap fails for you, try adding `--prefer-pkgsrc yes` to your
29bootstrap command line. 29bootstrap command line (this is now the default).
30 30
31Once bootstrapped, as is typical with pkgsrc, many packages build as is. 31Once bootstrapped, as is typical with pkgsrc, many packages build as is.
32For any particular package that doesn't, fixes are often in OpenBSD 32For any particular package that doesn't, fixes are often in OpenBSD
33Ports waiting to be borrowed. 33Ports waiting to be borrowed.

cvs diff -r1.310 -r1.311 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2022/04/06 13:06:09 1.310
+++ pkgsrc/bootstrap/bootstrap 2022/06/14 09:08:31 1.311
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.310 2022/04/06 13:06:09 schmonz Exp $ 3# $NetBSD: bootstrap,v 1.311 2022/06/14 09:08:31 nia Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -1122,26 +1122,31 @@ echo "LOCALBASE= $prefix" >> ${TARGET_M @@ -1122,26 +1122,31 @@ echo "LOCALBASE= $prefix" >> ${TARGET_M
1122if [ "${sysconfbase}" != "/etc" ]; then 1122if [ "${sysconfbase}" != "/etc" ]; then
1123echo "SYSCONFBASE= $sysconfbase" >> ${TARGET_MKCONF} 1123echo "SYSCONFBASE= $sysconfbase" >> ${TARGET_MKCONF}
1124fi 1124fi
1125echo "VARBASE= $varbase" >> ${TARGET_MKCONF} 1125echo "VARBASE= $varbase" >> ${TARGET_MKCONF}
1126if [ "${sysconfdir}" != "${prefix}/etc" ]; then 1126if [ "${sysconfdir}" != "${prefix}/etc" ]; then
1127 echo "PKG_SYSCONFBASE= $sysconfdir" >> ${TARGET_MKCONF} 1127 echo "PKG_SYSCONFBASE= $sysconfdir" >> ${TARGET_MKCONF}
1128fi 1128fi
1129echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF} 1129echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF}
1130echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF} 1130echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF}
1131echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF} 1131echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF}
1132echo "" >> ${TARGET_MKCONF} 1132echo "" >> ${TARGET_MKCONF}
1133 1133
1134case $opsys in 1134case $opsys in
 1135OpenBSD)
 1136 if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ]; then
 1137 prefer_pkgsrc="yes"
 1138 fi
 1139 ;;
1135Linux) 1140Linux)
1136 # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes 1141 # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes
1137 # Linux systems likely have software from other packages managers 1142 # Linux systems likely have software from other packages managers
1138 # like yum or apt that can leak into pkgsrc and cause issues as they 1143 # like yum or apt that can leak into pkgsrc and cause issues as they
1139 # age, undergo ABI changes, or get added/removed behind our backs. 1144 # age, undergo ABI changes, or get added/removed behind our backs.
1140 # Let pkgsrc maintain all dependencies to avoid these problems. 1145 # Let pkgsrc maintain all dependencies to avoid these problems.
1141 # The exception here is Elbrus 2000, for which a lot of patches have 1146 # The exception here is Elbrus 2000, for which a lot of patches have
1142 # not been upstreamed, so that it is better to use native. 1147 # not been upstreamed, so that it is better to use native.
1143 if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ] && \ 1148 if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ] && \
1144 [ "$machine_arch" != "e2k" ]; then 1149 [ "$machine_arch" != "e2k" ]; then
1145 prefer_pkgsrc="yes" 1150 prefer_pkgsrc="yes"
1146 fi 1151 fi
1147 ;; 1152 ;;