Commit Graph

8182 Commits

Author SHA1 Message Date
Colin Percival
e50fec56bf Revert "release/Makefile.vm: Use qemu-user-static-devel"
This breaks the weekly snapshot builds.  We'll try again once Warner has
some time to debug the qemu-user-static-devel port.

This reverts commit a04ecddfc7.
2024-06-02 07:07:52 -07:00
Colin Percival
a04ecddfc7 release/Makefile.vm: Use qemu-user-static-devel
This is a newer version of the qemu-user-static code, which is very
much out of date.

Requested by:	imp
2024-05-30 10:00:42 -07:00
Colin Percival
f81c0904f7 Add rtw88 firmware to DVD package set
Add net/wifi-firmware-rtw88-kmod since it is no longer included in
the base system on 15.x.  (It is present in 14.x, so this change will
not be MFCed.)
2024-05-23 17:02:40 -07:00
Colin Percival
d31ed58b9f Modernize DVD package set in preparation for 14.1
Remove archivers/unzip (now in base) and emulators/linux_base-c7 (old
and unlikely to be useful without other linux packages being installed),
ports-mgmt/portmaster (now largely obsolete and discouraged in favour
of using pkg and binary packages) and x11-drivers/xf86-video-vmware
(questionably useful).

Replace devel/git with devel/git@lite (sufficient for most purposes),
and adjust the "ensure the ports exist to sanitize the list" code to
ignore the @lite part when checking that /usr/ports/devel/git exists.

Add sysutils/seatd and x11-wm/sway for wayland support.

MFC after:	1 minute
Differential Revision:	https://reviews.freebsd.org/D45278
2024-05-23 17:01:59 -07:00
Colin Percival
ce7756fdca release: make dependencies, not recursive make
For historical reasons, the vm-release and cloudware-release targets
were written as recursive makes of ${VMTARGETS} and ${CLOUDTARGETS};
this worked fine until we started running `make release -jN` and
had both VM and cloud targets depending on ${QEMUTGT}, at which
point things exploded when we tried to build the port twice at the
same time.

Switch vm-release and cloudware-release to have make dependencies on
their individual components; this way a single make process runs and
is aware of the duplicate dependency (and only runs it once).

MFC after:	5 days
2024-05-09 00:52:25 -07:00
Colin Percival
0b1c5628c7 release: Rework vm_extra_pre_umount
The vm_extra_pre_umount function in vmimage.subr served two purposes:
It removed /etc/resolv.conf and /qemu (if cross-building), and it
provided a function for cloudware to override in order to make cloud
specific changes to the filesystem before constructing a disk image.

This resulted in a number of bugs:
1. When cross-building, the emulator binary was left as /qemu in the
Azure, GCE, Openstack and Vagrant images.
2. The build host's resolv.conf was left as /etc/resolv.conf in the
basic-ci and basic-cloudinit images.
3. When building GCE images, a Google-specific resolv.conf file was
constructed, and then deleted before the disk image was created.

Move the bits needed for running code inside a VM staging directory
from vm_install_base into a new vm_emulation_setup routine, and move
the corresponding cleanup bits from vm_extra_pre_umount to a new
vm_emulation_cleanup routine.

Remove the /qemu and /etc/resolv.conf cleanups from the cloudware
configuration files (where they exist) since we will now be running
vm_emulation_cleanup to remove those even when vm_extra_pre_umount
has been overridden.

Override vm_emulation_cleanup in gce.conf since in that one case (and
*only* that one case) we don't want to clean up resolv.conf (since it
was constructed for the VM image rather than copied from the host).

releng/14.1 candidate.

MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2024-05-06 13:40:47 -07:00
Colin Percival
9287d1853c release: Use qemu when cross-building vm images
For a bit over 5 years, we have used qemu when cross-building cloudware
images; in particular, it's necessary when installing packages which
might include post-install scripts.

Use qemu in the vm-images target too; while "generic" vm images don't
install packages, they still run newaliases and /etc/rc.d/ldconfig,
both of which fail without appropriate emulation.

