Commit graph

8147 commits

Author SHA1 Message Date
Baptiste Daroussin a977444652 cloudinit: fix creation of cloudinit ready VMs
The framework do not support multiple format images, so this last minute
addition of qcow2 format was clearly not a good idea.

while here fix a typo

Reported by:	cperciva
2024-03-22 18:03:27 +01:00
Baptiste Daroussin 45d83c3926 pkgbase: add a mechanism to be able to force a give ucl include
This is made in order to be able to find add the post-install scripts
for the kernel, where PKGNAME varies for each KERNCONF but we don't want
to dynamically duplicated the kernel.ucl file.

At the same time we don't want the *-dbg* packages to actually include
those post-install scripts
2024-03-20 09:39:18 +01:00
Baptiste Daroussin f8e46fd61e pkgbase: rework certctl package to only run rehash on the main package
Rework how ucl manifest are generated leveraging ucl features and flua

now the ucl generation is done via a lua script which uses libucl to
ingest the template and use variables as defined in its command line.

the template will include only if it exist a ucl file named after the
package name which will complement the template or overwrite what was
defined in the template if defined in this specific ucl file

this allows to overwrite license, but add script only to the packages
who actually needs them.

As a results the post install scripts are now only added to the right
package and not also added to the subpackages like -man or -dev

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44374
2024-03-19 07:58:29 +01:00
Baptiste Daroussin 78b6117dac release: add basic cloudinit images
Provide both zfs and ufs images which a 1MB partition reserved for the
config drive wearing a GPT Label "config-drive" to allow consumer to
know where they should push the config drive on the provided image.

2 formats available: qcow2 and raw

This has been tested on OVHCloud baremetal via "bring your own image"
Also tested on openstack

Reviewed by:		emaste
Sponsored by:		OVHCloud
Differential Revision:		https://reviews.freebsd.org/D44369
2024-03-18 10:58:50 +01:00
Ed Maste 1e4cd5ed54 release: remove binutils package data
GDB was the final GNU binutils component included in the base system,
but was removed in 2020.  Nothing provides a pkgbase binutils package
any longer.

Fixes: 1c0ea326aa ("Retire obsolete GDB 6.1.1")
Sponsored by:	The FreeBSD Foundation
2024-03-17 08:11:57 -04:00
Baptiste Daroussin 5c318f5ce3 pkgbase: remove packages which do not exists anymore 2024-03-15 14:51:40 +01:00
Baptiste Daroussin b8c053c9a6 nuageinit: add missing comment and descriptions for the package 2024-03-15 11:39:20 +01:00
Muhammad Moinur Rahman 65190700cb
release/tools: Add support for building armv7 vm
Currently there is no support for generating armv7 vm images in the
release artifacts. In fact in terms of release artifacts and
architecture there is no good reason to have a vm release artifact for
armv7 as those are mostly used in SOCs or embedded boards. However
considering that developers actually do need an easy way to test armv7
with a vm running this is really important. As part of pre-commit ci for
developers this can be really helpful for the end developers.

Approved by:	cperciva, imp, re
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43952
2024-02-19 00:49:52 +01:00
Mitchell Horne 3fb8f1272b riscv: add firmware partitions to GENERICSD.conf
Create two partitions in the existing space at the beginning of the
image (8MB). These are intended to hold u-boot SPL and u-boot proper.

The partition types selected are compatible with SiFive boards, e.g. the
HiFive Unmatched. They can easily be overridden for a platform that uses
the same scheme but different partition types, e.g. the StarFive
VisionFive v2. Firmware is not actually installed, this too is left for
the user.

It is not as simple to create the firmware partitions after the fact,
e.g. with partition indices 3 and 4. It is a shortcoming of current day
u-boot that the SPL loader looks for a specific partition index, rather
than the partition type, meaning that we will fail to boot if partition
2 doesn't contain u-boot.

Thus, our GENERICSD images become more generically usable with current
RISC-V hardware/firmware platforms.

Reviewed by:	manu, karels, imp
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43849
2024-02-14 11:16:54 -04:00
Mitchell Horne 2af03ebfb8 release: make SD card partition layout more flexible
Currently the partition layout is hardcoded to create an EFI/FAT
partition and a UFS root partition, with some logic to handle GPT/MBR
differences.

