Commit graph

8055 commits

Author SHA1 Message Date
John Baldwin 835b1bd404 release: Use the ABI of the target release to fetch packages
- Point --rootdir at the installed destdir in the dvd tree.  This
  causes pkg to determine the ABI from the installed destdir instead
  of the host's binaries.  Previously the result was that packages
  for the host's ABI were always downloaded breaking cross-releases
  (e.g. arm64 releases built on an amd64 host included amd64
  packages on the DVD ISO image rather than arm64 packages).  This
  also handles version mismatches, and I tested this by cross-building
  a 15.x arm64 release on a 14.x amd64 host.

- As a result, pkg now does a chdir(3) to the rootdir before running,
  so the -o argument to fetch needs to be updated to be relative to
  rootdir instead of the CWD as make runs.

- Add a new ROOTDIR variable to limit references to "dvd" to one
  place.  Ideally ROOTDIR would be an argument to this script so
  that it didn't really know about the dvd layout at all.

- While here, simplify creation of symlinks by just using a longer
  path to the link name instead of using 'cd' in the shell before
  invoking ln(1).  Also use ln -sf to create the pkg.pkg symlink
  rather than rm + ln.

PR:		278273
Reported by:	gatekeeper <tiago.gasiba@gmail.com>
Reviewed by:	imp, delphij
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44749

(cherry picked from commit ea2663040d)
2024-04-23 22:04:44 -07:00
Colin Percival 6b8ca8c4e4 release: Support r/o /usr/ports for cloudware
Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after:	3 days

(cherry picked from commit 6c87aed39c)
2024-04-23 22:04:06 -07:00
Colin Percival 1b0e859897 release/Makefile.vm: Support read-only ports tree
Build qemu (if needed) with WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles
so that we can have a read-only /usr/ports and don't contaminate it.  This
became an issue when I enabled parallel release building, since one image
might be creating its ports.txz file at the same time as we're building
qemu as a prerequisite for building another image.

MFC after:	5 days

(cherry picked from commit 6f454c211b)
2024-04-23 22:02:02 -07:00
Colin Percival 853241218d release.sh: Don't install git if already present
Prior to this commit, we install git from ports if there is a ports
tree available and git is not installed, and we install git from pkg
otherwise -- including the case where git is already installed.

Rework the logic to not (re)install git at all if it is already
installed.

MFC after:	3 days

(cherry picked from commit 6baddb6b11)
2024-04-02 13:44:46 -07:00
Mike Karels e889b5a892 arm64/RPI: enable powerd by default on arm64-aarch64-RPI images
Most 64-bit Raspberry Pi models have a variable processor clock
speed that defaults to a slow speed (e.g. 600 MHz for a nominal
1.5 GHz clock).  This results in everything running slowly unless
or until powerd is started, and FreeBSD is then thought to be slow.
Enable powerd by default in /etc/rc.conf on the arm64-aarch64-RPI
images.  Tested on Raspberry Pi 3B+ and 4B so far.

PR:		256836
Reviewed by:	rgrimes
Differential Revision:	https://reviews.freebsd.org/D43296

(cherry picked from commit 4347ef6050)
2024-01-30 14:10:56 -06:00
Xin LI a465a52e80 releng-gce: Advertise the availability of UEFI support in GCE images.
The amd64 and arm64 images supported UEFI, mark it as so users can take
advantage of UEFI boot on GCE.  This is already done on FreeBSD
14.0-RELEASE but never codified into the release tools (and should).

PR:		conf/276532
Reviewed by:	lwhsu
Differential Revision: https://reviews.freebsd.org/D43557

(cherry picked from commit 72dd306e44)
2024-01-29 23:23:06 -08:00
Ed Maste 1614823a49 release/oci.conf: add missing vm_extra_pre_umount() steps
vm.subr's default vm_extra_pre_umount removes /qemu and
/etc/resolv.conf.  When vm_extra_pre_umount is overridden these steps
need to be performed in the cloud-specific conf file.

