consistent license, various updates master
authorIan Kelling <iank@fsf.org>
Thu, 18 Apr 2024 02:08:51 +0000 (22:08 -0400)
committerIan Kelling <iank@fsf.org>
Thu, 18 Apr 2024 02:08:51 +0000 (22:08 -0400)
25 files changed:
README
alacritty
bbb
debbugs [new file with mode: 0644]
elisp
emacs
emacstrisquel7
esniper
exim
go
kitty
librecaptcha
mblaze
misc
mu4e
mumble
navidrome
nodejs
org-mode
pithosfly
prom-node-exporter [deleted file]
prometheus [deleted file]
rust
tor-browser
update-builds [deleted file]

diff --git a/README b/README
index 281a524a5342948eb7ce7cab3d4f70f9032f8df4..ee00d0b94654427f17b62524d766533bdbc7ea1c 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,38 @@
-Build and install misc software
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+The following is the GNU All-permissive License as recommended in
+<https://www.gnu.org/licenses/license-recommendations.en.html>
+
+Copyright (C) 2024 Ian Kelling <ian@iankelling.org>
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without any warranty.
+
+Ian's scripts to build and install misc software
+
+Most of these are not in use and may have bitrotted, grep -r my
+distro-setup repo for the ones that are.
 
 Please email me if you have a patches, bugs, feedback, or republish this
 somewhere else: Ian Kelling <ian@iankelling.org>.
index dcf68f61600e81c9e6a1559f93c0a6a0da0b4b88..ca175c7548ba095509ea9010faee64a5551e8f41 100755 (executable)
--- a/alacritty
+++ b/alacritty
@@ -1,8 +1,27 @@
 #!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: GPL-3.0-or-later
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
 
-source /a/bin/errhandle/err
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+source /a/bin/bash-bear-trap/bash-bear
 source /a/bin/distro-functions/src/package-manager-abstractions
 
 
diff --git a/bbb b/bbb
index 73aac2a00f4152e453c397971c9dbfa2aad51715..e0dc87e55e9a20f71d3ccd7e201cb64c32beb70f 100755 (executable)
--- a/bbb
+++ b/bbb
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # misc interesting:
 # https://github.com/sergeyksv/tingodb
diff --git a/debbugs b/debbugs
new file mode 100644 (file)
index 0000000..3ddc2c4
--- /dev/null
+++ b/debbugs
@@ -0,0 +1,26 @@
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# initial setup:
+# as root
+cp -ra /var/lib/debbugs /o
+debbugsconfig
diff --git a/elisp b/elisp
index 087e53b1b1be351d9e1dcb2bc220b1cf390e5914..edd52082e6e872e80f2c1b67797a833eee550a56 100755 (executable)
--- a/elisp
+++ b/elisp
@@ -1,5 +1,12 @@
 #!/bin/bash
-# Copyright (C) 2016 Ian Kelling
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,6 +20,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
 
 if [[ $1 == -u ]]; then
diff --git a/emacs b/emacs
index f4444f8e1d8acc81f0e286c249c0dc81300f6b58..01a66005036402d2b71a0564e07462630a93ad36 100755 (executable)
--- a/emacs
+++ b/emacs
@@ -1,5 +1,12 @@
 #!/bin/bash
-# Copyright (C) 2016 Ian Kelling
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,6 +20,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
 
 #set -x
index 3abb0692c676409a8fcbb1a5b4cbb14092db9503..d9f0d932707ff47aaa306010c3b72aaa68ae89ae 100644 (file)
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # one off for ted to get a newer emacs
 
diff --git a/esniper b/esniper
index a9bf588e2f88457fdf73ac7361ef1d596fb81453..f6f7ea84727de9a02d3d1b88b39375500cfef096 100755 (executable)
--- a/esniper
+++ b/esniper
@@ -1 +1,21 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/exim b/exim
index 24ed030c27e89b2d1cefcaabe6f5a54509577697..34dd8d709af1005e5c11a7ad4e6994d3279923b9 100644 (file)
--- a/exim
+++ b/exim
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # libgcrypt-dev is a test dependency
 # libidn11-dev is some build dep for newer version not in
diff --git a/go b/go
index d948b9d0063c95c53c1cad4128a5f64abc8e8c5a..d58bca7c87aa463d2b7662ba9ac464476e292cdc 100755 (executable)
--- a/go
+++ b/go
@@ -1,13 +1,32 @@
 #!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: AGPL-3.0-or-later
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # usage: no args, run to install latest go.
 
 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
 
 shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
-source /a/bin/errhandle/err
+source /usr/local/lib/bash-bear
 
 force=false
 case $1 in