On RISC-V platforms we are seeing the emerging pattern that firmware
should be placed in a partition of a known type, rather than just a
known sector of the disk. Thus, some functionality is needed to
customize the layout for SD card images.

Add a hook, arm_create_partitions(), which can be overridden to insert
additional platform-specific partitions, possibly preceding the standard
EFI and UFS ones. A couple of new variables are added to track the
indices, e.g. ROOTFSPART_SUFFIX=p2.

In a couple places this de-duplicates the GPT/MBR logic.

Reviewed by:	manu, karels, imp
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43848
2024-02-14 11:16:54 -04:00
Mitchell Horne 94b86c12f1 release: de-duplicate arm.subr fstab logic
These days, the entries are the identical for GPT and MBR.

Reviewed by:	manu, karels, imp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43847
2024-02-14 11:16:54 -04:00
Li-Wen Hsu 63007e4611
release: Add AZURE to CLOUDWARE
Let Azure use the image directly built by the release engineering team.

Reviewed by:	emaste
Approved by:	cperciva (re)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41906
2024-02-08 13:49:01 +08:00
Emmanuel Vadot b6e9a7a2e2 Reapply "pkgbase: Create a FreeBSD-dtb package"
This reverts commit 9bbe06b004.

Before that dtbs where included in each kernel packages which prevents
us to install multiple kernels.

Fix mtree-to-plist.awk to only generate a dtb.plist when we create
the kernel one (because dtb are installed during make installkernel).

Sponsored by:   Beckhoff Automation GmbH & Co. KG
2024-02-03 09:49:12 +01:00
Jose Luis Duran ef35e5eaee release: Add the Ed25519 vagrant insecure key
Both insecure keys, RSA and Ed25519, are required.

Obtained from:	b40f6e5fda
Reviewed by:	imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/835
2024-02-02 21:05:49 -07:00
Jose Luis Duran 0fa637ffee release: Allow sudo -g anyone and sudo -u anyone -g anytwo
When only the user (ALL) is specified explicitly, and the group is
implied, only sudo -u works.  Specifying both the user and group, like
(ALL:ALL), is required to:

1. Use sudo -g by itself (with no -u user)
2. Use sudo -u and -g together, with a -g group that is different from
   the -u user's primary group

Obtained from:	1d13533ea3
Reviewed by:	imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/835
2024-02-02 21:05:49 -07:00
Graham Perrin 5ff76402da pkg-stage.sh: add x11/sddm
MFC After: 2 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/996
2024-02-02 18:34:59 -07:00
Emmanuel Vadot 9bbe06b004 Revert "pkgbase: Create a FreeBSD-dtb package"
Somehow this doesn't work iwth make packages due to some kind of a race.
The package is first created correctly but later in the process it is
overwritten by a badly created empty package.
Revert in the mean time so we can have working pkgbase on arm/arm64

This reverts commit a5afd7920d.
2024-02-02 11:39:51 +01:00
Emmanuel Vadot a5afd7920d pkgbase: Create a FreeBSD-dtb package
Before that dtbs where included in each kernel packages which prevents
us to install multiple kernels.

Differential Revision:	https://reviews.freebsd.org/D43632
Reviewed by:	bapt
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2024-01-29 19:24:25 +01:00
Colin Percival 7b707e797b Revert "release.sh: Add -jN to make release"
The release-building code is not fully parallel-safe yet.

This reverts commit 9c1bad2da5.

Reported by:	jrtc27
2024-01-28 21:43:56 -08:00
Colin Percival 9c1bad2da5 release.sh: Add -jN to make release
The `make release` command now creates VM and cloudware images (if
enabled) in addition to disk images; this results in a very large
number of 'make installworld' commands running sequentially.  Adding
-jN should speed this up significantly.

MFC after:	1 month
X-MFC-to:	stable/14
2024-01-28 18:08:23 -08:00
Xin LI 72dd306e44 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
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D43557
2024-01-26 19:09:39 -08:00
Ed Maste 2e9b8c8c1e release: rework distributions list
Components like base.txz and ports.txz are called distributions in the
installer, and with the introduction of pkgbase we will start dealing
with normal pkg packages in the installer.  Rename EXTRA_PACKAGES to
DISTRIBUTIONS, and move base.txz and kernel.txz to that list.

