profile
viewpoint
Robert James Hernandez sarcasticadmin @Nebulaworks San Diego, CA sarcasticadmin.com

sarcasticadmin/dotfiles 11

personal dotfiles with stow

mathplusyou/BestGameEver 2

The best game ever made

drewmullen/vault-kv-migrate 0

a python module to interact with Hashicorp Vault kv engine recursively

githubschool/conflict-practice-sarcasticadmin 0

Let's resolve some conflicts.

sarcasticadmin/charts 0

Curated applications for Kubernetes

sarcasticadmin/clusterlint 0

A best practices checker for Kubernetes clusters. 🤠

sarcasticadmin/conftest 0

Write tests against structured configuration data using the Open Policy Agent Rego query language

sarcasticadmin/docker-machine-driver-bhyve 0

Docker Machine driver for Bhyve

sarcasticadmin/first-contributions 0

🚀✨ Help beginners to contribute to open source projects

startednix-community/NUR

started time in 14 hours

create barnchsarcasticadmin/nix-garage

branch : sa/gl-issue-309

created branch time in a day

push eventgithubschool/conflict-practice-sarcasticadmin

Briana Swift

commit sha a1a0c9d3288926933e1dfdf10a325298f9389f2f

add info about practicing Git and GitHub to readme

view details

Briana Swift

commit sha 9c84271096ca2eedb5bef5374776bf11d31e5dba

change title on manual simulation

view details

Briana Swift

commit sha 9320b58619ef77591df5f78eb21deaa1844f52e3

change wording in mini_bored

view details

Briana Swift

commit sha 3f3aaf1b84ba0d587871cb1852d089829d6f46e2

expand hex colors of urls

view details

Briana Swift

commit sha 1095c8c8e4eb14cbcd68e7302818e5c8e1b2c107

commenting out url colors

view details

Briana Swift

commit sha 4f249e6425e350ea40fa4a2693ae61516d1f42a0

change URL color

view details

push time in a day

push eventgithubschool/conflict-practice-sarcasticadmin

Briana Swift

commit sha a1a0c9d3288926933e1dfdf10a325298f9389f2f

add info about practicing Git and GitHub to readme

view details

Briana Swift

commit sha 9c84271096ca2eedb5bef5374776bf11d31e5dba

change title on manual simulation

view details

Briana Swift

commit sha 9320b58619ef77591df5f78eb21deaa1844f52e3

change wording in mini_bored

view details

Briana Swift

commit sha 3f3aaf1b84ba0d587871cb1852d089829d6f46e2

expand hex colors of urls

view details

Briana Swift

commit sha 1095c8c8e4eb14cbcd68e7302818e5c8e1b2c107

commenting out url colors

view details

Robert James Hernandez

commit sha f2d037b85f3dc0c1f035a8ae691d2ae17b596d60

Fixing

view details

push time in a day

startedtmccombs/hcl2json

started time in 2 days

issue commentopen-policy-agent/conftest

blocks with same name no longer testable

@jpreese thanks for picking this back up! Ill take a look at those PR changes shortly

drewmullen

comment created time in 2 days

startedjshcmpbll/jsh-nix

started time in 11 days

push eventsarcasticadmin/dotfiles

Robert James Hernandez

commit sha 1b0f97e07bce78ed04e86c913e59f6e8783e33e7

Adding nixos weekly and drop nixers rss

view details

Robert James Hernandez

commit sha 63891c7c03ec3d12468a9e1c87f0874b35e6b222

Adding alias to bashrc for non OSX

view details

Robert James Hernandez

commit sha b24217db2ddda899ea995cc5c1314851b67f2a73

Adding clipboard copy to tmux

view details

Robert James Hernandez

commit sha 8e02011306439865689588b16072b53c9bcb9c3a

weechat version config updates

view details

Robert James Hernandez

commit sha ff9a80b2d331bdc97613a8d94ed57ed415e534af

Adding nixos embedded irc channels

view details

Robert James Hernandez

commit sha bf923ded8cd0b0bef8f1dcdb736acfaf13584eb7

Merge pull request #43 from sarcasticadmin/sa/updates-09142020 Updating to IRC and RSS

view details

push time in 11 days

PR merged sarcasticadmin/dotfiles

Updating to IRC and RSS

Description

  • Adding some changes that have been lingering locally for IRC and RSS
  • Adding clipboard copying in tmux and bash alias to pbcopy
+106 -7

0 comment

12 changed files

sarcasticadmin

pr closed time in 11 days

PR opened sarcasticadmin/dotfiles

Updating to IRC and RSS

Description

  • Adding some changes that have been lingering locally for IRC and RSS
  • Adding clipboard copying in tmux and bash alias to pbcopy
+106 -7

0 comment

12 changed files

pr created time in 11 days

push eventsarcasticadmin/dotfiles

Robert James Hernandez

commit sha 63891c7c03ec3d12468a9e1c87f0874b35e6b222

Adding alias to bashrc for non OSX

view details

Robert James Hernandez

commit sha b24217db2ddda899ea995cc5c1314851b67f2a73

Adding clipboard copy to tmux

view details

Robert James Hernandez

commit sha 8e02011306439865689588b16072b53c9bcb9c3a

weechat version config updates

view details

Robert James Hernandez

commit sha ff9a80b2d331bdc97613a8d94ed57ed415e534af

Adding nixos embedded irc channels

view details

push time in 11 days

create barnchsarcasticadmin/dotfiles

branch : sa/updates-09142020

created branch time in 11 days

startedmingrammer/diagrams

started time in 11 days

issue commentNixOS/nixpkgs

Vulnerability roundup 92: terraform-0.13.0: 1 advisory [9.8]