@@ -19,6 +38,11 @@ e() { printf "$pre %s\n"  "$*"; }
 err() { echo "[$(date +'%Y-%m-%d %H:%M:%S%z')]: $0: $*" >&2; }
 
 
+if [[ ! -d /a/opt/go.git ]]; then
+  mkdir -p /a/opt
+  cd /a/opt
+  git clone --bare https://go.googlesource.com/go
+fi
 
 m cd /a/opt/go.git
 
@@ -54,6 +78,7 @@ fi
 
 if $up; then
   m git fetch --tags
+  mkdir -p ~/.local
   touch ~/.local/gofetch
 
   vers=($(git tag | sort -Vr | grep -E '^go[0-9.]+$' | head))
diff --git a/kitty b/kitty
index 2fa8372163dc956f72d02b84404833b3b1e9e484..07a5e514281eea8e680f2270fda9d1328494673e 100755 (executable)
--- a/kitty
+++ b/kitty
@@ -1,6 +1,27 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
 
-source /a/bin/errhandle/err
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+source /a/bin/bash-bear-trap/bash-bear
 
 if [[ -s ~/.bashrc ]]; then . ~/.bashrc; fi
 
index cf7444ab52af5df08f6d67006dbd5a33290e9d0b..6cb553110baa3361ecee2875d42bbc1fbb23cf0f 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/bash
-# Copyright (C) 2020 Ian Kelling
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,6 +20,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
 
 pi libgirepository1.0-dev python3-dev
diff --git a/mblaze b/mblaze
index 93226e4b08e0fc487d6523ed5cb7e3202cd4455d..adeb5b53ff79b70a0efc0c5f7a9a579cc42baa38 100755 (executable)
--- a/mblaze
+++ b/mblaze
@@ -1,5 +1,29 @@
 #!/bin/bash
-f=/usr/local/lib/err;test -r $f || { echo "error: $0 no $f" >&2;exit 1;}; . $f
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e; . /usr/local/lib/bash-bear; set +e
+
+# I can't remember why I built this from source.
+# It exists in the repo. Oh well.
 
 cd /a/opt/mblaze
 make
diff --git a/misc b/misc
index 7aba4022bac2cdc77cee0467e664a32b16376924..c304d6167c0191f03c7ad26432fb7d1e9d9a1e4b 100755 (executable)
--- a/misc
+++ b/misc
@@ -1,16 +1,32 @@
 #!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: AGPL-3.0-or-later
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
 
 shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
-# alternatively, using https://iankelling.org/git/?p=errhandle;a=tree
-# source /path/errhandle/err
-# on my machine
-source /a/bin/errhandle/err
+source /a/bin/bash-bear-trap/bash-bear
 
 # fuck pip. i hate it.
 #   pip install --user -U pip
diff --git a/mu4e b/mu4e
index b87990c7a4dc3b6b1ab93e28ef1cf6a5e53c85fb..5673bb5b4e0d27528366a41456705701f258f6a9 100755 (executable)
--- a/mu4e
+++ b/mu4e
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
 
diff --git a/mumble b/mumble
index b118cacdad1cb0d3d619c3519ddb3bc9a4b3558a..7362cf5e8ea587cd397fbea6abb4312c245235c9 100755 (executable)
--- a/mumble
+++ b/mumble
@@ -1,6 +1,25 @@
 #!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: AGPL-3.0-or-later
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi
 shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