This introduces no functional change but is a small cleanup in advance
of some pkgbase experimentation.

Reviewed by:	cperciva
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D43544
2024-01-24 09:13:51 -05:00
Mike Karels 6137b5f7b8 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
2024-01-15 07:28:53 -06:00
Xin LI e872a4013f 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
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D43411
2024-01-11 21:38:04 -08:00
Mike Karels 4347ef6050 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
MFC after:	1 month
Reviewed by:	rgrimes
Differential Revision:	https://reviews.freebsd.org/D43296
2024-01-05 13:41:24 -06:00
Jose Luis Duran adc215de9c release: Add missing /var/crash ZFS dataset
This matches the layout from bsdinstall.

MFC after:	1 week
Fixes:	89585511cc ("release: Add support for creating ZFS-based VM images")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/981
2024-01-02 12:51:13 -05:00
Colin Percival 8a735ffdf0 EC2: Bump AMI size to 6 GB
This week's cloud-init ZFS snapshots ran out of disk space.
2023-12-28 14:24:46 -08:00
Brad Davis 863975b684 release/Makefile.vm: Add cloudware overrides
Allow the cloudware *_FLAVOURS and *_FSLIST values to be overridden
at the command line, to assist users who want to e.g. build only one
of the many EC2 AMIs available.
2023-12-15 10:08:50 -08:00
Baptiste Daroussin 5faaa602ce pkgbase: propagate SRCRELDATE to the packages correctly
MFC After:		3 days
Reviewed by:		manu
Differential Revision:	https://reviews.freebsd.org/D42892
2023-12-04 22:27:57 +01:00
Baptiste Daroussin 6084d98949 pkgbase: kill circular dependency
clang was set to depend on clang-dev, but clang-dev already depends
on clang by design

MFC After:	3 days
2023-12-04 17:27:51 +01:00
Baptiste Daroussin 99b8c0c35b pkgbase: create source package
FreeBSD-src for all the sources but the kernel
FreeBSD-src-sys just for the kernel

MFC After:		3 days
Reviewed by:		manu
Differential Revision:	https://reviews.freebsd.org/D42651
2023-12-04 09:05:03 +01:00
Colin Percival 7d0ee5ebd0 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")
2023-12-03 13:39:30 -08:00
Colin Percival 97bd53ef4d 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
2023-11-27 13:35:41 -08:00
Colin Percival a959ae1c50 releng-gce: Add missing _
Fixes:	1b10bdf0e2 "releng-gce: Add ZFS support to GCE"
MFC after:	3 days
2023-10-19 15:46:59 -07:00
Emmanuel Vadot 0983e80a9a pkgbase: Move blacklist utilities to a new package
Unbloat a bit FreeBSD-utilities.
The only package that will depends on this new one is FreeBSD-ssh
which not anyone have in some setup.
And this will allow to have small pkgbase setup with ssh without
having to bring the bloated FreeBSD-utilities package
Name the package blocklist to reflect upstream futur changes.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D42148
2023-10-11 21:07:05 +02:00
Colin Percival 1f4ce7a39f EC2: Add experimental cloud-init images
Known issues:

1. The ec2-user user is created with a homedir of /usr/home/ec2-user
instead of /home/ec2-user; this appears to be a bug in cloud-init's
FreeBSD support.

2. Cloud-init configures IPv4 networking but not IPv6 networking.

releng/14.0 candidate.

Discussed with:	gjb
Reviewed by:	imp
MFC after:	5 days
Relnotes:	yes
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41793
2023-09-28 15:18:46 -07:00
Colin Percival fada6e2389 EC2: Split off reusable configuration bits
Split ec2-base.conf into ec2-base.conf and a reusable ec2.conf,
similar to how Vagrant flavours share a common vagrant.conf.

releng/14.0 candidate.

Discussed with:	gjb
MFC after:	5 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41792
2023-09-28 15:18:46 -07:00
Colin Percival 7494fb6b7d EC2: Flavour existing AMIs as "base"
Using the recently-added "cloudware flavours" mechanism, turn the
existing EC2 AMIs into a new "base" flavour.  The only user-visible
change is that AMI names now include the word "base".

