From 65a0d6984b02937e49093c32c37b5cfbc26e3b79 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 3 Jul 2020 17:38:33 -0400 Subject: [PATCH] various fixes --- elisp | 4 +- emacs | 9 ++-- exim | 119 +++++++++++++++++++++++++++++++--------------------- org-mode | 5 +-- pithosfly | 9 ++-- rust | 7 ++++ tor-browser | 9 ++-- 7 files changed, 97 insertions(+), 65 deletions(-) diff --git a/elisp b/elisp index 21ff0db..087e53b 100755 --- a/elisp +++ b/elisp @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash # Copyright (C) 2016 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi + if [[ $1 == -u ]]; then u="git pull" else diff --git a/emacs b/emacs index b2c9740..6acef0b 100755 --- a/emacs +++ b/emacs @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash # Copyright (C) 2016 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR +if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi #set -x # arg = git commit to check out @@ -146,7 +145,7 @@ if $recompile || [[ $rev != "$head" ]]; then logq sudo make install # make emacs always work for root - s /a/exe/lnf /usr/local/bin/emacs /usr/bin + sudo /a/exe/lnf /usr/local/bin/emacs /usr/bin echo $head >~/.local/emacs-build-git-revision fi @@ -161,7 +160,7 @@ rev=$(cat ~/.local/mu-build-git-revision 2>/dev/null) ||: head=$(git rev-parse HEAD) if $recompile || [[ $rev != "$head" ]]; then - if [[ $(distro-name) == trisquel ]]; then + if [[ $(debian-codename) == flidas ]]; then # use the flidas branch, stuck behind because # needs newer crypt libraries that are too troublesome. cd /a/opt/muflidas diff --git a/exim b/exim index 6bfeb5a..24ed030 100644 --- a/exim +++ b/exim @@ -1,52 +1,77 @@ #!/bin/bash +# libgcrypt-dev is a test dependency +# libidn11-dev is some build dep for newer version not in +apt-get install -y libopendmarc-dev libspf2-dev libgcrypt-dev libidn11-dev -apt-get install -y libopendmarc-dev libspf2-dev -apt-get -y build-dep exim4/flidas + +apt-get -y build-dep exim4/etiona # https://wiki.debian.org/BuildingAPackage apt-get install build-essential dpatch fakeroot devscripts equivs lintian quilt -mkct -apt-get source exim4/flidas - -# to just patch heavy: -# first apply below patch, then build, then -#diff -u ./EDITME.exim4-light ./EDITME.exim4-heavy > /tmp/EDITME.exim4-heavy.diff -# remove extraneous differences -# meld ./debian/EDITME.exim4-heavy.diff /tmp/EDITME.exim4-heavy.diff -# diff -u ./debian/EDITME.exim4-heavy.diff /tmp/EDITME.exim4-heavy.diff -# edit the diff to get filenames right. - - -patch -p0 <<'EOF' ---- ./exim4-4.86.2/src/EDITME.orig 2019-07-31 11:34:22.284977059 -0400 -+++ ./exim4-4.86.2/src/EDITME 2019-07-31 11:35:01.361206192 -0400 -@@ -445,9 +445,9 @@ - # installed on your system (www.libspf2.org). Depending on where it is installed - # you may have to edit the CFLAGS and LDFLAGS lines. - --# EXPERIMENTAL_SPF=yes --# CFLAGS += -I/usr/local/include --# LDFLAGS += -lspf2 -+EXPERIMENTAL_SPF=yes -+CFLAGS += -I/usr/local/include -+LDFLAGS += -lspf2 - - # Uncomment the following lines to add SRS (Sender rewriting scheme) support. - # You need to have libsrs_alt installed on your system (srs.mirtol.com). -@@ -469,9 +469,9 @@ - - # Uncomment the following line to add DMARC checking capability, implemented - # using libopendmarc libraries. --# EXPERIMENTAL_DMARC=yes --# CFLAGS += -I/usr/local/include --# LDFLAGS += -lopendmarc -+EXPERIMENTAL_DMARC=yes -+CFLAGS += -I/usr/local/include -+LDFLAGS += -lopendmarc - - - # Uncomment the following line to support Events, -EOF - -cd exim4-4.86.2 -fakeroot debian/rules binary + +cd /a/opt/exim/src +# created by using make wrapper /b/make-wrap and building the exim package +#. /a/opt/dexim/iank-debian-make-env + +declare -x LC_ALL='C' +declare -x PERL_USE_UNSAFE_INC='1' +declare -x CFLAGS='-g -O2 -D_LARGEFILE_SOURCE -fno-strict-aliasing -Wall ' +make +# copy src/Local/Makefile from debian experimental package into local repo, + +# for running the tests, +# edit src/Local/Makefile to remove ref: from EXIM_USER and EXIM_GROUP, +# then change CONFIGURE_OWNER and CONGIGURE_USER to the default ones that +# will be used when creating /a/opt/exim/test/test-config (iank/user2) +# echo /a/opt/exim/test/test-config | s dd of=/etc/exim4/trusted_configs +# edit /etc/hostname to be an fqdn, then hostname -F /etc/hostname. after +# running a single test, change this back, its cached in test/dnszones, and +# if you need to update that cache, rm -rf that dir. + +##### the following just patches the flidas package to have dmarc support + +# mkct +# apt-get source exim4/etiona + +# # to just patch heavy: +# # first apply below patch, then build, then +# #diff -u ./EDITME.exim4-light ./EDITME.exim4-heavy > /tmp/EDITME.exim4-heavy.diff +# # remove extraneous differences +# # meld ./debian/EDITME.exim4-heavy.diff /tmp/EDITME.exim4-heavy.diff +# # diff -u ./debian/EDITME.exim4-heavy.diff /tmp/EDITME.exim4-heavy.diff +# # edit the diff to get filenames right. + + +# patch -p0 <<'EOF' +# --- ./exim4-4.86.2/src/EDITME.orig 2019-07-31 11:34:22.284977059 -0400 +# +++ ./exim4-4.86.2/src/EDITME 2019-07-31 11:35:01.361206192 -0400 +# @@ -445,9 +445,9 @@ +# # installed on your system (www.libspf2.org). Depending on where it is installed +# # you may have to edit the CFLAGS and LDFLAGS lines. + +# -# EXPERIMENTAL_SPF=yes +# -# CFLAGS += -I/usr/local/include +# -# LDFLAGS += -lspf2 +# +EXPERIMENTAL_SPF=yes +# +CFLAGS += -I/usr/local/include +# +LDFLAGS += -lspf2 + +# # Uncomment the following lines to add SRS (Sender rewriting scheme) support. +# # You need to have libsrs_alt installed on your system (srs.mirtol.com). +# @@ -469,9 +469,9 @@ + +# # Uncomment the following line to add DMARC checking capability, implemented +# # using libopendmarc libraries. +# -# EXPERIMENTAL_DMARC=yes +# -# CFLAGS += -I/usr/local/include +# -# LDFLAGS += -lopendmarc +# +EXPERIMENTAL_DMARC=yes +# +CFLAGS += -I/usr/local/include +# +LDFLAGS += -lopendmarc + + +# # Uncomment the following line to support Events, +# EOF + +# cd exim4-4.86.2 +# fakeroot debian/rules binary diff --git a/org-mode b/org-mode index 701a5d1..c9d0b1d 100755 --- a/org-mode +++ b/org-mode @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash # Copyright (C) 2016 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,8 +16,7 @@ # git clone git://orgmode.org/org-mode.git # texinfo is all that is technically needed, but having tex for math is good -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR +if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi logq pi git texlive install-info diff --git a/pithosfly b/pithosfly index b28f6f6..7d45443 100755 --- a/pithosfly +++ b/pithosfly @@ -1,11 +1,12 @@ -#!/bin/bash -l - -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR +#!/bin/bash +# Copyright (C) 2019 Ian Kelling +# SPDX-License-Identifier: AGPL-3.0-or-later +if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi # pithosfly environment var is set in environment.sh +# already installed if type -t pithos &>/dev/null; then exit 0 fi diff --git a/rust b/rust index 38d2a60..08aea33 100755 --- a/rust +++ b/rust @@ -11,6 +11,10 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR # source /path/errhandle/err # on my machine source /a/bin/errhandle/err +source /a/bin/distro-functions/src/package-manager-abstractions + +PATH="$PATH:$HOME/.cargo/bin" +hash -r # install rust. if type -t rustc &>/dev/null; then @@ -24,6 +28,9 @@ if ! which rg &>/dev/null; then fi if ! type -t cargo-install-update &>/dev/null; then + # due to + # error: failed to run custom build command for `openssl-sys v0.9.53` + pi libssl-dev pkg-config cargo install cargo-update fi diff --git a/tor-browser b/tor-browser index 07fbe9b..c105e6e 100755 --- a/tor-browser +++ b/tor-browser @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash # Copyright (C) 2016 Ian Kelling # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR +if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi # stable version is shown on: @@ -57,7 +56,7 @@ new_timestamp=$(stat -c %Y $f) if [[ $timestamp != $new_timestamp || ! -e /a/opt/tor-browser_en-US/Browser/start-tor-browser ]]; then # not already installed rm -rf tor-browser_en-US - ex $f + tar Jxf $f fi for x in tor-*.tar.xz; do @@ -66,4 +65,4 @@ for x in tor-*.tar.xz; do [[ $x != $f ]] || continue command rm -f $x done -s lnf /a/opt/tor-browser_en-US/Browser/start-tor-browser /usr/local/bin +sudo ln -sf /a/opt/tor-browser_en-US/Browser/start-tor-browser /usr/local/bin -- 2.30.2