#!/bin/sh
-# $Id: genkey-firmengebrauch.sh 1641 2011-01-24 10:55:40Z tglase $
+# $Id: genkey-firmengebrauch.sh 1932 2011-04-27 14:53:08Z tglase $
#-
# Copyright © 2010, 2011
# Thorsten Glaser <t.glaser@tarent.de>
+# All rights reserved.
+#
+# Licenced under the GNU AGPLv3.
+#-
+# Generate a new GnuPG (PGP) key, for company use.
+# The keys are revokable by the company key and use LDAP user/password.
# check if we're called with mksh or bash; fix if not
if test -z "$shell_tried"; then
echo >&2 '│ dieser Fehlernachricht KONTAKTIEREN. │'
echo >&2 '└────────────────────────────────────────────────────────┘'
else
- echo >&2 '┌─────────────────────────────────────────┐'
- echo >&2 '│ Key generation finished with no errors. │'
- echo >&2 '│ Schlüsselerzeugung fehlerfrei erledigt. │'
- echo >&2 '└─────────────────────────────────────────┘'
+ cat >&2 <<'EOF'
+┌─────────────────────────────────────────┐
+│ Key generation finished with no errors. │
+│ Schlüsselerzeugung fehlerfrei erledigt. │
+└─────────────────────────────────────────┘
+
+╔═════════════════════════════════════════════════════════════════════╗
+║ You are responsible for backing up yout PGP secret key BY YOURSELF! ║
+║ Du mußt SELBER für Sicherungskopiën des privaten Schlüssels sorgen! ║
+╚═════════════════════════════════════════════════════════════════════╝
+EOF
fi
(echo "finished:"; gpg -k $pkid | sed 's/^/| /'; echo) >>"$log"
echo >&2
-# $Id: svg-path-abs2rel 874 2010-02-24 15:58:34Z tglase $
+# $Id: svg-path-abs2rel 2081 2011-06-09 20:21:16Z tglase $
#-
# Copyright © 2010
# Thorsten Glaser <t.glaser@tarent.de>
-# $MirOS: src/bin/mksh/dot.mkshrc,v 1.59 2011/02/09 19:32:35 tg Exp $
+# $MirOS: src/bin/mksh/dot.mkshrc,v 1.60 2011/05/29 02:18:49 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
# Thorsten Glaser <tg@mirbsd.org>
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
# of said person's immediate fault when using the work as intended.
+#-
+# RFC compliant base64 encoder and decoder
-# base64 encoder (not NUL safe) and decoder (NUL safe), RFC compliant
+# NUL safe base64 decoder
function Lb64decode {
[[ -o utf8-mode ]]; typeset u=$?
set +U
set -A Lb64encode_code -- A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \
a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 + /
+if true; then
+# not NUL safe base64 encoder
function Lb64encode {
[[ -o utf8-mode ]]; typeset u=$?
set +U
done
(( u )) || set -U
}
+else
+# NUL safe base64 encoder, needs mksh R40
+function Lb64encode {
+ [[ -o utf8-mode ]]; typeset u=$?
+ set +U
+ typeset c s t
+ if (( $# )); then
+ read -raN-1 s <<<"$*"
+ unset s[${#s[*]}-1]
+ else
+ read -raN-1 s
+ fi
+ typeset -i i=0 n=${#s[*]} j v
+
+ while (( i < n )); do
+ (( v = s[i++] << 16 ))
+ (( j = i < n ? s[i++] : 0 ))
+ (( v |= j << 8 ))
+ c=${s:(i++):1}
+ (( j = i < n ? s[i++] : 0 ))
+ (( v |= j ))
+ t=$t${Lb64encode_code[v >> 18]}${Lb64encode_code[v >> 12 & 63]}
+ c=${Lb64encode_code[v >> 6 & 63]}
+ if (( i <= n )); then
+ t=$t$c${Lb64encode_code[v & 63]}
+ elif (( i == n + 1 )); then
+ t=$t$c=
+ else
+ t=$t==
+ fi
+ if (( ${#t} == 76 || i >= n )); then
+ print $t
+ t=
+ fi
+ done
+ (( u )) || set -U
+}
+fi
#!/bin/mksh
-# $Id: csrgen 1637 2011-01-17 15:00:59Z tglase $
+# $Id: csrgen 2084 2011-06-09 20:54:16Z tglase $
#-
# Copyright © 2010, 2011
# Thorsten Glaser <t.glaser@tarent.de>
#!/bin/mksh
-rcsid='$MirOS: contrib/hosted/tg/deb/mkdebidx.sh,v 1.46 2011/03/04 14:24:32 tg Exp $'
+rcsid='$MirOS: contrib/hosted/tg/deb/mkdebidx.sh,v 1.51 2011/05/13 20:53:29 tg Exp $'
#-
# Copyright (c) 2008, 2009, 2010, 2011
# Thorsten Glaser <tg@mirbsd.org>
allsuites="$allsuites${allsuites:+ }${suite##*/}"
[[ $suites = : || $suites = *:"$suite":* ]] || continue
archs=
+ distribution=
. $suite/distinfo.sh
suitearchs=${archs:-${normarchs[*]}}
components=Components:
[[ -s $dist/distinfo.sh ]] && . $dist/distinfo.sh
set -A distarchs -- $(sortlist -u all ${archs:-$suitearchs})
IFS=:; distarchl=:"${distarchs[*]}":; IFS=$saveIFS
- for arch in $(sortlist -u ${distarchs[*]} ${dpkgarchs[*]}); do
+ for arch in $(sortlist -u ${distarchs[*]} ${dpkgarchs[*]}) /; do
+ # put "all" last
+ [[ $arch = all ]] && continue
+ [[ $arch = / ]] && arch=all
+ # create index
if [[ $dpkgarchl != *:"$arch":* ]]; then
print -u2 "Invalid arch '$arch' in $dist"
exit 1
(cat <<-EOF
Origin: ${repo_origin}
Label: ${repo_label}
- Suite: ${suite##*/}
+ Suite: ${distribution:-${suite##*/}}
Codename: ${suite##*/}
Date: $(date -u)
Architectures: all ${dpkgarchs[*]} source
Description: $(repo_description "$nick")
MD5Sum:
EOF
+ exec 4>$suite/Release-sha1
+ exec 5>$suite/Release-sha2
+ print -u4 SHA1:
+ print -u5 SHA256:
cd $suite
set -A cache_fn
set -A cache_md5
+ set -A cache_sha1
+ set -A cache_sha2
set -A cache_size
for n in Contents-* */{binary-*,source}/{Packag,Sourc}es*; do
[[ -f $n ]] || continue
if [[ $nc = "$nn" ]]; then
nm=${cache_md5[Lcdbhash_result]}
ns=${cache_size[Lcdbhash_result]}
+ nsha1=${cache_sha1[Lcdbhash_result]}
+ nsha2=${cache_sha2[Lcdbhash_result]}
else
+ # GNU *sum tools are horridly inefficient
set -A x -- $(md5sum "$nn")
nm=${x[0]}
+ set -A x -- $(sha1sum "$nn")
+ nsha1=${x[0]}
+ set -A x -- $(sha256sum "$nn")
+ nsha2=${x[0]}
ns=$(stat -c '%s' "$nn")
cache_md5[Lcdbhash_result]=$nm
cache_size[Lcdbhash_result]=$ns
cache_fn[Lcdbhash_result]=$nn
+ cache_sha1[Lcdbhash_result]=$nsha1
+ cache_sha2[Lcdbhash_result]=$nsha2
fi
print " $nm $ns $n"
+ print -u4 " $nsha1 $ns $n"
+ print -u5 " $nsha2 $ns $n"
done) >$suite/Release
+ cat $suite/Release-sha1 $suite/Release-sha2 >>$suite/Release
+ rm $suite/Release-sha1 $suite/Release-sha2
$gpg_remote gpg -u $repo_keyid -sb <$suite/Release >$suite/Release.gpg
done
continue
fi
- pn=; pv=; pd=; pp=; pN=; pf=
-
gzip -dc $dist/source/Sources.gz |&
+ pn=; pv=; pd=; pp=; Lf=
while IFS= read -pr line; do
case $line {
+ (" "*)
+ if [[ -n $Lf ]]; then
+ eval x=\$$Lf
+ x=$x$line
+ eval $Lf=\$x
+ fi
+ ;;
("Package: "*)
pn=${line##Package:*([ ])}
+ Lf=pn
;;
("Version: "*)
pv=${line##Version:*([ ])}
+ Lf=pv
;;
("Binary: "*)
pd=${line##Binary:*([ ])}
+ Lf=pd
;;
("Directory: "*)
pp=${line##Directory:*([ ])}
+ Lf=pp
;;
(?*) # anything else
+ Lf=
;;
(*) # empty line
if [[ -n $pn && -n $pv && -n $pd && -n $pp ]]; then
eval sp_dir_${suitename}[i]='${ppo:+$ppo,}$pp/'
sp_desc[i]=${sp_desc[i]},$pd
fi
- pn=; pv=; pd=; pp=
+ pn=; pv=; pd=; pp=; Lf=
;;
}
done
[[ -e $f ]] || continue
realpath "$f"
done | sort -u) |&
+ pn=; pv=; pd=; pp=; pN=; pf=; Lf=
while IFS= read -pr line; do
case $line {
+ (" "*)
+ if [[ -n $Lf ]]; then
+ eval x=\$$Lf
+ x=$x$line
+ eval $Lf=\$x
+ fi
+ ;;
("Package: "*)
pN=${line##Package:*([ ])}
+ Lf=pN
;;
("Source: "*)
pn=${line##Source:*([ ])}
pn=${pn%% *}
+ Lf=pn
;;
("Version: "*)
pv=${line##Version:*([ ])}
+ Lf=pv
;;
("Description: "*)
pd=${line##Description:*([ ])}
;;
("Architecture: "*)
pp=${line##Architecture:*([ ])}
+ Lf=pp
;;
("Filename: "*)
pf=${line##Filename:*([ ])}
+ Lf=pf
;;
(?*) # anything else
+ Lf=
;;
(*) # empty line
if [[ $pf = *:* || $pf = *'%'* ]]; then
eval bp_ver_${suitename}[i]=\$x
bp_desc[i]=$pd
fi
- pn=; pv=; pd=; pp=; pN=
+ pn=; pv=; pd=; pp=; pN=; pf=; Lf=
;;
}
done
EOF
print -r -- " <title>${repo_title} Index</title>"
cat <<'EOF'
- <meta name="generator" content="$MirOS: contrib/hosted/tg/deb/mkdebidx.sh,v 1.46 2011/03/04 14:24:32 tg Exp $" />
+ <meta name="generator" content="$MirOS: contrib/hosted/tg/deb/mkdebidx.sh,v 1.51 2011/05/13 20:53:29 tg Exp $" />
<style type="text/css">
table {
border: 1px solid black;
[[ -s 0-NOTE.txt ]] && print ' Also read my <a href="0-NOTE.txt">notes</a>.'
cat <<EOF
This repository uses <a
- href="http://pgpkeys.pca.dfn.de/pks/lookup?search=${repo_keyid}&op=vindex">${repo_keyid}</a>
+ href="http://pgp.uni-mainz.de:11371/pks/lookup?search=${repo_keyid}&op=vindex">${repo_keyid}</a>
as signing key.
</p>
<h2>Suites</h2>
#!/bin/mksh
-rcsid='$MirOS: contrib/hosted/tg/deb/quinn-ls.sh,v 1.1 2011/02/18 18:52:01 tg Exp $'
+rcsid='$MirOS: contrib/hosted/tg/deb/quinn-ls.sh,v 1.3 2011/05/25 17:40:51 tg Exp $'
#-
-# Copyright (c) 2011
+# Copyright © 2011
# Thorsten Glaser <tg@debian.org>
#
# Provided that these terms and disclaimer and all copyright notices
# are retained or reproduced in an accompanying document, permission
-# is granted to deal in this work without restriction, including un-
+# is granted to deal in this work without restriction, including un‐
# limited rights to use, publicly perform, distribute, sell, modify,
# merge, give away, or sublicence.
#
-# This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
+# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
# the utmost extent permitted by applicable law, neither express nor
# implied; without malicious intent or gross negligence. In no event
# may a licensor, author or contributor be held liable for indirect,
# direct, other damage, loss, or other issues arising in any way out
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
-# of said person's immediate fault when using the work as intended.
+# of said person’s immediate fault when using the work as intended.
+
+gather=cwd
+mydir=$(realpath "$(dirname "$0")")
+
+while getopts "l" ch; do
+ case $ch {
+ (l) gather=installed ;;
+ (*) exit 1 ;;
+ }
+done
+shift $((OPTIND - 1))
+
+# Debian Policy 3.9.2.0, §5.6.1
+function isdebpkg {
+ [[ $1 = [a-z0-9]+([a-z0-9+.-]) ]]
+}
+
+# Debian Policy 3.9.2.0, §5.6.12
+function isdebver {
+ local epochglob uvglob dvglob
+
+ # strict (must start with a digit)
+ #uvglob='[0-9]*'
+ # loose (should, but it's ok if not)
+ uvglob='+'
+
+ uvglob=$uvglob'([A-Za-z0-9.+~'
+
+ # colon is allowed if we have an epoch
+ if [[ $1 = +([0-9])':'* ]]; then
+ epochglob='+([0-9])'\'':'\'
+ uvglob=$uvglob':'
+ fi
+
+ # hyphen is allowed if we have a debian revision
+ if [[ $1 = *'-'+([A-Za-z0-9+.~]) ]]; then
+ dvglob=\'-\''+([A-Za-z0-9+.~])'
+ uvglob=$uvglob'-'
+ fi
+
+ uvglob=$uvglob'])'
+
+ eval [[ \$1 = $epochglob$uvglob$dvglob ]]
+}
-find . -name \*.changes -o -name \*.dsc |&
set -A pkgs
set -A lver
set -A uver
i=0
-while IFS= read -pr name; do
- Source=
- Version=
- eval $(sed -n \
- -e '/^\(Source\): \([^ ]*\)\( .*\)*$/s//\1='\''\2'\''/p' \
- -e '/^\(Version\): \([^ ]*\)$/s//\1='\''\2'\''/p' \
- "$name")
- if [[ -z $Source || -z $Version ]]; then
- print -ru2 "skipping invalid file $name"
- continue
+function do_gather {
+ if ! isdebpkg "$Source"; then
+ print -ru2 "skipping invalid Source '$Source', file $name"
+ return 2
+ fi
+ if ! isdebver "$Version"; then
+ print -ru2 "skipping invalid Version '$Version', file $name"
+ return 2
fi
j=-1
while (( ++j < i )); do
[[ ${pkgs[j]} = "$Source" ]] && break
done
if (( j == i )); then
- print -u2 "local $Source $Version"
+ print -ru2 "local $Source $Version"
pkgs[i]=$Source
lver[i++]=$Version
- continue
+ return 0
fi
for x in ${lver[j]}; do
# skip dups (from .changes = .dsc probably) silently
- [[ $x = "$Version" ]] && continue 2
+ [[ $x = "$Version" ]] && return 1
done
# put the newest local version leftmost
set -A xa -- ${lver[j]}
if dpkg --compare-versions "$Version" gt "${xa[0]}"; then
- print -u2 "newer $Source $Version"
+ print -ru2 "newer $Source $Version"
lver[j]="$Version ${lver[j]}"
else
- print -u2 "older $Source $Version"
+ print -ru2 "older $Source $Version"
lver[j]="${lver[j]} $Version"
fi
-done
+ return 0
+}
+
+if [[ $gather = cwd ]]; then
+ find . -name \*.changes -o -name \*.dsc |&
+ while IFS= read -pr name; do
+ Source=
+ Version=
+ eval $(sed -n \
+ -e '/^\(Source\): \([^ ]*\)\( .*\)*$/s//\1='\''\2'\''/p' \
+ -e '/^\(Version\): \([^ ]*\)$/s//\1='\''\2'\''/p' \
+ "$name")
+ do_gather
+ done
+elif [[ $gather = installed ]]; then
+ dpkg-query -Wf '${Package} ${Version} ${Source} ${Package}\n' |&
+ while read -p name Version Source x rest; do
+ if [[ $Source = *'('*')' ]]; then
+ # this is not customary…
+ rest=${Source##*'('}
+ rest=${rest%')'}
+ isdebver "$rest" && Version=$rest
+ elif [[ $x = '('*')' ]]; then
+ # Source:Version ≠ Version
+ x=${x#'('}
+ x=${x%')'}
+ isdebver "$x" && Version=$x
+ fi
+ do_gather
+ done
+else
+ exit 1
+fi
-print -u2 '\nrunning rmadison...'
+print -u2 '\nrunning rmadison…'
rmadison -s sid "${pkgs[@]}" |&
while read -pr pkg pipe vsn pipe sid pipe arches; do
#print -u2 "D: pkg<$pkg> vsn<$vsn> sid<$sid> arches<$arches>"
[[ ${pkgs[j]} = "$pkg" ]] && break
done
if (( j == i )); then
- print -u2 "bogus $pkg $vsn ignored"
+ print -ru2 "bogus $pkg $vsn ignored"
continue
fi
x=${uver[j]}
if [[ -z $x ]]; then
- print -u2 "found $pkg $vsn"
+ print -ru2 "found $pkg $vsn"
uver[j]=$vsn
elif [[ $x = "$vsn" ]]; then
- print -u2 "equal $pkg $vsn ignored"
+ print -ru2 "equal $pkg $vsn ignored"
elif dpkg --compare-versions "$x" lt "$vsn"; then
- print -u2 "newer $pkg $vsn (dropping $x)"
+ print -ru2 "newer $pkg $vsn (dropping $x)"
uver[j]=$vsn
else
- print -u2 "older $pkg $vsn ignored"
+ print -ru2 "older $pkg $vsn ignored"
fi
done
+print -u2 '\nreading override files [bad bld ign]…'
+# bad: mark RIGHT versions lower or equal as "bad"
+# bld: mark RIGHT version equal as "building"
+# ign: mark LEFT version equal as "ignored" and ignore not-in-upstream
+for type in bad bld ign; do
+ [[ -s $mydir/quinn-ls.$type ]] || continue
+ while read pkg vsn; do
+ if ! isdebpkg "$pkg"; then
+ print -ru2 "skipping invalid package '$pkg'," \
+ override $type
+ continue
+ fi
+ if ! isdebver "$vsn"; then
+ print -ru2 "skipping invalid version '$vsn'," \
+ override $type
+ continue
+ fi
+ print -ru2 "o:$type $pkg $vsn"
+ epkg=${pkg//'+'/_p}
+ epkg=${epkg//'.'/_d}
+ epkg=${epkg//'-'/_u}
+ eval over_${type}_${epkg}=\$vsn
+ done <$mydir/quinn-ls.$type
+done
+
c0=$'\033[0m'
c1=$'\033[1;31m'
c2=$'\033[1;32m'
c3=$'\033[1;33m'
c4=$'\033[1;34m'
+c5=$'\033[1;35m'
+c6=$'\033[1;36m'
print -ru2 "$c0"
-print -u2
+print -ru2
j=-1
while (( ++j < i )); do
lc=$c3
uc=$c4
fi
+
+ epkg=${pkg//'+'/_p}
+ epkg=${epkg//'.'/_d}
+ epkg=${epkg//'-'/_u}
+ for type in bad bld ign; do
+ eval over_$type=\$over_${type}_${epkg}
+ done
+ if [[ -n $over_ign && $lv = "$over_ign" ]]; then
+ lc=$c6
+ [[ $uv = '0~RM' ]] && uc=$c6
+ fi
+ [[ -n $over_bad ]] && dpkg --compare-versions "$uv" le "$over_bad" && \
+ uc=$c5
+ [[ -n $over_bld && $uv = "$over_bld" ]] && uc=$c6
+
print -r -- "$c0$pkg $lc$lv$c0 $uc$uv$c0"
[[ $lvs = $lv ]] && continue
for lv in ${lvs#* }; do
-# $MirOS: src/bin/mksh/dot.mkshrc,v 1.59 2011/02/09 19:32:35 tg Exp $
+# $MirOS: src/bin/mksh/dot.mkshrc,v 1.60 2011/05/29 02:18:49 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
# Thorsten Glaser <tg@mirbsd.org>
# DJB cdb hash (not via stdio, for speed)
typeset -Z11 -Uui16 Lcdbhash_result
+if true; then
+# not NUL safe
function Lcdbhash_add {
[[ -o utf8-mode ]]; typeset u=$?
set +U
(( u )) || set -U
}
+else
+# NUL safe; needs mksh R40
+function Lcdbhash_add {
+ [[ -o utf8-mode ]]; typeset u=$?
+ set +U
+ typeset s
+ if (( $# )); then
+ read -raN-1 s <<<"$*"
+ unset s[${#s[*]}-1]
+ else
+ read -raN-1 s
+ fi
+ typeset -i i=0 n=${#s[*]}
+
+ while (( i < n )); do
+ ((# Lcdbhash_result = (Lcdbhash_result * 33) ^ s[i++] ))
+ done
+
+ (( u )) || set -U
+}
+fi
function Lcdbhash {
Lcdbhash_result=5381
Lcdbhash_add "$@"
-# $MirOS: src/bin/mksh/dot.mkshrc,v 1.59 2011/02/09 19:32:35 tg Exp $
+# $MirOS: src/bin/mksh/dot.mkshrc,v 1.60 2011/05/29 02:18:49 tg Exp $
#-
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
# Thorsten Glaser <tg@mirbsd.org>
# Jenkins one-at-a-time hash (not via stdio, for speed)
typeset -Z11 -Uui16 Loaathash_result
+if true; then
+# not NUL safe
function Loaathash_add {
[[ -o utf8-mode ]]; typeset u=$?
set +U
(( u )) || set -U
}
+else
+# NUL safe; needs mksh R40
+function Loaathash_add {
+ [[ -o utf8-mode ]]; typeset u=$?
+ set +U
+ typeset s
+ if (( $# )); then
+ read -raN-1 s <<<"$*"
+ unset s[${#s[*]}-1]
+ else
+ read -raN-1 s
+ fi
+ typeset -i i=0 n=${#s[*]}
+
+ while (( i < n )); do
+ ((# Loaathash_result = (Loaathash_result + s[i++]) *
+ 1025 ))
+ ((# Loaathash_result ^= Loaathash_result >> 6 ))
+ done
+
+ (( u )) || set -U
+}
+fi
function Loaathash_do {
Loaathash_add "$@"
((# Loaathash_result += Loaathash_result << 3 ))
-# $MirOS: src/bin/mksh/check.t,v 1.464 2011/06/09 21:26:21 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.465 2011/06/09 21:53:12 tg Exp $
#-
# Copyright © 2008, 2009, 2011
# Thorsten Glaser <tg@mirbsd.org>
# damage or existence of a defect, except proven that it results out
# of said person’s immediate fault when using the work as intended.
#-
-# hexdump, not NUL byte safe
-# needs input terminated with a trailing newline, as per POSIX files
+# hexdump, NUL byte and binary safe
+# integer-base-one-3Ar
typeset -Uui16 -Z11 pos=0
typeset -Uui16 -Z5 hv=2147483647
dasc=
-while read -ar line; do
+if read -arN -1 line; then
typeset -i1 line
- line[${#line[*]}]=10
i=0
while (( i < ${#line[*]} )); do
hv=${line[i++]}
fi
(( (pos++ & 15) == 7 )) && print -n -- '- '
done
-done
+fi
while (( pos & 15 )); do
print -n ' '
(( (pos++ & 15) == 7 )) && print -n -- '- '
-# $MirOS: src/bin/mksh/check.t,v 1.464 2011/06/09 21:26:21 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.465 2011/06/09 21:53:12 tg Exp $
#-
# Copyright © 2008, 2009, 2011
# Thorsten Glaser <tg@mirbsd.org>
# hexdump, not NUL byte safe
# needs input terminated with a trailing newline, as per POSIX files
+# integer-base-one-3As
typeset -Uui16 -Z11 pos=0
typeset -Uui16 -Z5 hv=2147483647
typeset -i1 wc=0x0A
-# $MirOS: src/bin/mksh/check.t,v 1.464 2011/06/09 21:26:21 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.465 2011/06/09 21:53:12 tg Exp $
#-
# Copyright © 2008, 2009, 2011
# Thorsten Glaser <tg@mirbsd.org>
# damage or existence of a defect, except proven that it results out
# of said person’s immediate fault when using the work as intended.
#-
-# hexdump, not NUL byte safe, Unicode (UCS-2, OPTU-16) output
-# needs input terminated with a trailing newline, as per POSIX files
+# hexdump, NUL byte and binary safe, Unicode (UCS-2, OPTU-16) output
+# integer-base-one-3Wr
typeset -Uui16 -Z11 pos=0
typeset -Uui16 -Z7 hv=2147483647
dasc=
-while read -ar line; do
+if read -arN -1 line; then
typeset -i1 line
- line[${#line[*]}]=10
i=0
while (( i < ${#line[*]} )); do
hv=${line[i++]}
print -n -- '- '
dasc=$dasc$dch
done
-done
+fi
while (( pos & 7 )); do
print -n ' '
(( (pos++ & 7) == 3 )) && print -n -- '- '
-# $MirOS: src/bin/mksh/check.t,v 1.464 2011/06/09 21:26:21 tg Exp $
+# $MirOS: src/bin/mksh/check.t,v 1.465 2011/06/09 21:53:12 tg Exp $
#-
# Copyright © 2008, 2009, 2011
# Thorsten Glaser <tg@mirbsd.org>
# hexdump, not NUL byte safe, Unicode (UCS-2, OPTU-16) output
# needs input terminated with a trailing newline, as per POSIX files
+# integer-base-one-3Ws
typeset -Uui16 -Z11 pos=0
typeset -Uui16 -Z7 hv
typeset -i1 wc=0x0A
-# $MirOS: src/scripts/roff2htm,v 1.58 2009/02/17 12:55:22 tg Exp $
+# $MirOS: src/scripts/roff2htm,v 1.59 2011/02/18 22:37:28 tg Exp $
# $ekkoBSD: catman2html.sh,v 1.2 2004/03/07 03:02:53 stephen Exp $
#-
-# Copyright (c) 2004, 2005, 2006, 2007
-# Thorsten “mirabilos” Glaser <tg@mirbsd.de>
+# Copyright (c) 2004, 2005, 2006, 2007, 2011
+# Thorsten “mirabilos” Glaser <tg@mirbsd.org>
# Original version for ekkoBSD by:
# Copyright (c) 2004
# Stephen Paskaluk <sap@mirbsd.org>
\
-e 's#^\( \{2,3\}\)\([A-Z][ ,0-9A-z]*\)$#\1<b>\2</b>#' \
\
- -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\)[/0-9A-Za-z]*)\)#<a href=\"../man\3/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(\([1-9]\)[/0-9A-Za-z]*)\)#<a href=\"../man\3/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(\([PSU][MS][DM]\))\)#<a href=\"../man\3/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(\([PSU][MS][DM]\))\)#<a href=\"../man\3/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(\(PAPERS\))\)#<a href=\"../man\3/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(\(PAPERS\))\)#<a href=\"../man\3/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(GNU)\)#<a href=\"../manINFO/\2.htm\">\1</a>#g' \
- -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(GNU)\)#<a href=\"../manINFO/\2.htm\">\1</a>#g' \
+ -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\)[/0-9A-Za-z]*)\)#<a href=\"../man\3/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(\([1-9]\)[/0-9A-Za-z]*)\)#<a href=\"../man\3/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(\([PSU][MS][DM]\))\)#<a href=\"../man\3/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(\([PSU][MS][DM]\))\)#<a href=\"../man\3/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(\(PAPERS\))\)#<a href=\"../man\3/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(\(PAPERS\))\)#<a href=\"../man\3/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(\([0-9A-z][-.,0-9A-z]*\)(GNU)\)#<a href=\"../manINFO/\2.htm\" class=\"manlink\">\1</a>#g' \
+ -e '/^ /s#\(<i>\([0-9A-z][-.,0-9A-z]*\)</i>(GNU)\)#<a href=\"../manINFO/\2.htm\" class=\"manlink\">\1</a>#g' \
\
-e 's#<b>+</b>\( *\)<b>o</b># \1•#' \
-e 's#<b>+</b>#•#' \
<meta name="robots" content="index, follow" />
<link rel="canonical" href="https://www.mirbsd.org/man'$roff2htm_machine/$1.$2'" />
</head><body>
-<h1>MirOS Manual: <a href="../man'$2/$1'.htm">'$1\($2')</a></h1>'
+<h1>MirOS Manual: <a href="../man'$2/$1'.htm" class="manlink">'$1\($2')</a></h1>'
}
function output_footer {
print '<hr /><p style="font-size:xx-small;">Generated on' \
$roff2htm_gendate 'by
- <tt>$MirOS: src/scripts/roff2htm,v 1.58 2009/02/17 12:55:22 tg Exp $</tt></p>
-<p>These manual pages are <a href="../man7/BSD-Licence.htm">copyrighted</a>
- by their respective writers; their source is available at our <a
- href="http://cvs.mirbsd.de/">CVSweb</a>, AnonCVS, and other mirrors.
- The rest is Copyright © 2002-2008 <a href="http://www.mirbsd.org/">The
- MirOS Project</a>, Germany. <br /><i style="font-size:3pt;">
- This product includes material provided by Thorsten Glaser.</i></p>
+ <tt>$MirOS: src/scripts/roff2htm,v 1.59 2011/02/18 22:37:28 tg Exp $</tt></p>
+<p>These manual pages and other documentation are <a class="manlink"
+ href="../man7/BSD-Licence.htm">copyrighted</a> by their respective writers;
+ their source is available at our <a href="http://cvs.mirbsd.de/">CVSweb</a>,
+ AnonCVS, and other mirrors. The rest is Copyright © 2002‒2011 <a
+ href="https://www.mirbsd.org/">The MirOS Project</a>, Germany.<br /><i
+ style="font-size:3pt;"> This product includes material provided by Thorsten
+ Glaser.</i></p>
<p style="font-size:x-small;">This manual page’s HTML representation
is supposed to be <a href="http://validator.w3.org/check/referer">valid
XHTML/1.1</a>; if not, please send a bug report – diffs preferred.</p>
# patch in the additional name(s)
ed -s $2/$tn <<-EOF
/<title>/s#</title>#, $page($sect)&#
- /<h1>/s#</h1>#, <a href="../$tn">$page($sect)</a>&#
+ /<h1>/s#</h1>#, <a href="../$tn" class="manlink">$page($sect)</a>&#
wq
EOF
else
#!/bin/mksh
-# $Id: agus 1563 2010-11-12 16:27:24Z tglase $
+# $MirOS: contrib/hosted/tg/deb/aguspeed.sh,v 1.2 2011/06/09 20:30:24 tg Exp $
+# $Id: agus 2082 2011-06-09 20:31:34Z tglase $
#-
# From Planet Debian. Not complicated enough for copyright.
set -x
apt-get update || rv=$?
dpkg --clear-avail || rv=${rv:-$?}
+# this emits a harmless warning on squeeze
dpkg --forget-old-unavail || rv=${rv:-$?}
if sa=$(whence -p sync-available); then
+ # call with mksh due to *buntu bug
mksh "$sa" || rv=${rv:-$?}
fi
exit $rv
#!/bin/mksh
-# DEB $Id: mkhosts 1671 2011-02-11 13:16:02Z tglase $
-# RPM $Id: mkhosts 1687 2011-02-14 13:37:38Z tglase $
+# $Id: mkhosts 2083 2011-06-09 20:48:55Z tglase $
#-
# Copyright © 2010, 2011
# Thorsten Glaser <t.glaser@tarent.de>
# Licenced under the AGPLv3
-rpm=0
-
[[ $1 = really && $USER_ID = 0 ]] || exec sudo mksh "$0" really "$@"
shift
myipsx=
-while getopts "i:" ch; do
+target=
+while getopts "h:i:" ch; do
case $ch {
+ (h) target=$OPTARG ;;
(i) myipsx=$OPTARG ;;
+ (*) print -u2 "Usage: $0 [-h new.fqdn] [-i ip]"; exit 1 ;;
}
done
shift $((OPTIND - 1))
printf '%s\n' "Old Hostname: $(hostname -f) ($(hostname))"
while :; do
printf "New Hostname: "
- read hn
+ if [[ -n $target ]]; then
+ hn=$target
+ print -r -- "$hn"
+ else
+ read hn
+ fi
[[ $hn = [a-zA-Z0-9]?(*([a-zA-Z0-9-])[a-zA-Z0-9])+(.[a-zA-Z0-9]?(*([a-zA-Z0-9-])[a-zA-Z0-9])) ]] && break
+ if [[ -n $target ]]; then
+ print -u2 Invalid hostname.
+ exit 1
+ fi
done
if (( noips )); then
- if (( rpm )); then
- is="127.0.0.1 $hn ${hn%%.*} localhost localhost.localdomain"
- else
- is="127.0.0.1 $hn ${hn%%.*} localhost"
- fi
+ is="127.0.0.1 $hn ${hn%%.*} localhost localhost.localdomain"
else
- if (( rpm )); then
- is="127.0.0.1 localhost localhost.localdomain"
- else
- is="127.0.0.1 localhost"
- fi
+ is="127.0.0.1 localhost localhost.localdomain"
for ip in "${myips[@]}"; do
is="$is${nl}$ip $hn ${hn%%.*}"
done
fi
-if (( rpm )); then
+[[ -d /etc/sysconfig/. ]] && \
+ if [[ -e /etc/sysconfig/network || ! -e /etc/hostname ]]; then
grep -vi '^HOSTNAME=' /etc/sysconfig/network >/etc/sysconfig/network~
echo "HOSTNAME=$hn" >>/etc/sysconfig/network~
cat /etc/sysconfig/network~ >/etc/sysconfig/network
rm -f /etc/sysconfig/network~
- cat >/etc/hosts <<-EOF
- $is
-
- ::1 localhost6 localhost6.localdomain6
-EOF
-else
- echo $hn >/etc/hostname
- cat >/etc/hosts <<-EOF
- $is
+fi
+[[ -e /etc/hostname || ! -d /etc/sysconfig/. ]] && \
+ echo $hn >/etc/hostname
+cat >/etc/hosts <<-EOF
+ $is
- ::1 ip6-localhost ip6-loopback
- fe00::0 ip6-localnet
- ff00::0 ip6-mcastprefix
- ff02::1 ip6-allnodes
- ff02::2 ip6-allrouters
- ff02::3 ip6-allhosts
+ ::1 ip6-localhost ip6-loopback localhost6 localhost6.localdomain6
+ fe00::0 ip6-localnet
+ ff00::0 ip6-mcastprefix
+ ff02::1 ip6-allnodes
+ ff02::2 ip6-allrouters
+ ff02::3 ip6-allhosts
EOF
-fi
echo $hn >/proc/sys/kernel/hostname
hostname $hn
test x"$(hostname -f)" = x"$hn" && exit 0
#!/usr/bin/env mksh
-# $MirOS: contrib/code/Snippets/uri-grabber.sh,v 1.2 2008/05/03 01:09:24 tg Exp $
+# $MirOS: contrib/code/Snippets/uri-grabber.sh,v 1.3 2011/06/09 22:04:37 tg Exp $
#-
-# Copyright (c) 2007
+# Copyright (c) 2007, 2011
# Thorsten Glaser <tg@mirbsd.de>
#
# Provided that these terms and disclaimer and all copyright notices
#-
# Grab URIs (RFC 2396) from stdin and output them, one per line. May
# contain false positives / negatives but has been tested. Requested
-# to code by Vutral.
+# to code by Vutral. No support for mailto: at the moment.
while read line; do
while [[ $line = *@(http|https|ftp)://* ]]; do
(*) continue ;;
}
line=${line#*://}
- p2=${line%%@([!#0-9a-zA-Z;/?:@&=+$._!~*\'()%-])*}
+ p2=${line%%@([!#0-9a-zA-Z;/?:@&=+$,_.!~*\'()%-])*}
line=${line#${p2}?}
print "$beg://$p2"
done
#
echo x - LICENCE
sed 's/^X//' >LICENCE << 'END-of-LICENCE'
-X$MirOS: www/LICENCE,v 1.20 2011/02/18 22:37:29 tg Exp $
+X$MirOS: www/LICENCE,v 1.21 2011/03/11 17:57:42 bsiegert Exp $
X
X[…]
XThe MirOS Project web site source code is
XCopyright © 2007, 2008, 2009, 2011
X Thorsten “mirabilos” Glaser <tg@mirbsd.de>
-XCopyright © 2006, 2008
+XCopyright © 2006, 2008, 2011
X Benny Siegert <bsiegert@mirbsd.org>
XThis source code is available under the terms of the stan-
Xdard MirOS licence, see […] mk/common
END-of-LICENCE
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
-X# $MirOS: www/Makefile,v 1.73 2011/02/12 23:00:00 bsiegert Exp $
+X# $MirOS: www/Makefile,v 1.76 2011/06/06 22:05:48 tg Exp $
X#-
X# This file is part of the website of The MirOS Project, which is
X# copyrighted material, please read the LICENCE file for details.
XSRCS+= tags.hts
XCLEANFILES+= tags.lst tags.out
XTAGCLOUD+= debian
-XTAGCLOUD+= event
XTAGCLOUD+= mksh
+XTAGCLOUD+= pcli
XWLOGS= 9 10
X
X# legacy content
X @print '\nValidation complete.'
X
X.PHONY: clean cleandir depend install deinstall reinstall _reinstall \
-X cp-herc cp-heph rs-heph rs-eurynome
+X cp-herc cp-heph rs-heph rs-eurynome rs-pfau
X
X#cp-herc: site.tgz.stamp
X# ssh hercs 'cd /var/www/oldsite; tar xzvf -' <site.tgz
Xrs-eurynome:
X rsync -rxlztpgavPHK --rsh='ssh -4' dst/ eurynome:/var/anoncvs/anoncvs/www/
X
+Xrs-pfau:
+X rsync -rxlztpgavPHK --rsh='ssh -4' dst/ pfau:/Web/
+X
Xdepend: .depend
X
X.depend: ${TOP}/mk/mkdepend ${DEPSRCS}
X
Xlazy: .PHONY
X cd ${.CURDIR} && make depend && make && \
-X make _reinstall && exec make rs-eurynome rs-heph tagslst
+X make _reinstall && exec make rs-eurynome rs-heph rs-pfau tagslst
X
Xtagslst: .PHONY
X @(echo === TAGS USED/UNUSED/ACCOUNTED FOR ==; cat stamp_tag_* | \
END-of-mk/common
echo x - mk/htsconv
sed 's/^X//' >mk/htsconv << 'END-of-mk/htsconv'
-Xrcsid_htsconv='$MirOS: www/mk/htsconv,v 1.58 2011/02/18 22:37:28 tg Exp $'
+Xrcsid_htsconv='$MirOS: www/mk/htsconv,v 1.59 2011/03/21 16:18:48 tg Exp $'
X#-
X# This file is part of the website of The MirOS Project, which is
X# copyrighted material, please read the LICENCE file for details.
Xmws__pagename=
Xmws__header=
Xmws__rss=
-Xmws__difftag=MBSD_HTSCONV_GENDATE_TAG_14701
+Xmws__difftag=MBSD_HTSCONV_GENDATE_TAG_11353
Xunset mws__srcfile
Xunset mws__abspath
Xunset mws__relpath
X}
X
Xfunction mws_putheader {
-X local rcsid=$1 hpic
+X local rcsid=$1
X
X if [[ -z $mws__canonpath ]]; then
X print -u2 Internal error: mws_basepath not called!
X}
X
Xfunction mws_putfooter {
-X mws_content <<-'EOF'
+X mws_content_keeptabs <<-'EOF'
X </div>
X <div class="footer">
X <p style="display: none;">Do <em>not</em> send any eMail to <a
X mws__content "$@"
X}
X
+Xfunction mws_content_keeptabs {
+X if [[ -z $mws__header ]]; then
+X print -u2 Internal error: mws_putheader not called!
+X exit 1
+X fi
+X mws__content_keeptabs "$@"
+X}
+X
Xfunction mws__content {
X sed \
X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\(DOCS\))\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\)/[Ss][Pp][Aa][Rr][Cc])\ 1<a href="@@RELPATH@@htman/sparc/man\2/\1.htm" class="manlink">&</a>\ 1g' \
X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\)/[Ii]386)\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\))\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
+X -e 's\ 1^ \ 1<span style="display:none;"> </span>\ 1' \
+X -e "s\ 1@@ABSPATH@@\ 1$mws__abspath\ 1g" \
+X -e "s\ 1@@RELPATH@@\ 1$mws__relpath\ 1g" \
+X -e "s\ 1@@HEADER@@\ 1$mws__header\ 1g" \
+X -e "s\ 1@@RSS@@\ 1$mws__rss\ 1g"
+X}
+X
+Xfunction mws__content_keeptabs {
+X sed \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\(DOCS\))\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\(PAPERS\))\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(GNU)\ 1<a href="@@RELPATH@@htman/i386/manINFO/\1.html" class="manlink">&</a>\ 1g' \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([PSU][MS][DM]\))\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\)/[Ss][Pp][Aa][Rr][Cc])\ 1<a href="@@RELPATH@@htman/sparc/man\2/\1.htm" class="manlink">&</a>\ 1g' \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\)/[Ii]386)\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
+X -e 's\ 1\([0-9A-z][-.,0-9A-z]*\)(\([1-9]\))\ 1<a href="@@RELPATH@@htman/i386/man\2/\1.htm" class="manlink">&</a>\ 1g' \
X -e "s\ 1@@ABSPATH@@\ 1$mws__abspath\ 1g" \
X -e "s\ 1@@RELPATH@@\ 1$mws__relpath\ 1g" \
X -e "s\ 1@@HEADER@@\ 1$mws__header\ 1g" \
#!/bin/mksh
-# $MirOS: contrib/hosted/tg/deb/hookdir/pbuild,v 1.1 2009/12/07 20:48:19 tg Exp $
+# $MirOS: contrib/hosted/tg/deb/hookdir/pbuild,v 1.3 2011/06/09 22:17:15 tg Exp $
#-
# Not complicated enough for copyright.
+DIST=$(realpath "$0")
+DIST=${DIST##*/dists/}
+DIST=${DIST%%/*}
+
unset LANG LANGUAGE LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
-export LC_ALL=C
+export LC_ALL=C DIST
exec sudo cowbuilder --hookdir $(realpath .)/pb-hook "$@"
#!/bin/mksh
-# $MirOS: contrib/hosted/tg/deb/hookdir/pbuildetch,v 1.1 2009/12/07 20:48:20 tg Exp $
+# $MirOS: contrib/hosted/tg/deb/hookdir/pbuildetch,v 1.3 2011/06/09 22:17:15 tg Exp $
#-
# Not complicated enough for copyright.
unset LANG LANGUAGE LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
-export LC_ALL=C
+export LC_ALL=C DIST=etch
exec sudo cowbuilder --hookdir $(realpath .)/pb-hook \
--debian-etch-workaround "$@"