releng/14.0 candidate.

Discussed with:	gjb
Reviewed by:	imp
MFC after:	5 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41791
2023-09-28 15:18:46 -07:00
Colin Percival e6eeac9b71 release/Makefile.vm: Add support for CW flavours
There are two "Vagrant" images right now: "Vagrant Image for VirtualBox"
and "Vagrant Image for VMWare".  Rather than listing these separately in
a CLOUDWARE list, place "VAGRANT" into a CLOUDWARE_TYPES list and then
use a VAGRANT_FLAVOURS variable to identify the two versions.  Add make
logic to allow defaults (in this case, image format and filesystem) to
be specified once for VAGRANT and inherited by both flavours.

This will make future work to add flavoured EC2 images simpler.

releng/14.0 candidate.

Discussed with:	gjb
Reviewed by:	imp
MFC after:	5 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41790
2023-09-28 15:18:46 -07:00
Colin Percival fcbeeb5ff4 release/Makefile.vm: Garbage collect unused bits
The cw*-package targets were introduced in February 2015 as part of
adding support for building GCE images; but GCE support was reworked
in June 2015 and the cw*-package targets were in fact never used.
Remove them.

The *_DISK variables were introduced in February 2015 as part of
adding the cloudware-install target; this was removed in May 2016 as
the cloudware images are published via the respective cloud systems
and not published as disk images via the FreeBSD FTP site.  As such,
the *_DISK variables are not unused; remove them.

releng/14.0 candidate.

Discussed with:	gjb
Reviewed by:	imp
MFC after:	5 days
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41789
2023-09-28 15:18:46 -07:00
Mark Johnston 63aa2e9134 release/ec2: Remove references to portsnap
We no longer install a default portsnap.conf, so the sed invocation just
generates an error.

Reviewed by:	cperciva
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42003
2023-09-27 19:03:25 -04:00
John Baldwin 5919ab2991 powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41958
2023-09-25 07:55:18 -07:00
Mikaël Urankar 36468371ce pkgbase: Fix ucl for libcompiler_rt
It's only a -dev package now so add it to the list of -dev package
that don't have non-dev package.

PR:	273859
2023-09-22 11:42:21 +02:00
Ed Maste 8ee478dfd4 release: stop generating mergemaster databases
mergemaster was deprecated some time ago and will be removed from
FreeBSD 15.

Reviewed by:	imp
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41797
2023-09-20 07:28:40 -04:00
Doug Rabson 78847e1e59 pkgbase: Move headers and libs out of runtime and utilities
Headers from src/include were in the runtime-dev package but
subdirectories of src/include ended up in utilities-dev by default.
Neither package is a good choice - the headers in src/include are not
useful without the libraries contained in clibs-dev.

This moves the standard C headers to clibs-dev (C++ headers are already
in this package). While working on this, I found that various clang
libraries and headers were also bundled into utilities-dev by default
so these are also moved to clang-dev.

I also added a FreeBSD-build-essential meta package to make it simple to
install all the toolchain parts.

PR:		254173
Reviewed byb:	manu
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D41815
2023-09-12 13:22:21 +01:00
Ed Maste b7528b16c6 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
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41751
2023-09-06 14:56:40 -04:00
Glen Barber 82c57e2a75 release: remove arm/armv6 RPI-B configuration file
The arm/armv6 RPI-B images are deprecated in 15 and 14.
An MFC to stable/14 will follow.

MFC after:	3 days
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-31 19:24:38 -04:00
Li-Wen Hsu 1b10bdf0e2
releng-gce: Add ZFS support to GCE image buliding and uploading
Approved by:	delphij (re), gjb (re)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41527
2023-08-30 01:41:43 +08:00
Li-Wen Hsu 78f901dcbd
releng-azure: Add ZFS support to Azure image buliding and uploading
Approved by:	gjb (re)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41454
2023-08-30 01:40:39 +08:00
Li-Wen Hsu 0fe6998d8a
releng-azure: Use port name to install Azure CLI
To overcome package name changing on default Python version updates.

Approved by:	gjb (re)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41453
2023-08-30 01:39:11 +08:00