PR:		271602
Reviewed by:	dch, lwhsu
Event:		Kitchener-Waterloo Hackathon 202305
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40257

(cherry picked from commit ae60012e46)
2024-01-22 09:33:06 -05:00
Mike Karels c10c153196 Increase the size of riscv GENERICSD images to 6 GB
The stable/13 snapshot this week failed to build the riscv GENERICSD
image because it ran out of space.  Checking main and stable/14
snapshots, they are also low on space, around 100% or more of
capacity.  Increase them all from 5 GB to 6 GB.  Note, this is the
only riscv image configuration.

Discussed with:	cperciva

(cherry picked from commit 6137b5f7b8)
2024-01-15 07:31:43 -06:00
Xin LI 44cd4b2fec releng-gce: Advertise the availability of gVNIC support in GCE images.
This marks FreeBSD GCE images as gVNIC capable by adding the
--guest-os-features=GVNIC flag at creation time as suggested in GCE
documentation[1].  This allows Generation 3 and newer GCE instances
to leverage advanced networking capabilities and performance
enhancements provided by gVNIC.  Users will benefit from these
improvements without needing to create custom images.

[1] https://cloud.google.com/compute/docs/networking/using-gvnic#create_a_vm_with_gvnic_support

Reviewed by:	cperciva
Differential Revision: https://reviews.freebsd.org/D43411

