add roles/toxcore

This commit is contained in:
emdee 2024-01-08 12:51:06 +00:00
parent c8610f9ded
commit 7e491f4b8c
51 changed files with 1665 additions and 770 deletions

View file

@ -10,6 +10,7 @@ ROLE=toxcore
MYID=`id -u`
# or use sudo? or just diagnostics? $prog should be run as root $MYID
[ $MYID -eq 0 ] && sudo= || sudo=sudo # "WARN as root - sudo"
TOXCORE_LOG_DIR=$PREFIX/var/log
grep -q iommu=pt /proc/cmdline || WARN 'iommu=pt not on command line'
grep -q intel_iommu=on /proc/cmdline || WARN 'intel_iommu=on not on command line'
@ -72,7 +73,7 @@ lsmod | sort > /tmp/$$.lsmod
# selectively activate runtime features
[ "$#" -eq 0 ] && exit 0
if [ "$1" = "libvirt" ] ; then
if [ "$1" = "libvirt" -i "$1" = "libvirt_qemu" ] ; then
if [ ! -d /dev/virtio-ports ] ; then
# firewall - should depend on mode
for mod in "${MODS[@]}" ; do

View file

@ -29,6 +29,8 @@ ELOG="$TOXCORE_LOG_DIR"/$ly/E$prog$$.log
#?ols_make_testforge_logs $TOXCORE_LOG_DIR
find "$TOXCORE_LOG_DIR"/$ly/ -type f -name W${prog}*.log -o -name E${prog}*.log -mtime +1 -delete
[ -d /var/lib/libvirt/dnsmasq/ ] && \
sudo find /var/lib/libvirt/dnsmasq/ -mtime +1 -empty -delete
if virsh list | grep -q Whonix-Gateway ; then
/usr/local/bin/toxcore_libvirt_test_ga.bash

View file

@ -0,0 +1,22 @@
#!/bin/sh
# -*- mode: sh; tab-width: 8; encoding: utf-8-unix -*-
prog=`basename $0 .bash`
PREFIX=/var/local
. /usr/local/etc/testforge/testforge.bash
ROLE=testforge
PYVER=3
P="BASE_PYTHON${PYVER}_MINOR"
PYTHON_MINOR="$(eval echo \$$P)"
PYTHON_EXE_MSYS=$PREFIX/bin/python$PYVER.bash
PYTHON_EXE=$PYTHON_EXE_MSYS
# doctest.py
# NORMALIZE_WHITESPACE = register_optionflag('NORMALIZE_WHITESPACE')
# ELLIPSIS = register_optionflag('ELLIPSIS')
LOPTS="-o ELLIPSIS --fail-fast"
for file in "$@" ; do
/var/local/bin/python$PYVER.bash -m doctest $LOPTS "$file"
done

View file

@ -0,0 +1,169 @@
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.diff
.pylint.*
*~
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.pylint.err
.pylint.log

View file

