Skip to content

Instantly share code, notes, and snippets.

View bdrewery's full-sized avatar

Bryan Drewery bdrewery

  • Seattle, Washington
View GitHub Profile
@bdrewery
bdrewery / tree.sh
Created August 17, 2012 01:04
pkgng tree view script for FreeBSD
#! /bin/sh
# Copyright (c) 2012 Bryan Drewery <bryan@shatow.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer
# in this position and unchanged.
@bdrewery
bdrewery / loader.conf
Created July 4, 2012 04:00
FreeBSD BE ZFS setup
zfs_load="YES"
vfs.root.mountfrom="zfs:zroot/ROOT/freebsd83"
@bdrewery
bdrewery / gist:7ff0ba0f5c98b6a9ed6add8adb2c77de
Last active November 30, 2021 18:56
Poudriere incremental queue rework
[00:01:02] Building 417 packages using up to 14 builders
[00:01:02] Hit CTRL+t at any time to see build progress and stats
[00:01:03] [01] [00:00:00] Builder starting
[00:01:03] [02] [00:00:00] Builder starting
[00:01:04] [01] [00:00:01] Builder started
[00:01:04] [02] [00:00:01] Builder started
[00:01:05] [01] [00:00:01] Inspecting graphics/jbig2dec | jbig2dec-0.19 for needed shlibs
[00:01:05] [02] [00:00:01] Inspecting audio/libvorbis | libvorbis-1.3.7_2,3 for needed shlibs
[00:01:05] [03] [00:00:00] Builder starting
[00:01:06] [03] [00:00:01] Builder started
diff --git src/poudriere-sh/helpers.h src/poudriere-sh/helpers.h
index 9a9f151a9..930c0de89 100644
--- src/poudriere-sh/helpers.h
+++ src/poudriere-sh/helpers.h
@@ -107,7 +107,10 @@ void verrorwithstatus(int, const char *, va_list) __printf0like(2, 0) __dead2;
#define exit_(...) exit_X(__VA_ARGS__, _1, _0)(__VA_ARGS__)
#define exit_X(_0, _1, X, ...) exit ## X
#define exit_0(_) return (0)
-#define exit_1(_, status) verrorwithstatus(status, NULL, NULL)
+#define exit_1(_, status) do { \
--- external/sh/miscbltin.c.orig 2021-09-04 19:18:23 UTC
+++ external/sh/miscbltin.c
@@ -231,6 +231,8 @@ readcmd(int argc __unused, char **argv __unused)
* If there's nothing ready, return an error.
*/
if (status <= 0) {
+ while (*ap != NULL)
+ setvar(*ap++, "", 0);
sig = pendingsig;
return (128 + (sig != 0 ? sig : SIGALRM));
@bdrewery
bdrewery / gist:1400847
Created November 28, 2011 15:49
EFNet ssl servers
:servers_ssl
efnet.xs4all.nl
irc.choopa.ca:9999
irc.choopa.net:9999
irc.eversible.com:9999
irc.paraphysics.net
irc.servercentral.net:9999
irc.shoutcast.com:8000
irc.umich.edu:9999
irc.underworld.no
diff --git src/share/poudriere/testport.sh src/share/poudriere/testport.sh
index d8f0124da..d04f8c48b 100755
--- src/share/poudriere/testport.sh
+++ src/share/poudriere/testport.sh
@@ -217,11 +217,11 @@ if [ $CONFIGSTR -eq 1 ]; then
command -v dialog4ports >/dev/null 2>&1 || err 1 "You must have ports-mgmt/dialog4ports installed on the host to use -c."
__MAKE_CONF=$(mktemp -t poudriere-make.conf)
setup_makeconf "${__MAKE_CONF}" "${JAILNAME}" "${PTNAME}" "${SETNAME}"
- PORTSDIR=${portsdir} \
+ PORTSDIR="${MASTERMNT}${portsdir}" \
@bdrewery
bdrewery / last.sh
Created May 19, 2011 13:55
FreeBSD last(1) wrapper which protects the privacy of other users
#! /bin/bash
# THIS RUNS SETGID utmp
# last [-[n ]number] [user]
# everything else is IGNORED.
PROC=$_
### Only allow invocation from last, not other procs
if [ "${PROC/last/}" = "${PROC}" ]; then
exit 1
diff --git src/share/poudriere/common.sh src/share/poudriere/common.sh
index c4d5673dd..96c431ee5 100644
--- src/share/poudriere/common.sh
+++ src/share/poudriere/common.sh
@@ -6783,8 +6783,11 @@ _listed_ports() {
{
# -f specified
if [ -z "${LISTPORTS}" ]; then
+ local _ignore_comments
+