(cherry picked from commit e872a4013f)
2024-01-14 16:30:12 -08:00
Ceri Davies 677a7402ce sys/*/conf/*, docs: fix links to handbook
While here, fix all links to older en_US.ISO8859-1 documentation
in the src/ tree.

PR:             255026
Reported by:    Michael Büker <freebsd@michael-bueker.de>
Reviewed by:    dbaio
Differential Revision: https://reviews.freebsd.org/D30265

(cherry picked from commit c1a148873d)
2024-01-09 22:07:46 -05:00
Colin Percival c2c7340fef release/Makefile.vm: Rework emulator-portinstall
The emulator-portinstall target now unconditionally ensures that qemu
is installed; but is only invoked if needed (aka. when cross building
VM images).

MFC After:	3 days
MFC With:	97bd53ef4d ("Fix duplicate rc.conf files")

(cherry picked from commit 7d0ee5ebd0)
2023-12-05 15:40:59 -08:00
Colin Percival 91cb6905e9 Makefile.vm: Fix duplicate rc.conf files
Two bugs in Makefile.vm resulted in disk images being "built" multiple
times, resulting in lines added to /etc/rc.conf being duplicated:

1. The vm-image target reused the same "staging tree" directory for all
of its builds (multiple disk image types and multiple filesystem types).

2. The cw-type-flavour-fs target depends on emulator-portinstall, which
did not have a 'touch ${.TARGET}' and thus re-ran every time -- and
caused the cw-type-flavour-fs target to be re-run.  This was triggered
by release builds running `make cloudware-release` (creating the disk
images) followed by `make ec2amis` (which re-created the disk images
prior to uploading them).

MFC After:	1 week
Sponsored by:	https://www.patreon.com/cperciva

(cherry picked from commit 97bd53ef4d)
2023-12-05 15:40:59 -08:00
John Baldwin bc1cddbd4a powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41958

(cherry picked from commit 5919ab2991)
2023-10-24 11:13:18 -07:00
Ed Maste 413687812b release: remove inet blackhole sysctls from GCE config
Other cloud images do not do this, and it can produce confusing results.

Reviewed by:	Jose Luis Duran, delphij
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41751

(cherry picked from commit b7528b16c6)
(cherry picked from commit 5623352ec0)
2023-09-09 11:14:53 -04:00
Warner Losh 350f9ac5b3 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit 05248206f7)
2023-08-23 11:43:33 -06:00
Warner Losh 023fc80ee3 Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0e)
2023-08-23 11:43:30 -06:00
Jessica Clarke 2999e53151 release: Set loader_menu_multi_user_prompt to "Installer" for installer
This makes it more obvious that the media being booted is an installer
rather than an installed system, which is otherwise hard to distinguish.
It also provides a more user-friendly, and more accurate, prompt.

Reviewed by:	gjb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36419

(cherry picked from commit 2a90c47af1)
2023-08-01 21:42:52 +01:00
Glen Barber 638dd62637 release: Adjust where UNAME_r is defined for ports builds
In followup to 80ab50e1de,
export UNAME_r in Makefile.inc1 instead of Makefile.vm.

Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit 0be274d373)
2023-07-21 23:20:13 -04:00
Glen Barber 9265ff1fe3 release: Include Makefile.inc1 in Makefile.vm
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit c883b6fd8c)
2023-07-21 23:19:28 -04:00
Glen Barber 1feb6f1cbe release: sprinkle UNAME_r hacks following c883b6fd8c
Pass UNAME_r override to make(1) for ports builds when building
ports for another branch.

Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit 63749bfe96)
2023-07-21 23:18:43 -04:00
Glen Barber 3e94b6a238 release: adjust lang/python* dependencies for GCE
The lang/python3 port had failed to properly install because
it did in fact already exist and FORCE_PKG_REGISTER was not
set.  So, behaviorally everything here was correct.  However,
installing lang/python3 is in fact not correct and not needed,
so only install the lang/python port to provide symbolic links.

PR:		272354
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit b24c35b326)
2023-07-19 21:31:52 -04:00
Glen Barber ca7d3085f1 release: remove a stray backslash
PR:		272354 (related)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit 510fd83138)
2023-07-19 21:31:22 -04:00
Glen Barber 119b44c2b2 release: follow-up to previous commit to install lang/python{,3}
PR:		272354
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit cd8cad0ef5)
2023-07-19 21:30:53 -04:00
Glen Barber af8d597af0 release: ensure gce-check-depends installs lang/python{,3}
PR:		272354
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd

(cherry picked from commit 0ed426276f)
2023-07-19 21:30:20 -04:00
Li-Wen Hsu a81d4240b3
release/DVD_PACKAGES: Update the names of drm-kmod ports
When MFC, graphics/drm-515-kmod is not merged as it only suports 14+.

Reviewed by:	x11 (manu), re (gjb)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40770

(cherry picked from commit fea4a44c19)
2023-07-08 04:10:19 +08:00
Glen Barber 32beaf6d4d release: update GCE configuration for python3
Reported by:	asomers
PR:		272354
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd

(cherry picked from commit 3f21d3e0ba)
2023-07-05 17:00:05 -04:00
Brad Davis d63909d243 release: allow VM_EXTRA_PACKAGES to be specified in the environment
This is useful for adding extra packages to the build of an AMI.
For example:
	env VM_EXTRA_PACKAGES="zsh" make -C release ec2ami

(cherry picked from commit 83952a5baa)
2023-07-05 16:59:47 -04:00
Colin Percival 1178acf466 EC2: Default to "uefi-preferred" boot mode
In EC2, UEFI boots faster than BIOS, but not all amd64 instance types
support UEFI.  AMIs need to have their boot mode designated, which
created a dilemma: Faster boots, or wider compatibility?

The recently added "uefi-preferred" option solves this: AMIs can be
marked to use UEFI where it's available, but fall back to BIOS on
instance types which do not support UEFI.

This uses bsdec2-image-upload 1.4.6, which recently landed in the
ports tree.

PR:		265697
Reviewed by:	delphij, imp
MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D40470

(cherry picked from commit bcf9147144)
2023-06-21 12:26:00 -07:00
Colin Percival 9f2e54d1b3 EC2: Chase awscli package rename
MFC after:	1 week

(cherry picked from commit 267411d164)
2023-06-15 11:33:50 -07:00
Ed Maste 899ba534a5 release: Report disk image filename
For someone new to the release bits it's not always clear what files are
being created. Report the disk image name explicitly.

Reviewed by:	gjb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39953

(cherry picked from commit 4194bbb34c)
2023-05-06 14:55:33 -04:00
Ed Maste 68ffc1e6ee release: Remove "All Rights Reserved" from FreeBSD Foundation copyrights
(cherry picked from commit 4654ba28fb)
2023-04-27 13:03:03 -04:00
Dave Cottlehuber f8bbe032b2 release/oci: add Oracle Cloud image builder
Provides an OCI (Oracle Cloud Infrastructure) release target for
Oracle's KVM-based VM implementation. Tested using 13.1-RELEASE,
primarily on Ampere CPU on A1.Flex VM shapes, but also works on
amd64 shapes.

- supports cloud-init and custom scripts
- provides a freebsd@ sudo-enabled user
- root user disabled over ssh & console

Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Sponsored by:   SkunkWerks, GmbH
Technical assistance from:  Oracle
Differential Revision: https://reviews.freebsd.org/D34746

(cherry picked from commit 0af49f00b3)
2023-04-11 09:40:53 -04:00
Glen Barber b44388ec02 pkg-stage.sh: update port trailing version information
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit e4e139b828)
2023-03-27 10:11:24 -04:00
Joerg Wunsch 13524c5772
MFC: ARM release build: enable IPv6 SLAAC by default
When building ARM release images, enable IPv6 SLAAC by default in
addition to IPv4 DHCP.

Unlike amd64 (and other desktop/server) releases, ARM releases on SoC
setups are usually deployed by just using the installation image, so
there is no interactive network configuration. Not having IPv6
included by default is kind of an anachronism these days, given that
FreeBSD with the KAME project once pioneered IPv6 technology.

(cherry picked from commit 57228a4933)
2023-02-26 23:22:32 +01:00
Warner Losh 15d0c8a172 release: Don't install ubldr.bin
ubldr.bin was obsoleted by our uboot ports last year, so this is
completely unused in the default config (some customers still use
it, but that's not relevant to this script). Don't copy it at all
since it won't be used for re@ produced images.

Sponsored by:		Netflix
Reviewed by:		kevans, gjb (re@)
Differential Revision:	https://reviews.freebsd.org/D34192

(cherry picked from commit 4e46c6fb35)
2023-02-05 13:46:07 -08:00
Jose Luis Duran a599eea135 release: Remove C-like string comparison operator
Per [(1), i.e. test(1), the string comparison operator should be `=`,
not `==` in sh(1) scripts.

No functional change. FreeBSD's test accepts `==` as an alias for `=`
for compatibility with gnu test's `==` extension.

Reviewed by:	imp@, gjb@
Pull Request:	https://github.com/freebsd/freebsd-src/pull/485

(cherry picked from commit 3f197b101f)
2023-02-05 13:45:55 -08:00
Ed Maste ef120bffbf pkgbase: share rules for packages without pkgdeps
Have liby and libcompat share *-dev and *-lib32_dev rules, and share
*-man rule for libcompat and libelftc.  Also correct name substitution
and description for man rules.

Reviewed by:	manu
Fixes:		5391bcf0f7 ("pkgbase: Do not record dependency on...")
Fixes:		65fa2fd23b ("pkgbase: Do record dependency on non-...")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37964

(cherry picked from commit 0eccd618a3)
2023-02-02 10:35:07 +01:00
Emmanuel Vadot 8de6763fed pkgbase: Do record dependency on non-existent libelftc package
libelftc is an internal lib so it's never installed.
When building with WITH_MANSPLITPKG=yes the libelftc-man package
will have a dependecy on a non-existent libelftc package.

Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 65fa2fd23b)
2023-02-02 10:34:48 +01:00
Emmanuel Vadot 4cffb585c2 pkgbase: Do not record dependency on non-existent libcompat package
libcompat only provides a .a which is put in the -dev package.
Add a special record for it so we do not require a dependency on the
non-existent package FreeBSD-libcompat.

Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 5391bcf0f7)
2023-02-02 10:34:48 +01:00
Emmanuel Vadot a53b1150e4 pkgbase: Stop adding FreeBSD-runtime as a dep for every package
shlib_required/provided is enough for the dependencies and this also
causes problems for packages like rescue which shouldn't depend on runtime
at all.

PR:	268063
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 6933abc3e4)
2023-02-02 10:34:47 +01:00
Emmanuel Vadot b99749e1e5 pkgbase: Create a FreeBSD-games package
And put :
- pom
- caesar
- grdc

Differential Revision:	https://reviews.freebsd.org/D36230

(cherry picked from commit feec04b355)
2023-02-02 10:32:56 +01:00
Emmanuel Vadot ee4bb682f1 pkgbase: Put devmatch in its own package
devmatch is useful on standalone machine but not on jails.
Put devinfo(8) and libdevinfo there too.

Differential Revision:	https://reviews.freebsd.org/D36229

(cherry picked from commit e7a5a60ed5)
2023-02-02 10:32:56 +01:00
Emmanuel Vadot de6eaf5c35 pkgbase: Put devd in its own package
It's not that useful in a jail or in a mdroot.

Differential Revision:	https://reviews.freebsd.org/D36228

(cherry picked from commit ea0850e4be)
2023-02-02 10:32:56 +01:00
Emmanuel Vadot 01db7f820e pkgbase: Put ufs related tools and lib in their own package
It's not really useful in a jail or in a mdroot or even if a users
wants to do a full zfs machine.

Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D36227

(cherry picked from commit a7ffc94849)
2023-02-02 10:32:55 +01:00
Emmanuel Vadot 40b8a8f253 pkgbase: Put zfs utilities and lib in their own package
It is useful to have zfs utilities and lib in a separate package as
it allow users to create image that can support ZFS (i.e. not with
WITHOUT_ZFS in src.conf set) without bloating the default image with
all zfs tools (for example for jails).

Differential Revision:	https://reviews.freebsd.org/D36225

(cherry picked from commit a71ea7bea0)
2023-02-02 10:32:55 +01:00
Emmanuel Vadot e93d2af4be pkgbase: Put geom utilities in their own package
For most users it's not needed to boot and they are also
available in the FreeBSD-rescue package in case an update
break and FreeBSD-geom package isn't updated correctly.

Differential Revision:	https://reviews.freebsd.org/D36224

(cherry picked from commit 0bf688786f)
2023-02-02 10:32:55 +01:00
Emmanuel Vadot 0c4f6e1ec0 pkgbase: Put resolvconf in its own package
It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Differential Revision:	https://reviews.freebsd.org/D36223

(cherry picked from commit 6987b552dd)
2023-02-02 10:32:55 +01:00
Emmanuel Vadot bbc6162c50 pkgbase: Put dhclient in its own package
It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Reviewed by:	emaste, imp
Differential Revision:	https://reviews.freebsd.org/D36222

(cherry picked from commit ab4bd66752)
2023-02-02 10:32:55 +01:00
Emmanuel Vadot b80ee728d2 pkgbase: Put nvmecontrol in its own package
It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D36221

(cherry picked from commit 5f9db65d8a)
2023-02-02 10:32:54 +01:00
Ed Maste e9a573d29c pkgbase: do not record dependency on non-existent liby package
liby-dev provides (only) liby.a.  liby has no headers or man pages, and
there is no liby package.  Add a special case to record no dependency on
the package that does not exist.

PR:		266923
Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37429

(cherry picked from commit 1e9c9ab595)
2022-12-16 10:04:51 -05:00