@ -11,7 +11,7 @@
prog=`basename $0 .bash`
PREFIX=/usr/local
ROLE=hostvms
ROLE=toxcore
#[ $# -eq 0 ] && set - Whonix-Gateway /bin/cat /proc/cmdline
[ $# -eq 0 ] && set - Whonix-Gateway /bin/netstat -lnp4
@ -112,14 +112,12 @@ elif [ $RCMD = guest-exec ] ; then
#b64=`jq '.return.out_data' < /tmp/R$$.out`
DBUG rc=$rc /tmp/R$$.out
if grep -q err-data /tmp/R$$.out ; then
b64_err=`sed -e 's/{"return":{"exitcode":[0-9]*,"err-data":"//' -e 's/",".*//' /tmp/R$$.out`
errrc=$?
WARN `echo $b64_err | base64 -d -`
sed -e 's/{"return":{"exitcode":[0-9]*,"err-data":"//' -e 's/",".*//' /tmp/R$$.out | base64 -d - 2>/dev/null
# [ $? -eq 0 ] && WARN $b64_err
fi
if grep -q out-data /tmp/R$$.out ; then
b64_out=`sed -e 's/{"return":{"exitcode":[0-9]*,"out-data":"//' -e 's/",".*//' /tmp/R$$.out`
outrc=$?
INFO `echo $b64_out | base64 -d - `
sed -e 's/{"return":{"exitcode":[0-9]*,"out-data":"//' -e 's/",".*//' /tmp/R$$.out | base64 -d - 2>/dev/null
# [ $? -eq 0 ] && INFO $b64_out
fi
#b64=`jq '.return.out_data' < /tmp/R$$.out`

View file

@ -73,7 +73,7 @@ if [ "$#" -eq 0 ] ; then
elif [ "$1" = 'check' ] ; then
"$PYTHON_EXE" -c "import $MOD" || exit 10
# ols_run_checks_requirements
# msys_run_checks_requirements
elif [ $1 = 'test' ] ; then
cd $PREFIX/src/$DIR || exit 50

View file

@ -0,0 +1,279 @@
#!/bin/sh
# -*- mode: sh; tab-width: 8; encoding: utf-8-unix -*-
prog=`basename $0 .bash`
PREFIX=/usr/local
ROLE=toxcore
PKG=dracut
VER=050
DIR=${PKG}-$VER
URL=distfiles.gentoo.org/distfiles/$DIR.tar.xz
URI="https://www.kernel.org/pub/linux/utils/boot/${VER}/${DIR}.tar.xz"
cd $PREFIX/src || exit 2
WD=$PWD
if [ -d /etc/apt -a $USER = root ] ; then
# old_debian_requires asciidoc libkmod-dev libkmod-dev xsltproc
which xsltproc 2>/dev/null || apt-get install xsltproc || exit 2
which asciidoc 2>/dev/null || apt-get install asciidoc || exit 2
elif [ -d /etc/portage -a $USER = root ] ; then
which cpio >/dev/null || emerge -fp app-arch/cpio || exit 2
[ -f /usr/lib64/libkmod.so ] || emerge -fp '>=sys-apps/kmod-23[tools]' || exit 2
fi
if [ ! -f $DIR/dracut-initramfs-restore ] ; then
if [ -e $PREFIX/net/Http/$URL ] ; then
ip route|grep -q ^default || { echo "DEBUG: $0 not connected" ; exit 0 ; }
wget -xc -P $PREFIX/net/Http https://$URL
fi
tar xvfJ $PREFIX/net/Http/$URL
fi
cd $DIR || exit 3
true || \
grep -q ^prefix=$PREFIX configure || \
sed -e 's/^KMOD_LIBS.*/KMOD_LIBS ?= -lkmod/' \
-e 's@^ exit 1@# exit 1@' \
-e "s@^prefix=/usr$@prefix=$PREFIX@" -i configure
src_configure() {
local PV=$VER
# tc-export CC PKG_CONFIG
sed -e "s@^prefix=/usr\$@prefix=$PREFIX@" -i configure
./configure \
--disable-documentation \
--prefix="${PREFIX}" \
--sysconfdir="${PREFIX}/etc" \
|| return 1
# --bashcompletiondir="$(get_bashcompdir)"
# --systemdsystemunitdir="$(systemd_get_systemunitdir)"
if [ ! -f dracut-version.sh ] ; then
# Source tarball from github doesn't include this file
echo "DRACUT_VERSION=${PV}" > dracut-version.sh
fi
return 0
}
if [ "$#" -eq 0 ] ; then
if [ ! -f dracut-initramfs-restore.sh.dst ] ; then
false && \
if [ -d /usr/local/patches/$ROLE/usr/local/src/$DIR/files ] ; then
find /usr/local/patches/$ROLE/usr/local/src/$DIR/files -type f -name \*.patch | \
while read file ; do
root=`echo $file | sed -e 's/.patch//' -e "s@$PREFIX/patches/$ROLE/usr/local/src/$DIR/@@"`
[ -f $root.dst ] && continue
patch -b -z.dst $root < $file
done || exit 5
fi
# patches
if [ -d /usr/local/patches/$ROLE/usr/local/src/$DIR/ ] ; then
find /usr/local/patches/$ROLE/usr/local/src/$DIR/ -type f -name \*.diff | \
while read file ; do
root=$( echo $file | sed -e 's/.diff//' \
-e "s@$PREFIX/patches/$ROLE/usr/local/src/$DIR/@@" )
[ -f $root.dst ] && continue
patch -b -z.dst $root < $file
done || exit 5
fi
find * -type f -name \*sh -exec grep -q /usr/lib/dracut {} \; -print | \
while read file ; do
[ -f $file.dst ] || cp -p $file $file.dst
sed -e "s@/usr/lib/dracut@$PREFIX/lib/dracut@" $file
chmod 755 $file
done
fi
[ -f Makefile.inc ] || \
src_configure || exit 6
grep -q systemdsystemunitdir Makefile.inc || \
cat >> Makefile.inc << EOF
systemdsystemunitdir ?= /usr/local/lib/systemd
EOF
grep -v =$ dracut-version.sh && sed -e "s/=/=$VER/" dracut-version.sh
[ -x install/dracut-install ] || make >> make.log 2>&1 || exit 7
[ -x $PREFIX/lib/dracut/dracut-install -a \
$PREFIX/lib/dracut/dracut-install -nt install/dracut-install ] || \
make install >> install.log 2>&1 || exit 8
elif [ "$1" = 'test' ] ; then
$PREFIX/bin/$PKG --help || exit 30
# Has tests
elif [ "$1" = 'refresh' ] ; then # 6*
cd $WD/$DIR || exit 6
find * -name \*.dst | while read file ; do
base=`echo $file |sed -e 's/.dst//'`
[ -f $base.diff -a $base.diff -nt $base ] && continue
diff -c -C 5 $file $base>$base.diff
done
find * -name \*.diff | tar cf - -T - | \
tar xfBv - -C ../../patches/gpgkey/usr/local/src/dracut-050/
fi
exit 0
cp -p install/dracut-install $PREFIX/bin
rm -f -- "lsinitrd.1.xml"
asciidoc -d manpage -b docbook -o "lsinitrd.1.xml" lsinitrd.1.asc
rm -f -- "lsinitrd.1"
xsltproc -o "lsinitrd.1" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl lsinitrd.1.xml
rm -f -- "dracut.conf.5.xml"
asciidoc -d manpage -b docbook -o "dracut.conf.5.xml" dracut.conf.5.asc
rm -f -- "dracut.conf.5"
xsltproc -o "dracut.conf.5" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl dracut.conf.5.xml
rm -f -- "dracut.cmdline.7.xml"
asciidoc -d manpage -b docbook -o "dracut.cmdline.7.xml" dracut.cmdline.7.asc
rm -f -- "dracut.cmdline.7"
xsltproc -o "dracut.cmdline.7" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl dracut.cmdline.7.xml
rm -f -- "dracut.bootup.7.xml"
asciidoc -d manpage -b docbook -o "dracut.bootup.7.xml" dracut.bootup.7.asc
rm -f -- "dracut.bootup.7"
xsltproc -o "dracut.bootup.7" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl dracut.bootup.7.xml
rm -f -- "dracut.modules.7.xml"
asciidoc -d manpage -b docbook -o "dracut.modules.7.xml" dracut.modules.7.asc
rm -f -- "dracut.modules.7"
xsltproc -o "dracut.modules.7" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl dracut.modules.7.xml
rm -f -- "dracut.8.xml"
asciidoc -d manpage -b docbook -o "dracut.8.xml" dracut.8.asc
rm -f -- "dracut.8"
xsltproc -o "dracut.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl dracut.8.xml
rm -f -- "dracut-catimages.8.xml"
asciidoc -d manpage -b docbook -o "dracut-catimages.8.xml" dracut-catimages.8.asc
rm -f -- "dracut-catimages.8"
xsltproc -o "dracut-catimages.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl dracut-catimages.8.xml
rm -f -- "mkinitrd.8.xml"
asciidoc -d manpage -b docbook -o "mkinitrd.8.xml" mkinitrd.8.asc
rm -f -- "mkinitrd.8"
xsltproc -o "mkinitrd.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl mkinitrd.8.xml
rm -f -- "mkinitrd-suse.8.xml"
asciidoc -d manpage -b docbook -o "mkinitrd-suse.8.xml" mkinitrd-suse.8.asc
rm -f -- "mkinitrd-suse.8"
xsltproc -o "mkinitrd-suse.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl mkinitrd-suse.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-cmdline.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-cmdline.service.8.xml" modules.d/98dracut-systemd/dracut-cmdline.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-cmdline.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-cmdline.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-cmdline.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-initqueue.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-initqueue.service.8.xml" modules.d/98dracut-systemd/dracut-initqueue.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-initqueue.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-initqueue.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-initqueue.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-mount.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-mount.service.8.xml" modules.d/98dracut-systemd/dracut-mount.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-mount.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-mount.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-mount.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-shutdown.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-shutdown.service.8.xml" modules.d/98dracut-systemd/dracut-shutdown.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-shutdown.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-shutdown.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-shutdown.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-pre-mount.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-pre-mount.service.8.xml" modules.d/98dracut-systemd/dracut-pre-mount.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-pre-mount.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-pre-mount.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-pre-mount.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-pre-pivot.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-pre-pivot.service.8.xml" modules.d/98dracut-systemd/dracut-pre-pivot.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-pre-pivot.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-pre-pivot.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-pre-pivot.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-pre-trigger.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-pre-trigger.service.8.xml" modules.d/98dracut-systemd/dracut-pre-trigger.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-pre-trigger.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-pre-trigger.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-pre-trigger.service.8.xml
rm -f -- "modules.d/98dracut-systemd/dracut-pre-udev.service.8.xml"
asciidoc -d manpage -b docbook -o "modules.d/98dracut-systemd/dracut-pre-udev.service.8.xml" modules.d/98dracut-systemd/dracut-pre-udev.service.8.asc
rm -f -- "modules.d/98dracut-systemd/dracut-pre-udev.service.8"
xsltproc -o "modules.d/98dracut-systemd/dracut-pre-udev.service.8" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl modules.d/98dracut-systemd/dracut-pre-udev.service.8.xml
rm -f -- dracut.xml
asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc
rm -f -- dracut.html
xsltproc -o dracut.html --xinclude -nonet \
--stringparam custom.css.source dracut.css \
--stringparam generate.css.header 1 \
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
rm -f -- dracut.xml
[ -d /usr/lib/dracut ] || mkdir -p /usr/lib/dracut
mkdir -p /usr/lib/dracut/modules.d
mkdir -p /usr/share/man/man1 /usr/share/man/man5 /usr/share/man/man7 /usr/share/man/man8
install -m 0755 dracut.sh /usr/bin/dracut
install -m 0755 dracut-catimages.sh /usr/bin/dracut-catimages
install -m 0755 mkinitrd-dracut.sh /usr/bin/mkinitrd
install -m 0755 lsinitrd.sh /usr/bin/lsinitrd
install -m 0644 dracut.conf /usr/etc/dracut.conf
mkdir -p /usr/etc/dracut.conf.d
mkdir -p /usr/lib/dracut/dracut.conf.d
install -m 0755 dracut-init.sh /usr/lib/dracut/dracut-init.sh
install -m 0755 dracut-functions.sh /usr/lib/dracut/dracut-functions.sh
install -m 0755 dracut-version.sh /usr/lib/dracut/dracut-version.sh
ln -fs dracut-functions.sh /usr/lib/dracut/dracut-functions
install -m 0755 dracut-logger.sh /usr/lib/dracut/dracut-logger.sh
install -m 0755 dracut-initramfs-restore.sh /usr/lib/dracut/dracut-initramfs-restore
cp -arx modules.d /usr/lib/dracut
for i in lsinitrd.1; do install -m 0644 $i /usr/share/man/man1/${i##*/}; done
for i in dracut.conf.5; do install -m 0644 $i /usr/share/man/man5/${i##*/}; done
for i in dracut.cmdline.7 dracut.bootup.7 dracut.modules.7; do install -m 0644 $i /usr/share/man/man7/${i##*/}; done
for i in dracut.8 dracut-catimages.8 mkinitrd.8 mkinitrd-suse.8 modules.d/98dracut-systemd/dracut-cmdline.service.8 modules.d/98dracut-systemd/dracut-initqueue.service.8 modules.d/98dracut-systemd/dracut-mount.service.8 modules.d/98dracut-systemd/dracut-shutdown.service.8 modules.d/98dracut-systemd/dracut-pre-mount.service.8 modules.d/98dracut-systemd/dracut-pre-pivot.service.8 modules.d/98dracut-systemd/dracut-pre-trigger.service.8 modules.d/98dracut-systemd/dracut-pre-udev.service.8; do install -m 0644 $i /usr/share/man/man8/${i##*/}; done
ln -fs dracut.cmdline.7 /usr/share/man/man7/dracut.kernel.7
if [ -n "" ]; then \
mkdir -p ; \
ln -srf /usr/lib/dracut/modules.d/98dracut-systemd/dracut-shutdown.service /dracut-shutdown.service; \
mkdir -p /sysinit.target.wants; \
ln -s ../dracut-shutdown.service \
/sysinit.target.wants/dracut-shutdown.service; \
mkdir -p /initrd.target.wants; \
for i in \
dracut-cmdline.service \
dracut-initqueue.service \
dracut-mount.service \
dracut-pre-mount.service \
dracut-pre-pivot.service \
dracut-pre-trigger.service \
dracut-pre-udev.service \
; do \
ln -srf /usr/lib/dracut/modules.d/98dracut-systemd/$i ; \
ln -s ../$i \
/initrd.target.wants/$i; \
done \
fi
if [ -f install/dracut-install ]; then \
install -m 0755 install/dracut-install /usr/lib/dracut/dracut-install; \
fi
if [ -f skipcpio/skipcpio ]; then \
install -m 0755 skipcpio/skipcpio /usr/lib/dracut/skipcpio; \
fi
mkdir -p /usr/lib/kernel/install.d
install -m 0755 50-dracut.install /usr/lib/kernel/install.d/50-dracut.install
install -m 0755 51-dracut-rescue.install /usr/lib/kernel/install.d/51-dracut-rescue.install
mkdir -p /usr/share/bash-completion/completions
install -m 0644 dracut-bash-completion.sh /usr/share/bash-completion/completions/dracut
install -m 0644 lsinitrd-bash-completion.sh /usr/share/bash-completion/completions/lsinitrd
mkdir -p /usr/share/pkgconfig
install -m 0644 dracut.pc /usr/share/pkgconfig/dracut.pc
rm dracut.8.xml dracut.cmdline.7.xml modules.d/98dracut-systemd/dracut-mount.service.8.xml dracut.bootup.7.xml modules.d/98dracut-systemd/dracut-pre-mount.service.8.xml modules.d/98dracut-systemd/dracut-initqueue.service.8.xml mkinitrd.8.xml modules.d/98dracut-systemd/dracut-pre-pivot.service.8.xml dracut.modules.7.xml dracut.conf.5.xml lsinitrd.1.xml modules.d/98dracut-systemd/dracut-cmdline.service.8.xml dracut-catimages.8.xml modules.d/98dracut-systemd/dracut-pre-udev.service.8.xml modules.d/98dracut-systemd/dracut-pre-trigger.service.8.xml mkinitrd-suse.8.xml modules.d/98dracut-systemd/dracut-shutdown.service.8.xml
ROLE=text
ROLE=text
ROLE=text
ROLE=text
ROLE=text
ROLE=text
ROLE=text
ROLE=text
ROLE=text
ROLE=testing
ROLE=pydev
ROLE=logging
ROLE=gpgkey
ROLE=harden
ROLE=privacy
ROLE=hostvms
ROLE=pentest
ROLE=update

View file

@ -0,0 +1,9 @@
lineend=linux
style=linux
indent=spaces=8
convert-tabs
min-conditional-indent=0
max-instatement-indent=120
align-pointer=name
max-code-length=120

View file

@ -0,0 +1,25 @@
; Directory Local Variables
; For more information see (info "(emacs) Directory Variables")
; Sets emacs variables based on mode.
; A list of (major-mode . ((var1 . value1) (var2 . value2)))
; Mode can be nil, which gives default values.
; Characters width is set to 109 for .c and XML but for everything else 79.
; If you update this file make sure to update .vimrc and .editorconfig too.
((c-mode . ((fill-column . 109)
(c-basic-offset . 8)
(eval . (c-set-offset 'substatement-open 0))
(eval . (c-set-offset 'statement-case-open 0))
(eval . (c-set-offset 'case-label 0))
(eval . (c-set-offset 'arglist-intro '++))
(eval . (c-set-offset 'arglist-close 0))
(eval . (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist)))))
(nxml-mode . ((nxml-child-indent . 2)
(fill-column . 109)))
(meson-mode . ((meson-indent-basic . 8)))
(sh-mode . ((sh-basic-offset . 4)
(sh-indentation . 4)))
(awk-mode . ((c-basic-offset . 8)))
(nil . ((indent-tabs-mode . nil)
(tab-width . 4)
(fill-column . 79))) )

View file

@ -0,0 +1,39 @@
# EditorConfig configuration for dracut
# http://EditorConfig.org
# If you update this file make sure to update .dir-locals.el and .vimrc too.
# Top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file, utf-8 charset
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 4
switch_case_indent = true
function_next_line = false
binary_next_line = true
space_redirects = true
# Match config files, set indent to spaces with width of eight.
[*.{c,h}]
indent_style = space
indent_size = 8
# Match config files, set indent to spaces with width of four.
[*.sh]
indent_style = space
indent_size = 4
switch_case_indent = true
function_next_line = false
binary_next_line = true
space_redirects = true
# Match xml man pages, set indent to spaces with width of two.
[man/*.xml]
indent_style = space
indent_size = 2

View file

@ -0,0 +1,27 @@
/Makefile.inc
/dracut.8
/dracut-catimages.8
/dracut.conf.5
/dracut.conf.d/*.conf
/dracut-gencmdline.8
/dracut.html
/dracut.kernel.7
/dracut.pc
/dracut-install
/modules.d/99base/switch_root
/test/*/test.log
/test/*/.testdir
test*.img
/.buildpath
/.project
/dracut-version.sh
/install/dracut-install
/*.rpm
/*.[0-9]
/modules.d/98dracut-systemd/*.service.8
/*.sign
*.o
skipcpio/skipcpio
/util/util
/dracut-util
.idea/

View file

@ -0,0 +1 @@
kate: space-indent on; tab-width 4; indent-width 4; replace-tabs on; eol unix;

View file

@ -0,0 +1,9 @@
{
"name": "Dracut"
, "files": [ { "git": 1 } ]
, "build": {
"directory": "./"
, "build": "make -j $(getconf _NPROCESSORS_ONLN) all"
, "clean": "make clean"
}
}

View file

@ -0,0 +1,37 @@
Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer-omB+W0Dpw2o@public.gmane.org>
Seewer Philippe <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
Victor Lowther <victor.lowther@gmail.com> <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Harald Hoyer <harald@redhat.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Harald Hoyer <harald@redhat.com> <harald@eeepc.(none)>
Harald Hoyer <harald@redhat.com> <harald@hoyer.xyz>
Mike Snitzer <snitzer@redhat.com> <msnitzer@redhat.com>
Amerigo Wang <amwang@redhat.com> <xiyou.wangcong@gmail.com>
Andrey Borzenkov <arvidjaar@gmail.com> <arvidjaar@mail.ru>
Dan Horák <dhorak@redhat.com> <dan@danny.cz>
John Reiser <jreiser@bitwagon.com> <jreiser@BitWagon.com>
Luca Berra <bluca@vodka.it> <bluca@comedia.it>
Dave Young <dyoung@redhat.com> <dyoung@redhat.com>
Dave Young <dyoung@redhat.com> <dave@redhat.com>
Frederick Grose <fgrose@sugarlabs.org> <fgrose@gmail.com>
Frederic Crozat <fcrozat@suse.com> <fcrozat@mandriva.com>
Shawn W Dunn <sfalken@opensuse.org> <sfalken@opensuse.org>
Kyle McMartin <kmcmarti@redhat.com> <kyle@redhat.com>
Angelo "pallotron" Failla <pallotron@fb.com> <pallotron@fb.com>
Yu Watanabe <watanabe.yu+github@gmail.com>
Martin Wilck <mwilck@suse.de> <mwilck@suse.com>
Thomas Renninger <trenn@suse.com> <trenn@suse.de>
Andrey Borzenkov <arvidjaar@gmail.com>
Cristian Rodríguez <crrodriguez@opensuse.org>
Daniel Drake <drake@endlessm.com> <dsd@laptop.org>
Fabian Vogt <fvogt@suse.com>
Hannes Reinecke <hare@suse.com> <hare@suse.de>
Julian Wolf <juwolf@suse.com> <juwolf@suse.de>
Lidong Zhong <lidong.zhong@suse.com> <lzhong@suse.com>
Nikoli <nikoli@gmx.us> <nikoli@lavabit.com>
Peter Robinson <pbrobinson@fedoraproject.org> <pbrobinson@gmail.com>
Xunlei Pang <xlpang@redhat.com> <xpang@redhat.com>
Daniel Molkentin <daniel.molkentin@suse.com> <dmolkentin@suse.com>
Thomas Blume <thomas.blume@suse.com> <Thomas.Blume@suse.com>
Brian C. Lane <bcl@redhat.com> <bcl@brianlane.com>
Tomasz Paweł Gajc <tpgxyz@gmail.com> <tpgxyz@gmail.com>

View file

@ -0,0 +1,55 @@
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# The name of the upstream package
upstream_package_name: dracut
# The upstream tag versioning scheme
upstream_tag_template: "{version}"
# The URL of the upstream project
upstream_project_url: https://github.com/dracutdevs/dracut
# Relative path to a spec file within the upstream repository
specfile_path: pkgbuild/dracut.spec
# Name of the downstream package
downstream_package_name: dracut
# The URL of the downstream project
dist_git_base_url: https://src.fedoraproject.org/
# Sync file(s) from upstream repo to dist-git
synced_files:
# The dracut spec file is maintained upstream so we sync it downstream.
- dracut.spec
# We sync the packit file downstream be able to optionally use the sync-from-downstream command
- .packit.yaml
# We want new releases to be automatically built on rawhide and have few jobs
# on copr.
create_pr: false
jobs:
- job: propose_downstream
trigger: release
metadata:
dist_git_branches: main
- job: tests
trigger: pull_request
metadata:
targets:
- fedora-rawhide
- job: copr_build
trigger: pull_request
metadata:
targets:
- fedora-development
- job: copr_build
trigger: commit
metadata:
targets:
- fedora-all
- fedora-development

View file

@ -0,0 +1,34 @@
# SC2039: In POSIX sh, 'local' is undefined.
# https://github.com/koalaman/shellcheck/wiki/SC2039
disable=SC2039
# SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
# https://github.com/koalaman/shellcheck/wiki/SC2166
disable=SC2166
# SC2154: Variable is referenced but not assigned
# https://github.com/koalaman/shellcheck/wiki/SC2154
disable=SC2154
# SC1091: Not following <file>
# https://github.com/koalaman/shellcheck/wiki/SC1091
disable=SC1091
# SC2174: When used with -p, -m only applies to the deepest directory.
# https://github.com/koalaman/shellcheck/wiki/SC2174
disable=SC2174
# SC3043: In POSIX sh, 'local' is undefined.
# https://github.com/koalaman/shellcheck/wiki/SC3043
# ... but dash supports it
disable=SC3043
# SC3013: In POSIX sh, -ef is undefined.
# https://github.com/koalaman/shellcheck/wiki/SC3013
# ... but dash supports it
disable=SC3013
# SC3045: In POSIX sh, read -p is undefined.
# https://github.com/koalaman/shellcheck/wiki/SC3045
# ... but dash supports it
disable=SC3045

View file

@ -0,0 +1,15 @@
" Vim can use per directory configuration files like this.
" To enable that feature two lines are needed in your ~/.vimrc
" set exrc " enables per-directory .vimrc files
" set secure " disable unsafe commands in local .vimrc files
" Characters width is set to 109 for .c and XML but for everything else 79.
" If you update this file make sure to update .dir-locals.el & .editorconfig
set tabstop=4
set shiftwidth=4
set expandtab
set makeprg=GCC_COLORS=\ make
set tw=79
au BufRead,BufNewFile *.xml set tw=109 shiftwidth=2 smarttab
au FileType sh set tw=80 shiftwidth=4 smarttab
au FileType c set tw=109 shiftwidth=8 tabstop=8 smarttab expandtab

View file

@ -0,0 +1 @@
kate: space-indent on; tab-width 8; indent-width 8; replace-tabs on; eol unix;

View file

@ -0,0 +1,2 @@
(setq c-basic-offset 8)
(setq indent-tabs-mode nil)

View file

@ -0,0 +1 @@
kate: space-indent on; tab-width 8; indent-width 8; replace-tabs on; eol unix;

View file

@ -12,7 +12,7 @@ GIT_USER=reid-k
GIT_DIR=gridfire
DESC=""
[ -f /usr/local/src/var_local_src.bash ] && \
[ -f /usr/local/src/usr_local_src.bash ] && \
. /usr/local/src/usr_local_src.bash
cd $PREFIX/src || exit 2
@ -23,7 +23,7 @@ if [ "$#" -eq 0 ] ; then
if [ ! -e $MOD.py ] ; then
route|grep -q ^default || exit 0
ols_wget_c https://raw.githubusercontent.com/$GIT_USER/$GIT_DIR/master/$MOD.py
wget -c https://raw.githubusercontent.com/$GIT_USER/$GIT_DIR/master/$MOD.py
fi
#[ -f $MOD.sh ] || \
@ -36,7 +36,7 @@ if [ "$#" -eq 0 ] ; then
cat > $PREFIX/bin/$MOD$VER.bash << EOF
#!/bin/sh
# -*- mode: sh; tab-width: 8; encoding: utf-8-unix -*-
ROLE=proxy
ROLE=$ROLE
# https://$GIT_HUB/$GIT_USER/$GIT_DIR/
exec $PYTHON_EXE_MSYS $PREFIX/src/$DIR/$MOD.py "\$@"
EOF

View file

@ -0,0 +1,4 @@
AUTHORS
build
__pycache__
*.pyc

View file

@ -0,0 +1 @@
W. Trevor King <wking@tremily.us> <wking@drexel.edu>

View file

@ -0,0 +1,18 @@
[project]
name: pyassuan
vcs: Git
[files]
authors: yes
files: yes
ignored: COPYING | README | .update-copyright.conf | .git*
[copyright]
short: {project} comes with ABSOLUTELY NO WARRANTY and is licensed under the GNU General Public License.
long: This file is part of {project}.
{project} is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
{project} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with {project}. If not, see <http://www.gnu.org/licenses/>.

View file

@ -117,19 +117,15 @@ elif [ "$1" = check ] ; then
[ -f /var/local/src/var_local_src.bash ] || exit 0
. /var/local/src/var_local_src.bash || exit 10
ols_run_tests_exit $1 || exit 10$?
msys_var_local_src_prog_key $1 || exit 10$?
elif [ "$1" = 'lint' ] ; then
[ -f /var/local/src/var_local_src.bash ] || exit 0
. /var/local/src/var_local_src.bash
ols_run_tests_exit $1 || exit 20$?
msys_var_local_src_prog_key $1 || exit 20$?
ols_run_tests_shellcheck $ROLE || exit 21$?
ols_run_tests_pylint || exit 22$?
elif [ "$1" = 'test' ] ; then
[ -f /var/local/src/var_local_src.bash ] || exit 0
. /var/local/src/var_local_src.bash || exit 50
ols_run_tests_exit $1 || exit 51$?
ols_test_srcs test || exit 52$?
msys_var_local_src_prog_key $1 || exit 51$?
fi

View file

@ -32,20 +32,21 @@ if [ "$#" -eq 0 ] ; then
elif [ "$1" = 'check' ] ; then
exit 0
ols_run_checks_pip3
ols_run_tests_exit check || exit 10$?
msys_run_checks_pip3
msys_var_local_src_prog_key check || exit 10$?
exit $?
elif [ "$1" = 'lint' ] ; then
exit 0
ols_run_tests_shellcheck $ROLE || exit 2$?
ols_run_tests_exit $1 || exit 21$?
ols_run_tests_pylint || exit 22$?
msys_var_local_src_prog_key $1 || exit 21$?
# ols_run_tests_pylint || exit 22$?
elif [ "$1" = 'test' ] ; then
exit 0
ols_run_tests_exit $1 || exit 30$?
ols_gentoo_test_imports || exit 32$?
msys_var_local_src_prog_key $1 || exit 30$?
msys_check_pips_inst
msys_gentoo_test_imports || exit 32$?
#hangs /usr/bin/expect gpgkey_test_gpg.exp foobar || exit 31$?
fi