MFC after:	1 week
2024-05-04 23:59:29 -07:00
Lexi Winter
2f9966ff63 packages: add package for NTP
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1193
2024-05-04 07:41:54 -06:00
Colin Percival
f4b08097d8 release: Stage non-UFS images in vm-images-stage
When the VM image building code was updated to support building
non-UFS images, the vm-images-stage target was not updated to
install those newly built images to the FTP site.  As a result, we
have been sending weekly snapshot announcements since August claiming
that ZFS VM images are available when they are not in fact present
anywhere publicly accessible.

Fixes:	32ae9a6b39 "release: Build UFS and ZFS VM images"
Reported by:	Michael Dexter
MFC after:	5 days
2024-05-01 11:02:49 -07:00
Lexi Winter
e05b6502f9 package: fix dependency generation
A bug in release/packages/generate-ucl.sh causes package dependencies
(other than shlib depends) to not be generated correctly, meaning
packages are missing their dependencies.

generate-ucl.sh creates the UCL file by:

1. copying ${uclsource} (template.ucl) to ${uclfile}
2. appending dependencies to ${uclfile}
3. calling generate-ucl.lua on ${uclsource} to create ${uclfile}

This breaks because the dependencies added in step 2 are overwritten in
step 3.

Fix this by calling generate-ucl.lua with ${uclfile} as both the input
and output file, so anything we added to ${uclfile} is preserved.

Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1203
2024-04-29 08:31:36 -06:00
Lexi Winter
2ef5a8624a package: FreeBSD-periodic should depend on FreeBSD-cron
Reported by: des
Reviewed by: imp, des
Pull Request: https://github.com/freebsd/freebsd-src/pull/1204
2024-04-29 08:29:20 -06:00
Lexi Winter
1b3c07bed6 package: move OpenBSM auditing into its own package
Move auditing runtime (auditd, etc.) into the new FreeBSD-audit package.
Also move the runtime OpenBSM manual pages from libbsm into auditd so
they get installed with the right package.

Add an UPDATING entry noting the new packages.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1197
2024-04-28 22:33:06 -06:00
Kyle Evans
9245ced9c8 release: remove the RPI CM4s .dtb
This isn't actually packaged by the sysutils/rpi-firmware port, so we
cannot include it in the image.  Fix the RPI release build until an
interested party adds it to the port and packages are available.

Reported by:	cperciva
2024-04-25 17:10:32 -05:00
Jose Luis Duran
4f223e0da7 release: Change vmimage EFI GPT label
This matches the default bsdinstall nomenclature.

PR: 278480
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1188
2024-04-23 15:13:40 -06:00
Lexi Winter
c3dd71ab4c share/examples: move examples into appropriate packages
Allow a new variable SE_xxxPACKAGE to be used to place an example group
into a package.

Move the following examples into existing appropriate packages:

- bhyve examples into FreeBSD-bhyve
- bootforth examples into FreeBSD-bootloader
- csh examples into FreeBSD-csh
- ipfw examples into FreeBSD-ipfw
- jail examples into FreeBSD-jail
- pf examples into FreeBSD-pf
- ppp examples into FreeBSD-ppp
- printing examples into FreeBSD-lp
- uefisign examples into FreeBSD-efi-tools
- ypldap examples into FreeBSD-yp
- hast examples into FreeBSD-hast

Move all other examples into the new 'FreeBSD-examples' package.

This removes a significant number of files from the FreeBSD-utilities
package.

Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1176
2024-04-22 22:36:35 -06:00
Lexi Winter
8aaa58ada4 package: add DESC and COMMENT for cron package
Reviewed by: imp, manu, Mina Galic
Pull Request: https://github.com/freebsd/freebsd-src/pull/1172
2024-04-22 22:36:35 -06:00
Klaus Küchemann
1bd4f769ca add dtb support for RPI CM4, CM4s, CM4_ioBoard
Signed-off-by: Klaus Küchemann <maciphone2@googlemail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1182
2024-04-19 16:54:32 -06:00
Lexi Winter
dbd0366f34 package: move lpr into its own package
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1171
2024-04-19 16:54:31 -06:00
Colin Percival
567cbd8ff1 release: Build dvd image before staging pkgs
This missing dependency is only visible with -jN (which was otherwise
broken until recently) and only when building DVD images (which aren't
included in weekly snapshots and thereby slipped past testing).

