Skip to content

Instantly share code, notes, and snippets.

@jperkin
jperkin / mozilla-rootcerts-upgrade.md
Last active Jun 15, 2022
Upgrading mozilla-rootcerts on obsolete images
View mozilla-rootcerts-upgrade.md

Problem

Images such as 16.4.1 / 2016Q4 are too old to be able to easily upgrade to the latest mozilla-rootcerts package available in e.g. the trunk repository, and many root certificates are now unsupported.

To fix existing systems until they can be upgraded to a supported release, the following procedure can be used, though note it is very much a hack, and is e.g. overwriting package-managed files, but should otherwise be harmless.

Verify

As an example, 16.4.x systems are unable to verify the current certificate of Joyent Manta:

View gist:e04c8c4c55e8e6f5b7c38ba8b85b1bbd
$ pkgin pc rc.subr
Information for https://pkgsrc.joyent.com/packages/Darwin/11.0/x86_64/All/rc.subr-20210830.tgz:
Files:
/opt/pkg/etc/rc.conf.example
/opt/pkg/etc/rc.subr
/opt/pkg/etc/rc.d/DAEMON
/opt/pkg/etc/rc.d/LOGIN
/opt/pkg/etc/rc.d/NETWORKING
/opt/pkg/etc/rc.d/SERVERS
View pkg_install-macos-posix_spawn.diff
diff --git a/pkgtools/pkg_install/files/lib/fexec.c b/pkgtools/pkg_install/files/lib/fexec.c
index 540159863aa..592bd51f886 100644
--- a/pkgtools/pkg_install/files/lib/fexec.c
+++ b/pkgtools/pkg_install/files/lib/fexec.c
@@ -59,6 +59,16 @@
#include "lib.h"
+/*
+ * Newer macOS releases are not able to correctly handle vfork() when the
View pkg_install-system.diff
diff --git a/pkgtools/pkg_install/files/add/perform.c b/pkgtools/pkg_install/files/add/perform.c
index 65e20c55426..197d814705a 100644
--- a/pkgtools/pkg_install/files/add/perform.c
+++ b/pkgtools/pkg_install/files/add/perform.c
@@ -970,6 +970,7 @@ static int
run_install_script(struct pkg_task *pkg, const char *argument)
{
int ret;
+ const char *cmd;
char *filename;
View gist:9335c3a396fae60bb845c54f2a10d06b
[ 3.5858290] panic: kernel diagnostic assertion "!(timo == 0 && intr == false)" failed: file "/usr/src/sys/kern/kern_synch.c", line 235
[ 3.5858290] cpu0: Begin traceback...
[ 3.5858290] vpanic() at netbsd:vpanic+0x156
[ 3.5858290] __x86_indirect_thunk_rax() at netbsd:__x86_indirect_thunk_rax
[ 3.5858290] kpause() at netbsd:kpause+0x1a1
[ 3.5858290] comopen() at netbsd:comopen+0x48b
[ 3.5858290] cdev_open() at netbsd:cdev_open+0xae
[ 3.5858290] spec_open() at netbsd:spec_open+0x176
[ 3.5858290] VOP_OPEN() at netbsd:VOP_OPEN+0x3c
[ 3.5858290] vn_open() at netbsd:vn_open+0x32e
View snap.md
$ node expander.js >/tmp/1
$ vi proptable.js
$ git diff proptable.js
diff --git a/src/vm/node_modules/proptable.js b/src/vm/node_modules/proptable.js
index 37b75cc0..c9cfc7cf 100644
--- a/src/vm/node_modules/proptable.js
View aarch64-arch.diff
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk
index 75c66f6c5dbf..a9327b4bda8e 100644
--- a/mk/platform/Darwin.mk
+++ b/mk/platform/Darwin.mk
@@ -208,6 +208,15 @@ _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U} # install(1) option to strip
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysctl -n kern.argmax
+.if ${MACHINE_ARCH} == "aarch64"
+CWRAPPERS_APPEND.cc+= -arch arm64
View mysql.buildlink3.mk.md
# $NetBSD: mysql.buildlink3.mk,v 1.32 2021/05/13 15:29:04 jdolecek Exp $
#
# This file is included by packages that require some version of the
# MySQL database client.
#
# User-settable variables:
#
# MYSQL_VERSION_DEFAULT
#	The preferred MySQL version.
View py36-numpy.md
$ awk -F= '/^PKGNAME/ { pkg = $2 } /^ALL_DEP.*py36-numpy/ {print pkg}' /nfs/bulklog/upstream/trunk/meta/presolve
py36-biopython-1.74nb1
py36-gds-1.6nb1
py36-bcolz-1.2.1nb1
py36-boost-1.76.0
py36-h5py-2.9.0nb1
py36-gdal-3.3.0nb1
py36-OpenGL-3.1.5nb2
py36-OpenGL-accelerate-3.1.5nb1
View ghc-rpath.md

Diff:

diff --git a/lang/ghc88/Makefile b/lang/ghc88/Makefile
index 318fb2649a2..133d0cb95d8 100644
--- a/lang/ghc88/Makefile
+++ b/lang/ghc88/Makefile
@@ -202,20 +202,6 @@ GENERATE_PLIST+= \
 # There is an unused script which don't pass the portability test.
 CHECK_PORTABILITY_SKIP+=	distrib/prep-bin-dist-mingw