@ckauhaus The aws provider is package by nixpkgs: https://github.com/NixOS/nixpkgs/blob/241eef1ec360ea3a578d996cee71051ee563c3c6/pkgs/applications/networking/cluster/terraform-providers/data.nix#L75-L82

This issue should still be closed since according to NVD report it looks like its referencing a pretty old version of the aws provider:

aws/resource_aws_iam_user_login_profile.go in the HashiCorp Terraform Amazon Web Services (AWS) provider through v1.12.0

ckauhaus

comment created time in 13 days

startedinfracost/infracost

started time in 15 days

startedPhirePhly/aprx

started time in 18 days

startedBSDNow/bsdnow.tv

started time in a month

pull request commentNixOS/nixpkgs

sd-mux-ctrl: init at 2020-02-17

Minimal trivial changes, I think everything looks fine otherwise.

@samueldr Implemented those changes and ran the same set of tests mentioned in the description. Everything checked out fine

sarcasticadmin

comment created time in a month

push eventsarcasticadmin/nixpkgs

Robert James Hernandez

commit sha ba57562afe7759ceb86175c722e8e6eeda823e67

sd-mux-ctrl: init at 2020-02-17

view details

push time in a month

Pull request review commentNixOS/nixpkgs

sd-mux-ctrl: init at 2020-02-17

