Skip to content

Instantly share code, notes, and snippets.

@akkornel
akkornel / instructions.md
Created February 16, 2017 01:49
Using MacPorts to package software for distribution

Hello!

This document talks about how to use MacPorts to make a macOS installer packages that will install multiple MacPorts ports onto a system.

MacPorts is a project which takes open-source software and builds it for macOS. It takes care of the work of identifying and patching any macOS-specific problems, working out how best to do the build, etc..

Normally, you install MacPorts on your local system, and use the Terminal to install ports (a port is an individual software offering). However, it is also possible to use MacPorts to build macOS installer packages (.pkg files). MacPorts can also bundle multiple ports into a single package (an .mpkg file), so you can install multiple ports in a single action. The ability to make .mpkg files is useful, because ports typically depend on other ports in order to function properly.

This document describes the process for making .mpkg files, so that you can distribute them to systems.

#!/bin/env python3
import pyasn1
from pyasn1.type import constraint, namedtype, namedval, univ
from pyasn1.codec.ber.decoder import decode
from uuid import UUID
# These come from Python-LDAP's syncrepl module.
# They're definitions for pyasn1 to understand what it's parsing.
@akkornel
akkornel / 102217.txt
Created October 23, 2017 05:49
Git commit & tag re-certification from October 22, 2017
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Here is the table referred to in my blog post at
http://karl.kornel.us/2017/10/welp-there-go-my-git-signatures/
Last commit signed by my revoked sub-key First commit signed using my new sub-key
2af1083219692bf5046bac2c815656358fcda71f 4793f2c8fa5a69dcc351927039724704fca5dac0
bedb51ebee32838e0c9359fcca044e97ff1c3677 ccf9d4e03d757759c4b34579dad763be4e1cf21d
0473090599c505e78dd9fa8399d4b858e2ecc653 bf148ded0854093e0e4ce05c81210583b193997d
@akkornel
akkornel / globus-connect-server.conf
Created March 18, 2018 19:39
Globus Connect Server configuration (Stanford-specific), part 1
; vim: filetype=dosini : nospell :
;------------------------------
; Globus Configuration, Part 1
;------------------------------
; This is the part of /etc/globus-connect-server.conf that is common to all
; authentication methods. You can fill it out even if you haven't decided on
; an authentication method to use.
@akkornel
akkornel / globus-endpoint_cert-demo.py
Created March 23, 2018 05:27
Show the Globus endpoint_cert API used to fetch an endpoint key & cert
# vim: ts=2 sw=2 et
# To use this, first, install the `globus-sdk` package via pip.
# Next, go to https://developers.globus.org
# Choose "Register your app with Globus".
# Make a new project, with whatever name & email you want.
# Then, go to the "Add…" menu, and choose "Add a new app".
# Choose whatever app name you want.
# For _Redirect URLs_, enter `http://localhost:4000`.
# For _Scopes_, choose `urn:globus:auth:scope:transfer.api.globus.org:all`.
@akkornel
akkornel / globus-connect-server.conf
Created April 6, 2018 05:08
Globus Connect Server configuration (Stanford-specific), part 2 for legacy MyProxy authentication
; vim: filetype=dosini : nospell :
;------------------------------
; Globus Configuration, Part 2
; Legacy MyProxy Authentication
;------------------------------
; This is the part of /etc/globus-connect-server.conf that is specific to the
; legacy MyProxy authentication method. You should add this content to the
; end of the file, after you have filled in the content for Part 1.
@akkornel
akkornel / globus-connect-server.conf
Created April 6, 2018 06:33
Globus Connect Server configuration (Stanford-specific), part 2 for CILogon authentication
; vim: filetype=dosini : nospell :
;------------------------------
; Globus Configuration, Part 2
; CILogon Authentication
;------------------------------
; This is the part of /etc/globus-connect-server.conf that is specific to the
; CILogon authentication method. You should add this content to the end of
; the file, after you have filled in the content for Part 1.
@akkornel
akkornel / globus-connect-server.conf
Last active May 12, 2018 21:31
Globus Connect Server configuration (Stanford-specific), part 2 for MyProxy OAuth authentication
; vim: filetype=dosini : nospell :
;------------------------------
; Globus Configuration, Part 2
; MyProxy OAuth Authentication
;------------------------------
; This is the part of /etc/globus-connect-server.conf that is specific to the
; MyProxy OAuth authentication method. You should add this content to the
; end of the file, after you have filled in the content for Part 1.
@akkornel
akkornel / globus_sub_api.txt
Created October 10, 2018 20:18
Globus Subscription API suggestion
This is a request for a completely new Globus API. API credentials come from Globus Auth, but a new scope is used.
The idea behind this API is two-fold:
1. Allow the subscription to take place without having to pass credentials around.
2. Give Subscription Managers an easy way to list all the endpoints covered under a subscription, and see their details.
The last point is important: This API would give subscription managers access to endpoint details, even if the endpoint is marked private.
@akkornel
akkornel / output.txt
Created November 2, 2018 08:39
Errors and warnings when trying to build py-libzfs on Linux
$ make clean ; PYTHON=`which python` CFLAGS='-I/usr/include/libzfs -I/usr/src/zfs-0.7.11/include -I/usr/include/libspl' make
rm -rf build libzfs.c
/usr/bin/python setup.py build
WARNING: '' not a valid package name; please use only .-separated package names in setup.py
running build
running build_py
running build_ext
cythoning libzfs.pyx to libzfs.c
/home/akkornel/.local/lib/python2.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: ./pxd/libzfs.pxd
tree = Parsing.p_module(s, pxd, full_module_name)