index 16425d033dfdc377df4b18ca1689a8469d6a085e..29562002b27b631d860af115783926ba4ee2f159 100755 (executable)
--- a/navidrome
+++ b/navidrome
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 # example https://github.com/navidrome/navidrome/releases/download/v0.48.0/navidrome_0.48.0_Linux_x86_64.tar.gz
 up=$(wget -q -O- https://api.github.com/repos/navidrome/navidrome/releases/latest | jq -r .assets[].browser_download_url | grep Linux_x86_64)
diff --git a/nodejs b/nodejs
index fb3a4ec4e48b3019046cac184045eca25a4618c6..192f1e9ef6b8e0abd527e362820c46dec595c959 100755 (executable)
--- a/nodejs
+++ b/nodejs
@@ -1,4 +1,25 @@
 #!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 
 #https://github.com/nodesource/distributions/blob/master/README.md
 KEYRING=/usr/share/keyrings/nodesource.gpg
index c9d0b1ddb82547d84659220d3cb5495ffe82a836..60a3a8c6f6c1a0c82c7f4a905af71a57ff5da163 100755 (executable)
--- a/org-mode
+++ b/org-mode
@@ -1,5 +1,12 @@
 #!/bin/bash
-# Copyright (C) 2016 Ian Kelling
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,6 +20,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 # git clone git://orgmode.org/org-mode.git
 # texinfo is all that is technically needed, but having tex for math is good
 
index 9df698fe8ee1fcae1f59f21a3e915cb8cf5d3d9f..8676ae0be604f6e5f111836f6eb59feee8cbad8b 100755 (executable)
--- a/pithosfly
+++ b/pithosfly
@@ -1,6 +1,25 @@
 #!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: AGPL-3.0-or-later
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
 
 
diff --git a/prom-node-exporter b/prom-node-exporter
deleted file mode 100755 (executable)
index c75b496..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/bin/bash
-
-if ! test "$BASH_VERSION"; then echo "error: shell is not bash" >&2; exit 1; fi
-shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
-set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${PIPESTATUS[*]}" >&2' ERR
-
-[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
-
-
-usage() {
-  cat <<EOF
-Usage: ${0##*/} [-d]
-Install prometheus-node-exporter for debian based system with sysv or systemd
-
--d         Skip downloading and installing the latest binary
--s         Skip setup: config files, user, init scripts.
--l         Listen only on local interface.
--h|--help  Print help and exit.
-
-For downloading, requires curl wget and jq
-
-EOF
-  exit $1
-}
-
-##### begin command line parsing ########
-
-
-# defaults
-dl_bin=true
-do_setup=true
-listen_address=0.0.0.0
-
-while [[ $1 ]]; do
-  case $1 in
-    -d) dl_bin=false ;;
-    -s) do_setup=false ;;
-    -l) listen_address=127.0.0.1 ;;
-    -h|--help) usage 0 ;;
-  esac
-  shift
-done
-readonly dl_bin do_setup
-
-##### end command line parsing ########
-
-if $dl_bin; then
-  for p in curl wget jq; do
-    if ! type -t $p &>/dev/null; then
-      apt-get -y install $p
-    fi
-  done
-fi
-if $do_setup && ! type -t rsync &>/dev/null; then
-  # note: we could use diff or cmp instead.
-  apt-get -y install rsync
-fi
-
-sysd_reload=false
-installed_file=false
-
-i() { # install file
-  local tmp tmpdir dest="$1"
-  local base="${dest##*/}"
-  local dir="${dest%/*}"
-  if [[ $dir != "$base" ]]; then
-    # dest has a directory component
-    mkdir -p "$dir"
-  fi
-  tmpdir=$(mktemp -d)
-  cat >$tmpdir/"$base"
-  tmp=$(rsync -ic $tmpdir/"$base" "$dest")
-  if [[ $tmp ]]; then
-    printf "%s\n" "$tmp"
-    installed_file=true
-    if [[ $dest == /etc/systemd/system/* ]]; then
-      sysd_reload=true
-    fi
-  fi
-  rm -rf $tmpdir
-}
-
-
-if $dl_bin; then
-  if [[ -s /usr/local/src/node-exporter-url ]]; then
-    installed_url=$(cat /usr/local/src/node-exporter-url)
-  fi
-  url=$(curl -s https://api.github.com/repos/prometheus/node_exporter/releases/latest | jq -r '.assets[].browser_download_url | match(".*linux-amd64.tar.gz$").string')
-  if [[ ! $url ]]; then
-    echo $0: error failed to get url
-    exit 1
-  fi
-  if [[ $url != "$installed_url" ]]; then
-    tmpdir=$(mktemp -d)
-    cd $tmpdir
-    f=${url##*/}
-    wget -nv $url
-    tar -xf $f
-    dir=${f%.tar.gz}
-    install $dir/node_exporter /usr/local/bin/prometheus-node-exporter
-    printf "%s\n" "$url" >/usr/local/src/node-exporter-url
-    cd
-    rm -rf $tmpdir
-  fi
-fi
-
-if ! $do_setup; then
-  exit 0
-fi
-
-# taken from postinstall script
-if ! getent passwd prometheus &>/dev/null; then
-  adduser --quiet --system --home /var/lib/prometheus --no-create-home \
-          --group --gecos "Prometheus daemon" prometheus
-fi
-
-
-# textfile collector dir
-mkdir -p /var/lib/prometheus/node-exporter
-
-chown prometheus:prometheus /var/lib/prometheus
-
-
-i /etc/default/prometheus-node-exporter <<EOF
-# Set the command-line arguments to pass to the server.
-# Due to shell scaping, to pass backslashes for regexes, you need to double
-# them (\\d for \d). If running under systemd, you need to double them again
-# (\\\\d to mean \d), and escape newlines too.
-
-# sometime before 1.5 systemd was a default collector
-ARGS="--web.listen-address=${listen_address}:9100 --collector.textfile.directory=/var/lib/prometheus/node-exporter --collector.systemd"
-# to see all possible args, run with --help
-EOF
-
-if [[ -d /etc/systemd/system ]]; then # we are using systemd
-
-  # this is just fixing a screwed up state we shouldnt get into normally.
-  if [[ -e /etc/init.d/prometheus-node-exporter ]]; then
-    sysd_reload=true
-    rm -f /etc/init.d/prometheus-node-exporter
-  fi
-
-
-  # I used to have logic to handle having the distro package installed, which would then just override it's service file in some ways.  The only differences of the
-  # packaged version in t11 is that it creates /var/log/prometheus and a
-  # logrotate, but nothing is logged there. And it depends on
-  # prometheus-node-exporter-collectors, which is useful, but
-  # depends on prometheus-node-exporter. We would have no
-  # reason to install prometheus-node-exporter except that
-  # dependency. But since the collectors package is just a few
-  # small scripts we don't even currently use, and of course are not
-  # there on old versions, lets not try to use that package, and
-  # just manually install the files we want from upstream.
-  # https://github.com/prometheus-community/node-exporter-textfile-collector-scripts
-
-  if [[ -e /lib/systemd/system/prometheus-node-exporter.service ]]; then
-    apt -y remove --purge prometheus-node-exporter
-    rm -fv /lib/systemd/system/prometheus-node-exporter.service
-  fi
-
-  i /etc/systemd/system/prometheus-node-exporter.service <<'EOF'
-[Unit]
-Description=Prometheus exporter for machine metrics
-Documentation=https://github.com/prometheus/node_exporter
-
-# addition to the distro package
-StartLimitIntervalSec=0
-
-
-[Service]
-Restart=on-failure
-User=prometheus
-EnvironmentFile=/etc/default/prometheus-node-exporter
-ExecStart=/usr/local/bin/prometheus-node-exporter $ARGS
-ExecReload=/bin/kill -HUP $MAINPID
-TimeoutStopSec=20s
-SendSIGKILL=no
-
-# additions to the distro package
-Restart=always
-RestartSec=600
-
-
-[Install]
-WantedBy=multi-user.target
-EOF
-  if $sysd_reload; then
-    systemctl daemon-reload
-  fi
-  systemctl enable prometheus-node-exporter
-  if $installed_file; then
-    systemctl restart prometheus-node-exporter
-  fi
-else # not using systemd
-  i /etc/init.d/prometheus-node-exporter <<'EOF'
-#!/bin/sh
-# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
-if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
-    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
-fi
-### BEGIN INIT INFO
-# Provides:          prometheus-node-exporter
-# Required-Start:    $remote_fs
-# Required-Stop:     $remote_fs
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Prometheus exporter for machine metrics
-# Description:       Prometheus exporter for machine metrics, written in Go
-#                    with pluggable metric collectors.
-### END INIT INFO
-
-# Author: Martina Ferrari <tina@debian.org>
-# Author: Guillem Jover <gjover@sipwise.com>
-
-DESC="Prometheus exporter for machine metrics"
-NAME=prometheus-node-exporter
-USER=prometheus
-GROUP=$USER
-DAEMON=/usr/bin/$NAME
-PIDFILE=/run/prometheus/$NAME.pid
-LOGFILE=/var/log/prometheus/$NAME.log
-
-START_ARGS="--no-close --background --make-pidfile"
-STOP_ARGS="--remove-pidfile"
-
-do_start_prepare()
-{
-  mkdir -p $(dirname $PIDFILE)
-}
-
-do_start_cmd_override()
-{
-  start-stop-daemon --start --quiet --oknodo \
-    --exec $DAEMON --pidfile $PIDFILE --user $USER --group $GROUP \
-    --chuid $USER:$GROUP $START_ARGS -- $ARGS >>$LOGFILE 2>&1
-}
-
-do_stop_cmd_override()
-{
-  start-stop-daemon --stop --quiet --oknodo --retry=TERM/30/KILL/5 \
-    --exec $DAEMON --pidfile $PIDFILE --user $USER $STOP_ARGS
-}
-
-alias do_reload=do_reload_sigusr1
-EOF
-  chmod +x /etc/init.d/prometheus-node-exporter
-
-  mkdir -p /var/log/prometheus
-  chown prometheus:prometheus /var/log/prometheus
-  update-rc.d prometheus-node-exporter defaults
-
-  running=false
-  if type -t pgrep &>/dev/null && pgrep -f prometheus-node-exporter &>/dev/null; then
-    running=true
-  fi
-  if $installed_file || ! $running; then
-    /etc/init.d/prometheus-node-exporter restart
-  fi
-
-  i /etc/logrotate.d/prometheus-node-exporter <<'EOF'
-/var/log/prometheus/prometheus-node-exporter.log {
-    weekly
-    rotate 10
-    copytruncate
-    compress
-    delaycompress
-    notifempty
-    missingok
-}
-EOF
-
-fi
diff --git a/prometheus b/prometheus
deleted file mode 100755 (executable)
index e7e3233..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# I initially was using these
-# https://github.com/cloudalchemy/ansible-prometheus
-# https://github.com/cloudalchemy/ansible-alertmanager
-# https://github.com/cloudalchemy/ansible-node-exporter
-# https://github.com/cloudalchemy/ansible-grafana
-
-# As of trisquel 11, get upstream prom because it has the react ui,
-# which has localtime, and general better usability. alertmanager,
-# changelog seems to show good changes and surely things will just work
-# better with a matching prometheus.
-
-if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi
-
-#rsync --delete consoles console_libraries /etc/prometheus
-
-
-while read -r prog tool; do
-  cd /a/opt/${prog}dl
-  url=$(curl -s https://api.github.com/repos/prometheus/$prog/releases/latest | jq -r '.assets[].browser_download_url | match(".*linux-amd64.tar.gz$").string')
-  f=${url##*/}
-  if [[ -e $f ]]; then
-    timestamp=$(stat -c %Y $f)
-  else
-    timestamp=0
-  fi
-  m wget -nv -N $url
-  new_timestamp=$(stat -c %Y $f)
-  if [[ $timestamp != $new_timestamp || ! -e /usr/local/bin/$prog ]]; then
-    ngset
-    to_rm=( !($f) )
-    ngreset
-    if (( ${#to_rm[@]} )); then
-      rm -rf ${to_rm[@]}
-    fi
-    m ex $f
-    dir=${f%.tar.gz}
-    m sudo install $dir/$prog $dir/$tool /usr/local/bin
-    m sudo systemctl restart $prog
-  fi
-done <<'EOF'
-prometheus promtool
-alertmanager amtool
-EOF
diff --git a/rust b/rust
index 5ed2870e32fcf374b4b8c682ee7cfc866ccfa12d..58009fe2664e796e3568efec6c85e18bcd03b7ae 100755 (executable)
--- a/rust
+++ b/rust
@@ -1,11 +1,27 @@
 #!/bin/bash
-# Copyright (C) 2019 Ian Kelling
-# SPDX-License-Identifier: AGPL-3.0-or-later
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
 
-# alternatively, using https://iankelling.org/git/?p=errhandle;a=tree
-# source /path/errhandle/err
-# on my machine
-source /a/bin/errhandle/err
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+source /a/bin/bash-bear-trap/bash-bear
 source /a/bin/distro-functions/src/package-manager-abstractions
 
 PATH="$PATH:$HOME/.cargo/bin"
@@ -17,7 +33,16 @@ hash -r
 if type -t rustc &>/dev/null; then
   rustup update
 else
-  curl https://sh.rustup.rs -sSf | bash -s -- -y
+
+  # added stable due to this error
+#   Mar 11 00:13:15 info: no updatable toolchains installed
+# Mar 11 00:13:15 info: checking for self-update
+# Mar 11 00:13:15 info: cleaning up downloads & tmp directories
+# Mar 11 00:13:15 error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.
+# Mar 11 00:13:15 help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
+# Mar 11 00:13:15 /a/bin/buildscripts/rust:31: `cargo install-update -a' returned 1
+
+  curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain stable -y
 fi
 
 if ! which rg &>/dev/null; then
@@ -32,3 +57,9 @@ if ! type -t cargo-install-update &>/dev/null; then
 fi
 
 cargo install-update -a
+
+# https://github.com/rust-lang/cargo/issues/3289
+# 149 mb on fresh install as of 07-2023
+if du -s -t 500M ~/.cargo/registry | grep . &>/dev/null; then
+  rm -rf ~/.cargo/registry
+fi
index 9883473c3e09071b25d468aedb5c13a73756dbb2..923c4e3c4145502707fdfdda2f90d12f68895ee2 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/bash
-# Copyright (C) 2016 Ian Kelling
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
 
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,6 +20,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+
 if [[ -s ~/.bashrc ]]; then . ~/.bashrc; fi
 
 
diff --git a/update-builds b/update-builds
deleted file mode 100755 (executable)
index 091ee60..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-
-x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*}
-for x in *; do
-    if [[ $x == update-builds || ! -x $x || -d $x ]]; then
-        continue
-    fi
-    $x -u
-done