+{ stdenv, fetchgit, cmake, pkgconfig, libftdi1, popt}:++stdenv.mkDerivation rec {+  pname = "sd-mux-ctrl";+  version = "2020-02-17";++  src = fetchgit {+    url = "https://git.tizen.org/cgit/tools/testlab/sd-mux.git";+    rev = "9dd189d973da64e033a0c5c2adb3d94b23153d94";+    sha256 = "0fxl8m1zkkyxkc2zi8930m0njfgnd04a22acny6vljnzag2shjvg";+  };++  nativeBuildInputs = [ cmake pkgconfig ];++  buildInputs = [ libftdi1 popt ];++  postInstall = ''+    install -D -m 644 ../doc/man/${pname}.1 $out/share/man/man1/${pname}.1

Definitely makes sense

sarcasticadmin

comment created time in a month

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

sd-mux-ctrl: init at 2020-02-17

+{ stdenv, fetchgit, cmake, pkgconfig, libftdi1, popt}:++stdenv.mkDerivation rec {+  pname = "sd-mux-ctrl";

Thank you for the context, Ill keep that in mind for the future

sarcasticadmin

comment created time in a month

PullRequestReviewEvent

startedNixOS/nixos-search

started time in a month

pull request commentVentto/mons

Fixing command builtin for freebsd

@cemeyer Thanks for the clarification, thats makes sense since xrandr is under /usr/local/bin in FreeBSD.

Regardless, I think it still makes some sense cover both cases and check _PATH_STDPATH if for whatever reason the user was to botch their PATH.

sarcasticadmin

comment created time in a month

PR opened Ventto/mons

Fixing command builtin for freebsd

Description

Depends on: https://github.com/Ventto/libshlist/pull/2 Closes: #30

It does not seem that "command -pv xrandr" is able to find xrandr in my PATH on FreeBSD. Im not sure if this is due to there just not being a default /etc/environment set or what but I think we should be checking the current PATH as well as the default to make sure we search all possibilities.

Let me know what you think.

Tests

Building with my PR from libshlist: https://github.com/Ventto/libshlist/pull/2 nets me the expect results:

mkdir build
make install PREFIX=$(realpath ./build) LIB=$(realpath ../libshlist/liblist.sh)
...
$ build/bin/mons
Monitors:        2
Mode: primary
0:*  LVDS-1   (enabled)
+9 -2

0 comment

1 changed file

pr created time in a month

create barnchsarcasticadmin/mons

branch : sa/issue-30

created branch time in a month

fork sarcasticadmin/mons

POSIX Shell script to quickly manage monitors on X

fork in a month

PR opened Ventto/libshlist

Fixing list insert error under BSD sed

Description

This was related to the FreeBSD port for mons and the issue opened up in the portstree bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248632

BSD sed was unable to correctly leverage i command resulting in the following output when running mons on master 375bbba3aa700c8b3b33645a7fb70605c8b0ff0c:

 $ ./mons
sed: 1: "1iLVDS-1": command i expects \ followed by text
Monitors: 0
Mode: primary

The following change was initially suggested by @kevans91 here: https://github.com/Ventto/mons/issues/30#issuecomment-674335403 but I did some more testing to get the following to be complaint for both GNU and BSD versions of sed.

Tests

I have added appropriate tests for both the libshlist and libshlist_unsafe variations.

$ sh tests/test_freebsd.sh 
sed is /usr/bin/sed
test: insert pass
--------------------------
sed is a shell function
test: insert pass
$ sh tests/test_unsafe_freebsd.sh 
sed is /usr/bin/sed
test: insert pass
--------------------------
sed is a shell function

As for mons this also fixes the original error. I do have an issue with how command -pv xrandr is working and have to modify it to command -v xrandr but Ill open that issue in mons for discussion:

$ ./mons
Monitors:        2
Mode: primary
0:*  LVDS-1   (enabled) 
+86 -2

0 comment

4 changed files

pr created time in a month

push eventsarcasticadmin/libshlist

Robert James Hernandez

commit sha 7e5c7a84e39d80a4e587150afc2f0897307ccef3

Fix for liblist insert for BSD sed

view details

Robert James Hernandez

commit sha b45c4970cb24d9771dcab316ecf0fa7189bf6c9f

Fix for liblist unsafe BSD sed

view details

Robert James Hernandez

commit sha 0acbeaa59150b50ef81e7f21e82acfd90120ba3c

Test script for liblist insert

view details

Robert James Hernandez

commit sha 0a823f962d30b3c985b629b81c9cedeb87edf9a9

Test script liblist unsafe insert

view details

push time in a month

create barnchsarcasticadmin/libshlist

branch : sa/fixing-sed

created branch time in a month

fork sarcasticadmin/libshlist

POSIX Shell List Implementation.

fork in a month

startedstapelberg/airscan

started time in a month

startedghostunnel/ghostunnel

started time in a month

startedbsdimp/2.11bsd

started time in 2 months

startedprawnpdf/prawn

started time in 2 months

startedDavHau/nix-on-armv7l

started time in 2 months

create barnchsarcasticadmin/nixpkgs

branch : sa/nixos-20.03

created branch time in 2 months

push eventsarcasticadmin/nixpkgs

Robert James Hernandez

commit sha 4080c995c37e0ce853cd27e007b76ccd0b9dae86

sd-mux-ctrl: init at 2020-02-17

view details

push time in 2 months

PR opened NixOS/nixpkgs

sd-mux-ctrl: init at 2020-02-17

<!-- To help with the large amounts of pull requests, we would appreciate your reviews of other pull requests, especially simple package updates. Just leave a comment describing what you have tested in the relevant package/service. Reviewing helps to reduce the average time-to-merge for everyone. Thanks a lot if you do! List of open PRs: https://github.com/NixOS/nixpkgs/pulls Reviewing guidelines: https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions -->

Motivation for this change

This adds sd-mux-ctrl which is a tool for controlling multiple sd-mux devices for automated testing of single board computers: https://wiki.tizen.org/Laboratory

I figured this might be useful to others who are working on single-board computers (for example nixos: https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi) and require automated testing around these systems.

I have been using sd-mux-ctrl with SDWire hardware. This board is based on sd-mux devices minus any power switch or USB switching. Essentially it enables you to flash the sdcard without having to take the card out of the board. The workflow ends up being something along the lines of:

sudo sd-mux-ctrl --device-serial=odroid_u3_1 --ts
... - do the flashing things (dd)
sudo sd-mux-ctrl --device-serial=odroid_u3_1 --dut

ts = test server (i.e. laptop, workstation) dut = device under test (i.e. rpi, Odroid, etc.)

Things done

<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->

  • [ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [ ] NixOS
    • [ ] macOS
    • [x] other Linux distributions
  • [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • [x] Tested execution of all binary files (usually in ./result/bin/)
  • [ ] Determined the impact on package closure size (by running nix path-info -S before and after)
  • [ ] Ensured that relevant documentation is up to date
  • [x] Fits CONTRIBUTING.md.
+36 -0

0 comment

3 changed files

pr created time in 2 months

create barnchsarcasticadmin/nixpkgs

branch : sa/adding-sd-mux-ctrl

created branch time in 2 months

fork sarcasticadmin/nixpkgs

Nix Packages collection

fork in 2 months

startedMic92/sops-nix

started time in 2 months

issue commentFreshPorts/git_proc_commit

Helper script for redoing one commit

@dlangille saw your tweet: https://twitter.com/DLangille/status/1285750793711292416 sounds like youve made some good progress!

[freshports@devgit-ingress01 ~/ports-jail/var/db/repos/PORTS-head-git]$ git status HEAD detached at 44d4d38cf77e nothing to commit, working tree clean

This seems to be due to the fact that when git-to-freshports-xml.py exits with an error that it leaves the repo in a less than ideal state and in this case detached HEAD. Im not sure why git-to-freshports-xml.py actually needs to try to checkout each of these commits vs just leverage something like git show <SHA> but it still looks like its having issues with being able to leverage the type of HEAD, again this seems like its due to a mismatch of the actual type being used in python.

Anyway it sounds like youve got a path forward and thats good 😄

dlangille

comment created time in 2 months

push eventNebulaworks/nix-garage

Matthew Shiroma

commit sha d9de2620547c02c6583628129e0e529bddf7abd7

Added pki-validator image config

view details

Robert James Hernandez

commit sha 422fab4190e45e1e0ab5b108bdcd5a797a1d5504

Merge pull request #17 from maishiroma/ms/issue-304 [READY] Added pki-validator Image

view details

push time in 2 months

PR merged Nebulaworks/nix-garage

[READY] Added pki-validator Image

Description

This PR adds in another Docker image to the repo, pki-validator. This image is designed to be used to run test cases with openssl and make.

Tests

  • [x] Validated image can be created via nix-shell
  • [x] Validated that all needed packages are placed in configuration
+39 -0

5 comments

2 changed files

maishiroma

pr closed time in 2 months

pull request commentNebulaworks/nix-garage

[READY] Added pki-validator Image

@maishiroma awesome! thanks for adding the last comment about the owners group too

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Added pki-validator Image

+# pki-validator

nice README 😎

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Added pki-validator Image

+{ system ? builtins.currentSystem }:+let+  nwi = import ../../nwi.nix;+  pkgs = import ../../pin { snapshot = "nixos-20-03_0"; };+  lib = pkgs.lib;+  contents = with pkgs; [ openssl coreutils bash gnumake gnugrep gawk ];

Looks like what we would need

maishiroma

comment created time in 2 months

push eventNebulaworks/nix-garage

Matthew Shiroma

commit sha ce496ccc301879ea2964d009f7af14fa89e46b46

Added new script, template, and workflow logic to automate repo creation

view details

Robert James Hernandez

commit sha 1074b9b2730598e18cf25e0d8e622deec45e5609

Merge pull request #16 from maishiroma/ms/issue-306 [READY] Auto-Repo Creation via GitHub Workflow

view details

push time in 2 months

PR merged Nebulaworks/nix-garage

[READY] Auto-Repo Creation via GitHub Workflow

Description

This PR continues to improve on the publish-imgs GitHub Action workflow by now auto-creating any new Docker Hub repository when a new image is being published for the first time.

In order to facilitate this workflow, the following new items are added to the repository:

  1. A templates/ directory which contains the following:
    • A README_imgs.md, which outlines a standardized README for all images made in this repository
    • A README.md, explaining the purpose and usage of the templates in that directory
  2. A new script, create-repo, which facilitates the creation of a new Docker Hub repo via API calls
    • This script also does the following:
      • Adds in the engineering group with read/write permissions
      • Adds in both a short_description and a long_description, with them being based on the README_imgs.md that will be in all imgs/

Benefits

The biggest win for this PR is the ability for new images that are not yet existing in Nebulaworks Docker Hub to be pushed up without manual intervention on a Nebulaworks user to create a repository first. That small limitation slows down the publishing process, and with the current workflow we have in this repository, new images will have to get approved by a verified user, which helps prevent any unnecessary or malicious images to be published under Nebulaworks.

Workflow changes

Other than having a soft requirement of needing all imgs/ to have a README.md under the template as the README_imgs.md, from a CI perspective, nothing has changed.

  • The repo creation will be invoked during the CI build of publish-imgs, and will only actually create a repo if there does not exist one already.
  • For manually publishing images, the documentation for that has been modified accordingly.

Special Notes:

  • The reason for parts of the publish-imgs now having set +x and set -x being encapsulated around code parts that are using the DOCKER_HUB_TOKEN is to prevent that value from being visible to anyone (since this is a public repository). While one alternative could be to modify the create-repo script to calculate the token, this script will be invoked X times (X = numb of images), which could lead to the script slowing down + being inefficient with its data. As such, only doing it once and passing in the token as a CLI argument was the most ideal way I found.
  • With the standardization of the image READMEs, I also added in READMEs for all existing images that did not have one, making sure all of them abid by the new format.

Tests

  • Verified workflow in own environment
  • Specific GitHub Action run that yielded the desired results.
  • Verified that the org permissions work (WIP)
+139 -5

2 comments

10 changed files

maishiroma

pr closed time in 2 months

pull request commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

@maishiroma this looks good, lets :shipit:

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

+#!/usr/bin/env bash+# vim: ft=sh sw=2 et+# shellcheck shell=bash+set -efo pipefail++# A Bash script that automates creating a Docker Hub Repository, if applicable. Also adds an org group, engineering, to have read/write access to said repo if applicable++#### Requires the following parameters to be passed in from the CLI:+# Docker Hub API Token = $1+# User/Org name = $2+# Repo name = $3++# Checks if required values are passed in+test -z $1 && (echo "Script needs a token towards Docker Hub!" && exit 1)+test -z $2 && (echo "Script needs a user/org that exists in Docker Hub!" && exit 1)+test -z $3 && (echo "Script needs a repo name to verify/use!" && exit 1)++REPO_EXISTS_CODE=$(curl --write-out %{response_code} --output /dev/null -s \+    -H "Content-Type: application/json" -H "Authorization: JWT $1" \+    --url https://hub.docker.com/v2/repositories/$2/$3/)++if [ $REPO_EXISTS_CODE -ne 200 ]; then+    echo "Docker Hub repo $3 does not exist in $2, creating now..."+    cat << EOF > ./data.json

If we are going to write out this data.json can we just put it in a temp directory just in case? Id hate for this to end up clobbering something else in the future.

tmpdata=$(mktemp /tmp/tempdata.XXXXXX)
cat << EOF > $tmpdata
...
EOF
maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

 jobs:             }           }           EOF+          +          set +x

Thanks for masking the credentials

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

+#!/usr/bin/env bash+# vim: ft=sh sw=2 et+# shellcheck shell=bash+set -efo pipefail++# A Bash script that automates creating a Docker Hub Repository, if applicable. Also adds an org group, engineering, to have read/write access to said repo if applicable++#### Requires the following parameters to be passed in from the CLI:+# Docker Hub API Token = $1+# User/Org name = $2+# Repo name = $3++# Checks if required values are passed in+test -z $1 && (echo "Script needs a token towards Docker Hub!" && exit 1)+test -z $2 && (echo "Script needs a user/org that exists in Docker Hub!" && exit 1)+test -z $3 && (echo "Script needs a repo name to verify/use!" && exit 1)++REPO_EXISTS_CODE=$(curl --write-out %{response_code} --output /dev/null -s \+    -H "Content-Type: application/json" -H "Authorization: JWT $1" \+    --url https://hub.docker.com/v2/repositories/$2/$3/)++if [ $REPO_EXISTS_CODE -ne 200 ]; then+    echo "Docker Hub repo $3 does not exist in $2, creating now..."+    cat << EOF > ./data.json+{+    "namespace": "$2",+    "name": "$3",+    "description": "$(sed '2q;d' ./imgs/$3/README.md)",+    "is_private": false+}+EOF+    curl -s -H "Content-Type: application/json" -H "Authorization: JWT $1" -X POST \+    -d @./data.json --url https://hub.docker.com/v2/repositories/+    echo++    # Clean up+    rm ./data.json+else+    echo "Repo $3 already exists in $2."

We should exit 0 here if the repo already exists. I dont think we need to worry enforcing the group or readme for every publish run (Im worried about API limits as the number repos grows). Maybe we come back and add for -f (force flag) that does this but once we reconcile the delta with the 3 existing docker repos all the others should come into line.

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

+#!/usr/bin/env bash+# vim: ft=sh sw=2 et+# shellcheck shell=bash+set -efo pipefail++# A Bash script that automates creating a Docker Hub Repository, if applicable. Also adds an org group, engineering, to have read/write access to said repo if applicable++#### Requires the following parameters to be passed in from the CLI:+# Docker Hub API Token = $1+# User/Org name = $2+# Repo name = $3++# Checks if required values are passed in+test -z $1 && (echo "Script needs a token towards Docker Hub!" && exit 1)

Thanks for adding some checks for args

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

+# awsutils

Itll be so much nicer to have these descriptions 👍

maishiroma

comment created time in 2 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Auto-Repo Creation via GitHub Workflow

+# [TITLE GOES HERE]

Can we make this a README_imgs.tpl or something along those lines just to make it a bit more obvious?

maishiroma

comment created time in 2 months

startedbsdimp/mk211bsd

started time in 2 months

issue commentsocallinuxexpo/scale-network

Investigate ath10k-ct driver solutions

The saga continues for these small devices. This could effect our our tplinks too:

  • https://bugs.openwrt.org/index.php?do=details&task_id=2651#comment8515
sarcasticadmin

comment created time in 2 months

issue commentsocallinuxexpo/scale-network

Update openwrt ath79 to kernel 5.4

@davidelang just found this on the mailing lists, going to standby to see how things progress: https://bugs.openwrt.org/index.php?do=details&task_id=1714#comment8500

sarcasticadmin

comment created time in 2 months

issue commentFreshPorts/git_proc_commit

Helper script for redoing one commit

@skozlov404

I'd say it doesn't even matter if the tree is dirty or not - the script processes the commits that already happened, so git reset shouldn't be needed at all. The only thing that matters is that you do git fetch origin beforehand so your tree is up to date

Oh, I get what's been suggested in #3 - since git-to-freshports-xml.py used to only process all the commits from the specified one to the HEAD - if we move the HEAD to right above the commit we're specifying - this would give us the effect of processing the single commit.

Thing is, with --single-commit and --commit-range flags now implemented - we don't need to jump around the git tree anymore like that - by just using git fetch origin and the proper flags to git-to-freshports-xml.py we're now able to achieve everything required.

The idea of reset --hard HEAD was just to make sure for any reason that the local master was clean so that we could git rebase since the rebase needs to have a clean tree before it can proceed.

git-delta.sh was assuming that git-to-freshports-xml.py just needed a starting point, so I figured we could leverage the remote local master branch compared to the local master from when we last synced to get our starting point and just pass that along to git-to-freshports-xml.py to process the commits from the starting point to HEAD.

We arent jumping around the tree, just leveraging the lag from the last time we synced and then just fetching last copy of master and comparing it to local master and bring local master up to date.

@dlangille it looks like your error is just a TypeError due to how that git library processes the commits. Pulling from your output above https://github.com/FreshPorts/git_proc_commit/issues/7#issuecomment-655797104:

TypeError: HEAD is a detached symbolic reference as it points to 'f2bfe60090b840b6d99a3288c0b745843cefcfe1'

It would seem that we need to handle HEAD in a special way (python type is different) or just get the commit hash that HEAD currently points to so we can make the ranging in git-to-freshports-xml.py work correctly.

One issue I keep thinking about: getting out of sync. We want to make sure the latest commit in our repo is the latest commit in the database. If it is not, we need to process what's in the repo before doing a fetch.

In regards to this, I think this is a separate issue compared to whats being discussed here. I would think just checking the database for the last commit stored then comparing that to the starting point in git-delta.sh. The starting point should just be 1 commit ahead of whats in the database, if not move the starting point to the the commit right after the database entry and let git-to-freshports-xml.py process it all. We are guaranteed that the history will be in the right order as a no one in the portstree is rewriting history on master (this is not the case)

dlangille

comment created time in 2 months

issue commentFreshPorts/git_proc_commit

Helper script for redoing one commit

@dlangille thanks, Ill take a look at this tonight and give you some feedback. At the moment Im not near my machine.

dlangille

comment created time in 2 months

issue openedsocallinuxexpo/scale-network

Update openwrt ath79 to kernel 5.4

Description

It would appear that ath79 is landing in upstream openwrt: http://lists.openwrt.org/pipermail/openwrt-devel/2020-July/029879.html

Update openwrt ath79 to kernel 5.4 using the automatic build process. We might have to patch the existing version if its not yet landed upstream in master

Acceptance Criteria

  • Confirm that openwrt builds on ath79
  • Run through automatic build process

created time in 3 months

startedpeter-evans/dockerhub-description

started time in 3 months

push eventNebulaworks/nix-garage

Matthew Shiroma

commit sha b701463a3c02893c279ce7e0272f5e8a58aba079

Added config for magic-wormhole-mailbox

view details

Robert James Hernandez

commit sha a5c7fd11f92e376e15678e6b90f519a00c9772fb

Merge pull request #15 from maishiroma/ms/issue-257 [READY] Added config for magic-wormhole-mailbox

view details

push time in 3 months

PR merged Nebulaworks/nix-garage

[READY] Added config for magic-wormhole-mailbox

Summary

This PR adds in a new docker image configuration that automatically sets up a self-hosted rendezvous server for a magic-wormhole service.

Benefit

Since there are little open sourced solutions to building consistent solutions in running self-hosted solutions, I think this can greatly help others see a working example of this and how they can implement this in their own solutions.

Tests

  • Build derivation successfully and imported docker image
  • Ran container and tested service locally
+47 -0

6 comments

2 changed files

maishiroma

pr closed time in 3 months

pull request commentNebulaworks/nix-garage

[READY] Added config for magic-wormhole-mailbox

@maishiroma awesome, looking forward to using this! :shipit:

maishiroma

comment created time in 3 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Added config for magic-wormhole-mailbox

+{ system ? builtins.currentSystem }:+let+  nwi = import ../../nwi.nix;+  pkgs = import ../../pin { snapshot = "nixos-20-03_0"; };+  lib = pkgs.lib;+  importedPythonPkgs = with pkgs; python37.withPackages (pythonPkgs: with pythonPkgs; [ magic-wormhole-mailbox-server ]);+  contents = with pkgs; [ bash coreutils procps importedPythonPkgs ];+in+pkgs.dockerTools.buildImage {+  inherit contents;+  name = "nebulaworks/magic-wormhole-mailbox-server";+  # Doesnt matter will use the derivation+  # when publishing to registry+  tag = "latest";+  extraCommands = ''+    # make sure /tmp exists+    mkdir -m 1777 tmp++    # Magic-Wormhole-Mailbox Directory+    mkdir -m 1777 magic-mailbox

Can we make this more uniform? /var/lib/wormhole or something like that would be more appropriate I think. This way we can standardize on the hierarchy of the filesystem: https://www.man7.org/linux/man-pages/man7/hier.7.html vs just having a bunch of things hanging off /.

Also lets make the something a tighter, 750 seems more appropriate

maishiroma

comment created time in 3 months

issue commentFreshPorts/git_proc_commit

Thoughts on generate this data

Absolutely @dlangille you can the following:

# Make sure we are on the master branch
git checkout master
# Go back to a specific hash
git reset --hard COMMITHASH

Just substitute the COMMITHASH for the hash you originally started from.

sarcasticadmin

comment created time in 3 months

pull request commentNebulaworks/nix-garage

[READY] - Adding cacert pkg to awsutils img

@maishiroma thanks for all the help on this, this is now ready to go! 🚀

sarcasticadmin

comment created time in 3 months

pull request commentNebulaworks/nix-garage

[READY] - Adding cacert pkg to awsutils img

Adding some context around why helmsman-aws change. @maishiroma dug into why the derivation changed due to #10 and his findings were:

I just did a build of the old helmsman-aws image prior to the fmt and I was able to get the existing image hash. The change did
arose from the fmt, but it was in the deps.nix in the pkgs/helm-diff . By fmt that, it caused the hash to change in the 
nix-build, creating a new image for helmsman-aws. The odd thing though is that there is no heredoc that is being modified in
that nix config. In fact, the heredoc  doesn’t seem to matter in this case. awsutils has a heredoc that got modified in the
default.nix , but that was not enough of a difference to generate a brand new image (looking at the last job for publishing
images showed this).

Output taken from: https://github.com/Nebulaworks/nix-garage/runs/828756395?check_suite_focus=true

/nix/store/pbj9q2qyw511wfy18g8lz9jw2mpc5qvw-docker-image-helmsman-aws.tar.gz
+ cp /__w/nix-garage/nix-garage/imgs/helmsman-aws//result /__w/nix-garage/nix-garage/result
+ nix-shell --run './publish-imgs helmsman-aws'
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
time="2020-07-02T00:06:45Z" level=fatal msg="Error parsing image name \"docker://docker.io/nebulaworks/helmsman-aws:pbj9q2qyw511wfy18g8lz9jw2mpc5qvw\": Error reading manifest pbj9q2qyw511wfy18g8lz9jw2mpc5qvw in docker.io/nebulaworks/helmsman-aws: manifest unknown: manifest unknown"
Getting image source signatures
Copying blob sha256:4864e02891e4b109b1a8399507183f666a1a04340ac51a4c7203281836254d14
Copying config sha256:252c03ebc4b2f7c4bd79baa8488a6d4a96d1ca9414ff2d4a4765b6701291b8cb
Writing manifest to image destination
Storing signatures
sarcasticadmin

comment created time in 3 months

pull request commentNebulaworks/nix-garage

[WIP] Adding cacerts to awsutils img

Closing and going with #11

sarcasticadmin

comment created time in 3 months

PR closed Nebulaworks/nix-garage

[WIP] Adding cacerts to awsutils img

Description

Copy of #12

Trying out a branch in this repo vs fork

+3 -3

3 comments

2 changed files

sarcasticadmin

pr closed time in 3 months

pull request commentNebulaworks/nix-garage

[REVIEW] - Adding cacert pkg to awsutils img

publish

sarcasticadmin

comment created time in 3 months

push eventsarcasticadmin/nix-garage

Robert James Hernandez

commit sha acc63c7b1fda4d084e773fcc2df2b97dd3e916d1

Adding cacerts to awsutils img

view details

push time in 3 months

pull request commentNebulaworks/nix-garage

[REVIEW] - Adding cacert pkg to awsutils img

publish

sarcasticadmin

comment created time in 3 months

push eventsarcasticadmin/nix-garage

Robert James Hernandez

commit sha 8da620140aacb4646f0ea0f6e4706e40477a503e

Using actual secret ref

view details

Matthew Shiroma

commit sha b2625f81625b6e6b477bdd8a0be99c838c17a6d2

Merge pull request #14 from sarcasticadmin/rh/fix-publish [READY] Using actual secret ref

view details

Robert James Hernandez

commit sha d5d9cefdb5c730737a794be96535f44291a638d0

Adding cacerts to awsutils img

view details

push time in 3 months

push eventsarcasticadmin/nix-garage

push time in 3 months

PR opened Nebulaworks/nix-garage

[READY] Using actual secret ref

Description

After noticing publish failures it looks like we were expecting the wrong secret credential. These was an oversight while testing some new features of our actions workflow. This should fix things.

+2 -2

0 comment

1 changed file

pr created time in 3 months

create barnchsarcasticadmin/nix-garage

branch : rh/fix-publish

created branch time in 3 months

pull request commentNebulaworks/nix-garage

[WIP] Adding cacerts to awsutils img

publish

sarcasticadmin

comment created time in 3 months

push eventNebulaworks/nix-garage

Robert James Hernandez

commit sha be2eacce8e74b3bc2cf196bc745515d9a71a2b33

Using actual secret ref

view details

push time in 3 months

pull request commentNebulaworks/nix-garage

[REVIEW] - Adding cacert pkg to awsutils img

publish

sarcasticadmin

comment created time in 3 months

push eventsarcasticadmin/nix-garage

Robert James Hernandez

commit sha be2eacce8e74b3bc2cf196bc745515d9a71a2b33

Using actual secret ref

view details

push time in 3 months

pull request commentNebulaworks/nix-garage

[WIP] Adding cacerts to awsutils img

publish

sarcasticadmin

comment created time in 3 months

PR opened Nebulaworks/nix-garage

[WIP] Adding cacerts to awsutils img

Description

Copy of #12

Trying out a branch in this repo vs fork

+1 -1

0 comment

1 changed file

pr created time in 3 months

create barnchNebulaworks/nix-garage

branch : rh/gl-issue-289

created branch time in 3 months

pull request commentNebulaworks/nix-garage

[REVIEW] - Adding cacert pkg to awsutils img

publish

sarcasticadmin

comment created time in 3 months

push eventsarcasticadmin/nix-garage

Robert James Hernandez

commit sha 39032e1b0d9e413853b351dbbbfddae5a8e05838

Updating publish docs Publishing process now needs to account for the trigger job that Matt added in a previous PR.

view details

Matthew Shiroma

commit sha d877aed80f006484bd80e54e74bed1b34b4482ab

Merge pull request #9 from sarcasticadmin/sa/test-action-1 [READY] Testing out actions and doc updates

view details

Matthew Shiroma

commit sha b3e32be74dfa43e8937f4d9448ed3c982904e1ef

Fixed workflows to utilize proper checkout parameters

view details

Robert James Hernandez

commit sha 276d650209f0602c128a39ea3eb952c7d19d6444

Merge pull request #12 from maishiroma/ms/issue-300 [READY] Fixed workflows to utilize proper checkout parameters

view details

Robert James Hernandez

commit sha dcc157e8d50dc89382bd5340ed5d0320fa6a30e5

Adding cacerts to awsutils img

view details

push time in 3 months

push eventNebulaworks/nix-garage

Matthew Shiroma

commit sha b3e32be74dfa43e8937f4d9448ed3c982904e1ef

Fixed workflows to utilize proper checkout parameters

view details

Robert James Hernandez

commit sha 276d650209f0602c128a39ea3eb952c7d19d6444

Merge pull request #12 from maishiroma/ms/issue-300 [READY] Fixed workflows to utilize proper checkout parameters

view details

push time in 3 months

PR merged Nebulaworks/nix-garage

[READY] Fixed workflows to utilize proper checkout parameters

Summary

This PR fixes an issue with the workflow files in that they were missing a key parameter to make sure that they were pulling code from the PR, not from the default branch. Also, some minor clean up was done on the workflow files in order to keep consistency as well as clarity.

Note: The lint-nixpkgs job still worked as intended because it was using a PR event, which the default action for actions/checkout in that case is to use the PR's head commit. This isn't the case for the publish_imgs, which uses an issue_comment event. As such, to keep consistency, the lint_nixpkgs is also modified to reflect the specific usage of a branch SHA.

Authentication Fix Explanation

The issue of the authentication error comes from the context that the event was running from. Because of the default behavior of actions/checkout@v2 as well as the event being used coming from an issue_comment, the context used was not the base repository, but instead, the context of the forked branch. As such, secrets are not passed in that fork context, despite the workflow job running in the base repository.

The fix for this was to extract the SHA of the PR's head commit, which will take the work that was made from the PR, but allowing for the use of secrets declared in the base repository. This behavior can be seen in this PR and in this successful job. Note that the workflow in that repository is using a SHA ref to the PR.

Tests

  • Verified in my own environment of changes:
    • PR used
    • Successful Job, noting the steps in Verify Commentor is Approver and Authenticate and Execute Publish Script
+39 -7

1 comment

2 changed files

maishiroma

pr closed time in 3 months

Pull request review commentNebulaworks/nix-garage

[REVIEW] Fixed workflows to utilize proper checkout parameters

 jobs:           --header 'Authorization: Bearer ${{ secrets.NWIAUTO_PAT }}' \           --header 'Content-Type: application/json' | jq -r '.state' \           )+          commit_sha=$(curl -sSf \+          --url ${{ github.event.issue.pull_request.url }} \+          --header 'Authorization: Bearer ${{ secrets.NWIAUTO_PAT }}' \+          --header 'Content-Type: application/json' | jq -r '.head.sha' \+          ) -          if [ $is_approver == "active" ]; then+          if [[ $is_approver == "active" ]] && [[ ! -z $commit_sha ]]; then             echo ::set-output name=status::success+            echo ::set-output name=sha::$commit_sha+          elif [ -z $commit_sha ]; then

Thanks for adding this conditional just in case

maishiroma

comment created time in 3 months

pull request commentNebulaworks/nix-garage

[REVIEW] Fixed workflows to utilize proper checkout parameters

@maishiroma thanks for the work on this. Looking forward to see how the checkout behavior changes with this new version of the github action. I think it should get us toward fixing #11.

As we discussed outside of this thread there seems to be something brought about by the nixpkg-fmt from #10 causing the derivation change on helmsman-aws

maishiroma

comment created time in 3 months

create barnchsarcasticadmin/dotfiles

branch : sa/update-weechat-2

created branch time in 3 months

issue closedFreshPorts/git_proc_commit

Thoughts on generate this data

Description

@dlangille following up from our conversation earlier today: https://twitter.com/sarcasticadmin/status/1278075104417603584

I know in your initial examples you have the commit hash that youll be updating each time you run this script. Wanted to also point out that you could alternatively leverage some of the built-in functionality in git to do this without having to embedded a commit SHA in the code.

Below is a script for updating freesbd-ports. It assumes that the repo is already cloned down although that could be handled here too if desired. But the idea is that since you have a local copy of the remote master branch and a local master you can diff them to see where you last left on the git log to xml conversion and then just run the conversion as you typically would.

git-delta.sh:

# Assumes you already cloned down the repo once
# Leverage the fact that we already have the new starting
# point since we know the position of the local master branch
# the last time we ran this

REMOTE='origin'

# Update local copies of remote branches
git fetch $REMOTE

# Make sure branch is clean and on master
git reset --hard HEAD
git checkout master

# Get the first commit for our starting point
STARTPOINT=$(git log master..$REMOTE/master --oneline --reverse | head -n 1 | cut -d' ' -f1)

# Bring local branch up-to-date with the local remote
git rebase $REMOTE/master

# Call xml conversion with starting point
#python3 git-to-freshports.py -c $STARTPOINT
echo "Would have ran git-to-freshport.py starting at: $STARTPOINT"

Example

The following is an example I had from a local ports tree. I have git-delta.sh in the same dir as the rest of the ports tree. Set ports tree master so some old commit. This commits from Jan:

$ git checkout master && git reset --hard d3b56095dd0e

Run the delta:

$ sh git-delta.sh  
HEAD is now at d3b56095dd0e Update to 0.11.2.
Already on 'master'
Your branch is behind 'origin/master' by 47065 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Successfully rebased and updated refs/heads/master.
Would have ran git-to-freshport.py starting at: d475beb9e713

Looking at d475beb9e713 its the next commit in the tree after d3b56095dd0e:

commit d475beb9e7130c8bc2ccf4108229932285f52f84
Author: jbeich <jbeich@FreeBSD.org>
Date:   Wed Jan 30 05:28:56 2019 +0000

    multimedia/libva-intel-media-driver: update to 18.4.0 (release)
    
    Changes:        https://github.com/intel/media-driver/compare/7e966d06...intel-media-18.4.0
    Changes:        https://github.com/intel/media-driver/releases/tag/intel-media-18.4.0
    MFH:            2019Q1 (stabilization)

Hope this is helpful!

closed time in 3 months

sarcasticadmin

issue commentFreshPorts/git_proc_commit

Thoughts on generate this data

@dlangille awesome, happy to help!

BTW, you mentioned "without having to embedded a commit SHA in the code " - git-show-commit.sh was a proof of concept to verify iteration could happen. When expanded, it would not have had a hardcoded hash.

Ya, understood. I just wanted to point out that the repo has all the info you need.

Thanks for all the work you've done with Freshports, I use it daily!

sarcasticadmin

comment created time in 3 months

issue openedFreshPorts/git_proc_commit

Thoughts on generate this data

Description

@dlangille following up from our conversation earlier today: https://twitter.com/sarcasticadmin/status/1278075104417603584

I know in your initial examples you have the commit hash that youll be updating each time you run this script. Wanted to also point out that you could alternatively leverage some of the built-in functionality in git to do this without having to embedded a commit SHA in the code.

Below is a script for updating freesbd-ports. It assumes that the repo is already cloned down although that could be handled here too if desired. But the idea is that since you have a local copy of the remote master branch and a local master you can diff them to see where you last left on the git log to xml conversion and then just run the conversion as you typically would.

git-delta.sh:

# Assumes you already cloned down the repo once
# Leverage the fact that we already have the new starting
# point since we know the position of the local master branch
# the last time we ran this

REMOTE='origin'

# Update local copies of remote branches
git fetch $REMOTE

# Make sure branch is clean and on master
git reset --hard HEAD
git checkout master

# Get the first commit for our starting point
STARTPOINT=$(git log master..$REMOTE/master --oneline --reverse | head -n 1 | cut -d' ' -f1)

# Bring local branch up-to-date with the local remote
git rebase $REMOTE/master

# Call xml conversion with starting point
#python3 git-to-freshports.py -c $STARTPOINT
echo "Would have ran git-to-freshport.py starting at: $STARTPOINT"

Example

The following is an example I had from a local ports tree. I have git-delta.sh in the same dir as the rest of the ports tree. Set ports tree master so some old commit. This commits from Jan:

$ git checkout master && git reset --hard d3b56095dd0e

Run the delta:

$ sh git-delta.sh  
HEAD is now at d3b56095dd0e Update to 0.11.2.
Already on 'master'
Your branch is behind 'origin/master' by 47065 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Successfully rebased and updated refs/heads/master.
Would have ran git-to-freshport.py starting at: d475beb9e713

Looking at d475beb9e713 its the next commit in the tree after d3b56095dd0e:

commit d475beb9e7130c8bc2ccf4108229932285f52f84
Author: jbeich <jbeich@FreeBSD.org>
Date:   Wed Jan 30 05:28:56 2019 +0000

    multimedia/libva-intel-media-driver: update to 18.4.0 (release)
    
    Changes:        https://github.com/intel/media-driver/compare/7e966d06...intel-media-18.4.0
    Changes:        https://github.com/intel/media-driver/releases/tag/intel-media-18.4.0
    MFH:            2019Q1 (stabilization)

Hope this is helpful!

created time in 3 months

pull request commentNebulaworks/nix-garage

[REVIEW] - Adding cacerts to awsutils img

publish

sarcasticadmin

comment created time in 3 months

push eventsarcasticadmin/nix-garage

Robert James Hernandez

commit sha cd692618ab174d461a44a5cbba0c541a5300632a

Adding cacerts to awsutils img

view details

push time in 3 months

more