MFC after:	3 days
2024-04-14 16:45:40 -07:00
Colin Percival
7ffa1f14e3 Makefile.vm: Set CLEANDIRS correctly for vm-image
With multiple filesystems and disk image formats, we now use different
staging directories; we need to include them all in CLEANDIRS.

Fixes:	97bd53ef4d "Makefile.vm: Fix duplicate rc.conf files"
MFC after:	3 days
2024-04-14 16:45:40 -07:00
John Baldwin
ea2663040d 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
2024-04-14 16:45:40 -07:00
Colin Percival
5c213bf01a cloudware: allow disk format to be a list
Make basic-cloudinit available both in qcow2 and raw formats

MFC After:	3 days
Co-Authored-By:	bapt
Sponsored by:	OVHCloud (original patch from bapt)
Differential Revision:	https://reviews.freebsd.org/D44747
2024-04-14 16:45:40 -07:00
Colin Percival
4d7174b1d9 release: Fix powerpc boot block uudecoding
Confusingly, uuencode writes to stdout by default, but uudecode does not.

Fixes:	6c3e01bf85 "release: Randomize powerpc boot block file name"
MFC after:	3 days
2024-04-12 17:52:28 -07:00
Colin Percival
6c3e01bf85 release: Randomize powerpc boot block file name
With parallel builds enabled, we can end up building multiple ISOs at
once, which causes problems if mkisoimages.sh uses a consistent file
name "/tmp/hfs-boot-block".

MFC after:	3 days
2024-04-12 10:58:09 -07:00
Colin Percival
6c87aed39c 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
2024-04-12 10:58:09 -07:00
Mina Galić
2039437c76 ec2: homedir bug fixed in 24.1.4
This bug fix is due to be released in Quarterly:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275896

While here, overwrite the `doas` stanza, which needs to correspond to
the user that we are creating.

MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1163
2024-04-11 14:12:16 -07:00
Colin Percival
6f454c211b 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
2024-04-11 09:28:05 -07:00
Baptiste Daroussin
eeec7a1199 Revert "cloudware: allow disk format to be a list"
This reverts commit 6ec9aaf63c.

Requested by:	cperciva
2024-04-11 17:13:29 +02:00
Baptiste Daroussin
6ec9aaf63c cloudware: allow disk format to be a list
Make basic-cloudinit available both in qcow2 and raw formats

MFC After:	1 week
Reviewed by:	Allanjude
Sponsored by:	OVHCloud
Differential Revision:	https://reviews.freebsd.org/D44747
2024-04-11 16:07:50 +02:00
Colin Percival
2c01e189ff Reapply "release.sh: Add -jN to make release"
With the latest changes to release/Makefile, it is now possible to
run `make release -jN` without the build failing (at least in my
latest tests).

This reverts commit 7b707e797b.

MFC after:	1 week
2024-04-09 20:29:16 -07:00
Colin Percival
a1bff97300 release: Don't reuse disc1/bootonly directories
The disc1 and bootonly directories have files distributed into them
for use in "full" and "mini" images; the former are disc1.iso and
memstick.img, and the latter is bootonly.iso and mini-memstick.img.

Unfortunately the scripts which package a directory tree into an ISO
or memory stick image also modify the directory, for example to
create an appropriate /etc/fstab file; so creating two images at the
same time breaks.

Resolve this by copying disc1 to disc1-disc1 and disc1-memstick,
and copying bootonly to bootonly-bootonly and bootonly-memstick,
before using those directories for constructing the ISO+memstick
images.

MFC after:	1 week
2024-04-09 20:29:16 -07:00
Colin Percival
65c603ed65 release: distributekernel before packagekernel
With these as a single make command, `make -j` breaks when it tries to
package up a kernel which hasn't been distributed yet.

MFC after:	1 week
2024-04-09 20:29:16 -07:00
Colin Percival
93e4813b9a release: make -j compat: cd inside subshell
Place instances of "cd foo && bar" inside subshells for compatibility
with modern make(8) which uses a single shell for the duration of a
makefile target.

MFC after:	1 week
2024-04-09 20:29:16 -07:00
Colin Percival
6baddb6b11 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
2024-03-29 00:12:52 -07:00
Baptiste Daroussin
d72a37b535 pkgbase: remove post-install script for kernel
the hint file is now directly packages within the package itself.

Reported by:	jhb
2024-03-27 09:08:39 +01:00
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