From 8e4ed050e1869b1fe000fb4b4a1627f749169233 Mon Sep 17 00:00:00 2001 From: Chris Rees Date: Fri, 26 Feb 2021 22:10:17 +0000 Subject: [PATCH 1/2] Add ability to add custom packages Since drm-kmod is never going to match 12.2, we should just fix this now. Any line starting with https in the package files is pulled separately. They should be in reverse order of dependencies. I've build drm-kmod for 12.2, but of course these could come from anywhere. --- build.sh | 15 ++++++--------- settings/packages.common-12 | 7 ++++--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index 7d23fee6..d62c18eb 100755 --- a/build.sh +++ b/build.sh @@ -183,9 +183,12 @@ packages() mount_nullfs ${packages} ${uzip}/var/cache/pkg mount -t devfs devfs ${uzip}/dev # FIXME: In the following line, the hardcoded "i386" needs to be replaced by "${arch}" - how? - cat "${cwd}/settings/packages.common-${MAJOR}" | sed '/^#/d' | sed '/\!i386/d' | xargs /usr/local/sbin/pkg-static -c "${uzip}" install -y - cat "${cwd}/settings/packages.${desktop}" | sed '/^#/d' | sed '/\!i386/d' | xargs /usr/local/sbin/pkg-static -c "${uzip}" install -y - + for p in common-${MAJOR} ${desktop}; do + sed '/^#/d;/\!i386/d;/^https/d' "${cwd}/settings/packages.$p" | \ + xargs /usr/local/sbin/pkg-static -c "${uzip}" install -y + sed -ne "/^https/s/%%ARCH%%/${arch}/p" "${cwd}/settings/packages.$p" | \ + xargs /usr/local/sbin/pkg-static -c "${uzip}" add + done # Install the packages we have generated in pkg() that are listed in transient-packages-list ls -lh "${packages}/transient/" while read -r p; do @@ -196,12 +199,6 @@ packages() /usr/local/sbin/pkg-static -r ${uzip} add "${packages}/transient/${p}" # pkg-static add has no -y done <"${packages}/transient/transient-packages-list" - # Workaround for kernel-related packages being broken in the default package repository - # as long as the previous dot release is still supported; FIXME - # https://forums.freebsd.org/threads/i915kms-package-breaks-on-12-2-release-workaround-build-from-ports.77501/ - # FIXME: Add https://darkness-pi.monwarez.ovh/posts/synth-repository/ properly. How? - # IGNORE_OSVERSION=yes /usr/local/sbin/pkg-static -c "${uzip}" add https://darkness-pi.monwarez.ovh/amd64/All/drm-fbsd12.0-kmod-4.16.g20200221.txz - # For now we are just going back to using 12.1 rather than 12.2 /usr/local/sbin/pkg-static -c ${uzip} info > "${cdroot}/data/system.uzip.manifest" cp "${cdroot}/data/system.uzip.manifest" "${isopath}.manifest" rm ${uzip}/etc/resolv.conf diff --git a/settings/packages.common-12 b/settings/packages.common-12 index 35740c15..6e0b6f1a 100644 --- a/settings/packages.common-12 +++ b/settings/packages.common-12 @@ -10,14 +10,12 @@ xf86-input-mouse xf86-input-vmmouse xf86-video-ati xf86-video-cirrus +xf86-video-intel xf86-video-scfb xf86-video-vesa xf86-video-vmware xf86-video-qxl # !i386 -drm-kmod -drm-legacy-kmod libva-intel-driver -drm-kmod # nvidia-driver # !i386 # Is now handled in build.sh initgfx() mesa-libs mesa-dri @@ -60,3 +58,6 @@ b43-fwcutter dsbdriverd # Control screen brightness on some Intel-based machines including MacBook Pro intel-backlight +https://www.bayofrum.net/~crees/pkg/hello-12.2%%ARCH%%-drm/gpu-firmware-kmod-g20201213.txz +https://www.bayofrum.net/~crees/pkg/hello-12.2%%ARCH%%-drm/drm-fbsd12.0-kmod-4.16.g20201016_1.txz +https://www.bayofrum.net/~crees/pkg/hello-12.2%%ARCH%%-drm/drm-kmod-g20190710_1.txz From a4f1dd628868e6928ea11ddce62c35f63e649ca6 Mon Sep 17 00:00:00 2001 From: Chris Rees Date: Sat, 27 Feb 2021 20:38:33 +0000 Subject: [PATCH 2/2] Only fetch experimental packages from cirrus These are trusted, as you can refer back to the github source Cache these in the usual place Currently supported for 12.1 and 12.2; they are built from https://github.com/crees/drm-kmod-FreeBSD-12, so the .cirrus.yml would need updating for further versions --- build.sh | 13 ++++++++++--- settings/packages.common-12 | 5 ++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index d62c18eb..61e29d75 100755 --- a/build.sh +++ b/build.sh @@ -184,10 +184,17 @@ packages() mount -t devfs devfs ${uzip}/dev # FIXME: In the following line, the hardcoded "i386" needs to be replaced by "${arch}" - how? for p in common-${MAJOR} ${desktop}; do - sed '/^#/d;/\!i386/d;/^https/d' "${cwd}/settings/packages.$p" | \ + sed '/^#/d;/\!i386/d;/^cirrus:/d' "${cwd}/settings/packages.$p" | \ xargs /usr/local/sbin/pkg-static -c "${uzip}" install -y - sed -ne "/^https/s/%%ARCH%%/${arch}/p" "${cwd}/settings/packages.$p" | \ - xargs /usr/local/sbin/pkg-static -c "${uzip}" add + pkg_cachedir=/var/cache/pkg + mkdir -p ${uzip}${pkg_cachedir}/furybsd-cirrus + for url in $(sed -ne "s,^cirrus:,https://api.cirrus-ci.com/v1/artifact/,;s,%%ARCH%%,$arch,;s,%%VER%%,$VER,p" "${cwd}/settings/packages.$p"); do + pkgfile=${url##*/} + if [ ! -e ${uzip}${pkg_cachedir}/furybsd-cirrus/${pkgfile} ]; then + fetch -o ${uzip}${pkg_cachedir}/furybsd-cirrus/ $url + fi + /usr/local/sbin/pkg-static -c "${uzip}" add ${pkg_cachedir}/furybsd-cirrus/${pkgfile} + done done # Install the packages we have generated in pkg() that are listed in transient-packages-list ls -lh "${packages}/transient/" diff --git a/settings/packages.common-12 b/settings/packages.common-12 index 6e0b6f1a..7df4a465 100644 --- a/settings/packages.common-12 +++ b/settings/packages.common-12 @@ -19,6 +19,7 @@ libva-intel-driver # nvidia-driver # !i386 # Is now handled in build.sh initgfx() mesa-libs mesa-dri +gpu-firmware-kmod open-vm-tools virtualbox-ose-additions xauth @@ -58,6 +59,4 @@ b43-fwcutter dsbdriverd # Control screen brightness on some Intel-based machines including MacBook Pro intel-backlight -https://www.bayofrum.net/~crees/pkg/hello-12.2%%ARCH%%-drm/gpu-firmware-kmod-g20201213.txz -https://www.bayofrum.net/~crees/pkg/hello-12.2%%ARCH%%-drm/drm-fbsd12.0-kmod-4.16.g20201016_1.txz -https://www.bayofrum.net/~crees/pkg/hello-12.2%%ARCH%%-drm/drm-kmod-g20190710_1.txz +cirrus:github/crees/drm-kmod-FreeBSD-12/main/binaries/drm-fbsd12.0-kmod-%%VER%%%%ARCH%%.txz