Initial commit
This commit is contained in:
commit
98e71a6096
594 changed files with 35367 additions and 0 deletions
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
*.tar.xz
|
||||
*.tar.gz
|
||||
*.tar.bz2
|
||||
*.tar.lz
|
||||
*.txz
|
||||
*.tbz
|
||||
*.tgz
|
||||
*.sh.xz
|
||||
*.zip
|
||||
*.bak
|
||||
*.gz
|
||||
DEPS.*
|
||||
*.diff.gz
|
||||
packages
|
||||
COMPILER
|
||||
incomplete
|
||||
incomplete.n
|
||||
waf-2.0.9
|
||||
*.img.xz
|
||||
gcc
|
||||
libreoffice
|
||||
others
|
||||
networkmanager
|
||||
pending
|
||||
testing
|
||||
virt
|
||||
webkitgtk
|
||||
youtube-viewer
|
||||
*.buildlog
|
12
CREDITS
Normal file
12
CREDITS
Normal file
|
@ -0,0 +1,12 @@
|
|||
Location: irc.freenode.net:
|
||||
The People on my distro channel #smlinux
|
||||
The People (and bots too, perhaps) and their works of ##slackware
|
||||
The People (and bots too, perhaps) and their works of #openwrt
|
||||
The People (and bots too, perhaps) and their works of #musl
|
||||
The People (and bots too, perhaps) and their works of #sabotage
|
||||
The People (and bots too, perhaps) and their works of #alpine-linux
|
||||
The People (and bots too, perhaps) and their works on #sta.li on 2f30.org.
|
||||
|
||||
Dhruv Vyas (https://github.com/dhruvvyas90) for his 32bit ARM versatilepb raspberry qemu kernel
|
||||
|
||||
And many many more untold places on the internet....
|
19
README
Normal file
19
README
Normal file
|
@ -0,0 +1,19 @@
|
|||
Welcome to SMLinux!
|
||||
|
||||
SMLinux is an experimental linux distribution based on the musl C library using a
|
||||
Slackware-based build/packaging system, aimed at intermediate and advanced users. In
|
||||
some packages, SMLinux uses patches from other linux distros for bug fixing, better
|
||||
support and consistency with the musl C library.
|
||||
|
||||
SMLinux currently supports only x86_64 and aarch64 (arm64) CPU architectures.
|
||||
|
||||
SMLinux Guide can be found on:
|
||||
http://pktsurf.in/guide
|
||||
|
||||
Complete source, including build files and source tarballs, and binary packages
|
||||
can be found on:
|
||||
http://slackware.uk/smlinux/
|
||||
|
||||
You can contact us in the #smlinux channel of irc.freenode.net.
|
||||
|
||||
Happy Slacking!
|
315
base/.buildlist.base
Normal file
315
base/.buildlist.base
Normal file
|
@ -0,0 +1,315 @@
|
|||
initfs
|
||||
gcc-libs
|
||||
which
|
||||
wiringpi
|
||||
dcron
|
||||
cpio
|
||||
gsl
|
||||
ijs
|
||||
ed
|
||||
bc
|
||||
kbd
|
||||
db
|
||||
netbsd-curses
|
||||
readline
|
||||
busybox
|
||||
dmidecode
|
||||
pkgconf
|
||||
make
|
||||
m4
|
||||
ccache
|
||||
musl
|
||||
libsodium
|
||||
libunistring
|
||||
bzip2
|
||||
libffi
|
||||
libgpg-error
|
||||
libgcrypt
|
||||
mksh
|
||||
mdadm
|
||||
mtools
|
||||
lzip
|
||||
lzlib
|
||||
tarlz
|
||||
plzip
|
||||
expat
|
||||
perl
|
||||
perl-modules
|
||||
nasm
|
||||
intltool
|
||||
diffutils
|
||||
autoconf
|
||||
automake
|
||||
argp-standalone
|
||||
bison
|
||||
flex
|
||||
less
|
||||
vim
|
||||
bash
|
||||
bash-completion
|
||||
tree
|
||||
attr
|
||||
acl
|
||||
patch
|
||||
libpcap
|
||||
smartmontools
|
||||
zlib
|
||||
gzip
|
||||
xz
|
||||
pigz
|
||||
findutils
|
||||
file
|
||||
pcre
|
||||
pcre2
|
||||
grep
|
||||
tar
|
||||
sysklogd
|
||||
gawk
|
||||
sed
|
||||
zip
|
||||
unzip
|
||||
popt
|
||||
tzdb
|
||||
pciutils
|
||||
openssl
|
||||
sqlite
|
||||
python3
|
||||
libxml2
|
||||
libxslt
|
||||
xmlto
|
||||
wayland
|
||||
wayland-protocols
|
||||
kmod
|
||||
python-setuptools
|
||||
python-pip
|
||||
python-lxml
|
||||
python-markupsafe
|
||||
python-mako
|
||||
python-six
|
||||
python-cheetah
|
||||
gettext
|
||||
iso-codes
|
||||
libtool
|
||||
docbook
|
||||
itstool
|
||||
yasm
|
||||
makeself
|
||||
gperf
|
||||
alsa-lib
|
||||
portaudio
|
||||
libao
|
||||
libaio
|
||||
libarchive
|
||||
ninja
|
||||
meson
|
||||
glib
|
||||
eudev
|
||||
libusb
|
||||
usbutils
|
||||
dialog
|
||||
lvm
|
||||
parted
|
||||
mlocate
|
||||
groff
|
||||
mandoc
|
||||
pinfo
|
||||
haveged
|
||||
procps-ng
|
||||
util-linux
|
||||
coreutils
|
||||
dosfstools
|
||||
cryptsetup
|
||||
logrotate
|
||||
e2fsprogs
|
||||
gptfdisk
|
||||
gmp
|
||||
mpfr
|
||||
libcroco
|
||||
libpng
|
||||
libexif
|
||||
fribidi
|
||||
lzo
|
||||
libidn
|
||||
libidn2
|
||||
libnl
|
||||
libmnl
|
||||
libnfnetlink
|
||||
libtasn1
|
||||
nettle
|
||||
lame
|
||||
nghttp2
|
||||
libssh2
|
||||
curl
|
||||
libnetfilter_conntrack
|
||||
iptables
|
||||
libelf-compat
|
||||
gnu-efi
|
||||
libevent
|
||||
texinfo
|
||||
cmake
|
||||
libjpeg-turbo
|
||||
libcap
|
||||
libcap-ng
|
||||
libvpx
|
||||
libogg
|
||||
libvorbis
|
||||
libtheora
|
||||
physfs
|
||||
brotli
|
||||
hyphen
|
||||
fuse
|
||||
gnutls
|
||||
libsndfile
|
||||
libtorrent
|
||||
libetpan
|
||||
opus
|
||||
opusfile
|
||||
libpthread-stubs
|
||||
aspell
|
||||
aspell6
|
||||
json-c
|
||||
json-glib
|
||||
libmypaint
|
||||
mypaint-brushes
|
||||
jbig2dec
|
||||
libvncserver
|
||||
jansson
|
||||
libnxml
|
||||
libmrss
|
||||
libassuan
|
||||
libasr
|
||||
fdk-aac
|
||||
asciidoc
|
||||
git
|
||||
desktop-file-utils
|
||||
gstreamer
|
||||
icu
|
||||
hunspell
|
||||
enchant
|
||||
htop
|
||||
nano
|
||||
ncdu
|
||||
pwgen
|
||||
tofrodos
|
||||
i2c-tools
|
||||
sudo
|
||||
alsa-utils
|
||||
alsa-plugins
|
||||
libical
|
||||
giflib
|
||||
keyutils
|
||||
libtirpc
|
||||
lsof
|
||||
ntfs-3g
|
||||
ca-certificates
|
||||
mpg123
|
||||
exiv2
|
||||
chrony
|
||||
libopenal
|
||||
p7zip
|
||||
x264
|
||||
libseccomp
|
||||
scons
|
||||
jam
|
||||
lm-sensors
|
||||
gdbm
|
||||
ruby
|
||||
syslinux
|
||||
hdparm
|
||||
neon
|
||||
wavpack
|
||||
libcddb
|
||||
libcdio
|
||||
libcdio-paranoia
|
||||
libmms
|
||||
libcue
|
||||
fftw
|
||||
flac
|
||||
libsamplerate
|
||||
soxr
|
||||
faad2
|
||||
libmodplug
|
||||
libmtp
|
||||
npth
|
||||
libksba
|
||||
gpgme
|
||||
gmime
|
||||
gnupg2
|
||||
id3lib
|
||||
libid3tag
|
||||
woff2
|
||||
libsecret
|
||||
p11-kit
|
||||
miniupnpc
|
||||
gloox
|
||||
libuv
|
||||
zsh
|
||||
pm-utils
|
||||
boost
|
||||
rpi-userland
|
||||
slapt-get
|
||||
pv
|
||||
libgc
|
||||
guile
|
||||
strace
|
||||
gdb
|
||||
acpid
|
||||
libdaemon
|
||||
gyp
|
||||
mozilla-nss
|
||||
c-ares
|
||||
sbc
|
||||
speexdsp
|
||||
lz4
|
||||
zstd
|
||||
lua
|
||||
lua53
|
||||
toluapp
|
||||
libkate
|
||||
libminizip
|
||||
libshout
|
||||
twolame
|
||||
exfat-utils
|
||||
bubblewrap
|
||||
qpdf
|
||||
libnfs
|
||||
sysstat
|
||||
enet
|
||||
chrpath
|
||||
libgit2
|
||||
oniguruma
|
||||
sysfsutils
|
||||
swig
|
||||
python-future
|
||||
python-typing
|
||||
python-m2crypto
|
||||
wireless-regdb
|
||||
crda
|
||||
cython
|
||||
time
|
||||
signify
|
||||
python-markdown
|
||||
python-pyyaml
|
||||
python-tornado
|
||||
python-lunr
|
||||
python-livereload
|
||||
python-jinja2
|
||||
python-click
|
||||
python-wheel
|
||||
python-importlib-metadata
|
||||
python-typing-extensions
|
||||
python-zipp
|
||||
python-tqdm
|
||||
python-regex
|
||||
python-joblib
|
||||
python-nltk
|
||||
python-mkdocs
|
||||
kernel-source
|
||||
kernel-headers
|
||||
highlight
|
||||
llvm
|
||||
clang
|
||||
rust
|
||||
lld
|
||||
sccache
|
||||
nodejs
|
31
base/acl/acl.SMBuild
Executable file
31
base/acl/acl.SMBuild
Executable file
|
@ -0,0 +1,31 @@
|
|||
APP=acl
|
||||
VERSION=2.2.53
|
||||
BUILD=1sml
|
||||
HOMEPAGE="http://savannah.nongnu.org/projects/acl"
|
||||
DOWNLOAD=''
|
||||
REQUIRES="attr"
|
||||
DESC="Tools and libraries for manipulating POSIX Access Control Lists"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix=""
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
mv $PKG/share/doc/$APP/* $PKGDOCS/
|
||||
rm -rf $PKG/share/doc
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
7b41ad53b4499bf59cb4d37b51db147a9aef8e72855f28044ae73dd8528272a0762e1e4a769919ca72b6cd1cec31161c166f6707e5534b85ed7718c6f57e8895 acl-2.2.53.tar.lz
|
||||
"
|
19
base/acpid/acpi_handler.sh
Normal file
19
base/acpid/acpi_handler.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
# Default acpi script that takes an entry for all actions
|
||||
|
||||
IFS=${IFS}/
|
||||
set $@
|
||||
|
||||
case "$1" in
|
||||
button)
|
||||
case "$2" in
|
||||
power) /sbin/init 0
|
||||
;;
|
||||
*) logger "ACPI action $2 is not defined"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
logger "ACPI group $1 / action $2 is not defined"
|
||||
;;
|
||||
esac
|
37
base/acpid/acpid.SMBuild
Executable file
37
base/acpid/acpid.SMBuild
Executable file
|
@ -0,0 +1,37 @@
|
|||
APP=acpid
|
||||
VERSION=2.0.32
|
||||
BUILD=1sml
|
||||
HOMEPAGE='http://sourceforge.net/projects/acpid2/'
|
||||
DOWNLOAD=''
|
||||
DESC="Tools and daemon for implementing ACPI standard on Linux"
|
||||
|
||||
build() {
|
||||
compileonlyfor x86_64
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
--sbindir=/bin
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
install -Dm 755 $SRCDIR/acpi_handler.sh $PKG/etc/acpi/acpi_handler.sh.new
|
||||
install -Dm 644 $SRCDIR/default $PKG/etc/acpi/events/default
|
||||
install -Dm 755 $SRCDIR/rc.acpid $PKG/etc/rc.d/rc.acpid
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
head -n 100 Changelog > $PKGDOCS/CHANGELOG
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
c7afffdf9818504e1ac03b0ad693a05f772bfd07af9808262b3b6bb82ca4dabe6253c94e6dc59e5be6f0da9e815e8bcf2d3e16f02b23d0248b6bad4509e78be7 acpid-2.0.32.tar.xz
|
||||
"
|
18
base/acpid/default
Normal file
18
base/acpid/default
Normal file
|
@ -0,0 +1,18 @@
|
|||
# This is the ACPID default configuration, it takes all
|
||||
# events and passes them to /etc/acpi/default.sh for further
|
||||
# processing.
|
||||
|
||||
# event keeps a regular expression matching the event. To get
|
||||
# power events only, just use something like "event=button power.*"
|
||||
# to catch it.
|
||||
# action keeps the command to be executed after an event occurs
|
||||
# In case of the power event above, your entry may look this way:
|
||||
#event=button power.*
|
||||
#action=/bin/init 0
|
||||
|
||||
# Optionally you can specify the placeholder %e. It will pass
|
||||
# through the whole kernel event message to the program you've
|
||||
# specified.
|
||||
|
||||
event=.*
|
||||
action=/etc/acpi/acpi_handler.sh %e
|
13
base/acpid/doinst.sh
Normal file
13
base/acpid/doinst.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
config etc/acpi/acpi_handler.sh.new
|
40
base/acpid/rc.acpid
Normal file
40
base/acpid/rc.acpid
Normal file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
# Start/stop/restart acpid.
|
||||
|
||||
# Start acpid:
|
||||
acpid_start() {
|
||||
if [ -x /bin/acpid -a -d /proc/acpi ]; then
|
||||
echo "Starting ACPI daemon: /bin/acpid"
|
||||
/bin/acpid
|
||||
fi
|
||||
}
|
||||
|
||||
# Stop acpid:
|
||||
acpid_stop() {
|
||||
if [ -r /var/run/acpid.pid ]; then
|
||||
kill $(cat /var/run/acpid.pid)
|
||||
else
|
||||
killall acpid
|
||||
fi
|
||||
}
|
||||
|
||||
# Restart acpid:
|
||||
acpid_restart() {
|
||||
acpid_stop
|
||||
sleep 1
|
||||
acpid_start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
acpid_start
|
||||
;;
|
||||
'stop')
|
||||
acpid_stop
|
||||
;;
|
||||
'restart')
|
||||
acpid_restart
|
||||
;;
|
||||
*)
|
||||
echo "usage $0 start|stop|restart"
|
||||
esac
|
53
base/alsa-lib/alsa-lib.SMBuild
Executable file
53
base/alsa-lib/alsa-lib.SMBuild
Executable file
|
@ -0,0 +1,53 @@
|
|||
APP=alsa-lib
|
||||
VERSION=1.2.3.1
|
||||
BUILD=1sml
|
||||
HOMEPAGE="http://alsa-project.org"
|
||||
DOWNLOAD=''
|
||||
DESC="Advanced Linux Sound Architecture provides audio and MIDI functionality for Linux"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
patch -p1 < $SRCDIR/remove-test.patch
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
--disable-python \
|
||||
--disable-static \
|
||||
--disable-resmgr \
|
||||
--enable-seq \
|
||||
--enable-aload \
|
||||
--disable-dependency-tracking \
|
||||
--without-versioned
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
( cd $PKG
|
||||
mv share/alsa/alsa.conf share/alsa/alsa.conf.new
|
||||
# create a blank asound.conf.new
|
||||
mkdir -p etc ; touch etc/asound.conf.new
|
||||
)
|
||||
|
||||
if [ "$ARCH" = "aarch64" ]; then
|
||||
# Provide some sample conf files for using USB audio by overwriting the above file
|
||||
cp $SRCDIR/alsa.conf.rpi.usbaudio $PKG/share/alsa/alsa.conf.new
|
||||
cp $SRCDIR/asound.conf.rpi $PKG/etc/asound.conf.new
|
||||
fi
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
ed0a81371117a91a5024f3bef5a881ffa9521399eab5e016924669a3f1eba2d6a02efa284b160089bc581717d39d15325ebb2faf162e4d3dabe4c29785a5fb58 alsa-lib-1.2.3.1.tar.bz2
|
||||
e15318431fe2d5bd1e42ef793f223e3e5995890d7befe6daa3d7456ccf5cb2f51eb79171539cecae13032a9b8a798ea35e04c89b27c7ef9567e2c03fb8db4512 remove-test.patch
|
||||
"
|
642
base/alsa-lib/alsa.conf.rpi.usbaudio
Normal file
642
base/alsa-lib/alsa.conf.rpi.usbaudio
Normal file
|
@ -0,0 +1,642 @@
|
|||
#
|
||||
# ALSA library configuration file
|
||||
#
|
||||
|
||||
# pre-load the configuration files
|
||||
|
||||
@hooks [
|
||||
{
|
||||
func load
|
||||
files [
|
||||
"/etc/alsa/conf.d"
|
||||
"/etc/asound.conf"
|
||||
"~/.asoundrc"
|
||||
{
|
||||
@func concat
|
||||
strings [
|
||||
{
|
||||
@func getenv
|
||||
vars [
|
||||
XDG_CONFIG_HOME
|
||||
]
|
||||
default "~/.config"
|
||||
}
|
||||
"/alsa/asoundrc"
|
||||
]
|
||||
}
|
||||
]
|
||||
errors false
|
||||
}
|
||||
]
|
||||
|
||||
# load card-specific configuration files (on request)
|
||||
|
||||
cards.@hooks [
|
||||
{
|
||||
func load
|
||||
files [
|
||||
{
|
||||
@func concat
|
||||
strings [
|
||||
{ @func datadir }
|
||||
"/cards/aliases.conf"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
func load_for_all_cards
|
||||
files [
|
||||
{
|
||||
@func concat
|
||||
strings [
|
||||
{ @func datadir }
|
||||
"/cards/"
|
||||
{ @func private_string }
|
||||
".conf"
|
||||
]
|
||||
}
|
||||
]
|
||||
errors false
|
||||
}
|
||||
]
|
||||
|
||||
#
|
||||
# defaults
|
||||
#
|
||||
|
||||
# show all name hints also for definitions without hint {} section
|
||||
defaults.namehint.showall off
|
||||
# show just basic name hints
|
||||
defaults.namehint.basic on
|
||||
# show extended name hints
|
||||
defaults.namehint.extended off
|
||||
#
|
||||
defaults.ctl.card 1
|
||||
defaults.pcm.card 1
|
||||
defaults.pcm.device 0
|
||||
defaults.pcm.subdevice -1
|
||||
defaults.pcm.nonblock 1
|
||||
defaults.pcm.compat 0
|
||||
defaults.pcm.minperiodtime 5000 # in us
|
||||
defaults.pcm.ipc_key 5678293
|
||||
defaults.pcm.ipc_gid audio
|
||||
defaults.pcm.ipc_perm 0660
|
||||
defaults.pcm.tstamp_type default
|
||||
defaults.pcm.dmix.max_periods 0
|
||||
defaults.pcm.dmix.channels 2
|
||||
defaults.pcm.dmix.rate 48000
|
||||
defaults.pcm.dmix.format unchanged
|
||||
defaults.pcm.dmix.card defaults.pcm.card
|
||||
defaults.pcm.dmix.device defaults.pcm.device
|
||||
defaults.pcm.dsnoop.card defaults.pcm.card
|
||||
defaults.pcm.dsnoop.device defaults.pcm.device
|
||||
defaults.pcm.front.card defaults.pcm.card
|
||||
defaults.pcm.front.device defaults.pcm.device
|
||||
defaults.pcm.rear.card defaults.pcm.card
|
||||
defaults.pcm.rear.device defaults.pcm.device
|
||||
defaults.pcm.center_lfe.card defaults.pcm.card
|
||||
defaults.pcm.center_lfe.device defaults.pcm.device
|
||||
defaults.pcm.side.card defaults.pcm.card
|
||||
defaults.pcm.side.device defaults.pcm.device
|
||||
defaults.pcm.surround21.card defaults.pcm.card
|
||||
defaults.pcm.surround21.device defaults.pcm.device
|
||||
defaults.pcm.surround40.card defaults.pcm.card
|
||||
defaults.pcm.surround40.device defaults.pcm.device
|
||||
defaults.pcm.surround41.card defaults.pcm.card
|
||||
defaults.pcm.surround41.device defaults.pcm.device
|
||||
defaults.pcm.surround50.card defaults.pcm.card
|
||||
defaults.pcm.surround50.device defaults.pcm.device
|
||||
defaults.pcm.surround51.card defaults.pcm.card
|
||||
defaults.pcm.surround51.device defaults.pcm.device
|
||||
defaults.pcm.surround71.card defaults.pcm.card
|
||||
defaults.pcm.surround71.device defaults.pcm.device
|
||||
defaults.pcm.iec958.card defaults.pcm.card
|
||||
defaults.pcm.iec958.device defaults.pcm.device
|
||||
defaults.pcm.modem.card defaults.pcm.card
|
||||
defaults.pcm.modem.device defaults.pcm.device
|
||||
defaults.pcm.file_format raw
|
||||
defaults.pcm.file_truncate true # truncate files via file or tee PCM
|
||||
defaults.rawmidi.card 0
|
||||
defaults.rawmidi.device 0
|
||||
defaults.rawmidi.subdevice -1
|
||||
defaults.hwdep.card 0
|
||||
defaults.hwdep.device 0
|
||||
defaults.timer.class 2
|
||||
defaults.timer.sclass 0
|
||||
defaults.timer.card 0
|
||||
defaults.timer.device 0
|
||||
defaults.timer.subdevice 0
|
||||
|
||||
#
|
||||
# PCM interface
|
||||
#
|
||||
|
||||
pcm.hw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_PCM_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.subdevice
|
||||
}
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
hint {
|
||||
show {
|
||||
@func refer
|
||||
name defaults.namehint.extended
|
||||
}
|
||||
description "Direct hardware device without any conversions"
|
||||
}
|
||||
}
|
||||
|
||||
pcm.plughw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_PCM_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_PCM_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.subdevice
|
||||
}
|
||||
}
|
||||
type plug
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
}
|
||||
hint {
|
||||
show {
|
||||
@func refer
|
||||
name defaults.namehint.extended
|
||||
}
|
||||
description "Hardware device with all software conversions"
|
||||
}
|
||||
}
|
||||
|
||||
pcm.plug {
|
||||
@args [ SLAVE ]
|
||||
@args.SLAVE {
|
||||
type string
|
||||
}
|
||||
type plug
|
||||
slave.pcm $SLAVE
|
||||
}
|
||||
|
||||
pcm.shm {
|
||||
@args [ SOCKET PCM ]
|
||||
@args.SOCKET {
|
||||
type string
|
||||
}
|
||||
@args.PCM {
|
||||
type string
|
||||
}
|
||||
type shm
|
||||
server $SOCKET
|
||||
pcm $PCM
|
||||
}
|
||||
|
||||
pcm.tee {
|
||||
@args [ SLAVE FILE FORMAT ]
|
||||
@args.SLAVE {
|
||||
type string
|
||||
}
|
||||
@args.FILE {
|
||||
type string
|
||||
}
|
||||
@args.FORMAT {
|
||||
type string
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.file_format
|
||||
}
|
||||
}
|
||||
type file
|
||||
slave.pcm $SLAVE
|
||||
file $FILE
|
||||
format $FORMAT
|
||||
truncate {
|
||||
@func refer
|
||||
name defaults.pcm.file_truncate
|
||||
}
|
||||
}
|
||||
|
||||
pcm.file {
|
||||
@args [ FILE FORMAT ]
|
||||
@args.FILE {
|
||||
type string
|
||||
}
|
||||
@args.FORMAT {
|
||||
type string
|
||||
default {
|
||||
@func refer
|
||||
name defaults.pcm.file_format
|
||||
}
|
||||
}
|
||||
type file
|
||||
slave.pcm null
|
||||
file $FILE
|
||||
format $FORMAT
|
||||
truncate {
|
||||
@func refer
|
||||
name defaults.pcm.file_truncate
|
||||
}
|
||||
}
|
||||
|
||||
pcm.null {
|
||||
type null
|
||||
hint {
|
||||
show {
|
||||
@func refer
|
||||
name defaults.namehint.basic
|
||||
}
|
||||
description "Discard all samples (playback) or generate zero samples (capture)"
|
||||
}
|
||||
}
|
||||
|
||||
# redirect to load-on-demand extended pcm definitions
|
||||
pcm.cards cards.pcm
|
||||
|
||||
pcm.default cards.pcm.default
|
||||
pcm.sysdefault cards.pcm.default
|
||||
pcm.front cards.pcm.front
|
||||
pcm.rear cards.pcm.rear
|
||||
pcm.center_lfe cards.pcm.center_lfe
|
||||
pcm.side cards.pcm.side
|
||||
pcm.surround21 cards.pcm.surround21
|
||||
pcm.surround40 cards.pcm.surround40
|
||||
pcm.surround41 cards.pcm.surround41
|
||||
pcm.surround50 cards.pcm.surround50
|
||||
pcm.surround51 cards.pcm.surround51
|
||||
pcm.surround71 cards.pcm.surround71
|
||||
pcm.iec958 cards.pcm.iec958
|
||||
pcm.spdif iec958
|
||||
pcm.hdmi cards.pcm.hdmi
|
||||
pcm.dmix cards.pcm.dmix
|
||||
pcm.dsnoop cards.pcm.dsnoop
|
||||
pcm.modem cards.pcm.modem
|
||||
pcm.phoneline cards.pcm.phoneline
|
||||
|
||||
#
|
||||
# Control interface
|
||||
#
|
||||
|
||||
ctl.sysdefault {
|
||||
type hw
|
||||
card {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_CTL_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.ctl.card
|
||||
}
|
||||
}
|
||||
hint.description "Default control device"
|
||||
}
|
||||
ctl.default ctl.sysdefault
|
||||
|
||||
ctl.hw {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_CTL_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.ctl.card
|
||||
}
|
||||
}
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
hint.description "Direct control device"
|
||||
}
|
||||
|
||||
ctl.shm {
|
||||
@args [ SOCKET CTL ]
|
||||
@args.SOCKET {
|
||||
type string
|
||||
}
|
||||
@args.CTL {
|
||||
type string
|
||||
}
|
||||
type shm
|
||||
server $SOCKET
|
||||
ctl $CTL
|
||||
}
|
||||
|
||||
#
|
||||
# RawMidi interface
|
||||
#
|
||||
|
||||
rawmidi.default {
|
||||
type hw
|
||||
card {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.card
|
||||
}
|
||||
}
|
||||
device {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.device
|
||||
}
|
||||
}
|
||||
hint.description "Default raw MIDI device"
|
||||
}
|
||||
|
||||
rawmidi.hw {
|
||||
@args [ CARD DEV SUBDEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_RAWMIDI_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.rawmidi.device
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default -1
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
hint {
|
||||
description "Direct rawmidi driver device"
|
||||
device $DEV
|
||||
}
|
||||
}
|
||||
|
||||
rawmidi.virtual {
|
||||
@args [ MERGE ]
|
||||
@args.MERGE {
|
||||
type string
|
||||
default 1
|
||||
}
|
||||
type virtual
|
||||
merge $MERGE
|
||||
}
|
||||
|
||||
#
|
||||
# Sequencer interface
|
||||
#
|
||||
|
||||
seq.default {
|
||||
type hw
|
||||
hint.description "Default sequencer device"
|
||||
}
|
||||
|
||||
seq.hw {
|
||||
type hw
|
||||
}
|
||||
|
||||
#
|
||||
# HwDep interface
|
||||
#
|
||||
|
||||
hwdep.default {
|
||||
type hw
|
||||
card {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_HWDEP_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.hwdep.card
|
||||
}
|
||||
}
|
||||
device {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_HWDEP_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.hwdep.device
|
||||
}
|
||||
}
|
||||
hint.description "Default hardware dependent device"
|
||||
}
|
||||
|
||||
hwdep.hw {
|
||||
@args [ CARD DEV ]
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func getenv
|
||||
vars [
|
||||
ALSA_HWDEP_CARD
|
||||
ALSA_CARD
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.hwdep.card
|
||||
}
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func igetenv
|
||||
vars [
|
||||
ALSA_HWDEP_DEVICE
|
||||
]
|
||||
default {
|
||||
@func refer
|
||||
name defaults.hwdep.device
|
||||
}
|
||||
}
|
||||
}
|
||||
type hw
|
||||
card $CARD
|
||||
device $DEV
|
||||
hint {
|
||||
description "Direct hardware dependent device"
|
||||
device $DEV
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Timer interface
|
||||
#
|
||||
|
||||
timer_query.default {
|
||||
type hw
|
||||
}
|
||||
|
||||
timer_query.hw {
|
||||
type hw
|
||||
}
|
||||
|
||||
timer.default {
|
||||
type hw
|
||||
class {
|
||||
@func refer
|
||||
name defaults.timer.class
|
||||
}
|
||||
sclass {
|
||||
@func refer
|
||||
name defaults.timer.sclass
|
||||
}
|
||||
card {
|
||||
@func refer
|
||||
name defaults.timer.card
|
||||
}
|
||||
device {
|
||||
@func refer
|
||||
name defaults.timer.device
|
||||
}
|
||||
subdevice {
|
||||
@func refer
|
||||
name defaults.timer.subdevice
|
||||
}
|
||||
hint.description "Default timer device"
|
||||
}
|
||||
|
||||
timer.hw {
|
||||
@args [ CLASS SCLASS CARD DEV SUBDEV ]
|
||||
@args.CLASS {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.timer.class
|
||||
}
|
||||
}
|
||||
@args.SCLASS {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.timer.sclass
|
||||
}
|
||||
}
|
||||
@args.CARD {
|
||||
type string
|
||||
default {
|
||||
@func refer
|
||||
name defaults.timer.card
|
||||
}
|
||||
}
|
||||
@args.DEV {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.timer.device
|
||||
}
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
default {
|
||||
@func refer
|
||||
name defaults.timer.subdevice
|
||||
}
|
||||
}
|
||||
type hw
|
||||
class $CLASS
|
||||
sclass $SCLASS
|
||||
card $CARD
|
||||
device $DEV
|
||||
subdevice $SUBDEV
|
||||
hint {
|
||||
description "Direct timer device"
|
||||
device $DEV
|
||||
}
|
||||
}
|
8
base/alsa-lib/asound.conf.rpi
Normal file
8
base/alsa-lib/asound.conf.rpi
Normal file
|
@ -0,0 +1,8 @@
|
|||
pcm.!default {
|
||||
type hw
|
||||
card 1
|
||||
}
|
||||
ctl.!default {
|
||||
type hw
|
||||
card 1
|
||||
}
|
14
base/alsa-lib/doinst.sh
Normal file
14
base/alsa-lib/doinst.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
config share/alsa/alsa.conf.new
|
||||
config etc/asound.conf.new
|
85
base/alsa-lib/remove-test.patch
Normal file
85
base/alsa-lib/remove-test.patch
Normal file
|
@ -0,0 +1,85 @@
|
|||
diff --git a/test/Makefile.am b/test/Makefile.am
|
||||
index 99c2c4f..ac7bae1 100644
|
||||
--- a/test/Makefile.am
|
||||
+++ b/test/Makefile.am
|
||||
@@ -2,7 +2,7 @@ SUBDIRS=. lsb
|
||||
|
||||
check_PROGRAMS=control pcm pcm_min latency seq \
|
||||
playmidi1 timer rawmidi midiloop \
|
||||
- oldapi queue_timer namehint client_event_filter \
|
||||
+ queue_timer namehint client_event_filter \
|
||||
chmap audio_time user-ctl-element-set pcm-multi-thread
|
||||
|
||||
control_LDADD=../src/libasound.la
|
||||
@@ -16,7 +16,6 @@ playmidi1_LDADD=../src/libasound.la
|
||||
timer_LDADD=../src/libasound.la
|
||||
rawmidi_LDADD=../src/libasound.la
|
||||
midiloop_LDADD=../src/libasound.la
|
||||
-oldapi_LDADD=../src/libasound.la
|
||||
queue_timer_LDADD=../src/libasound.la
|
||||
namehint_LDADD=../src/libasound.la
|
||||
client_event_filter_LDADD=../src/libasound.la
|
||||
diff --git a/test/Makefile.in b/test/Makefile.in
|
||||
index d096226..699ae45 100644
|
||||
--- a/test/Makefile.in
|
||||
+++ b/test/Makefile.in
|
||||
@@ -90,7 +90,7 @@ host_triplet = @host@
|
||||
check_PROGRAMS = control$(EXEEXT) pcm$(EXEEXT) pcm_min$(EXEEXT) \
|
||||
latency$(EXEEXT) seq$(EXEEXT) playmidi1$(EXEEXT) \
|
||||
timer$(EXEEXT) rawmidi$(EXEEXT) midiloop$(EXEEXT) \
|
||||
- oldapi$(EXEEXT) queue_timer$(EXEEXT) namehint$(EXEEXT) \
|
||||
+ queue_timer$(EXEEXT) namehint$(EXEEXT) \
|
||||
client_event_filter$(EXEEXT) chmap$(EXEEXT) \
|
||||
audio_time$(EXEEXT) user-ctl-element-set$(EXEEXT) \
|
||||
pcm-multi-thread$(EXEEXT)
|
||||
@@ -136,9 +136,6 @@ midiloop_DEPENDENCIES = ../src/libasound.la
|
||||
namehint_SOURCES = namehint.c
|
||||
namehint_OBJECTS = namehint.$(OBJEXT)
|
||||
namehint_DEPENDENCIES = ../src/libasound.la
|
||||
-oldapi_SOURCES = oldapi.c
|
||||
-oldapi_OBJECTS = oldapi.$(OBJEXT)
|
||||
-oldapi_DEPENDENCIES = ../src/libasound.la
|
||||
pcm_SOURCES = pcm.c
|
||||
pcm_OBJECTS = pcm.$(OBJEXT)
|
||||
pcm_DEPENDENCIES = ../src/libasound.la
|
||||
@@ -222,11 +219,11 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = audio_time.c chmap.c client_event_filter.c control.c \
|
||||
- latency.c midiloop.c namehint.c oldapi.c pcm.c \
|
||||
+ latency.c midiloop.c namehint.c pcm.c \
|
||||
pcm-multi-thread.c pcm_min.c playmidi1.c queue_timer.c \
|
||||
rawmidi.c seq.c timer.c user-ctl-element-set.c
|
||||
DIST_SOURCES = audio_time.c chmap.c client_event_filter.c control.c \
|
||||
- latency.c midiloop.c namehint.c oldapi.c pcm.c \
|
||||
+ latency.c midiloop.c namehint.c pcm.c \
|
||||
pcm-multi-thread.c pcm_min.c playmidi1.c queue_timer.c \
|
||||
rawmidi.c seq.c timer.c user-ctl-element-set.c
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
@@ -439,7 +436,6 @@ playmidi1_LDADD = ../src/libasound.la
|
||||
timer_LDADD = ../src/libasound.la
|
||||
rawmidi_LDADD = ../src/libasound.la
|
||||
midiloop_LDADD = ../src/libasound.la
|
||||
-oldapi_LDADD = ../src/libasound.la
|
||||
queue_timer_LDADD = ../src/libasound.la
|
||||
namehint_LDADD = ../src/libasound.la
|
||||
client_event_filter_LDADD = ../src/libasound.la
|
||||
@@ -524,10 +520,6 @@ namehint$(EXEEXT): $(namehint_OBJECTS) $(namehint_DEPENDENCIES) $(EXTRA_namehint
|
||||
@rm -f namehint$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(namehint_OBJECTS) $(namehint_LDADD) $(LIBS)
|
||||
|
||||
-oldapi$(EXEEXT): $(oldapi_OBJECTS) $(oldapi_DEPENDENCIES) $(EXTRA_oldapi_DEPENDENCIES)
|
||||
- @rm -f oldapi$(EXEEXT)
|
||||
- $(AM_V_CCLD)$(LINK) $(oldapi_OBJECTS) $(oldapi_LDADD) $(LIBS)
|
||||
-
|
||||
pcm$(EXEEXT): $(pcm_OBJECTS) $(pcm_DEPENDENCIES) $(EXTRA_pcm_DEPENDENCIES)
|
||||
@rm -f pcm$(EXEEXT)
|
||||
$(AM_V_CCLD)$(pcm_LINK) $(pcm_OBJECTS) $(pcm_LDADD) $(LIBS)
|
||||
@@ -577,7 +569,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/latency.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midiloop.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/namehint.Po@am__quote@ # am--include-marker
|
||||
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldapi.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcm-multi-thread.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcm.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcm_min.Po@am__quote@ # am--include-marker
|
31
base/alsa-plugins/alsa-plugins.SMBuild
Executable file
31
base/alsa-plugins/alsa-plugins.SMBuild
Executable file
|
@ -0,0 +1,31 @@
|
|||
APP=alsa-plugins
|
||||
VERSION=1.2.2
|
||||
BUILD=1sml
|
||||
HOMEPAGE="http://www.alsa-project.org"
|
||||
DOWNLOAD=""
|
||||
DESC="Plugins for ALSA"
|
||||
REQUIRES="alsa-lib"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--libdir=/lib
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING* $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
25a7dfaa64be024447d889b5cde668f1308d197f54880548a82d50beb4ac0dbff33b415da1e26dc5229408c934247a9bd38acfb0f82ca388deac0d77ab3cdadb alsa-plugins-1.2.2.tar.bz2
|
||||
"
|
36
base/alsa-utils/alsa-utils.SMBuild
Executable file
36
base/alsa-utils/alsa-utils.SMBuild
Executable file
|
@ -0,0 +1,36 @@
|
|||
APP=alsa-utils
|
||||
VERSION=1.2.3
|
||||
BUILD=1sml
|
||||
HOMEPAGE='http://alsa-project.org'
|
||||
DOWNLOAD=''
|
||||
REQUIRES="netbsd-curses alsa-lib"
|
||||
DESC="Utilities for ALSA such as alsactl, amixer, alsamixer, aplay and arecord"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
--bindir=/bin \
|
||||
--sbindir=/bin \
|
||||
--mandir="/share/man" \
|
||||
--disable-nls \
|
||||
--disable-xmlto
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
5aeba2e5b7279c62d4df85b61a26b3f41e5465bac5a0b94c7bbe1299f7aa38e8cf2a1f749f618289a63b61f76609fe54169fcbe70792b45adc8957811b672012 alsa-utils-1.2.3.tar.bz2
|
||||
"
|
87
base/alsa-utils/rc.alsa
Normal file
87
base/alsa-utils/rc.alsa
Normal file
|
@ -0,0 +1,87 @@
|
|||
#!/bin/sh
|
||||
# Load the mixer settings and OSS compatibility (if enabled) for ALSA.
|
||||
# (the Advanced Linux Sound Architecture)
|
||||
|
||||
# A function to load the ALSA mixer settings:
|
||||
load_alsa_mixer() {
|
||||
if [ -r /var/lib/alsa/asound.state ]; then
|
||||
echo "Loading ALSA mixer settings: /usr/sbin/alsactl restore"
|
||||
/usr/sbin/alsactl restore
|
||||
else
|
||||
# It's possible a user might not want to set a default sound state.
|
||||
# In that case, do this: touch /var/lib/alsa/no.asound.state
|
||||
if [ ! -r /var/lib/alsa/no.asound.state ]; then
|
||||
echo "Setting default ALSA mixer settings."
|
||||
# set default mixer volumes for ALSA
|
||||
# Taken from the alsaconf script.
|
||||
amixer -s -q <<EOF
|
||||
set Master 75% unmute
|
||||
set Master -12dB
|
||||
set 'Master Mono' 75% unmute
|
||||
set 'Master Mono' -12dB
|
||||
set Front 75% unmute
|
||||
set Front -12dB
|
||||
set PCM 90% unmute
|
||||
set PCM 0dB
|
||||
mixer Synth 90% unmute
|
||||
mixer Synth 0dB
|
||||
mixer CD 90% unmute
|
||||
mixer CD 0dB
|
||||
# mute mic
|
||||
set Mic 0% mute
|
||||
# ESS 1969 chipset has 2 PCM channels
|
||||
set PCM,1 90% unmute
|
||||
set PCM,1 0dB
|
||||
# Trident/YMFPCI/emu10k1
|
||||
set Wave 100% unmute
|
||||
set Music 100% unmute
|
||||
set AC97 100% unmute
|
||||
# CS4237B chipset:
|
||||
set 'Master Digital' 75% unmute
|
||||
# Envy24 chips with analog outs
|
||||
set DAC 90% unmute
|
||||
set DAC -12dB
|
||||
set DAC,0 90% unmute
|
||||
set DAC,0 -12dB
|
||||
set DAC,1 90% unmute
|
||||
set DAC,1 -12dB
|
||||
# some notebooks use headphone instead of master
|
||||
set Headphone 75% unmute
|
||||
set Headphone -12dB
|
||||
set Playback 100% unmute
|
||||
# turn off digital switches
|
||||
set "SB Live Analog/Digital Output Jack" off
|
||||
set "Audigy Analog/Digital Output Jack" off
|
||||
EOF
|
||||
echo "Storing default ALSA mixer settings: /usr/sbin/alsactl store"
|
||||
/usr/sbin/alsactl store
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# If udev or something else has loaded the ALSA modules, then
|
||||
# simply load the mixer settings and make sure the OSS compat
|
||||
# modules are loaded (if enabled):
|
||||
if [ -d /proc/asound ]; then
|
||||
if [ -x /etc/rc.d/rc.alsa-oss ]; then
|
||||
sh /etc/rc.d/rc.alsa-oss
|
||||
fi
|
||||
load_alsa_mixer
|
||||
else
|
||||
# If there are ALSA modules defined in /etc/modprobe.d/*, but
|
||||
# ALSA is not yet loaded, then load the modules now:
|
||||
DRIVERS=$(modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | tr -s "[[:blank:]]" " " | cut -d " " -f 3)
|
||||
if [ ! "$DRIVERS" = "" ]; then
|
||||
echo "Loading ALSA kernel modules."
|
||||
for module in $DRIVERS; do
|
||||
modprobe $module
|
||||
done
|
||||
fi
|
||||
# If ALSA is now up, then load the mixer settings and OSS modules (if enabled):
|
||||
if [ -d /proc/asound ]; then
|
||||
if [ -x /etc/rc.d/rc.alsa-oss ]; then
|
||||
sh /etc/rc.d/rc.alsa-oss
|
||||
fi
|
||||
load_alsa_mixer
|
||||
fi
|
||||
fi
|
24
base/alsa-utils/rc.alsa-oss
Normal file
24
base/alsa-utils/rc.alsa-oss
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
# Load the ALSA OSS kernel modules to support OSS applications.
|
||||
# To use this, set this script as executable (chmod 755 rc.alsa-oss)
|
||||
# and it will be run from the main rc.alsa script. Unless you know
|
||||
# that something requires OSS support, it is better to leave this
|
||||
# script disabled. Some applications will try OSS first even though
|
||||
# they also support ALSA, and will block other applications from
|
||||
# using audio I/O.
|
||||
#
|
||||
# Many programs that use OSS can be run using the aoss wrapper and
|
||||
# will then use ALSA in a non-blocking way (and will not require
|
||||
# loading these kernel modules). Consider trying that before enabling
|
||||
# these modules. (See "man aoss")
|
||||
|
||||
if modprobe -c | tr _ - | grep -wq snd-pcm-oss ; then
|
||||
if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then
|
||||
echo "Loading OSS compatibility modules for ALSA."
|
||||
# Use -b to enable blacklisting these modules:
|
||||
modprobe -q -b snd-pcm-oss
|
||||
modprobe -q -b snd-seq-oss
|
||||
modprobe -q -b snd-mixer-oss
|
||||
fi
|
||||
fi
|
||||
|
79
base/argp-standalone/001-throw-in-funcdef.patch
Normal file
79
base/argp-standalone/001-throw-in-funcdef.patch
Normal file
|
@ -0,0 +1,79 @@
|
|||
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||
#
|
||||
# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
|
||||
# Copyright (C) 2006 The T2 SDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- T2-COPYRIGHT-NOTE-END ---
|
||||
|
||||
|
||||
No __THROW in function implementation.
|
||||
--jsaw
|
||||
|
||||
--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100
|
||||
+++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100
|
||||
@@ -560,17 +560,17 @@
|
||||
# endif
|
||||
|
||||
# ifndef ARGP_EI
|
||||
-# define ARGP_EI extern __inline__
|
||||
+# define ARGP_EI extern inline
|
||||
# endif
|
||||
|
||||
ARGP_EI void
|
||||
-__argp_usage (__const struct argp_state *__state) __THROW
|
||||
+__argp_usage (__const struct argp_state *__state)
|
||||
{
|
||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
||||
}
|
||||
|
||||
ARGP_EI int
|
||||
-__option_is_short (__const struct argp_option *__opt) __THROW
|
||||
+__option_is_short (__const struct argp_option *__opt)
|
||||
{
|
||||
if (__opt->flags & OPTION_DOC)
|
||||
return 0;
|
||||
@@ -582,7 +582,7 @@
|
||||
}
|
||||
|
||||
ARGP_EI int
|
||||
-__option_is_end (__const struct argp_option *__opt) __THROW
|
||||
+__option_is_end (__const struct argp_option *__opt)
|
||||
{
|
||||
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
|
||||
}
|
||||
--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100
|
||||
+++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100
|
||||
@@ -1290,13 +1290,13 @@
|
||||
/* Defined here, in case a user is not inlining the definitions in
|
||||
* argp.h */
|
||||
void
|
||||
-__argp_usage (__const struct argp_state *__state) __THROW
|
||||
+__argp_usage (__const struct argp_state *__state)
|
||||
{
|
||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
||||
}
|
||||
|
||||
int
|
||||
-__option_is_short (__const struct argp_option *__opt) __THROW
|
||||
+__option_is_short (__const struct argp_option *__opt)
|
||||
{
|
||||
if (__opt->flags & OPTION_DOC)
|
||||
return 0;
|
||||
@@ -1310,7 +1310,7 @@
|
||||
}
|
||||
|
||||
int
|
||||
-__option_is_end (__const struct argp_option *__opt) __THROW
|
||||
+__option_is_end (__const struct argp_option *__opt)
|
||||
{
|
||||
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
|
||||
}
|
38
base/argp-standalone/argp-standalone.SMBuild
Executable file
38
base/argp-standalone/argp-standalone.SMBuild
Executable file
|
@ -0,0 +1,38 @@
|
|||
APP=argp-standalone
|
||||
VERSION=1.3
|
||||
BUILD=1sml
|
||||
HOMEPAGE='http://www.lysator.liu.se/~nisse/misc/'
|
||||
DOWNLOAD=''
|
||||
DESC="Hierarchical argument parsing library broken out of glibc"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
patch -p1 < $SRCDIR/gnu89-inline.patch
|
||||
patch -p1 < $SRCDIR/001-throw-in-funcdef.patch
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc
|
||||
|
||||
make
|
||||
|
||||
install -Dm 644 argp.h $PKG/include/argp.h
|
||||
install -Dm 755 libargp.a $PKG/lib/libargp.a
|
||||
|
||||
head -n 100 ChangeLog > $PKGDOCS/CHANGELOG
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
b6bb0416d19cc2bc582158ea4b7d143fa13a2dacfac25b7f9adea68b4dd6b06548a4a81f1691036f04feae86ca87f45e6c1dae12cf2d6d6a74e16b2d2ee556dd argp-standalone-1.3.tar.lz
|
||||
5e4cdeeb16e6a4fb46a00ab95f3da9276ee554eec00bb2a05da7467961234ba3f9a630aafa7ceb5feb429a84ece8bf03b869fa996b86468f4716935a914c79a4 001-throw-in-funcdef.patch
|
||||
69f1d8a4fcd542346f98bc1fb7151db748483fc2f331c8c35114e0891d867b41c603ddaa5f3130aaaf1c640e02c51ac71cee71b62c09301b146812e9059e9ade gnu89-inline.patch
|
||||
"
|
22
base/argp-standalone/gnu89-inline.patch
Normal file
22
base/argp-standalone/gnu89-inline.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index 4658839..09f0267 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -79,16 +79,10 @@ AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name],
|
||||
|
||||
# Set these flags *last*, or else the test programs won't compile
|
||||
if test x$GCC = xyes ; then
|
||||
- # Using -ggdb3 makes (some versions of) Redhat's gcc-2.96 dump core
|
||||
- if "$CC" --version | grep '^2\.96$' 1>/dev/null 2>&1; then
|
||||
- true
|
||||
- else
|
||||
- CFLAGS="$CFLAGS -ggdb3"
|
||||
- fi
|
||||
CFLAGS="$CFLAGS -Wall -W \
|
||||
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes \
|
||||
-Waggregate-return \
|
||||
- -Wpointer-arith -Wbad-function-cast -Wnested-externs"
|
||||
+ -Wpointer-arith -Wbad-function-cast -Wnested-externs -fgnu89-inline"
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -I$srcdir"
|
31
base/asciidoc/asciidoc.SMBuild
Executable file
31
base/asciidoc/asciidoc.SMBuild
Executable file
|
@ -0,0 +1,31 @@
|
|||
APP=asciidoc
|
||||
VERSION=9.0.4
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://github.com/asciidoc/asciidoc-py3"
|
||||
DOWNLOAD=''
|
||||
DESC="Text document format for writing notes and documentation"
|
||||
REQUIRES="python3 libxslt docbook"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-"py3"-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-"py3"-$VERSION.tar.?z*
|
||||
cd $APP-"py3"-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYRIGHT LICENSE $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
df71bb8a35fc0099c34dcfbcfe8c182b59c5a8e86326a994fe722fea2c902fb56d221d8ae42a7b967daa4acc8cadd82ec9c85add48a8013ad04d295bf1d728c4 asciidoc-py3-9.0.4.tar.lz
|
||||
"
|
35
base/aspell/aspell.SMBuild
Executable file
35
base/aspell/aspell.SMBuild
Executable file
|
@ -0,0 +1,35 @@
|
|||
APP=aspell
|
||||
VERSION=0.60.7
|
||||
BUILD=1sml
|
||||
HOMEPAGE="http://aspell.net/"
|
||||
REQUIRES="gcc-libs netbsd-curses perl"
|
||||
DESC="Spell checker for GNU Linux"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc/aspell \
|
||||
--libdir=/lib \
|
||||
--enable-pkgdatadir=/lib/aspell \
|
||||
--enable-data-dir=/lib/aspell \
|
||||
--enable-pkglibdir=/lib/aspell \
|
||||
--enable-dict-dir=/lib/aspell
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
b02d4f5e82f5a001a6dd626088405cc0987036f735585d4ad1a025e59f009c631318c8a9480096c552ef647b59d0050f8503af28aa1e7b858d1598d3495ba509 aspell-0.60.7.tar.lz
|
||||
"
|
29
base/aspell6/aspell6.SMBuild
Executable file
29
base/aspell6/aspell6.SMBuild
Executable file
|
@ -0,0 +1,29 @@
|
|||
APP=aspell6
|
||||
VERSION=en
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://ftp.gnu.org/gnu/aspell/dict/0index.html"
|
||||
DOWNLOAD=""
|
||||
REQUIRES="aspell"
|
||||
DESC="Dictionary files for aspell spelling checker"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION-2018.04.16-0.tar.bz2
|
||||
cd "$APP-$VERSION-2018.04.16-0"
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp Copyright $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
70447f5f11a6a2d96e58376ac06e78add59e4eb237ca40ed0752f481dabe1a6e9e227fd20ba95a5612de1bb4357cd65760a31c94efe66f8499b9ed031e9846c2 aspell6-en-2018.04.16-0.tar.bz2
|
||||
"
|
27
base/attr/attr-cdefs.patch
Normal file
27
base/attr/attr-cdefs.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- attr-2.4.47.org/include/xattr.h
|
||||
+++ attr-2.4.47/include/xattr.h
|
||||
@@ -30,8 +30,13 @@
|
||||
#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
|
||||
#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
|
||||
|
||||
+#ifndef __THROW
|
||||
+#define __THROW
|
||||
+#endif
|
||||
|
||||
-__BEGIN_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
|
||||
extern int setxattr (const char *__path, const char *__name,
|
||||
const void *__value, size_t __size, int __flags) __THROW;
|
||||
@@ -58,6 +63,8 @@
|
||||
extern int lremovexattr (const char *__path, const char *__name) __THROW;
|
||||
extern int fremovexattr (int __filedes, const char *__name) __THROW;
|
||||
|
||||
-__END_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif /* __XATTR_H__ */
|
45
base/attr/attr.SMBuild
Executable file
45
base/attr/attr.SMBuild
Executable file
|
@ -0,0 +1,45 @@
|
|||
APP=attr
|
||||
VERSION=2.4.47
|
||||
BUILD=1sml
|
||||
HOMEPAGE="http://savannah.nongnu.org/projects/attr"
|
||||
DOWNLOAD=""
|
||||
REQUIRES="musl"
|
||||
DESC="Tools for manipulating extended attributes on filesystems"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
sed -i 's@-o $(PKG_USER) -g $(PKG_GROUP)@@' include/buildmacros
|
||||
sed -i 's@CHOWN=_chown@CHOWN=true@' include/install-sh
|
||||
patch -p1 < $SRCDIR/attr-cdefs.patch
|
||||
|
||||
make clean
|
||||
|
||||
CFLAGS="-static" \
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
--enable-gettext=no
|
||||
|
||||
for i in po ; do
|
||||
printf 'all:\n\ttrue\ninstall:\n\ttrue\ninstall-lib:\n\ttrue\ninstall-dev:\n\ttrue\nclean:\n\ttrue\n' > "$i"/Makefile
|
||||
done
|
||||
|
||||
make LDFLAGS=-all-static
|
||||
|
||||
make DESTDIR="$PKG" install install-lib install-dev
|
||||
|
||||
cp doc/{COPYING,COPYING.LGPL} $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
8d1c8b506db2e0c8290d49dc2672a59d7fb5a8e74e784835132d706ebd0c52a14d848fde8fe629c551b51bdc098152f0e5ee0290d0ef51dd5f90dca3c113d24b attr-2.4.47.tar.lz
|
||||
28236fb6bd7021d249bb2f4fc98a4445f86d336afd4289708b3580d126f08c0c952595f78aa14b203f857df06e5c7262348b660c0e206de3efb1caecf6d19f8c attr-cdefs.patch
|
||||
"
|
30
base/autoconf/autoconf.SMBuild
Executable file
30
base/autoconf/autoconf.SMBuild
Executable file
|
@ -0,0 +1,30 @@
|
|||
APP=autoconf
|
||||
VERSION=2.69
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.gnu.org/software/autoconf'
|
||||
DOWNLOAD=''
|
||||
REQUIRES="m4 perl perl-modules diffutils gawk"
|
||||
DESC="m4 macros extension to produce scripts for software packaging"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix=""
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING* $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
9ab9a95fdba7bed86440ec77d3bc976f30c08fb688c699e68c017c741a3792534ec96f0d1f61e5d0f242b77d0ae29fd541a29653fea82d6fd1b983b192033cb6 autoconf-2.69.tar.lz
|
||||
"
|
30
base/automake/automake.SMBuild
Executable file
30
base/automake/automake.SMBuild
Executable file
|
@ -0,0 +1,30 @@
|
|||
APP=automake
|
||||
VERSION=1.16.1
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.gnu.org/software/automake'
|
||||
DOWNLOAD='https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz'
|
||||
DESC="GNU Makefile generator"
|
||||
REQUIRES="autoconf perl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix=""
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
cde49f49251a4110b6d6bf71a87c70a02761b937575825049953a5ccb6031e4ee9f4d7ec00b4713e0f1267ddb3265de659e268b09697c4fd401c606910e4605f automake-1.16.1.tar.lz
|
||||
"
|
35
base/bash-completion/bash-completion.SMBuild
Executable file
35
base/bash-completion/bash-completion.SMBuild
Executable file
|
@ -0,0 +1,35 @@
|
|||
APP=bash-completion
|
||||
VERSION=2.11
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://github.com/scop/bash-completion'
|
||||
DOWNLOAD='https://github.com/scop/bash-completion/archive/refs/tags/2.11.tar.gz'
|
||||
REQUIRES="bash"
|
||||
DESC="Programmable completion for the bash shell"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
# Thank you slackware
|
||||
patch -p1 < $SRCDIR/fixup-sh-script-completions.diff
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
551638e4b97be74ec97624bb9b952dd093a0f6b41f85932efc6a2b914d3a58a9e34b3efd0f4f49ed20fc089e2c93cb0997a0017fefaa7aa3b78d83878d58eda2 bash-completion-2.11.tar.lz
|
||||
313db416a83f811d52ed7ea530a45851b34ed736eb119ff539127983f300cfd9d4fef95c5e134255f55b082e3f41e9129f48eb85d81c87e8321b735d4d83a483 fixup-sh-script-completions.diff
|
||||
"
|
18
base/bash-completion/fixup-sh-script-completions.diff
Normal file
18
base/bash-completion/fixup-sh-script-completions.diff
Normal file
|
@ -0,0 +1,18 @@
|
|||
The 'sh' completion file only completes on *.sh files. This breaks the
|
||||
expectation (on Slackware, at least) that e.g. "sh /etc/rc.d/rc.my<TAB>"
|
||||
will complete to rc.mysql. This patch fixes that, but a consequence is that
|
||||
"sh" will complete on *any* filename. IMHO, that's not a regression at all,
|
||||
since stock bash without bash-completion does that already... --rworkman
|
||||
|
||||
Acked-by: volkerdi
|
||||
|
||||
--- ./completions/sh.orig 2020-07-25 12:37:24.175001592 -0500
|
||||
+++ ./completions/sh 2020-07-25 12:38:34.061003155 -0500
|
||||
@@ -31,6 +31,6 @@
|
||||
((args == 1)) && ext="sh"
|
||||
_filedir $ext
|
||||
} &&
|
||||
- complete -F _sh sh
|
||||
+ complete -F _sh
|
||||
|
||||
# ex: filetype=sh
|
42
base/bash/bash.SMBuild
Executable file
42
base/bash/bash.SMBuild
Executable file
|
@ -0,0 +1,42 @@
|
|||
APP=bash
|
||||
VERSION=5.0
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.gnu.org/software/bash/bash.html'
|
||||
DOWNLOAD='https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz'
|
||||
REQUIRES="netbsd-curses"
|
||||
DESC="GNU Bourne-Again SHell"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
bash_cv_getenv_redef=no \
|
||||
bash_cv_sys_named_pipes=yes \
|
||||
ac_cv_rl_version=5.0 \
|
||||
LDFLAGS="-static" \
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--bindir=/bin \
|
||||
--sysconfdir=/etc \
|
||||
--without-bash-malloc \
|
||||
--disable-rpath \
|
||||
--enable-history \
|
||||
--disable-nls
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
( cd $PKG/bin ; ln -s bash sh )
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
5795c200a1f930caa1b984006498ea1ecae6fd9f73aa039ccc02403e4b2db0cc0999d47b00dc92eefe1ae25b189b43ca5e3d052606b535ea8712f3e3f6f39470 bash-5.0.tar.lz
|
||||
"
|
29
base/bc/bc.SMBuild
Executable file
29
base/bc/bc.SMBuild
Executable file
|
@ -0,0 +1,29 @@
|
|||
APP=bc
|
||||
VERSION=1.2.5
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://www.gnu.org/software/bc/"
|
||||
DOWNLOAD=''
|
||||
DESC="Arbitrary precision numeric processing language"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z**
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure.sh -EHNG
|
||||
|
||||
make all
|
||||
make install DESTDIR=$PKG BINDIR="/bin" MAN1DIR="/share/man/man1"
|
||||
|
||||
cp LICENSE.md $PKGDOCS
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
3e3f56daf1ec3622ef59de067a6497637d09adcec862eb1f90ea1fb901b113e072c1c2b7473fbb6cbff8e340db22bfe041d43b9e83e6b1bb55bf1f5a2bc40d52 bc-1.2.5.tar.lz
|
||||
"
|
29
base/bison/bison.SMBuild
Executable file
29
base/bison/bison.SMBuild
Executable file
|
@ -0,0 +1,29 @@
|
|||
APP=bison
|
||||
VERSION=3.1
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.gnu.org/software/bison/bison.html'
|
||||
DOWNLOAD='https://ftp.gnu.org/gnu/bison/bison-3.1.tar.xz'
|
||||
DESC="parser generator similar to yacc"
|
||||
REQUIRES="m4"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--disable-nls
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
cfc0fd081892dfde34f0f1d5530db02c6160fb9c9efdc7da774c9150848456b14877fcc5f67e384cb6b1a85d174dd9cfb55ce852739fd949304f880a854765fe bison-3.1.tar.lz
|
||||
"
|
11
base/boost/boost-execinfo.patch
Normal file
11
base/boost/boost-execinfo.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- boost_1_60_0.org/tools/build/src/engine/execunix.c 2013-01-04 09:45:43.165000002 +0000
|
||||
+++ boost_1_60_0/tools/build/src/engine/execunix.c 2013-01-04 09:46:20.095000004 +0000
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <sys/times.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
-#if defined(sun) || defined(__sun)
|
||||
+#if defined(sun) || defined(__sun) || defined(__GLIBC__)
|
||||
#include <wait.h>
|
||||
#endif
|
||||
|
36
base/boost/boost.SMBuild
Executable file
36
base/boost/boost.SMBuild
Executable file
|
@ -0,0 +1,36 @@
|
|||
APP=boost
|
||||
VERSION=1_69_0
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.boost.org/'
|
||||
REQUIRES="bzip2 zlib findutils python3 icu xz"
|
||||
DESC="Huge collection of free peer-reviewed portable C++ source libraries"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf "$APP"_"$VERSION"
|
||||
|
||||
tar xf $SRCDIR/"$APP"_"$VERSION".tar.?z*
|
||||
cd "$APP"_"$VERSION"
|
||||
chown -R root.root .
|
||||
|
||||
patch -p1 < $SRCDIR/boost-execinfo.patch
|
||||
|
||||
unset CXX
|
||||
# Also symlink <toolchain>-gcc-6.3.0 to gcc-6.3.0 and <toolchain>-g++ to g++-6.3.0
|
||||
|
||||
CC="$CC" \
|
||||
./bootstrap.sh \
|
||||
--prefix="$PKG" \
|
||||
|
||||
./b2 -j3 toolset=gcc-foo -d+2 stage threading=multi link=shared || true
|
||||
./b2 -j3 -d+2 install threading=multi link=shared || true
|
||||
|
||||
cp LICENSE_1_0.txt $PKGDOCS/LICENSE
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552 boost_1_69_0.tar.bz2
|
||||
16d8d072adb9073f240e3f7ff73591d3867681c4ba47f6f9f7d064e367b45a97e1f757ff01e489d0d834382670f9e9658755754d0e0dce62b08e6045c1f8605a boost-execinfo.patch
|
||||
"
|
32
base/brotli/brotli.SMBuild
Executable file
32
base/brotli/brotli.SMBuild
Executable file
|
@ -0,0 +1,32 @@
|
|||
APP=brotli
|
||||
VERSION=1.0.7
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://github.com/google/brotli"
|
||||
DOWNLOAD="https://github.com/google/brotli/archive/refs/tags/v1.0.7.tar.gz"
|
||||
REQUIRES="musl"
|
||||
DESC="Generic-purpose lossless compression algorithm based on LZ77, Huffman coding and 2nd order context modeling"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./bootstrap
|
||||
|
||||
./configure \
|
||||
--prefix=""
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp LICENSE $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
74c138ff3cd31185daed65666afb163279d2766d367bff9f3133252467772e47450b4b5dee9476d2cad4198d8e613739673de54648252b9d5e0887be5d87ca5d brotli-1.0.7.tar.lz
|
||||
"
|
37
base/bubblewrap/bubblewrap.SMBuild
Executable file
37
base/bubblewrap/bubblewrap.SMBuild
Executable file
|
@ -0,0 +1,37 @@
|
|||
APP=bubblewrap
|
||||
VERSION=0.4.1
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://github.com/containers/bubblewrap'
|
||||
DOWNLOAD=''
|
||||
DESC="Unprivileged sandboxing tool to reduce attack surfaces"
|
||||
REQUIRES="libcap"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
patch -p1 < $SRCDIR/realpath-workaround.patch
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--with-priv-mode=setuid \
|
||||
--disable-man
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
0ff46dc0fda2d0cffbb36cc52ff43951b30cbd835a42cc56806acbbbd827796bfadbb1cfafc84d6b47a72c031ca44abe1c377acc0cc25fe3b33e854f5f687d35 bubblewrap-0.4.1.tar.xz
|
||||
7e8395aa7801263056b0c072194240f0ae1ee1a3b0acd874baf112a7b7b5e53ac5f688ece9099067bfc1e28e52e81f107964a3288a615cc1eedb1af5f82bbd8e realpath-workaround.patch
|
||||
"
|
53
base/bubblewrap/realpath-workaround.patch
Normal file
53
base/bubblewrap/realpath-workaround.patch
Normal file
|
@ -0,0 +1,53 @@
|
|||
Musl realpath() implementation currently depends on /proc which is
|
||||
not available when setting up pivot root. For the time being just
|
||||
fallback to a naive normalization algorithm originated from
|
||||
VoidLinux' xbps. If there was path that would have required advanced
|
||||
normalizing as provided by realpath() the following parse_mountinfo()
|
||||
will fail.
|
||||
|
||||
|
||||
diff --git bind-mount.c.orig bind-mount.c
|
||||
index 045fa0e..d05b540 100644
|
||||
--- ./bind-mount.c.orig
|
||||
+++ ./bind-mount.c
|
||||
@@ -23,6 +23,28 @@
|
||||
#include "utils.h"
|
||||
#include "bind-mount.h"
|
||||
|
||||
+#ifndef __GLIBC__
|
||||
+static char *
|
||||
+normpath(char *path)
|
||||
+{
|
||||
+ char *seg = NULL, *p = NULL;
|
||||
+
|
||||
+ for (p = path, seg = NULL; *p; p++) {
|
||||
+ if (strncmp(p, "/../", 4) == 0 || strncmp(p, "/..", 4) == 0) {
|
||||
+ memmove(seg ? seg : p, p+3, strlen(p+3) + 1);
|
||||
+ return normpath(path);
|
||||
+ } else if (strncmp(p, "/./", 3) == 0 || strncmp(p, "/.", 3) == 0) {
|
||||
+ memmove(p, p+2, strlen(p+2) + 1);
|
||||
+ } else if (strncmp(p, "//", 2) == 0 || strncmp(p, "/", 2) == 0) {
|
||||
+ memmove(p, p+1, strlen(p+1) + 1);
|
||||
+ }
|
||||
+ if (*p == '/')
|
||||
+ seg = p;
|
||||
+ }
|
||||
+ return path;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static char *
|
||||
skip_token (char *line, bool eat_whitespace)
|
||||
{
|
||||
@@ -397,7 +419,11 @@ bind_mount (int proc_fd,
|
||||
path, so to find it in the mount table we need to do that too. */
|
||||
resolved_dest = realpath (dest, NULL);
|
||||
if (resolved_dest == NULL)
|
||||
+#ifdef __GLIBC__
|
||||
return 2;
|
||||
+#else
|
||||
+ resolved_dest = normpath(strdup(dest));
|
||||
+#endif
|
||||
|
||||
mount_tab = parse_mountinfo (proc_fd, resolved_dest);
|
||||
if (mount_tab[0].mountpoint == NULL)
|
47
base/busybox/busybox-blowfish.patch
Normal file
47
base/busybox/busybox-blowfish.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- a/libbb/pw_encrypt.c
|
||||
+++ b/libbb/pw_encrypt.c
|
||||
@@ -57,9 +57,20 @@
|
||||
* Need to be case-insensitive in the code below.
|
||||
*/
|
||||
if ((algo[0]|0x20) != 'd') { /* not des */
|
||||
- len = 8/2; /* so far assuming md5 */
|
||||
*salt_ptr++ = '$';
|
||||
- *salt_ptr++ = '1';
|
||||
+ if(algo[0] == 'b') {
|
||||
+ // blowfish
|
||||
+ *salt_ptr++ = '2';
|
||||
+ *salt_ptr++ = 'a';
|
||||
+ *salt_ptr++ = '$';
|
||||
+ // 8 rounds
|
||||
+ *salt_ptr++ = '0';
|
||||
+ *salt_ptr++ = '8';
|
||||
+ len = 22/2;
|
||||
+ } else {
|
||||
+ *salt_ptr++ = '1';
|
||||
+ if (algo[0] == 'm') len = 8/2; /* so far assuming md5 */
|
||||
+ }
|
||||
*salt_ptr++ = '$';
|
||||
#if !ENABLE_USE_BB_CRYPT || ENABLE_USE_BB_CRYPT_SHA
|
||||
if ((algo[0]|0x20) == 's') { /* sha */
|
||||
@@ -99,6 +110,11 @@
|
||||
/* Other advanced crypt ids (TODO?): */
|
||||
/* $2$ or $2a$: Blowfish */
|
||||
|
||||
+static char *bf_crypt(const char *key, const char *salt) {
|
||||
+ // use musl-builtin crypt
|
||||
+ return crypt(key, salt);
|
||||
+}
|
||||
+
|
||||
static struct const_des_ctx *des_cctx;
|
||||
static struct des_ctx *des_ctx;
|
||||
|
||||
@@ -113,7 +129,8 @@
|
||||
if (salt[1] == '5' || salt[1] == '6')
|
||||
return sha_crypt((char*)key, (char*)salt);
|
||||
#endif
|
||||
- }
|
||||
+ } else if (salt[0] == '$' && salt[1] == '2' && salt[2] == 'a' && salt[3] == '$')
|
||||
+ return bf_crypt(key, salt);
|
||||
|
||||
if (!des_cctx)
|
||||
des_cctx = const_des_init();
|
22
base/busybox/busybox-fdisk-sector-size.patch
Normal file
22
base/busybox/busybox-fdisk-sector-size.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- a/util-linux/fdisk.c
|
||||
+++ b/util-linux/fdisk.c
|
||||
@@ -166,17 +166,8 @@
|
||||
|
||||
|
||||
typedef unsigned long long ullong;
|
||||
-/* Used for sector numbers. Partition formats we know
|
||||
- * do not support more than 2^32 sectors
|
||||
- */
|
||||
-typedef uint32_t sector_t;
|
||||
-#if UINT_MAX == 4294967295
|
||||
-# define SECT_FMT ""
|
||||
-#elif ULONG_MAX == 4294967295
|
||||
-# define SECT_FMT "l"
|
||||
-#else
|
||||
-# error Cant detect sizeof(uint32_t)
|
||||
-#endif
|
||||
+typedef uint64_t sector_t;
|
||||
+#define SECT_FMT "ll"
|
||||
|
||||
struct hd_geometry {
|
||||
unsigned char heads;
|
20
base/busybox/busybox-libbb-make-unicode-printable.patch
Normal file
20
base/busybox/busybox-libbb-make-unicode-printable.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/libbb/printable_string.c
|
||||
+++ b/libbb/printable_string.c
|
||||
@@ -28,8 +28,6 @@
|
||||
}
|
||||
if (c < ' ')
|
||||
break;
|
||||
- if (c >= 0x7f)
|
||||
- break;
|
||||
s++;
|
||||
}
|
||||
|
||||
@@ -42,7 +40,7 @@
|
||||
unsigned char c = *d;
|
||||
if (c == '\0')
|
||||
break;
|
||||
- if (c < ' ' || c >= 0x7f)
|
||||
+ if (c < ' ')
|
||||
*d = '?';
|
||||
d++;
|
||||
}
|
191
base/busybox/busybox-ping.patch
Normal file
191
base/busybox/busybox-ping.patch
Normal file
|
@ -0,0 +1,191 @@
|
|||
diff --git a/networking/ping.c b/networking/ping.c
|
||||
index 94fb007..0d83b66 100644
|
||||
--- a/networking/ping.c
|
||||
+++ b/networking/ping.c
|
||||
@@ -155,6 +155,7 @@ enum {
|
||||
pingsock = 0,
|
||||
};
|
||||
|
||||
+static int using_dgram;
|
||||
static void
|
||||
#if ENABLE_PING6
|
||||
create_icmp_socket(len_and_sockaddr *lsa)
|
||||
@@ -171,9 +172,23 @@ create_icmp_socket(void)
|
||||
#endif
|
||||
sock = socket(AF_INET, SOCK_RAW, 1); /* 1 == ICMP */
|
||||
if (sock < 0) {
|
||||
- if (errno == EPERM)
|
||||
- bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
|
||||
- bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket);
|
||||
+ if (errno != EPERM)
|
||||
+ bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket);
|
||||
+#if defined(__linux__) || defined(__APPLE__)
|
||||
+ /* We don't have root privileges. Try SOCK_DGRAM instead.
|
||||
+ * Linux needs net.ipv4.ping_group_range for this to work.
|
||||
+ * MacOSX allows ICMP_ECHO, ICMP_TSTAMP or ICMP_MASKREQ
|
||||
+ */
|
||||
+#if ENABLE_PING6
|
||||
+ if (lsa->u.sa.sa_family == AF_INET6)
|
||||
+ sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6);
|
||||
+ else
|
||||
+#endif
|
||||
+ sock = socket(AF_INET, SOCK_DGRAM, 1); /* 1 == ICMP */
|
||||
+ if (sock < 0)
|
||||
+#endif
|
||||
+ bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
|
||||
+ using_dgram = 1;
|
||||
}
|
||||
|
||||
xmove_fd(sock, pingsock);
|
||||
@@ -226,12 +241,14 @@ static void ping4(len_and_sockaddr *lsa)
|
||||
bb_perror_msg("recvfrom");
|
||||
continue;
|
||||
}
|
||||
- if (c >= 76) { /* ip + icmp */
|
||||
- struct iphdr *iphdr = (struct iphdr *) G.packet;
|
||||
-
|
||||
- pkt = (struct icmp *) (G.packet + (iphdr->ihl << 2)); /* skip ip hdr */
|
||||
- if (pkt->icmp_id != G.myid)
|
||||
- continue; /* not our ping */
|
||||
+ if (c >= 76 || using_dgram && (c == 64)) { /* ip + icmp */
|
||||
+ if(!using_dgram) {
|
||||
+ struct iphdr *iphdr = (struct iphdr *) G.packet;
|
||||
+
|
||||
+ pkt = (struct icmp *) (G.packet + (iphdr->ihl << 2)); /* skip ip hdr */
|
||||
+ if (pkt->icmp_id != G.myid)
|
||||
+ continue; /* not our ping */
|
||||
+ } else pkt = (struct icmp *) G.packet;
|
||||
if (pkt->icmp_type == ICMP_ECHOREPLY)
|
||||
break;
|
||||
}
|
||||
@@ -627,19 +644,21 @@ static void unpack_tail(int sz, uint32_t *tp,
|
||||
}
|
||||
static void unpack4(char *buf, int sz, struct sockaddr_in *from)
|
||||
{
|
||||
- struct icmp *icmppkt;
|
||||
struct iphdr *iphdr;
|
||||
+ struct icmp *icmppkt;
|
||||
int hlen;
|
||||
|
||||
/* discard if too short */
|
||||
if (sz < (datalen + ICMP_MINLEN))
|
||||
return;
|
||||
+ if(!using_dgram) {
|
||||
+ /* check IP header */
|
||||
+ iphdr = (struct iphdr *) buf;
|
||||
+ hlen = iphdr->ihl << 2;
|
||||
+ sz -= hlen;
|
||||
+ icmppkt = (struct icmp *) (buf + hlen);
|
||||
+ } else icmppkt = (struct icmp *) buf;
|
||||
|
||||
- /* check IP header */
|
||||
- iphdr = (struct iphdr *) buf;
|
||||
- hlen = iphdr->ihl << 2;
|
||||
- sz -= hlen;
|
||||
- icmppkt = (struct icmp *) (buf + hlen);
|
||||
if (icmppkt->icmp_id != myid)
|
||||
return; /* not our ping */
|
||||
|
||||
@@ -651,7 +670,7 @@ static void unpack4(char *buf, int sz, struct sockaddr_in *from)
|
||||
tp = (uint32_t *) icmppkt->icmp_data;
|
||||
unpack_tail(sz, tp,
|
||||
inet_ntoa(*(struct in_addr *) &from->sin_addr.s_addr),
|
||||
- recv_seq, iphdr->ttl);
|
||||
+ recv_seq, using_dgram ? 42 : iphdr->ttl);
|
||||
} else if (icmppkt->icmp_type != ICMP_ECHO) {
|
||||
bb_error_msg("warning: got ICMP %d (%s)",
|
||||
icmppkt->icmp_type,
|
||||
@@ -695,11 +714,31 @@ static void ping4(len_and_sockaddr *lsa)
|
||||
int sockopt;
|
||||
|
||||
pingaddr.sin = lsa->u.sin;
|
||||
- if (source_lsa) {
|
||||
+ if (source_lsa && !using_dgram) {
|
||||
if (setsockopt(pingsock, IPPROTO_IP, IP_MULTICAST_IF,
|
||||
&source_lsa->u.sa, source_lsa->len))
|
||||
bb_error_msg_and_die("can't set multicast source interface");
|
||||
xbind(pingsock, &source_lsa->u.sa, source_lsa->len);
|
||||
+ } else if(using_dgram) {
|
||||
+ struct sockaddr_in sa;
|
||||
+ socklen_t sl;
|
||||
+
|
||||
+ sa.sin_family = AF_INET;
|
||||
+ sa.sin_port = 0;
|
||||
+ sa.sin_addr.s_addr = source_lsa ?
|
||||
+ source_lsa->u.sin.sin_addr.s_addr : 0;
|
||||
+ sl = sizeof(sa);
|
||||
+
|
||||
+ if (bind(pingsock, (struct sockaddr *) &sa, sl) == -1) {
|
||||
+ perror("bind");
|
||||
+ exit(2);
|
||||
+ }
|
||||
+
|
||||
+ if (getsockname(pingsock, (struct sockaddr *) &sa, &sl) == -1) {
|
||||
+ perror("getsockname");
|
||||
+ exit(2);
|
||||
+ }
|
||||
+ myid = sa.sin_port;
|
||||
}
|
||||
|
||||
/* enable broadcast pings */
|
||||
@@ -716,6 +755,15 @@ static void ping4(len_and_sockaddr *lsa)
|
||||
setsockopt_int(pingsock, IPPROTO_IP, IP_MULTICAST_TTL, opt_ttl);
|
||||
}
|
||||
|
||||
+ if(using_dgram) {
|
||||
+ int hold = 65536;
|
||||
+ if (setsockopt(pingsock, SOL_IP, IP_RECVTTL, (char *)&hold, sizeof(hold)))
|
||||
+ perror("WARNING: setsockopt(IP_RECVTTL)");
|
||||
+ if (setsockopt(pingsock, SOL_IP, IP_RETOPTS, (char *)&hold, sizeof(hold)))
|
||||
+ perror("WARNING: setsockopt(IP_RETOPTS)");
|
||||
+
|
||||
+ }
|
||||
+
|
||||
signal(SIGINT, print_stats_and_exit);
|
||||
|
||||
/* start the ping's going ... */
|
||||
@@ -749,10 +797,33 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
char control_buf[CMSG_SPACE(36)];
|
||||
|
||||
pingaddr.sin6 = lsa->u.sin6;
|
||||
- if (source_lsa)
|
||||
+ if (source_lsa && !using_dgram)
|
||||
xbind(pingsock, &source_lsa->u.sa, source_lsa->len);
|
||||
+ else if(using_dgram) {
|
||||
+ struct sockaddr_in6 sa = {0};
|
||||
+ socklen_t sl;
|
||||
+
|
||||
+ sa.sin6_family = AF_INET6;
|
||||
+ sa.sin6_port = 0;
|
||||
+ if(source_lsa) {
|
||||
+ memcpy(&sa.sin6_addr, &source_lsa->u.sin6.sin6_addr, sizeof(struct in6_addr));
|
||||
+ }
|
||||
+ sl = sizeof(sa);
|
||||
+
|
||||
+ if (bind(pingsock, (struct sockaddr *) &sa, sl) == -1) {
|
||||
+ perror("bind");
|
||||
+ exit(2);
|
||||
+ }
|
||||
+
|
||||
+ if (getsockname(pingsock, (struct sockaddr *) &sa, &sl) == -1) {
|
||||
+ perror("getsockname");
|
||||
+ exit(2);
|
||||
+ }
|
||||
+ myid = sa.sin6_port;
|
||||
+ }
|
||||
|
||||
#ifdef ICMP6_FILTER
|
||||
+ if(!using_dgram)
|
||||
{
|
||||
struct icmp6_filter filt;
|
||||
if (!(option_mask32 & OPT_VERBOSE)) {
|
||||
@@ -880,7 +951,7 @@ static int common_ping_main(int opt, char **argv)
|
||||
if (opt & OPT_p)
|
||||
G.pattern = xstrtou_range(str_p, 16, 0, 255);
|
||||
|
||||
- myid = (uint16_t) getpid();
|
||||
+ if(!using_dgram) myid = (uint16_t) getpid();
|
||||
hostname = argv[optind];
|
||||
#if ENABLE_PING6
|
||||
{
|
||||
|
59
base/busybox/busybox.SMBuild
Executable file
59
base/busybox/busybox.SMBuild
Executable file
|
@ -0,0 +1,59 @@
|
|||
APP=busybox
|
||||
VERSION=1.27.2
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://www.busybox.net/"
|
||||
DOWNLOAD="https://www.busybox.net/downloads/busybox-1.27.2.tar.bz2"
|
||||
REQUIRES="musl"
|
||||
DESC="Swiss army knife of embedded linux providing subsets of common UNIX utilities"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
# taken from sabotage linux
|
||||
patch -p1 < $SRCDIR/busybox-blowfish.patch
|
||||
patch -p1 < $SRCDIR/busybox-fdisk-sector-size.patch
|
||||
patch -p1 < $SRCDIR/busybox-libbb-make-unicode-printable.patch
|
||||
patch -p1 < $SRCDIR/busybox-ping.patch
|
||||
|
||||
cp $SRCDIR/busybox.config .config
|
||||
make CC="$CC"
|
||||
|
||||
install -Dm 755 busybox $PKG/bin/busybox
|
||||
|
||||
cp LICENSE $PKGDOCS/
|
||||
|
||||
cd $PKG/bin
|
||||
|
||||
for f in ntpd hwclock passwd udhcpc udhcpd route ifconfig \
|
||||
telnet telnetd tftp microcom netstat killall5 setfont \
|
||||
loadkmap wall ipcalc iostat brctl arp \
|
||||
su login init chpst sv svc runsv runsvdir halt reboot poweroff getty \
|
||||
adduser addgroup deluser delgroup mdev rev;
|
||||
do ln -s busybox "$f";
|
||||
done
|
||||
|
||||
install -Dm 755 $SRCDIR/udhcpc-script $PKG/etc/udhcpc-script
|
||||
install -Dm 755 $SRCDIR/dhclient $PKG/bin/dhclient
|
||||
|
||||
mkdir -p $PKG/share/man/man8
|
||||
for f in sv runsvchdir chpst runsvdir runit runsv runit ;
|
||||
do cp $SRCDIR/runit-man/$f.8 $PKG/share/man/man8/
|
||||
done
|
||||
|
||||
echo "server pool.ntp.org" > $PKG/etc/ntp.conf
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
b75f66680a0fa6fd409f5070ced57d8babd02bdf3e1a194d749a2acbc5842d2474d98e5368fe9831e5e560ed5320a914357a96b2f0a0b9653c2540f7801ea198 busybox-1.27.2.tar.lz
|
||||
4380794dab5bc3e6a82b18d2556bbe647503382acb33d3c82baacae166d3a6fc877b4d07b15512678c2c9868fb28f67b43b0fd804b72e3c4ee441d9108f5c5b4 busybox-blowfish.patch
|
||||
8e1c116cde322f35b2a122f0c333ef36ef06334c7c0c504a8abd7f9c805d2d3c25d455d8e20ed46e960ed6dec4b543973528c948cf24ac1e02c9730d894802a5 busybox-fdisk-sector-size.patch
|
||||
bee4d54bd2e740866c0eb21777767813c5789b233ed85878a96cfd459338f710abc5107fb5abb412e22f7be895c914818729fe6453cddecd99eb3241528c0d48 busybox-libbb-make-unicode-printable.patch
|
||||
1057badba69fbdf98392253ae777f92c991af35cc09f094329e509cb18e668a47f0c4b2cfc7fd698c2c93c07b02833862dbc008381b753715ef6f0904b7f9b23 busybox-ping.patch
|
||||
"
|
1135
base/busybox/busybox.config
Normal file
1135
base/busybox/busybox.config
Normal file
File diff suppressed because it is too large
Load diff
11
base/busybox/dhclient
Executable file
11
base/busybox/dhclient
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
if [ -z "$1" ] ; then
|
||||
echo usage: $0 [interface]
|
||||
echo i.e. $0 eth0
|
||||
echo i.e. $0 wlan0
|
||||
exit 1
|
||||
fi
|
||||
interface="$1"
|
||||
retries=3
|
||||
/bin/udhcpc -t $retries -n -i "$interface" -s /etc/udhcpc-script -x hostname=$(hostname)
|
||||
|
265
base/busybox/runit-man/chpst.8
Normal file
265
base/busybox/runit-man/chpst.8
Normal file
|
@ -0,0 +1,265 @@
|
|||
.TH chpst 8
|
||||
.SH NAME
|
||||
chpst \- runs a program with a changed process state
|
||||
.SH SYNOPSIS
|
||||
.B chpst
|
||||
[\-vP012]
|
||||
[\-u
|
||||
.IR user ]
|
||||
[\-U
|
||||
.IR user ]
|
||||
[\-b
|
||||
.IR argv0 ]
|
||||
[-e
|
||||
.IR dir ]
|
||||
[\-/
|
||||
.IR root ]
|
||||
[\-n
|
||||
.IR inc ]
|
||||
[-l|-L
|
||||
.IR lock ]
|
||||
[-m
|
||||
.IR bytes ]
|
||||
[-d
|
||||
.IR bytes ]
|
||||
[-o
|
||||
.IR n ]
|
||||
[-p
|
||||
.IR n ]
|
||||
[-f
|
||||
.IR bytes ]
|
||||
[-c
|
||||
.IR bytes ]
|
||||
.I prog
|
||||
.SH DESCRIPTION
|
||||
.I prog
|
||||
consists of one or more arguments.
|
||||
.P
|
||||
.B chpst
|
||||
changes the process state according to the given options, and runs
|
||||
.IR prog .
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-u \fI[:]user[:group]
|
||||
setuidgid.
|
||||
Set uid and gid to the
|
||||
.IR user 's
|
||||
uid and gid, as found in
|
||||
.IR /etc/passwd .
|
||||
If
|
||||
.I user
|
||||
is followed by a colon and a
|
||||
.IR group ,
|
||||
set the gid to
|
||||
.IR group 's
|
||||
gid, as found in
|
||||
.IR /etc/group ,
|
||||
instead of
|
||||
.IR user 's
|
||||
gid.
|
||||
If
|
||||
.I group
|
||||
consists of a colon-separated list of group names,
|
||||
.B chpst
|
||||
sets the group ids of all listed groups.
|
||||
If
|
||||
.I user
|
||||
is prefixed with a colon, the
|
||||
.I user
|
||||
and all
|
||||
.I group
|
||||
arguments are interpreted as uid and gids respectivly, and not looked up in
|
||||
the password or group file.
|
||||
All initial supplementary groups are removed.
|
||||
.TP
|
||||
.B \-U \fI[:]user[:group]
|
||||
envuidgid.
|
||||
Set the environment variables $UID and $GID to the
|
||||
.IR user 's
|
||||
uid and gid, as found in
|
||||
.IR /etc/passwd .
|
||||
If
|
||||
.I user
|
||||
is followed by a colon and a
|
||||
.IR group ,
|
||||
set $GID to the
|
||||
.IR group 's
|
||||
gid, as found in
|
||||
.IR /etc/group ,
|
||||
instead of
|
||||
.IR user 's
|
||||
gid.
|
||||
If
|
||||
.I user
|
||||
is prefixed with a colon, the
|
||||
.I user
|
||||
and
|
||||
.I group
|
||||
arguments are interpreted as uid and gid respectivly, and not looked up in
|
||||
the password or group file.
|
||||
.TP
|
||||
.B \-b \fIargv0
|
||||
argv0.
|
||||
Run
|
||||
.I prog
|
||||
with
|
||||
.I argv0
|
||||
as the 0th argument.
|
||||
.TP
|
||||
.B \-e \fIdir
|
||||
envdir.
|
||||
Set various environment variables as specified by files in the directory
|
||||
.IR dir :
|
||||
If
|
||||
.I dir
|
||||
contains a file named
|
||||
.I k
|
||||
whose first line is
|
||||
.IR v ,
|
||||
.B chpst
|
||||
removes the environment variable
|
||||
.I k
|
||||
if it exists, and then adds the environment variable
|
||||
.I k
|
||||
with the value
|
||||
.IR v .
|
||||
The name
|
||||
.I k
|
||||
must not contain =.
|
||||
Spaces and tabs at the end of
|
||||
.I v
|
||||
are removed, and nulls in
|
||||
.I v
|
||||
are changed to newlines.
|
||||
If the file
|
||||
.I k
|
||||
is empty (0 bytes long),
|
||||
.B chpst
|
||||
removes the environment variable
|
||||
.I k
|
||||
if it exists, without adding a new variable.
|
||||
.TP
|
||||
.B \-/ \fIroot
|
||||
chroot.
|
||||
Change the root directory to
|
||||
.I root
|
||||
before starting
|
||||
.IR prog .
|
||||
.TP
|
||||
.B \-n \fIinc
|
||||
nice.
|
||||
Add
|
||||
.I inc
|
||||
to the
|
||||
.BR nice (2)
|
||||
value before starting
|
||||
.IR prog .
|
||||
.I inc
|
||||
must be an integer, and may start with a minus or plus.
|
||||
.TP
|
||||
.B \-l \fIlock
|
||||
lock.
|
||||
Open the file
|
||||
.I lock
|
||||
for writing, and obtain an exclusive lock on it.
|
||||
.I lock
|
||||
will be created if it does not exist.
|
||||
If
|
||||
.I lock
|
||||
is locked by another process, wait until a new lock can be obtained.
|
||||
.TP
|
||||
.B \-L \fIlock
|
||||
The same as \-l, but fail immediately if
|
||||
.I lock
|
||||
is locked by another process.
|
||||
.TP
|
||||
.B \-m \fIbytes
|
||||
limit memory.
|
||||
Limit the data segment, stack segment, locked physical pages, and total of
|
||||
all segment per process to
|
||||
.I bytes
|
||||
bytes each.
|
||||
.TP
|
||||
.B \-d \fIbytes
|
||||
limit data segment.
|
||||
Limit the data segment per process to
|
||||
.I bytes
|
||||
bytes.
|
||||
.TP
|
||||
.B \-o \fIn
|
||||
limit open files.
|
||||
Limit the number of open file descriptors per process to
|
||||
.IR n .
|
||||
.TP
|
||||
.B \-p \fIn
|
||||
limit processes.
|
||||
Limit the number of processes per uid to
|
||||
.IR n .
|
||||
.TP
|
||||
.B \-f \fIbytes
|
||||
limit output size.
|
||||
Limit the output file size to
|
||||
.I bytes
|
||||
bytes.
|
||||
.TP
|
||||
.B \-c \fIbytes
|
||||
limit core size.
|
||||
Limit the core file size to
|
||||
.I bytes
|
||||
bytes.
|
||||
.TP
|
||||
.B \-v
|
||||
verbose.
|
||||
Print verbose messages to standard error.
|
||||
This includes warnings about limits unsupported by the system.
|
||||
.TP
|
||||
.B \-P
|
||||
pgrphack.
|
||||
Run
|
||||
.I prog
|
||||
in a new process group.
|
||||
.TP
|
||||
.B \-0
|
||||
Close standard input before starting
|
||||
.IR prog .
|
||||
.TP
|
||||
.B \-1
|
||||
Close standard output before starting
|
||||
.IR prog .
|
||||
.TP
|
||||
.B \-2
|
||||
Close standard error before starting
|
||||
.IR prog .
|
||||
.SH EXIT CODES
|
||||
.B chpst
|
||||
exits 100 when called with wrong options.
|
||||
It prints an error message and exits 111 if it has trouble changing the
|
||||
process state.
|
||||
Otherwise its exit code is the same as that of
|
||||
.IR prog .
|
||||
.SH EMULATION
|
||||
If
|
||||
.B chpst
|
||||
is called as
|
||||
.BR envdir ,
|
||||
.BR envuidgid ,
|
||||
.BR pgrphack ,
|
||||
.BR setlock ,
|
||||
.BR setuidgid ,
|
||||
or
|
||||
.BR softlimit ,
|
||||
it emulates the functionality of these programs from the daemontools package
|
||||
respectively.
|
||||
.SH SEE ALSO
|
||||
sv(8),
|
||||
runsv(8),
|
||||
setsid(2),
|
||||
runit(8),
|
||||
runit-init(8),
|
||||
runsvdir(8),
|
||||
runsvchdir(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
http://cr.yp.to/daemontools.html
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
63
base/busybox/runit-man/runit-init.8
Normal file
63
base/busybox/runit-man/runit-init.8
Normal file
|
@ -0,0 +1,63 @@
|
|||
.TH runit-init 8
|
||||
.SH NAME
|
||||
init \- a UNIX process no 1
|
||||
.SH SYNOPSIS
|
||||
.B init
|
||||
[ 0 | 6 ]
|
||||
.SH DESCRIPTION
|
||||
.B runit-init
|
||||
is the first process the kernel starts.
|
||||
If
|
||||
.B runit-init
|
||||
is started as process no 1, it runs and replaces itself with
|
||||
.BR runit (8).
|
||||
.P
|
||||
If
|
||||
.B runit-init
|
||||
is started while the system is up, it must be either called as
|
||||
.B init 0
|
||||
or
|
||||
.B init 6\fR:
|
||||
.TP
|
||||
.B init 0
|
||||
tells the Unix process no 1 to shutdown and halt the system.
|
||||
To signal
|
||||
.BR runit (8)
|
||||
the system halt request,
|
||||
.B runit-init
|
||||
removes all permissions of the file
|
||||
.I /etc/runit/reboot
|
||||
(chmod 0), and sets the execute by owner permission of the file
|
||||
.I /etc/runit/stopit
|
||||
(chmod 100).
|
||||
Then a CONT signal is sent to
|
||||
.BR runit (8).
|
||||
.TP
|
||||
.B init 6
|
||||
tells the Unix process no 1 to shutdown and reboot the system.
|
||||
To signal
|
||||
.BR runit (8)
|
||||
the system reboot request,
|
||||
.B runit-init
|
||||
sets the execute by owner permission of the files
|
||||
.I /etc/runit/reboot
|
||||
and
|
||||
.I /etc/runit/stopit
|
||||
(chmod 100). Then a CONT signal is sent to
|
||||
.BR runit (8).
|
||||
.SH EXIT CODES
|
||||
.B runit-init
|
||||
returns 111 on error, 0 in all other cases.
|
||||
.SH SEE ALSO
|
||||
runit(8),
|
||||
runsvdir(8),
|
||||
runsvchdir(8),
|
||||
sv(8),
|
||||
runsv(8),
|
||||
chpst(8),
|
||||
utmpset(8),
|
||||
svlogd(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
88
base/busybox/runit-man/runit.8
Normal file
88
base/busybox/runit-man/runit.8
Normal file
|
@ -0,0 +1,88 @@
|
|||
.TH runit 8
|
||||
.SH NAME
|
||||
runit \- a UNIX process no 1
|
||||
.SH SYNOPSIS
|
||||
.B runit
|
||||
.SH DESCRIPTION
|
||||
.B runit
|
||||
must be run as Unix process no 1.
|
||||
It performs the system's booting, running, and shutdown in three stages:
|
||||
.SH STAGE 1
|
||||
.B runit
|
||||
runs
|
||||
.I /etc/runit/1
|
||||
and waits for it to terminate.
|
||||
The system's one time tasks are done here.
|
||||
.I /etc/runit/1
|
||||
has full control of
|
||||
.I /dev/console
|
||||
to be able to start an emergency shell if the one time initialization tasks
|
||||
fail. If
|
||||
.I /etc/runit/1
|
||||
crashes, or exits 100,
|
||||
.B runit
|
||||
will skip stage 2 and enter stage 3.
|
||||
.SH STAGE 2
|
||||
.B runit
|
||||
runs
|
||||
.IR /etc/runit/2 ,
|
||||
which should not return until system shutdown; if it crashes, or exits 111,
|
||||
it will be restarted.
|
||||
Normally
|
||||
.I /etc/runit/2
|
||||
starts
|
||||
.BR runsvdir (8).
|
||||
.B runit
|
||||
is able to handle the ctrl-alt-del keyboard request in stage 2, see below.
|
||||
.SH STAGE 3
|
||||
If
|
||||
.B runit
|
||||
is told to shutdown the system, or stage 2 returns, it terminates stage 2 if
|
||||
it is running, and runs
|
||||
.IR /etc/runit/3 .
|
||||
The systems tasks to shutdown and possibly halt or reboot the system are
|
||||
done here.
|
||||
If stage 3 returns,
|
||||
.B runit
|
||||
checks if the file
|
||||
.I /etc/runit/reboot
|
||||
exists and has the execute by owner permission set.
|
||||
If so, the system is rebooted, it's halted otherwise.
|
||||
.SH CTRL-ALT-DEL
|
||||
If
|
||||
.B runit
|
||||
receives the ctrl-alt-del keyboard request and the file
|
||||
.I /etc/runit/ctrlaltdel
|
||||
exists and has the execute by owner permission set,
|
||||
.B runit
|
||||
runs
|
||||
.IR /etc/runit/ctrlaltdel ,
|
||||
waits for it to terminate, and then sends itself a CONT signal.
|
||||
.SH SIGNALS
|
||||
.B runit
|
||||
only accepts signals in stage 2.
|
||||
.P
|
||||
If
|
||||
.B runit
|
||||
receives a CONT signal and the file
|
||||
.I /etc/runit/stopit
|
||||
exists and has the execute by owner permission set,
|
||||
.B runit
|
||||
is told to shutdown the system.
|
||||
.P
|
||||
if
|
||||
.B runit
|
||||
receives an INT signal, a ctrl-alt-del keyboard request is triggered.
|
||||
.SH SEE ALSO
|
||||
runit-init(8),
|
||||
runsvdir(8),
|
||||
runsvchdir(8),
|
||||
sv(8),
|
||||
runsv(8),
|
||||
chpst(8),
|
||||
utmpset(8),
|
||||
svlogd(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
225
base/busybox/runit-man/runsv.8
Normal file
225
base/busybox/runit-man/runsv.8
Normal file
|
@ -0,0 +1,225 @@
|
|||
.TH runsv 8
|
||||
.SH NAME
|
||||
runsv \- starts and monitors a service and optionally an appendant log
|
||||
service
|
||||
.SH SYNOPSIS
|
||||
.B runsv
|
||||
.I service
|
||||
.SH DESCRIPTION
|
||||
.I service
|
||||
must be a directory.
|
||||
.P
|
||||
.B runsv
|
||||
switches to the directory
|
||||
.I service
|
||||
and starts ./run.
|
||||
If ./run exits and ./finish exists,
|
||||
.B runsv
|
||||
starts ./finish.
|
||||
If ./finish doesn't exist or ./finish exits,
|
||||
.B runsv
|
||||
restarts ./run.
|
||||
.P
|
||||
If ./run or ./finish exit immediately,
|
||||
.B runsv
|
||||
waits a second before starting ./finish or restarting ./run.
|
||||
.P
|
||||
Two arguments are given to ./finish.
|
||||
The first one is ./run's exit code, or -1 if ./run didn't exit normally.
|
||||
The second one is the least significant byte of the exit status as
|
||||
determined by
|
||||
.BR waitpid (2);
|
||||
for instance it is 0 if ./run exited normally, and the signal number
|
||||
if ./run was terminated by a signal.
|
||||
If
|
||||
.B runsv
|
||||
cannot start ./run for some reason, the exit code is 111 and the status is 0.
|
||||
.P
|
||||
If the file
|
||||
.IR service /down
|
||||
exists,
|
||||
.B runsv
|
||||
does not start ./run immediately.
|
||||
The control interface (see below) can be used to start the service and to
|
||||
give other commands to
|
||||
.BR runsv .
|
||||
.P
|
||||
If the directory
|
||||
.IR service /log
|
||||
exists,
|
||||
.B runsv
|
||||
creates a pipe, redirects
|
||||
.IR service /run's
|
||||
and
|
||||
.IR service /finish's
|
||||
standard output to the pipe, switches to the directory
|
||||
.IR service /log
|
||||
and starts ./run (and ./finish) exactly as described above for the
|
||||
.I service
|
||||
directory.
|
||||
The standard input of the log service is redirected to read from the pipe.
|
||||
.P
|
||||
.B runsv
|
||||
maintains status information in a binary format (compatible to the
|
||||
daemontools'
|
||||
.B supervise
|
||||
program) in
|
||||
.IR service /supervise/status
|
||||
and
|
||||
.IR service /log/supervise/status,
|
||||
and in a human-readable format in
|
||||
.IR service /supervise/stat,
|
||||
.IR service /log/supervise/stat,
|
||||
.IR service /supervise/pid,
|
||||
.IR service /log/supervise/pid.
|
||||
.SH CONTROL
|
||||
The named pipes
|
||||
.IR service /supervise/control,
|
||||
and (optionally)
|
||||
.IR service /log/supervise/control
|
||||
are provided to give commands to
|
||||
.BR runsv .
|
||||
You can use
|
||||
.BR sv (8)
|
||||
to control the service or just write one of the following characters to
|
||||
the named pipe:
|
||||
.TP
|
||||
.B u
|
||||
Up.
|
||||
If the service is not running, start it.
|
||||
If the service stops, restart it.
|
||||
.TP
|
||||
.B d
|
||||
Down.
|
||||
If the service is running, send it a TERM signal, and then a CONT signal.
|
||||
If ./run exits, start ./finish if it exists.
|
||||
After it stops, do not restart service.
|
||||
.TP
|
||||
.B o
|
||||
Once.
|
||||
If the service is not running, start it.
|
||||
Do not restart it if it stops.
|
||||
.TP
|
||||
.B p
|
||||
Pause.
|
||||
If the service is running, send it a STOP signal.
|
||||
.TP
|
||||
.B c
|
||||
Continue.
|
||||
If the service is running, send it a CONT signal.
|
||||
.TP
|
||||
.B h
|
||||
Hangup.
|
||||
If the service is running, send it a HUP signal.
|
||||
.TP
|
||||
.B a
|
||||
Alarm.
|
||||
If the service is running, send it a ALRM signal.
|
||||
.TP
|
||||
.B i
|
||||
Interrupt.
|
||||
If the service is running, send it a INT signal.
|
||||
.TP
|
||||
.B q
|
||||
Quit.
|
||||
If the service is running, send it a QUIT signal.
|
||||
.TP
|
||||
.B 1
|
||||
User-defined 1.
|
||||
If the service is running, send it a USR1 signal.
|
||||
.TP
|
||||
.B 2
|
||||
User-defined 2.
|
||||
If the service is running, send it a USR2 signal.
|
||||
.TP
|
||||
.B t
|
||||
Terminate.
|
||||
If the service is running, send it a TERM signal.
|
||||
.TP
|
||||
.B k
|
||||
Kill.
|
||||
If the service is running, send it a KILL signal.
|
||||
.TP
|
||||
.B x
|
||||
Exit.
|
||||
If the service is running, send it a TERM signal, and then a CONT signal.
|
||||
Do not restart the service.
|
||||
If the service is down, and no log service exists,
|
||||
.B runsv
|
||||
exits.
|
||||
If the service is down and a log service exists,
|
||||
.B runsv
|
||||
closes the standard input of the log service, and waits for it to terminate.
|
||||
If the log service is down,
|
||||
.B runsv
|
||||
exits.
|
||||
This command is ignored if it is given to
|
||||
.IR service /log/supervise/control.
|
||||
.P
|
||||
Example: to send a TERM signal to the socklog-unix service, either do
|
||||
# sv term /service/socklog-unix
|
||||
or
|
||||
# printf t >/service/socklog-unix/supervise/control
|
||||
.P
|
||||
.BR printf (1)
|
||||
usually blocks if no
|
||||
.B runsv
|
||||
process is running in the service directory.
|
||||
.SH CUSTOMIZE CONTROL
|
||||
For each control character
|
||||
.I c
|
||||
sent to the control pipe,
|
||||
.B runsv
|
||||
first checks if
|
||||
.I service\fR/control/\fIc
|
||||
exists and is executable.
|
||||
If so, it starts
|
||||
.I service\fR/control/\fIc
|
||||
and waits for it to terminate, before interpreting the command.
|
||||
If the program exits with return code 0,
|
||||
.B runsv
|
||||
refrains from sending the service the corresponding signal.
|
||||
The command
|
||||
.I o
|
||||
is always considered as command
|
||||
.IR u .
|
||||
On command
|
||||
.I d
|
||||
first
|
||||
.I service\fR/control/t
|
||||
is checked, and then
|
||||
.I service\fR/control/d.
|
||||
On command
|
||||
.I x
|
||||
first
|
||||
.I service\fR/control/t
|
||||
is checked, and then
|
||||
.I service\fR/control/x.
|
||||
The control of the optional log service cannot be customized.
|
||||
.SH SIGNALS
|
||||
If
|
||||
.B runsv
|
||||
receives a TERM signal, it acts as if the character x was written to the
|
||||
control pipe.
|
||||
.SH EXIT CODES
|
||||
.B runsv
|
||||
exits 111 on an error on startup or if another
|
||||
.B runsv
|
||||
is running in
|
||||
.IR service .
|
||||
.P
|
||||
.B runsv
|
||||
exits 0 if it was told to exit.
|
||||
.SH SEE ALSO
|
||||
sv(8),
|
||||
chpst(8),
|
||||
svlogd(8),
|
||||
runit(8),
|
||||
runit-init(8),
|
||||
runsvdir(8),
|
||||
runsvchdir(8),
|
||||
utmpset(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
55
base/busybox/runit-man/runsvchdir.8
Normal file
55
base/busybox/runit-man/runsvchdir.8
Normal file
|
@ -0,0 +1,55 @@
|
|||
.TH runsvchdir 8
|
||||
.SH NAME
|
||||
runsvchdir \- change services directory of runsvdir(8)
|
||||
.SH SYNOPSIS
|
||||
.B runsvchdir
|
||||
.I dir
|
||||
.SH DESCRIPTION
|
||||
.I dir
|
||||
is a services directory for the use with
|
||||
.BR runsvdir (8).
|
||||
If
|
||||
.I dir
|
||||
does not start with a slash, it is searched in /etc/runit/runsvdir/.
|
||||
.I dir
|
||||
must not start with a dot.
|
||||
.P
|
||||
.B runsvchdir
|
||||
switches to the directory
|
||||
.IR /etc/runit/runsvdir/ ,
|
||||
copies
|
||||
.I current
|
||||
to
|
||||
.IR previous ,
|
||||
and replaces
|
||||
.I current
|
||||
with a symlink pointing to
|
||||
.IR dir .
|
||||
.P
|
||||
Normally
|
||||
.I /service
|
||||
is a symlink to
|
||||
.IR current ,
|
||||
and
|
||||
.BR runsvdir (8)
|
||||
is running
|
||||
.IR /service/ .
|
||||
.SH EXIT CODES
|
||||
.B runsvchdir
|
||||
prints an error message and exits 111 on error.
|
||||
.B runsvchdir
|
||||
exits 0 on success.
|
||||
.SH FILES
|
||||
/etc/runit/runsvdir/previous
|
||||
/etc/runit/runsvdir/current
|
||||
/etc/runit/runsvdir/current.new
|
||||
.SH SEE ALSO
|
||||
runsvdir(8),
|
||||
runit(8),
|
||||
runit-init(8),
|
||||
sv(8),
|
||||
runsv(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
102
base/busybox/runit-man/runsvdir.8
Normal file
102
base/busybox/runit-man/runsvdir.8
Normal file
|
@ -0,0 +1,102 @@
|
|||
.TH runsvdir 8
|
||||
.SH NAME
|
||||
runsvdir \- starts and monitors a collection of runsv(8) processes
|
||||
.SH SYNOPSIS
|
||||
.B runsvdir
|
||||
[\-P]
|
||||
.I dir
|
||||
[
|
||||
.I log
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.I dir
|
||||
must be a directory.
|
||||
.I log
|
||||
is a space holder for a readproctitle log, and must be at least seven
|
||||
characters long or absent.
|
||||
.P
|
||||
.B runsvdir
|
||||
starts a
|
||||
.BR runsv (8)
|
||||
process for each subdirectory, or symlink to a directory, in the services
|
||||
directory
|
||||
.IR dir ,
|
||||
up to a limit of 1000 subdirectories,
|
||||
and restarts a
|
||||
.BR runsv (8)
|
||||
process if it terminates.
|
||||
.B runsvdir
|
||||
skips subdirectory names starting with dots.
|
||||
.BR runsv (8)
|
||||
must be in
|
||||
.BR runsvdir 's
|
||||
PATH.
|
||||
.P
|
||||
At least every five seconds
|
||||
.B runsvdir
|
||||
checks whether the time of last modification, the inode, or the device, of
|
||||
the services directory
|
||||
.I dir
|
||||
has changed.
|
||||
If so, it re-scans the service directory, and if it sees a new subdirectory,
|
||||
or new symlink to a directory, in
|
||||
.IR dir ,
|
||||
it starts a new
|
||||
.BR runsv (8)
|
||||
process;
|
||||
if
|
||||
.B runsvdir
|
||||
sees a subdirectory being removed that was previously there, it sends the
|
||||
corresponding
|
||||
.BR runsv (8)
|
||||
process a TERM signal, stops monitoring this process, and so does not
|
||||
restart the
|
||||
.BR runsv (8)
|
||||
process if it exits.
|
||||
.P
|
||||
If the
|
||||
.I log
|
||||
argument is given to
|
||||
.BR runsvdir ,
|
||||
all output to standard error is redirected to this
|
||||
.IR log ,
|
||||
which is similar to the daemontools'
|
||||
.B readproctitle
|
||||
log.
|
||||
To see the most recent error messages, use a process-listing tool such as
|
||||
.BR ps (1).
|
||||
.B runsvdir
|
||||
writes a dot to the readproctitle log every 15 minutes so that old error
|
||||
messages expire.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-P
|
||||
use
|
||||
.BR setsid (2)
|
||||
to run each
|
||||
.BR runsv (8)
|
||||
process in a new session and separate process group.
|
||||
.SH SIGNALS
|
||||
If
|
||||
.B runsvdir
|
||||
receives a TERM signal, it exits with 0 immediately.
|
||||
.P
|
||||
If
|
||||
.B runsvdir
|
||||
receives a HUP signal, it sends a TERM signal to each
|
||||
.BR runsv (8)
|
||||
process it is monitoring and then exits with 111.
|
||||
.SH SEE ALSO
|
||||
sv(8),
|
||||
runsv(8),
|
||||
runsvchdir(8),
|
||||
runit(8),
|
||||
runit-init(8),
|
||||
chpst(8),
|
||||
svlogd(8),
|
||||
utmpset(8),
|
||||
setsid(2)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
285
base/busybox/runit-man/sv.8
Normal file
285
base/busybox/runit-man/sv.8
Normal file
|
@ -0,0 +1,285 @@
|
|||
.TH sv 8
|
||||
.SH NAME
|
||||
sv \- control and manage services monitored by
|
||||
.BR runsv (8)
|
||||
.SH SYNOPSIS
|
||||
.B sv
|
||||
[\-v] [\-w
|
||||
.I sec\fR]
|
||||
.I command
|
||||
.I services
|
||||
.P
|
||||
.BI /etc/init.d/ service
|
||||
[\-w
|
||||
.I sec\fR]
|
||||
.I command
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B sv
|
||||
program reports the current status and controls the state of services
|
||||
monitored by the
|
||||
.BR runsv (8)
|
||||
supervisor.
|
||||
.P
|
||||
.I services
|
||||
consists of one or more arguments, each argument naming a directory
|
||||
.I service
|
||||
used by
|
||||
.BR runsv (8).
|
||||
If
|
||||
.I service
|
||||
doesn't start with a dot or slash and doesn't end with a slash, it is
|
||||
searched in the default services directory
|
||||
.IR /service/ ,
|
||||
otherwise relative to the current directory.
|
||||
.P
|
||||
.I command
|
||||
is one of up, down, status, once, pause, cont, hup, alarm, interrupt, 1, 2,
|
||||
term, kill, or exit, or start, stop, restart, shutdown, force-stop,
|
||||
force-reload, force-restart, force-shutdown.
|
||||
.P
|
||||
The
|
||||
.B sv
|
||||
program can be sym-linked to
|
||||
.I /etc/init.d/
|
||||
to provide an LSB init script interface.
|
||||
The
|
||||
.I service
|
||||
to be controlled then is specified by the base name of the ``init script''.
|
||||
.SH COMMANDS
|
||||
.TP
|
||||
.B status
|
||||
Report the current status of the service, and the appendant log service if
|
||||
available, to standard output.
|
||||
.TP
|
||||
.B up
|
||||
If the service is not running, start it.
|
||||
If the service stops, restart it.
|
||||
.TP
|
||||
.B down
|
||||
If the service is running, send it the TERM signal, and the CONT signal.
|
||||
If ./run exits, start ./finish if it exists.
|
||||
After it stops, do not restart service.
|
||||
.TP
|
||||
.B once
|
||||
If the service is not running, start it.
|
||||
Do not restart it if it stops.
|
||||
.TP
|
||||
.B pause cont hup alarm interrupt quit 1 2 term kill
|
||||
If the service is running, send it the STOP, CONT, HUP, ALRM, INT, QUIT,
|
||||
USR1, USR2, TERM, or KILL signal respectively.
|
||||
.TP
|
||||
.B exit
|
||||
If the service is running, send it the TERM signal, and the CONT signal.
|
||||
Do not restart the service.
|
||||
If the service is down, and no log service exists,
|
||||
.BR runsv (8)
|
||||
exits.
|
||||
If the service is down and a log service exists,
|
||||
.BR runsv (8)
|
||||
closes the standard input of the log service and waits for it to terminate.
|
||||
If the log service is down,
|
||||
.BR runsv (8)
|
||||
exits.
|
||||
This command is ignored if it is given to an appendant log service.
|
||||
.P
|
||||
.BR sv
|
||||
actually looks only at the first character of these
|
||||
.IR command s.
|
||||
.SS Commands compatible to LSB init script actions
|
||||
.TP
|
||||
.B status
|
||||
Same as
|
||||
.IR status .
|
||||
.TP
|
||||
.B start
|
||||
Same as
|
||||
.IR up ,
|
||||
but wait up to 7 seconds for the command to take effect.
|
||||
Then report the status or timeout.
|
||||
If the script
|
||||
.I ./check
|
||||
exists in the service directory,
|
||||
.B sv
|
||||
runs this script to check whether the service is up and available;
|
||||
it's considered to be available if
|
||||
.I ./check
|
||||
exits with 0.
|
||||
.TP
|
||||
.B stop
|
||||
Same as
|
||||
.IR down ,
|
||||
but wait up to 7 seconds for the service to become down.
|
||||
Then report the status or timeout.
|
||||
.TP
|
||||
.B reload
|
||||
Same as
|
||||
.IR hup ,
|
||||
and additionally report the status afterwards.
|
||||
.TP
|
||||
.B restart
|
||||
Send the commands
|
||||
.IR term ,
|
||||
.IR cont ,
|
||||
and
|
||||
.I up
|
||||
to the service, and wait up to 7 seconds for the service to restart.
|
||||
Then report the status or timeout.
|
||||
If the script
|
||||
.I ./check
|
||||
exists in the service directory,
|
||||
.B sv
|
||||
runs this script to check whether the service is up and available again;
|
||||
it's considered to be available if
|
||||
.I ./check
|
||||
exits with 0.
|
||||
.TP
|
||||
.B shutdown
|
||||
Same as
|
||||
.IR exit ,
|
||||
but wait up to 7 seconds for the
|
||||
.BR runsv (8)
|
||||
process to terminate.
|
||||
Then report the status or timeout.
|
||||
.TP
|
||||
.B force-stop
|
||||
Same as
|
||||
.IR down ,
|
||||
but wait up to 7 seconds for the service to become down.
|
||||
Then report the status, and on timeout send the service the
|
||||
.I kill
|
||||
command.
|
||||
.TP
|
||||
.B force-reload
|
||||
Send the service the
|
||||
.I term
|
||||
and
|
||||
.I cont
|
||||
commands, and wait up to 7 seconds for the service to restart.
|
||||
Then report the status, and on timeout send the service the
|
||||
.I kill
|
||||
command.
|
||||
.TP
|
||||
.B force-restart
|
||||
Send the service the
|
||||
.IR term ,
|
||||
.I cont
|
||||
and
|
||||
.I up
|
||||
commands, and wait up to 7 seconds for the service to restart.
|
||||
Then report the status, and on timeout send the service the
|
||||
.I kill
|
||||
command.
|
||||
If the script
|
||||
.I ./check
|
||||
exists in the service directory,
|
||||
.B sv
|
||||
runs this script to check whether the service is up and available again;
|
||||
it's considered to be available if
|
||||
.I ./check
|
||||
exits with 0.
|
||||
.TP
|
||||
.B force-shutdown
|
||||
Same as
|
||||
.IR exit ,
|
||||
but wait up to 7 seconds for the
|
||||
.BR runsv (8)
|
||||
process to terminate.
|
||||
Then report the status, and on timeout send the service the
|
||||
.I kill
|
||||
command.
|
||||
.TP
|
||||
.B try-restart
|
||||
if the service is running, send it the
|
||||
.I term
|
||||
and
|
||||
.I cont
|
||||
commands, and wait up to 7 seconds for the service to restart.
|
||||
Then report the status or timeout.
|
||||
|
||||
.SS Additional Commands
|
||||
.TP
|
||||
.B check
|
||||
Check for the service to be in the state that's been requested.
|
||||
Wait up to 7 seconds for the service to reach the requested state, then
|
||||
report the status or timeout.
|
||||
If the requested state of the service is
|
||||
.IR up ,
|
||||
and the script
|
||||
.I ./check
|
||||
exists in the service directory,
|
||||
.B sv
|
||||
runs this script to check whether the service is up and running; it's
|
||||
considered to be up if
|
||||
.I ./check
|
||||
exits with 0.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-v
|
||||
If the
|
||||
.I command
|
||||
is up, down, term, once, cont, or exit, then wait up to 7 seconds for the
|
||||
command to take effect.
|
||||
Then report the status or timeout.
|
||||
.TP
|
||||
.B \-w \fIsec
|
||||
Override the default timeout of 7 seconds with
|
||||
.I sec
|
||||
seconds.
|
||||
This option implies
|
||||
.IR \-v .
|
||||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B SVDIR
|
||||
The environment variable $SVDIR overrides the default services directory
|
||||
.IR /service/ .
|
||||
.TP
|
||||
.B SVWAIT
|
||||
The environment variable $SVWAIT overrides the default 7 seconds to wait
|
||||
for a command to take effect.
|
||||
It is overridden by the \-w option.
|
||||
.SH EXIT CODES
|
||||
.B sv
|
||||
exits 0, if the
|
||||
.I command
|
||||
was successfully sent to all
|
||||
.IR services ,
|
||||
and, if it was told to wait, the
|
||||
.I command
|
||||
has taken effect to all services.
|
||||
.P
|
||||
For each
|
||||
.I service
|
||||
that caused an error (e.g. the directory is not controlled by a
|
||||
.BR runsv (8)
|
||||
process, or
|
||||
.B sv
|
||||
timed out while waiting),
|
||||
.B sv
|
||||
increases the exit code by one and exits non zero.
|
||||
The maximum is 99.
|
||||
.B sv
|
||||
exits 100 on error.
|
||||
.P
|
||||
If
|
||||
.B sv
|
||||
is called with a base name other than
|
||||
.BR sv :
|
||||
it exits 1 on timeout or trouble sending the command; if the
|
||||
.I command
|
||||
is
|
||||
.BR status ,
|
||||
it exits 3 if the service is down, and 4 if the status is unknown;
|
||||
it exits 2 on wrong usage, and 151 on error.
|
||||
.SH SEE ALSO
|
||||
runsv(8),
|
||||
chpst(8),
|
||||
svlogd(8),
|
||||
runsvdir(8),
|
||||
runsvchdir(8),
|
||||
runit(8),
|
||||
runit-init(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
464
base/busybox/runit-man/svlogd.8
Normal file
464
base/busybox/runit-man/svlogd.8
Normal file
|
@ -0,0 +1,464 @@
|
|||
.TH svlogd 8
|
||||
.SH NAME
|
||||
svlogd \- runit's service logging daemon
|
||||
.SH SYNOPSIS
|
||||
.B svlogd
|
||||
[\-tttv] [\-r
|
||||
.I c\fR] [\-R
|
||||
.I xyz\fR] [\-l
|
||||
.I len\fR] [\-b
|
||||
.I buflen\fR]
|
||||
.I logs
|
||||
.SH DESCRIPTION
|
||||
.I logs
|
||||
consists of one or more arguments, each specifying a directory.
|
||||
.P
|
||||
.B svlogd
|
||||
continuously reads log data from its standard input, optionally filters log
|
||||
messages, and writes the data to one or more automatically rotated
|
||||
.IR logs .
|
||||
.P
|
||||
Recent log files can automatically be processed by an arbitrary processor
|
||||
program when they are rotated, and
|
||||
.B svlogd
|
||||
can be told to alert selected log messages to standard error, and through
|
||||
udp.
|
||||
.P
|
||||
.B svlogd
|
||||
runs until it sees end-of-file on standard input or is sent a TERM signal,
|
||||
see below.
|
||||
.SS LOG DIRECTORY
|
||||
A log directory
|
||||
.I log
|
||||
contains some number of old log files, and the current log file
|
||||
.IR current .
|
||||
Old log files have a file name starting with
|
||||
.I @
|
||||
followed by a precise timestamp (see the daemontools'
|
||||
.B tai64n
|
||||
program), indicating when
|
||||
.I current
|
||||
was rotated and renamed to this file.
|
||||
.P
|
||||
A log directory additionally contains the lock file
|
||||
.IR lock ,
|
||||
maybe
|
||||
.I state
|
||||
and
|
||||
.IR newstate ,
|
||||
and optionally the file
|
||||
.IR config .
|
||||
.B svlogd
|
||||
creates necessary files if they don't exist.
|
||||
.P
|
||||
If
|
||||
.B svlogd
|
||||
has trouble opening a log directory, it prints a warning, and ignores this
|
||||
log directory.
|
||||
If
|
||||
.B svlogd
|
||||
is unable to open all log directories given at the command line, it exits
|
||||
with an error.
|
||||
This can happen on start-up or after receiving a HUP signal.
|
||||
.SS LOG FILE ROTATION
|
||||
.B svlogd
|
||||
appends selected log messages to the
|
||||
.I current
|
||||
log file.
|
||||
If
|
||||
.I current
|
||||
has
|
||||
.I size
|
||||
bytes or more (or there is a new-line within the last
|
||||
.I len
|
||||
of
|
||||
.I size
|
||||
bytes), or is older than a specified amount of
|
||||
.IR time ,
|
||||
.I current
|
||||
is rotated:
|
||||
.P
|
||||
.B svlogd
|
||||
closes
|
||||
.IR current ,
|
||||
changes permission of
|
||||
.I current
|
||||
to 0755, renames
|
||||
.I current
|
||||
to
|
||||
.RI @ timestamp\fR.s,
|
||||
and starts with a new empty
|
||||
.IR current .
|
||||
If
|
||||
.B svlogd
|
||||
sees
|
||||
.I num
|
||||
or more old log files in the log directory, it removes the oldest one.
|
||||
Note that this doesn't decrease the number of log files if there are
|
||||
already more than
|
||||
.I num
|
||||
log files, this must be done manually, e.g. for keeping 10 log files:
|
||||
.P
|
||||
ls \-1 \\@* |sort |sed \-ne '10,$p' |xargs rm
|
||||
.SS PROCESSOR
|
||||
If
|
||||
.B svlogd
|
||||
is told to process recent log files, it saves
|
||||
.I current
|
||||
to
|
||||
.RI @ timestamp\fR.u,
|
||||
feeds
|
||||
.RI @ timestamp\fR.u
|
||||
through ``sh \-c "\fIprocessor\fR"''
|
||||
and writes the output to
|
||||
.RI @ timestamp\fR.t.
|
||||
If the
|
||||
.I processor
|
||||
finishes successfully,
|
||||
.RI @ timestamp\fR.t
|
||||
is renamed to
|
||||
.RI @ timestamp\fR.s,
|
||||
and
|
||||
.RI @ timestamp\fR.u
|
||||
is deleted; otherwise
|
||||
.RI @ timestamp\fR.t
|
||||
is deleted and the
|
||||
.I processor
|
||||
is started again.
|
||||
.B svlogd
|
||||
also saves any output that the
|
||||
.I processor
|
||||
writes to file descriptor 5, and makes that output available on file
|
||||
descriptor 4 when running
|
||||
.I processor
|
||||
on the next log file rotation.
|
||||
.P
|
||||
A
|
||||
.I processor
|
||||
is run in the background.
|
||||
If
|
||||
.B svlogd
|
||||
sees a previously started
|
||||
.I processor
|
||||
still running when trying to start a new one for the same
|
||||
.IR log ,
|
||||
it blocks until the currently running
|
||||
.I processor
|
||||
has finished successfully.
|
||||
Only the HUP signal works in that situation.
|
||||
Note that this may block any program feeding its log data to
|
||||
.BR svlogd.
|
||||
|
||||
.SS CONFIG
|
||||
On startup, and after receiving a HUP signal,
|
||||
.B svlogd
|
||||
checks for each log directory
|
||||
.I log
|
||||
if the configuration file
|
||||
.I log/config
|
||||
exists, and if so, reads the file line by line and adjusts configuration for
|
||||
.I log
|
||||
as follows:
|
||||
.P
|
||||
If the line is empty, or starts with a ``#'', it is ignored.
|
||||
A line of the form
|
||||
.TP
|
||||
.RI s size
|
||||
sets the maximum file size of
|
||||
.I current
|
||||
when
|
||||
.B svlogd
|
||||
should rotate the current log file to
|
||||
.I size
|
||||
bytes.
|
||||
Default is 1000000.
|
||||
If
|
||||
.I size
|
||||
is zero,
|
||||
.B svlogd
|
||||
doesn't rotate log files.
|
||||
You should set
|
||||
.I size
|
||||
to at least (2 *
|
||||
.IR len ).
|
||||
.TP
|
||||
.RI n num
|
||||
sets the number of old log files
|
||||
.B svlogd
|
||||
should maintain to
|
||||
.IR num .
|
||||
If
|
||||
.B svlogd
|
||||
sees more that
|
||||
.I num
|
||||
old log files in
|
||||
.I log
|
||||
after log file rotation, it deletes the oldest one.
|
||||
Default is 10.
|
||||
If
|
||||
.I num
|
||||
is zero,
|
||||
.B svlogd
|
||||
doesn't remove old log files.
|
||||
.TP
|
||||
.RI N min
|
||||
sets the minimum number of old log files
|
||||
.B svlogd
|
||||
should maintain to
|
||||
.IR min .
|
||||
.I min
|
||||
must be less than
|
||||
.IR num .
|
||||
If
|
||||
.I min
|
||||
is set, and
|
||||
.B svlogd
|
||||
cannot write to
|
||||
.I current
|
||||
because the filesystem is full, and it sees more than
|
||||
.I min
|
||||
old log files, it deletes the oldest one.
|
||||
.TP
|
||||
.RI t timeout
|
||||
sets the maximum age of the
|
||||
.I current
|
||||
log file when
|
||||
.B svlogd
|
||||
should rotate the current log file to
|
||||
.I timeout
|
||||
seconds.
|
||||
If
|
||||
.I current
|
||||
is
|
||||
.I timeout
|
||||
seconds old, and is not empty,
|
||||
.B svlogd
|
||||
forces log file rotation.
|
||||
.TP
|
||||
.RI ! processor
|
||||
tells
|
||||
.B svlogd
|
||||
to feed each recent log file through
|
||||
.I processor
|
||||
(see above) on log file rotation.
|
||||
By default log files are not processed.
|
||||
.TP
|
||||
.RI u a.b.c.d[:port]
|
||||
tells
|
||||
.B svlogd
|
||||
to transmit the first
|
||||
.I len
|
||||
characters of selected log messages to the IP address
|
||||
.IR a.b.c.d ,
|
||||
port number
|
||||
.IR port .
|
||||
If
|
||||
.I port
|
||||
isn't set, the default port for syslog is used (514).
|
||||
.I len
|
||||
can be set through the \-l option, see below.
|
||||
If
|
||||
.B svlogd
|
||||
has trouble sending udp packets, it writes error messages to the log
|
||||
directory.
|
||||
Attention:
|
||||
logging through udp is unreliable, and should be used in private networks
|
||||
only.
|
||||
.TP
|
||||
.RI U a.b.c.d[:port]
|
||||
is the same as the
|
||||
.I u
|
||||
line above, but the log messages are no longer written to the log directory,
|
||||
but transmitted through udp only.
|
||||
Error messages from
|
||||
.B svlogd
|
||||
concerning sending udp packages still go to the log directory.
|
||||
.TP
|
||||
.RI p prefix
|
||||
tells
|
||||
.B svlogd
|
||||
to prefix each line to be written to the log directory, to standard error,
|
||||
or through UDP, with
|
||||
.IR prefix .
|
||||
.P
|
||||
If a line starts with a
|
||||
.IR \- ,
|
||||
.IR + ,
|
||||
.IR e ,
|
||||
or
|
||||
.IR E ,
|
||||
.B svlogd
|
||||
matches the first
|
||||
.I len
|
||||
characters of each log message against
|
||||
.I pattern
|
||||
and acts accordingly:
|
||||
.TP
|
||||
.RI \- pattern
|
||||
the log message is deselected.
|
||||
.TP
|
||||
.RI + pattern
|
||||
the log message is selected.
|
||||
.TP
|
||||
.RI e pattern
|
||||
the log message is selected to be printed to standard error.
|
||||
.TP
|
||||
.RI E pattern
|
||||
the log message is deselected to be printed to standard error.
|
||||
.P
|
||||
Initially each line is selected to be written to
|
||||
.IR log/current .
|
||||
Deselected log messages are discarded from
|
||||
.IR log .
|
||||
Initially each line is deselected to be written to standard err.
|
||||
Log messages selected for standard error are written to standard error.
|
||||
.SH PATTERN MATCHING
|
||||
.B svlogd
|
||||
matches a log message against the string
|
||||
.I pattern
|
||||
as follows:
|
||||
.P
|
||||
.I pattern
|
||||
is applied to the log message one character by one, starting with the first.
|
||||
A character not a star (``*'') and not a plus (``+'') matches itself.
|
||||
A plus matches the next character in
|
||||
.I pattern
|
||||
in the log message one or more times.
|
||||
A star before the end of
|
||||
.I pattern
|
||||
matches any string in the log message that does not include the next
|
||||
character in
|
||||
.IR pattern .
|
||||
A star at the end of
|
||||
.I pattern
|
||||
matches any string.
|
||||
.P
|
||||
Timestamps optionally added by
|
||||
.B svlogd
|
||||
are not considered part of the log message.
|
||||
.P
|
||||
An
|
||||
.B svlogd
|
||||
pattern is not a regular expression.
|
||||
For example consider a log message like this
|
||||
.P
|
||||
2005-12-18_09:13:50.97618 tcpsvd: info: pid 1977 from 10.4.1.14
|
||||
.P
|
||||
The following pattern doesn't match
|
||||
.P
|
||||
-*pid*
|
||||
.P
|
||||
because the first star matches up to the first p in tcpsvd, and then the
|
||||
match fails because i is not s.
|
||||
To match this log message, you can use a pattern like this instead
|
||||
.P
|
||||
-*: *: pid *
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-t
|
||||
timestamp.
|
||||
Prefix each selected line with a precise timestamp (see the daemontools'
|
||||
.B tai64n
|
||||
program) when writing to
|
||||
.I log
|
||||
or to standard error.
|
||||
.TP
|
||||
.B \-tt
|
||||
timestamp.
|
||||
Prefix each selected line with a human readable, sortable UTC timestamp of
|
||||
the form YYYY-MM-DD_HH:MM:SS.xxxxx when writing to
|
||||
.I log
|
||||
or to standard error.
|
||||
.TP
|
||||
.B \-ttt
|
||||
timestamp.
|
||||
Prefix each selected line with a human readable, sortable UTC timestamp of
|
||||
the form YYYY-MM-DDTHH:MM:SS.xxxxx when writing to
|
||||
.I log
|
||||
or to standard error.
|
||||
.TP
|
||||
.B \-r \fIc
|
||||
replace.
|
||||
.I c
|
||||
must be a single character.
|
||||
Replace non-printable characters in log messages with
|
||||
.IR c .
|
||||
Characters are replaced before pattern matching is applied.
|
||||
.TP
|
||||
.B \-R \fIxyz
|
||||
replace charset.
|
||||
Additionally to non-printable characters, replace all characters found in
|
||||
.I xyz
|
||||
with
|
||||
.I c
|
||||
(default ``_'').
|
||||
.TP
|
||||
.B \-l \fIlen
|
||||
line length.
|
||||
Pattern matching applies to the first
|
||||
.I len
|
||||
characters of a log message only.
|
||||
Default is 1000.
|
||||
.TP
|
||||
.B \-b \fIbuflen
|
||||
buffer size.
|
||||
Set the size of the buffer
|
||||
.B svlogd
|
||||
uses when reading from standard input and writing to
|
||||
.I logs
|
||||
to
|
||||
.IR buflen .
|
||||
Default is 1024.
|
||||
.I buflen
|
||||
must be greater than
|
||||
.IR len .
|
||||
For
|
||||
.B svlogd
|
||||
instances that process a lot of data in short time, the buffer size should
|
||||
be increased to improve performance.
|
||||
.TP
|
||||
.B \-v
|
||||
verbose.
|
||||
Print verbose messages to standard error.
|
||||
.SH SIGNALS
|
||||
If
|
||||
.B svlogd
|
||||
is sent a HUP signal, it closes and reopens all
|
||||
.IR logs ,
|
||||
and updates their configuration according to
|
||||
.IR log/config .
|
||||
If
|
||||
.B svlogd
|
||||
has trouble opening a log directory, it prints a warning, and discards this
|
||||
log directory.
|
||||
If
|
||||
.B svlogd
|
||||
is unable to open all log directories given at the command line, it exits
|
||||
with an error.
|
||||
.P
|
||||
If
|
||||
.B svlogd
|
||||
is sent a TERM signal, or if it sees end-of-file on standard input, it stops
|
||||
reading standard input, processes the data in the buffer, waits for all
|
||||
.I processor
|
||||
subprocesses to finish if any, and exits 0 as soon as possible.
|
||||
.P
|
||||
If
|
||||
.B svlogd
|
||||
is sent an ALRM signal, it forces log file rotation for all
|
||||
.I logs
|
||||
with a non empty
|
||||
.I current
|
||||
log file.
|
||||
.SH SEE ALSO
|
||||
sv(8),
|
||||
runsv(8),
|
||||
chpst(8),
|
||||
runit(8),
|
||||
runit-init(8),
|
||||
runsvdir(8),
|
||||
runsvchdir(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
63
base/busybox/runit-man/utmpset.8
Normal file
63
base/busybox/runit-man/utmpset.8
Normal file
|
@ -0,0 +1,63 @@
|
|||
.TH utmpset 8
|
||||
.SH NAME
|
||||
utmpset \- logout a line from utmp and wtmp file
|
||||
.SH SYNOPSIS
|
||||
.B utmpset
|
||||
[
|
||||
.B \-w
|
||||
]
|
||||
.I line
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B utmpset
|
||||
program modifies the user accounting database
|
||||
.BR utmp (5)
|
||||
and optionally
|
||||
.BR wtmp (5)
|
||||
to indicate that the user on the terminal
|
||||
.I line
|
||||
has logged out.
|
||||
.P
|
||||
Ordinary
|
||||
.BR init (8)
|
||||
processes handle utmp file records for local login accounting.
|
||||
The
|
||||
.BR runit (8)
|
||||
program doesn't include code to update the utmp file, the
|
||||
.BR getty (8)
|
||||
processes are handled the same as all other services.
|
||||
.P
|
||||
To enable local login accounting, add
|
||||
.B utmpset
|
||||
to the
|
||||
.BR getty (8)
|
||||
.I finish
|
||||
scripts, e.g.:
|
||||
.P
|
||||
$ cat /service/getty-5/finish
|
||||
#!/bin/sh
|
||||
exec utmpset \-w tty5
|
||||
$
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-w
|
||||
wtmp. Additionally to the utmp file, write an empty record for
|
||||
.I line
|
||||
to the wtmp file.
|
||||
.SH EXIT CODES
|
||||
.B utmpset
|
||||
returns 111 on error, 1 on wrong usage, 0 in all other cases.
|
||||
.SH SEE ALSO
|
||||
sv(8),
|
||||
runsv(8),
|
||||
runit(8),
|
||||
runit-init(8)
|
||||
runsvdir(8),
|
||||
runsvchdir(8),
|
||||
chpst(8),
|
||||
svlogd(8),
|
||||
getty(8)
|
||||
.P
|
||||
http://smarden.org/runit/
|
||||
.SH AUTHOR
|
||||
Gerrit Pape <pape@smarden.org>
|
30
base/busybox/udhcpc-script
Executable file
30
base/busybox/udhcpc-script
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
|
||||
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||
RESOLV_CONF="/etc/resolv.conf"
|
||||
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
||||
case "$1" in
|
||||
deconfig)
|
||||
/sbin/ifconfig $interface 0.0.0.0
|
||||
;;
|
||||
renew|bound)
|
||||
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
|
||||
if [ -n "$router" ] ; then
|
||||
echo "deleting routers"
|
||||
while route del default gw 0.0.0.0 dev $interface ; do
|
||||
:
|
||||
done
|
||||
for i in $router ; do
|
||||
route add default gw $i dev $interface
|
||||
done
|
||||
fi
|
||||
echo -n > $RESOLV_CONF
|
||||
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
|
||||
for i in $dns ; do
|
||||
echo adding dns $i
|
||||
echo nameserver $i >> $RESOLV_CONF
|
||||
done
|
||||
;;
|
||||
esac
|
||||
exit 0
|
21
base/bzip2/bzip2-flags.patch
Normal file
21
base/bzip2/bzip2-flags.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- bzip2-1.0.6.old/Makefile-libbz2_so
|
||||
+++ bzip2-1.0.6/Makefile-libbz2_so
|
||||
@@ -25,6 +25,7 @@
|
||||
CC=gcc
|
||||
BIGFILES=-D_FILE_OFFSET_BITS=64
|
||||
CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
|
||||
+LDFLAGS=
|
||||
|
||||
OBJS= blocksort.o \
|
||||
huffman.o \
|
||||
@@ -35,8 +36,8 @@
|
||||
bzlib.o
|
||||
|
||||
all: $(OBJS)
|
||||
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
|
||||
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
|
||||
rm -f libbz2.so.1.0
|
||||
ln -s libbz2.so.1.0.6 libbz2.so.1.0
|
||||
|
43
base/bzip2/bzip2.SMBuild
Executable file
43
base/bzip2/bzip2.SMBuild
Executable file
|
@ -0,0 +1,43 @@
|
|||
APP=bzip2
|
||||
VERSION=1.0.6
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://sourceware.org/bzip2/'
|
||||
DOWNLOAD='https://sourceware.org/pub/bzip2/bzip2-1.0.6.tar.gz'
|
||||
REQUIRES="musl"
|
||||
DESC="block-sorting file compressor based on Burrows-Wheeler text compression algorithm"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
# Taken from sabotage
|
||||
|
||||
patch -p1 < $SRCDIR/bzip2-flags.patch
|
||||
|
||||
sed -i 's@$(PREFIX)@$(DESTDIR)$(PREFIX)@g' Makefile
|
||||
sed -i 's@$(PREFIX)/man@$(PREFIX)/share/man@g' Makefile
|
||||
|
||||
sed -i 's@all: libbz2.a bzip2 bzip2recover test@all: libbz2.a bzip2 bzip2recover@' Makefile
|
||||
make -f Makefile-libbz2_so
|
||||
make PREFIX="/" CFLAGS="-fPIC"
|
||||
|
||||
make install DESTDIR=$PKG PREFIX="/"
|
||||
install -m 0644 libbz2.so.1.0.6 $PKG/lib
|
||||
|
||||
cp LICEN?E $PKGDOCS/
|
||||
|
||||
cd $PKG/lib
|
||||
ln -sf libbz2.so.1.0.6 libbz2.so.1.0
|
||||
ln -sf libbz2.so.1.0.6 libbz2.so
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
a8e36dd2987acb7f39fbfecc5207e9a18f5029b9254c75b0b832b72fa443a227f1e5490739707129ca325a6fab8acfd8fed9fec3330cdc67f4594147f84a1ba0 bzip2-1.0.6.tar.lz
|
||||
8b8eff6348994c5d67691d3b4d53bd3e66785138c613737c1f38ac8c245412cde4efe44e671e9ee05c7216e9f895d7ef7212c1f76d31724f5016a3720aad335d bzip2-flags.patch
|
||||
"
|
10
base/c-ares/LICENSE
Normal file
10
base/c-ares/LICENSE
Normal file
|
@ -0,0 +1,10 @@
|
|||
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted, provided that
|
||||
the above copyright notice appear in all copies and that both that copyright
|
||||
notice and this permission notice appear in supporting documentation, and that
|
||||
the name of M.I.T. not be used in advertising or publicity pertaining to
|
||||
distribution of the software without specific, written prior permission.
|
||||
M.I.T. makes no representations about the suitability of this software for any
|
||||
purpose. It is provided "as is" without express or implied warranty.
|
31
base/c-ares/c-ares.SMBuild
Executable file
31
base/c-ares/c-ares.SMBuild
Executable file
|
@ -0,0 +1,31 @@
|
|||
APP=c-ares
|
||||
VERSION=1.16.1
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://c-ares.haxx.se/'
|
||||
DOWNLOAD='https://c-ares.haxx.se/download/c-ares-1.16.1.tar.gz'
|
||||
DESC="C library for asynchronous DNS requests including name resolves"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--enable-shared
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp $SRCDIR/LICENSE $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
4ac2a5d5c6da74eb1d6155c4eadc7127ab1b53a8d13caec41bd6172db5417a79f3ab022e77ba37d8b13da6893d7ced5fd8baf5cc3950a4154b4de8743ad31471 c-ares-1.16.1.tar.gz
|
||||
"
|
48
base/ca-certificates/ca-certificates.SMBuild
Executable file
48
base/ca-certificates/ca-certificates.SMBuild
Executable file
|
@ -0,0 +1,48 @@
|
|||
APP=ca-certificates
|
||||
VERSION=20210308
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://ftp.debian.org/debian/pool/main/c/ca-certificates/'
|
||||
DOWNLOAD=''
|
||||
DESC="PEM Files of CA Certificates"
|
||||
REQUIRES="musl curl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
tar xf $SRCDIR/$APP.tar.?z*
|
||||
|
||||
cd $APP
|
||||
fixbuilddirpermissions
|
||||
|
||||
# Patch to remove incompatible arguments from run-parts
|
||||
patch -p1 < $SRCDIR/fixup_update-ca-certificates.diff
|
||||
|
||||
# Update to certdata.txt from $SRCDIR:
|
||||
xzcat $SRCDIR/certdata-${VERSION}.txt.xz > mozilla/certdata.txt
|
||||
|
||||
mkdir -p $PKG/share/ca-certificates $PKG/bin $PKG/usr/sbin
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG CERTSDIR=/share/ca-certificates
|
||||
cp docs/copyright $PKGDOCS/COPYRIGHT
|
||||
|
||||
mkdir -p $PKG/etc/ca-certificates/update.d
|
||||
printf "# Automatically generated by $APP-$VERSION \n#\n" \
|
||||
> $PKG/etc/ca-certificates.conf.new
|
||||
( cd $PKG/share/ca-certificates
|
||||
find . -name '*.crt' | sort | cut -b3-
|
||||
) >> $PKG/etc/ca-certificates.conf.new
|
||||
|
||||
install -Dm 755 $SRCDIR/setup.11.cacerts $PKG/var/log/setup/setup.11.cacerts
|
||||
install -Dm 644 sbin/update-ca-certificates.8 $PKG/share/man/man8/update-ca-certificates.8
|
||||
|
||||
# Why do people hardcode paths in Makefiles!
|
||||
mv $PKG/usr/sbin/* $PKG/bin/
|
||||
rm -rf $PKG/usr
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
c1310a6c1f3af3838b56a9e55382261d60d3f1b5da5dbf612c5d5119e2a398dbbbdfbf7c88034aea901c752cf1c7624e3e7903746de6d8c72fc94bcccf9d06b7 ca-certificates.tar.lz
|
||||
c57ee9319db07b66a7f89fe518d318b47b31cb9e5f73ae4125f9e0f05e26fceaaa2decf2263716500e5403732f5446d0779a5cfb4b962328fb32dcc371347688 fixup_update-ca-certificates.diff
|
||||
"
|
19
base/ca-certificates/doinst.sh
Normal file
19
base/ca-certificates/doinst.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
config etc/ca-certificates.conf.new
|
||||
|
||||
if [ -x /bin/update-ca-certificates ]; then
|
||||
/bin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
|
||||
fi
|
||||
|
12
base/ca-certificates/fixup_update-ca-certificates.diff
Normal file
12
base/ca-certificates/fixup_update-ca-certificates.diff
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -urN ca-certificates-20150426.orig/sbin/update-ca-certificates ca-certificates-20150426/sbin/update-ca-certificates
|
||||
--- ca-certificates-20150426.orig/sbin/update-ca-certificates 2015-04-01 13:47:25.000000000 +0100
|
||||
+++ ca-certificates-20150426/sbin/update-ca-certificates 2015-09-14 22:51:39.856021883 +0100
|
||||
@@ -193,7 +193,7 @@
|
||||
echo "Running hooks in $HOOKSDIR..."
|
||||
VERBOSE_ARG=
|
||||
[ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
|
||||
- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
|
||||
+ eval run-parts "$HOOKSDIR" | while read hook
|
||||
do
|
||||
( cat "$ADDED"
|
||||
cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
|
3
base/ca-certificates/setup.11.cacerts
Normal file
3
base/ca-certificates/setup.11.cacerts
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
#BLURB="Rebuild SSL certificate database."
|
||||
chroot . usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
|
31
base/ccache/ccache.SMBuild
Executable file
31
base/ccache/ccache.SMBuild
Executable file
|
@ -0,0 +1,31 @@
|
|||
APP=ccache
|
||||
VERSION=3.7.9
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://ccache.dev/'
|
||||
DOWNLOAD='https://github.com/ccache/ccache/releases/download/v3.7.9/ccache-3.7.9.tar.xz'
|
||||
DESC="Compiler cache to speed up re-compilation of C/C++ code by caching previous compiles"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
LDFLAGS="-static" \
|
||||
./configure \
|
||||
--prefix=""
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp GPL* $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
0944846a6543947251e500576dd69f0b88d69c9a7535de5be8d6a17505489d8ec658bac8a71b8a8c70f341e3e174968e99ebfaadfd1e64b2e791f4d567b1a0c9 ccache-3.7.9.tar.lz
|
||||
"
|
45
base/chrony/README
Normal file
45
base/chrony/README
Normal file
|
@ -0,0 +1,45 @@
|
|||
chrony is a versatile implementation of the Network Time Protocol
|
||||
(NTP). It can synchronise the system clock with NTP servers, reference
|
||||
clocks (e.g. GPS receiver), and manual input using wristwatch and
|
||||
keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer
|
||||
to provide a time service to other computers in the network.
|
||||
|
||||
It is designed to perform well in a wide range of conditions, including
|
||||
intermittent network connections, heavily congested networks, changing
|
||||
temperatures (ordinary computer clocks are sensitive to temperature),
|
||||
and systems that do not run continuously, or run on a virtual machine.
|
||||
|
||||
Two programs are included in chrony, chronyd is a daemon that is
|
||||
started at boot time and chronyc is a command-line interface program
|
||||
which can be used to monitor chronyd's performance and to change
|
||||
various operating parameters whilst it is running.
|
||||
|
||||
Note 1:
|
||||
You must have the 'chrony' group and user to run this script:
|
||||
$ groupadd -g 354 chrony
|
||||
$ useradd -u 354 -d /var/lib/chrony -s /bin/false -g chrony chrony
|
||||
Feel free to use a different uid and gid if desired, but 354 is
|
||||
recommended to avoid conflicts with other stuff from SlackBuilds.org.
|
||||
|
||||
Note 2:
|
||||
If you are upgrading from previous version, where the daemon was
|
||||
running under 'root' user as opposed to 'chrony' user, you need to
|
||||
ensure correct permissions for /var/run/chrony directory and files
|
||||
under /var/lib/chrony directory.
|
||||
|
||||
If possible (i.e. you don't have any precious files there), before
|
||||
starting the daemon, remove /var/run/chrony directory (cronyd will
|
||||
recreate it) and remove files under /var/lib/chrony directory (cronyd
|
||||
will recreate them).
|
||||
|
||||
Note 3:
|
||||
The provided configuration file sets up chrony to operate in the most
|
||||
common scenario, that is NTP client for synchronising local machine
|
||||
time with the remote NTP server(s) time (using pool.ntp.org by
|
||||
default). See the man pages for chronyd and chrony.conf (and the
|
||||
contrib and examples directories) for more details on possible
|
||||
configuration options.
|
||||
|
||||
Note 4:
|
||||
The provided /etc/rc.d/rc.chrony script can be used to launch the
|
||||
daemon at boot and to stop it at shutdown.
|
44
base/chrony/chrony.SMBuild
Executable file
44
base/chrony/chrony.SMBuild
Executable file
|
@ -0,0 +1,44 @@
|
|||
APP=chrony
|
||||
VERSION=3.5
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://chrony.tuxfamily.org/'
|
||||
DOWNLOAD='https://download.tuxfamily.org/chrony/chrony-3.5.tar.gz'
|
||||
DESC="Lightweight program to maintain accuracy of the real time clock via NTP"
|
||||
REQUIRES="nettle libcap"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--bindir=/bin \
|
||||
--sbindir=/bin \
|
||||
--mandir=/share/man \
|
||||
--without-readline \
|
||||
--without-nss
|
||||
|
||||
make $MAKEFLAGS
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
cp $SRCDIR/chrony.conf $PKG/etc/
|
||||
# raspberry pi example
|
||||
cp $SRCDIR/chrony.conf.rpi $PKG/etc/
|
||||
cp $SRCDIR/README $PKG/etc/chrony.README
|
||||
|
||||
mkdir -p $PKG/var/lib/chrony
|
||||
|
||||
preprunitservice chrony down
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
bdfeb8a5d478ff575b5bff6f9d298fb1102c9d74f2636499e124a8d9273a9d8c2b9b51bd037ef7054fd12c02a8371160a486f08a2f0c8fa2b97ed0410a9f3cf0 chrony-3.5.tar.lz
|
||||
"
|
15
base/chrony/chrony.conf
Normal file
15
base/chrony/chrony.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
# NTP server to pool from
|
||||
#pool pool.ntp.org iburst maxsources 2
|
||||
server pool.ntp.org iburst
|
||||
# Location of the drift file
|
||||
driftfile /var/lib/chrony/drift
|
||||
# Enable the server and set the stratum level
|
||||
local stratum 1
|
||||
# Allow only hosts from this subnet to sync
|
||||
allow 192.168.1.0/24
|
||||
# Speed up initial clock correction when started
|
||||
makestep 1.0 3
|
||||
manual
|
||||
dumpdir /var/run/chrony
|
||||
logdir /var/log
|
||||
rtcsync
|
14
base/chrony/chrony.conf.rpi
Normal file
14
base/chrony/chrony.conf.rpi
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Typical raspberry pi configuration for chrony
|
||||
# Uncomment to enable server and set the stratum level
|
||||
local stratum 2
|
||||
# Uncomment to allow hosts from the following subnets to sync
|
||||
allow 192.168.1.0/24
|
||||
# NTP server to pool from
|
||||
# pool 0.europe.ntp.org iburst maxsources 2
|
||||
server pool.ntp.org iburst
|
||||
initstepslew 30 pool.ntp.org
|
||||
# Location of the drift file
|
||||
driftfile /var/lib/chrony/drift
|
||||
# Location to store measurement data
|
||||
dumpdir /var/run/chrony
|
||||
logdir /var/log
|
3
base/chrony/chrony.run
Normal file
3
base/chrony/chrony.run
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
PATH="/bin"
|
||||
exec chronyd -n 2>&1
|
13
base/chrony/doinst.sh
Normal file
13
base/chrony/doinst.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="`dirname $NEW`/`basename $NEW .new`"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
config etc/chrony.conf.new
|
||||
config etc/chrony.conf.rpi.new
|
31
base/chrpath/chrpath.SMBuild
Executable file
31
base/chrpath/chrpath.SMBuild
Executable file
|
@ -0,0 +1,31 @@
|
|||
APP=chrpath
|
||||
VERSION=0.16
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://chrpath.alioth.debian.org/'
|
||||
DOWNLOAD='https://alioth.debian.org/frs/download.php/latestfile/813/chrpath-0.16.tar.gz'
|
||||
DESC="Program to modify rpath aka dynamic library load path of binaries"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--mandir=/share/man
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
aa04d490f78bff20a56fe20539cec10218c0772a668909eda8324ca825f51e8ef92001e95d9c316e79a145a043c9c327ec94d1a82e104ab408ca1021832745aa chrpath-0.16.tar.gz
|
||||
"
|
37
base/clang/10-add-musl-triples.patch
Normal file
37
base/clang/10-add-musl-triples.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
|
||||
index da197e47..505439ea 100644
|
||||
--- a/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ b/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -1997,6 +1997,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
|
||||
static const char *const AArch64Triples[] = {
|
||||
"aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
|
||||
+ "aarch64-linux-musl",
|
||||
"aarch64-suse-linux", "aarch64-linux-android"};
|
||||
static const char *const AArch64beLibDirs[] = {"/lib"};
|
||||
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
|
||||
@@ -2006,6 +2007,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
static const char *const ARMTriples[] = {"arm-linux-gnueabi",
|
||||
"arm-linux-androideabi"};
|
||||
static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
|
||||
+ "arm-linux-musleabihf",
|
||||
+ "armv7l-linux-musleabihf",
|
||||
"armv7hl-redhat-linux-gnueabi",
|
||||
"armv6hl-suse-linux-gnueabi",
|
||||
"armv7hl-suse-linux-gnueabi"};
|
||||
@@ -2025,6 +2028,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
"x86_64-redhat-linux", "x86_64-suse-linux",
|
||||
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
|
||||
"x86_64-slackware-linux", "x86_64-unknown-linux",
|
||||
+ "x86_64-linux-musl",
|
||||
"x86_64-amazon-linux", "x86_64-linux-android"};
|
||||
static const char *const X32LibDirs[] = {"/libx32"};
|
||||
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
|
||||
@@ -2034,6 +2038,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
"i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
|
||||
"i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu",
|
||||
"i686-linux-android", "i386-gnu", "i486-gnu",
|
||||
+ "i686-linux-musl",
|
||||
"i586-gnu", "i686-gnu"};
|
||||
|
||||
static const char *const MIPSLibDirs[] = {"/lib"};
|
391
base/clang/30-fix-python-shebangs.patch
Normal file
391
base/clang/30-fix-python-shebangs.patch
Normal file
|
@ -0,0 +1,391 @@
|
|||
diff --git a/bindings/python/examples/cindex/cindex-dump.py b/bindings/python/examples/cindex/cindex-dump.py
|
||||
index 46073b28..fc513c7e 100644
|
||||
--- a/bindings/python/examples/cindex/cindex-dump.py
|
||||
+++ b/bindings/python/examples/cindex/cindex-dump.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
#===- cindex-dump.py - cindex/Python Source Dump -------------*- python -*--===#
|
||||
#
|
||||
diff --git a/bindings/python/examples/cindex/cindex-includes.py b/bindings/python/examples/cindex/cindex-includes.py
|
||||
index ec1fbc0c..be600342 100644
|
||||
--- a/bindings/python/examples/cindex/cindex-includes.py
|
||||
+++ b/bindings/python/examples/cindex/cindex-includes.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
#===- cindex-includes.py - cindex/Python Inclusion Graph -----*- python -*--===#
|
||||
#
|
||||
diff --git a/docs/tools/dump_ast_matchers.py b/docs/tools/dump_ast_matchers.py
|
||||
index c96c1ca2..26cf4156 100755
|
||||
--- a/docs/tools/dump_ast_matchers.py
|
||||
+++ b/docs/tools/dump_ast_matchers.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# A tool to parse ASTMatchers.h and update the documentation in
|
||||
# ../LibASTMatchersReference.html automatically. Run from the
|
||||
# directory in which this file is located to update the docs.
|
||||
diff --git a/docs/tools/dump_format_style.py b/docs/tools/dump_format_style.py
|
||||
index 5feb793a..e18a2ffb 100755
|
||||
--- a/docs/tools/dump_format_style.py
|
||||
+++ b/docs/tools/dump_format_style.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# A tool to parse the FormatStyle struct from Format.h and update the
|
||||
# documentation in ../ClangFormatStyleOptions.rst automatically.
|
||||
# Run from the directory in which this file is located to update the docs.
|
||||
diff --git a/test/AST/gen_ast_dump_json_test.py b/test/AST/gen_ast_dump_json_test.py
|
||||
index 975039ea..9a6ee94c 100644
|
||||
--- a/test/AST/gen_ast_dump_json_test.py
|
||||
+++ b/test/AST/gen_ast_dump_json_test.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from collections import OrderedDict
|
||||
from sets import Set
|
||||
diff --git a/tools/clang-format/clang-format-diff.py b/tools/clang-format/clang-format-diff.py
|
||||
index 3ba0abef..6b0425a7 100755
|
||||
--- a/tools/clang-format/clang-format-diff.py
|
||||
+++ b/tools/clang-format/clang-format-diff.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
|
||||
#
|
||||
diff --git a/tools/clang-format/git-clang-format b/tools/clang-format/git-clang-format
|
||||
index ef7f22d0..4ea4521f 100755
|
||||
--- a/tools/clang-format/git-clang-format
|
||||
+++ b/tools/clang-format/git-clang-format
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
#===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===#
|
||||
#
|
||||
diff --git a/tools/scan-build-py/bin/analyze-build b/tools/scan-build-py/bin/analyze-build
|
||||
index 6c285874..5b270d54 100755
|
||||
--- a/tools/scan-build-py/bin/analyze-build
|
||||
+++ b/tools/scan-build-py/bin/analyze-build
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-build-py/bin/analyze-c++ b/tools/scan-build-py/bin/analyze-c++
|
||||
index 564e2abf..b2b60a44 100755
|
||||
--- a/tools/scan-build-py/bin/analyze-c++
|
||||
+++ b/tools/scan-build-py/bin/analyze-c++
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-build-py/bin/analyze-cc b/tools/scan-build-py/bin/analyze-cc
|
||||
index 564e2abf..b2b60a44 100755
|
||||
--- a/tools/scan-build-py/bin/analyze-cc
|
||||
+++ b/tools/scan-build-py/bin/analyze-cc
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-build-py/bin/intercept-build b/tools/scan-build-py/bin/intercept-build
|
||||
index 23f51047..fe45c545 100755
|
||||
--- a/tools/scan-build-py/bin/intercept-build
|
||||
+++ b/tools/scan-build-py/bin/intercept-build
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-build-py/bin/intercept-c++ b/tools/scan-build-py/bin/intercept-c++
|
||||
index 4230c803..0cba3a3c 100755
|
||||
--- a/tools/scan-build-py/bin/intercept-c++
|
||||
+++ b/tools/scan-build-py/bin/intercept-c++
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-build-py/bin/intercept-cc b/tools/scan-build-py/bin/intercept-cc
|
||||
index 4230c803..0cba3a3c 100755
|
||||
--- a/tools/scan-build-py/bin/intercept-cc
|
||||
+++ b/tools/scan-build-py/bin/intercept-cc
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-build-py/bin/scan-build b/tools/scan-build-py/bin/scan-build
|
||||
index 156da064..4fa08175 100755
|
||||
--- a/tools/scan-build-py/bin/scan-build
|
||||
+++ b/tools/scan-build-py/bin/scan-build
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
diff --git a/tools/scan-view/bin/scan-view b/tools/scan-view/bin/scan-view
|
||||
index 6165432e..07effbca 100755
|
||||
--- a/tools/scan-view/bin/scan-view
|
||||
+++ b/tools/scan-view/bin/scan-view
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
diff --git a/tools/scan-view/share/Reporter.py b/tools/scan-view/share/Reporter.py
|
||||
index b1ff1614..d6300e78 100644
|
||||
--- a/tools/scan-view/share/Reporter.py
|
||||
+++ b/tools/scan-view/share/Reporter.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""Methods for reporting bugs."""
|
||||
diff --git a/tools/scan-view/share/startfile.py b/tools/scan-view/share/startfile.py
|
||||
index 9eb548bc..cdf3db27 100644
|
||||
--- a/tools/scan-view/share/startfile.py
|
||||
+++ b/tools/scan-view/share/startfile.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""Utility for opening a file using the default application in a cross-platform
|
||||
diff --git a/utils/ABITest/ABITestGen.py b/utils/ABITest/ABITestGen.py
|
||||
index 93a6de93..efb35fa7 100755
|
||||
--- a/utils/ABITest/ABITestGen.py
|
||||
+++ b/utils/ABITest/ABITestGen.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
from pprint import pprint
|
||||
diff --git a/utils/CIndex/completion_logger_server.py b/utils/CIndex/completion_logger_server.py
|
||||
index 20166711..02d7cd6f 100755
|
||||
--- a/utils/CIndex/completion_logger_server.py
|
||||
+++ b/utils/CIndex/completion_logger_server.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import absolute_import, division, print_function
|
||||
import sys
|
||||
from socket import *
|
||||
diff --git a/utils/CaptureCmd b/utils/CaptureCmd
|
||||
index 705585c3..5ffdfe56 100755
|
||||
--- a/utils/CaptureCmd
|
||||
+++ b/utils/CaptureCmd
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""CaptureCmd - A generic tool for capturing information about the
|
||||
invocations of another program.
|
||||
diff --git a/utils/CmpDriver b/utils/CmpDriver
|
||||
index 12ce7a32..c2b6ab5e 100755
|
||||
--- a/utils/CmpDriver
|
||||
+++ b/utils/CmpDriver
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
A simple utility that compares tool invocations and exit codes issued by
|
||||
diff --git a/utils/FindSpecRefs b/utils/FindSpecRefs
|
||||
index 9097f93f..3ad581b3 100755
|
||||
--- a/utils/FindSpecRefs
|
||||
+++ b/utils/FindSpecRefs
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import re
|
||||
diff --git a/utils/FuzzTest b/utils/FuzzTest
|
||||
index 0e043df7..c4c956b6 100755
|
||||
--- a/utils/FuzzTest
|
||||
+++ b/utils/FuzzTest
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This is a generic fuzz testing tool, see --help for more information.
|
||||
diff --git a/utils/TestUtils/deep-stack.py b/utils/TestUtils/deep-stack.py
|
||||
index 10bf47ac..5fb8d0df 100755
|
||||
--- a/utils/TestUtils/deep-stack.py
|
||||
+++ b/utils/TestUtils/deep-stack.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
def pcall(f, N):
|
||||
diff --git a/utils/analyzer/CmpRuns.py b/utils/analyzer/CmpRuns.py
|
||||
index 3fab6ef5..9baa7a48 100755
|
||||
--- a/utils/analyzer/CmpRuns.py
|
||||
+++ b/utils/analyzer/CmpRuns.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
CmpRuns - A simple tool for comparing two static analyzer runs to determine
|
||||
diff --git a/utils/analyzer/SATestAdd.py b/utils/analyzer/SATestAdd.py
|
||||
index 52089f4e..d087a90b 100755
|
||||
--- a/utils/analyzer/SATestAdd.py
|
||||
+++ b/utils/analyzer/SATestAdd.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Static Analyzer qualification infrastructure: adding a new project to
|
||||
diff --git a/utils/analyzer/SATestBuild.py b/utils/analyzer/SATestBuild.py
|
||||
index 691ded80..b17b3db1 100755
|
||||
--- a/utils/analyzer/SATestBuild.py
|
||||
+++ b/utils/analyzer/SATestBuild.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Static Analyzer qualification infrastructure.
|
||||
diff --git a/utils/analyzer/SATestUpdateDiffs.py b/utils/analyzer/SATestUpdateDiffs.py
|
||||
index ea3c08cc..08e3f82f 100755
|
||||
--- a/utils/analyzer/SATestUpdateDiffs.py
|
||||
+++ b/utils/analyzer/SATestUpdateDiffs.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Update reference results for static analyzer.
|
||||
diff --git a/utils/analyzer/SumTimerInfo.py b/utils/analyzer/SumTimerInfo.py
|
||||
index 36e519ad..d1934f19 100644
|
||||
--- a/utils/analyzer/SumTimerInfo.py
|
||||
+++ b/utils/analyzer/SumTimerInfo.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Script to Summarize statistics in the scan-build output.
|
||||
diff --git a/utils/analyzer/exploded-graph-rewriter.py b/utils/analyzer/exploded-graph-rewriter.py
|
||||
index 5ce56d61..808f21c9 100755
|
||||
--- a/utils/analyzer/exploded-graph-rewriter.py
|
||||
+++ b/utils/analyzer/exploded-graph-rewriter.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
#===- exploded-graph-rewriter.py - ExplodedGraph dump tool -----*- python -*--#
|
||||
#
|
||||
diff --git a/utils/check_cfc/check_cfc.py b/utils/check_cfc/check_cfc.py
|
||||
index 311f502f..0bbbc088 100755
|
||||
--- a/utils/check_cfc/check_cfc.py
|
||||
+++ b/utils/check_cfc/check_cfc.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""Check CFC - Check Compile Flow Consistency
|
||||
|
||||
diff --git a/utils/check_cfc/obj_diff.py b/utils/check_cfc/obj_diff.py
|
||||
index a0951c5b..b3866948 100755
|
||||
--- a/utils/check_cfc/obj_diff.py
|
||||
+++ b/utils/check_cfc/obj_diff.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
diff --git a/utils/check_cfc/test_check_cfc.py b/utils/check_cfc/test_check_cfc.py
|
||||
index 0808252a..6f149ebc 100755
|
||||
--- a/utils/check_cfc/test_check_cfc.py
|
||||
+++ b/utils/check_cfc/test_check_cfc.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
"""Test internal functions within check_cfc.py."""
|
||||
|
||||
diff --git a/utils/creduce-clang-crash.py b/utils/creduce-clang-crash.py
|
||||
index be16211c..e56f3697 100755
|
||||
--- a/utils/creduce-clang-crash.py
|
||||
+++ b/utils/creduce-clang-crash.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
"""Calls C-Reduce to create a minimal reproducer for clang crashes.
|
||||
|
||||
Output files:
|
||||
diff --git a/utils/hmaptool/hmaptool b/utils/hmaptool/hmaptool
|
||||
index 58baab2f..00296f11 100755
|
||||
--- a/utils/hmaptool/hmaptool
|
||||
+++ b/utils/hmaptool/hmaptool
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import json
|
||||
diff --git a/utils/modfuzz.py b/utils/modfuzz.py
|
||||
index 61ca3272..19a9807b 100644
|
||||
--- a/utils/modfuzz.py
|
||||
+++ b/utils/modfuzz.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/env python3
|
||||
|
||||
# To use:
|
||||
# 1) Update the 'decls' list below with your fuzzing configuration.
|
||||
diff --git a/utils/token-delta.py b/utils/token-delta.py
|
||||
index 62b4eb3c..022fb2f8 100755
|
||||
--- a/utils/token-delta.py
|
||||
+++ b/utils/token-delta.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
import os
|
||||
diff --git a/www/builtins.py b/www/builtins.py
|
||||
index f0bcf196..54901487 100755
|
||||
--- a/www/builtins.py
|
||||
+++ b/www/builtins.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
import sys, fileinput
|
||||
|
||||
diff --git a/www/make_cxx_dr_status b/www/make_cxx_dr_status
|
||||
index 2d7c1f32..bc24cd12 100755
|
||||
--- a/www/make_cxx_dr_status
|
||||
+++ b/www/make_cxx_dr_status
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/env python3
|
||||
import sys, os, re
|
||||
|
||||
index = 'cwg_index.html'
|
||||
|
52
base/clang/clang.SMBuild
Executable file
52
base/clang/clang.SMBuild
Executable file
|
@ -0,0 +1,52 @@
|
|||
APP=clang
|
||||
VERSION=10.0.1
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://clang.llvm.org/'
|
||||
DOWNLOAD=""
|
||||
REQUIRES="llvm"
|
||||
DESC="LLVM project-based C language family front-end"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION".src"
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION".src".tar.?z*
|
||||
cd $APP-$VERSION".src"
|
||||
fixbuilddirpermissions
|
||||
|
||||
patch -p1 < $SRCDIR/10-add-musl-triples.patch
|
||||
patch -p1 < $SRCDIR/30-fix-python-shebangs.patch
|
||||
|
||||
unset CFLAGS CXXFLAGS
|
||||
|
||||
mkdir -p smbuild && cd smbuild
|
||||
cmake .. -G Ninja -Wno-dev \
|
||||
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||
-DCMAKE_INSTALL_PREFIX="" \
|
||||
-DCLANG_BUILD_EXAMPLES=OFF \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DCLANG_LINK_CLANG_DYLIB=ON \
|
||||
-DLLVM_INCLUDE_DOCS=OFF \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=OFF \
|
||||
-DCLANG_INCLUDE_TESTS=ON \
|
||||
-DCLANG_PLUGIN_SUPPORT=ON \
|
||||
-DLIBCLANG_BUILD_STATIC=ON \
|
||||
-DLLVM_ENABLE_EH=ON \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DCLANG_VENDOR=SMLinux
|
||||
|
||||
ninja clang-tblgen
|
||||
ninja $MAKEFLAGS
|
||||
|
||||
DESTDIR="$PKG" ninja install
|
||||
|
||||
cp ../LICENSE.TXT $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
c6712d491ce5e166ef72724cf855d742d88da825ffc25585612d7f2eb7770343e3ae48fa78e0af3e5d5efdde3a9686a7361dac3b546a4378de22448ea6e4026c clang-10.0.1.src.tar.xz
|
||||
533558863dc7247202b2a739e1bd2d81a99a16be329370cb734d338284b5408ecd14fe78ac836aaf922e377334b7a3ebef532cf8395d91aafe346bf71eb8b7fc 10-add-musl-triples.patch
|
||||
c7f34b425b0dcea9752eeb7ff3d3a33af9cc45740fd3e77d52e4d610c5fd3daaa4d59138a255b057ef886915615a77ec1e6a447f3818b4b2724129c0ba354932 30-fix-python-shebangs.patch
|
||||
"
|
40
base/cmake/cmake.SMBuild
Executable file
40
base/cmake/cmake.SMBuild
Executable file
|
@ -0,0 +1,40 @@
|
|||
APP=cmake
|
||||
VERSION=3.17.3
|
||||
BUILD=1sml
|
||||
HOMEPAGE='http://www.cmake.org'
|
||||
DOWNLOAD='https://cmake.org/files/v3.17/cmake-3.17.3.tar.gz'
|
||||
DESC="Cross-platform, open-source make system"
|
||||
REQUIRES="gcc-libs openssl libunistring libidn2"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
para="$(echo $MAKEFLAGS | sed 's/-j//')"
|
||||
|
||||
./bootstrap \
|
||||
--prefix="" \
|
||||
--no-system-curl \
|
||||
--no-system-expat \
|
||||
--no-system-jsoncpp \
|
||||
--no-system-zlib \
|
||||
--no-system-bzip2 \
|
||||
--no-system-libarchive \
|
||||
--no-qt-gui \
|
||||
--parallel="$para"
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp Licenses/* Copyright.txt $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
e68eb80a294a4ee441f5e29b95a6450677ef8d7a8aa40e29e7475db9aa7566edd903ce4bfb57a0795f8e31dd29f16620f588b81b5fd9f74e80f996de980bccd3 cmake-3.17.3.tar.lz
|
||||
"
|
39
base/coreutils/coreutils.SMBuild
Executable file
39
base/coreutils/coreutils.SMBuild
Executable file
|
@ -0,0 +1,39 @@
|
|||
APP=coreutils
|
||||
VERSION=8.32
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.gnu.org/software/coreutils/coreutils.html'
|
||||
DOWNLOAD='http://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.xz'
|
||||
DESC="Core GNU utilities"
|
||||
REQUIRES="attr acl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
patch -p1 < $SRCDIR/ls.patch
|
||||
|
||||
FORCE_UNSAFE_CONFIGURE=1 \
|
||||
CFLAGS="$CFLAGS -static" \
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--bindir=/bin \
|
||||
--libexecdir=/lib \
|
||||
--without-gmp \
|
||||
--disable-nls
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
e4473c87948904b017fef23d1c81cafdf0d6d282cd6dd9d402d3dc718642f392029933cd7b161f73d6b69523ca12458066ba2804201a1ce256da753fa521f54c coreutils-8.32.tar.lz
|
||||
2742d74c45bdb52c524d415fb0787ed63164aec2c22980a1c46b40b7db2f0911008161b1219d5b571cc25de274bacc20c8be3f651906967a032a3ac9859cffce ls.patch
|
||||
"
|
25
base/coreutils/ls.patch
Normal file
25
base/coreutils/ls.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
../src/ls.c: In function 'print_dir':
|
||||
|
||||
../src/ls.c:3026:24: error: 'SYS_getdents' undeclared (first use in this function); did you mean 'SYS_getdents64'?
|
||||
|
||||
3026 | if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
|
||||
|
||||
| ^~~~~~~~~~~~
|
||||
|
||||
| SYS_getdents64
|
||||
|
||||
../src/ls.c:3026:24: note: each undeclared identifier is reported only once for each function it appears in
|
||||
|
||||
diff --git a/src/ls.c b/src/ls.c
|
||||
index 24b9832..64ecf40 100644
|
||||
--- a/src/ls.c
|
||||
+++ b/src/ls.c
|
||||
@@ -3018,7 +3018,7 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
|
||||
if (errno != EOVERFLOW)
|
||||
break;
|
||||
}
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) && defined(__x86_64__)
|
||||
else if (! found_any_entries)
|
||||
{
|
||||
/* If readdir finds no directory entries at all, not even "." or
|
32
base/cpio/cpio.SMBuild
Executable file
32
base/cpio/cpio.SMBuild
Executable file
|
@ -0,0 +1,32 @@
|
|||
APP=cpio
|
||||
VERSION=2.13
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.gnu.org/software/cpio/'
|
||||
DOWNLOAD='https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.gz'
|
||||
DESC="Backup and archiving utility"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
CFLAGS="$CFLAGS -fcommon" \
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp -a COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
078d5d0ab398adb76b0a4e83a07821edf2cca5e84308ef547fd530c6c6c3d4b8577833581614aedfd23ca697cab058672dba7886642d8a3eb9ae769c10d672e8 cpio-2.13.tar.lz
|
||||
"
|
10
base/crda/01-Makefile-dont-run-ldconfig.patch
Normal file
10
base/crda/01-Makefile-dont-run-ldconfig.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/Makefile 2014-12-11 00:51:29.000000000 +0100
|
||||
+++ b/Makefile 2016-04-23 03:03:33.785974265 +0200
|
||||
@@ -127,7 +127,6 @@
|
||||
$(NQ) ' INSTALL libreg'
|
||||
$(Q)mkdir -p $(DESTDIR)/$(LIBDIR)
|
||||
$(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/
|
||||
- $(Q)ldconfig
|
||||
|
||||
%.o: %.c regdb.h $(LIBREG)
|
||||
$(NQ) ' CC ' $@
|
95
base/crda/crda-4.14-python-3.patch
Normal file
95
base/crda/crda-4.14-python-3.patch
Normal file
|
@ -0,0 +1,95 @@
|
|||
diff --git a/utils/key2pub.py b/utils/key2pub.py
|
||||
index 9bb04cd..632e6a6 100755
|
||||
--- a/utils/key2pub.py
|
||||
+++ b/utils/key2pub.py
|
||||
@@ -3,20 +3,20 @@
|
||||
import sys
|
||||
try:
|
||||
from M2Crypto import RSA
|
||||
-except ImportError, e:
|
||||
+except ImportError as e:
|
||||
sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message)
|
||||
sys.stderr.write('Please install the "M2Crypto" Python module.\n')
|
||||
sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n')
|
||||
sys.exit(1)
|
||||
|
||||
def print_ssl_64(output, name, val):
|
||||
- while val[0] == '\0':
|
||||
+ while val[0:1] == b'\0':
|
||||
val = val[1:]
|
||||
while len(val) % 8:
|
||||
- val = '\0' + val
|
||||
+ val = b'\0' + val
|
||||
vnew = []
|
||||
while len(val):
|
||||
- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]))
|
||||
+ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8]))
|
||||
val = val[8:]
|
||||
vnew.reverse()
|
||||
output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
|
||||
@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val):
|
||||
output.write('};\n\n')
|
||||
|
||||
def print_ssl_32(output, name, val):
|
||||
- while val[0] == '\0':
|
||||
+ while val[0:1] == b'\0':
|
||||
val = val[1:]
|
||||
while len(val) % 4:
|
||||
- val = '\0' + val
|
||||
+ val = b'\0' + val
|
||||
vnew = []
|
||||
while len(val):
|
||||
- vnew.append((val[0], val[1], val[2], val[3], ))
|
||||
+ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4]))
|
||||
val = val[4:]
|
||||
vnew.reverse()
|
||||
output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew)))
|
||||
@@ -80,21 +80,21 @@ struct pubkey {
|
||||
|
||||
static struct pubkey keys[] = {
|
||||
''')
|
||||
- for n in xrange(n + 1):
|
||||
+ for n in range(n + 1):
|
||||
output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
|
||||
output.write('};\n')
|
||||
pass
|
||||
|
||||
def print_gcrypt(output, name, val):
|
||||
output.write('#include <stdint.h>\n')
|
||||
- while val[0] == '\0':
|
||||
+ while val[0:1] == b'\0':
|
||||
val = val[1:]
|
||||
output.write('static const uint8_t %s[%d] = {\n' % (name, len(val)))
|
||||
idx = 0
|
||||
for v in val:
|
||||
if not idx:
|
||||
output.write('\t')
|
||||
- output.write('0x%.2x, ' % ord(v))
|
||||
+ output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v)))
|
||||
idx += 1
|
||||
if idx == 8:
|
||||
idx = 0
|
||||
@@ -117,7 +117,7 @@ struct key_params {
|
||||
|
||||
static const struct key_params __attribute__ ((unused)) keys[] = {
|
||||
''')
|
||||
- for n in xrange(n + 1):
|
||||
+ for n in range(n + 1):
|
||||
output.write(' KEYS(e_%d, n_%d),\n' % (n, n))
|
||||
output.write('};\n')
|
||||
|
||||
@@ -135,7 +135,7 @@ except IndexError:
|
||||
mode = None
|
||||
|
||||
if not mode in modes:
|
||||
- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))
|
||||
+ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())))
|
||||
sys.exit(2)
|
||||
|
||||
output = open(outfile, 'w')
|
||||
@@ -153,3 +153,5 @@ for f in files:
|
||||
idx += 1
|
||||
|
||||
modes[mode][1](output, idx - 1)
|
||||
+
|
||||
+output.close()
|
35
base/crda/crda.SMBuild
Executable file
35
base/crda/crda.SMBuild
Executable file
|
@ -0,0 +1,35 @@
|
|||
APP=crda
|
||||
VERSION=4.14
|
||||
BUILD=2sml
|
||||
REQUIRES="libnl libgcrypt python-m2crypto"
|
||||
DESC="Udev wrapper for communicating between kernel and userspace"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
# Thank you alpine linux
|
||||
patch -p1 < $SRCDIR/01-Makefile-dont-run-ldconfig.patch
|
||||
# Thank you arch linux
|
||||
patch -p1 < $SRCDIR/crda-4.14-python-3.patch
|
||||
|
||||
# Disable -Werror, just in case
|
||||
sed -i 's@-Werror@@g' Makefile
|
||||
|
||||
make V=1 PREFIX="/" SBINDIR="/bin"
|
||||
make install PREFIX="/" SBINDIR="/bin" DESTDIR=$PKG
|
||||
|
||||
cp LICENSE $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
d75990625c8ccc04beb7d300d519d18b715c8cc0a2ba231dc0dd6b9fe2906f20cd53609ef8f07ae74f4c2437dea47d8246b6319e9b02e4c905359854ca5db9b7 crda-4.14.tar.xz
|
||||
c642976b193722c0050c13331a010b466cea8391bb5f945832604a556e274ea1a4b289c78f74ff5d502fae800f18219db3d10ff10c0528eefc5e9443a963640f 01-Makefile-dont-run-ldconfig.patch
|
||||
6ab136d1a8fe59a6e1d92d8e07d2074bad7c663162e03b00916bb26c382ef66876b61b0f11b86a5705cc493d666497fd96d94b9d3f469b4bdedc37acf391d5e1 crda-4.14-python-3.patch
|
||||
"
|
33
base/cryptsetup/cryptsetup.SMBuild
Executable file
33
base/cryptsetup/cryptsetup.SMBuild
Executable file
|
@ -0,0 +1,33 @@
|
|||
APP=cryptsetup
|
||||
VERSION=1.7.4
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://github.com/mbroz/cryptsetup"
|
||||
DOWNLOAD="https://github.com/mbroz/cryptsetup/archive/refs/tags/v1_7_4.tar.gz"
|
||||
DESC="Utility for setting up encrypted filesystems"
|
||||
REQUIRES="popt util-linux libgpg-error libgcrypt lvm"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sbindir=/bin \
|
||||
--libdir=/lib \
|
||||
--sysconfdir=/etc
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING* $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
b4fc1a2be208ebc795057964fd3d1d3756af9b07f0ae33bdd185ff1415961be70f380b0d98583a25e044dee3605997b96cdc3ea3e34ed3a4cb14cf1f48f65446 cryptsetup-1.7.4.tar.lz
|
||||
"
|
1
base/curl/cacert-fetch.sh
Executable file
1
base/curl/cacert-fetch.sh
Executable file
|
@ -0,0 +1 @@
|
|||
lftpget http://curl.haxx.se/ca/cacert.pem && rm cacert.pem.bz2 && bzip2 -9 cacert.pem
|
3401
base/curl/cacert.pem
Normal file
3401
base/curl/cacert.pem
Normal file
File diff suppressed because it is too large
Load diff
46
base/curl/curl.SMBuild
Executable file
46
base/curl/curl.SMBuild
Executable file
|
@ -0,0 +1,46 @@
|
|||
APP=curl
|
||||
VERSION=7.77.0
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://curl.se/'
|
||||
DOWNLOAD='https://curl.se/download/curl-7.77.0.tar.xz'
|
||||
DESC="Command line URL data transfer tool"
|
||||
REQUIRES="zlib openssl brotli libssh2 libidn2 nghttp2 libunistring"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc \
|
||||
--with-libssh2 \
|
||||
--without-ca-bundle \
|
||||
--with-ca-path=/etc/ssl/certs \
|
||||
--with-openssl
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
( cd docs/libcurl
|
||||
make install-man3 DESTDIR=$PKG
|
||||
cd opts
|
||||
make install-man3 DESTDIR=$PKG
|
||||
)
|
||||
|
||||
# We don't ship the related perl script (yet):
|
||||
rm -f $PKG/share/man/man1/mk-ca-bundle.1
|
||||
|
||||
strip -g $PKG/lib/libcurl.a
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
aef92a0e3f8ce8491b258a9a1c4dcea3c07c29b139a1f68f08619caa0295cfde76335d2dfb9cdf434525daea7dd05d8acd22f203f5ccc7735bd317964ec1da76 curl-7.77.0.tar.xz
|
||||
"
|
25
base/cython/cython.SMBuild
Executable file
25
base/cython/cython.SMBuild
Executable file
|
@ -0,0 +1,25 @@
|
|||
APP=cython
|
||||
VERSION=0.29.21
|
||||
BUILD=1sml
|
||||
HOMEPAGE="https://pypi.org/project/Cython"
|
||||
REQUIRES="python3 python-setuptools"
|
||||
DESC="C-Extensions for Python3"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf Cython-$VERSION
|
||||
|
||||
tar xf $SRCDIR/Cython-$VERSION.tar.?z*
|
||||
cd Cython-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
python3 setup.py install --prefix="" --root=$PKG
|
||||
|
||||
cp COPYING.txt LICENSE.txt $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
6216e63996e83b887cdcee6cd912d42e7da853640336b9190f5115d687848a902ee5a8edd6bfaef645c066b89e17dcd80ca1387688eb80a527ec23a0a4636e8f Cython-0.29.21.tar.gz
|
||||
"
|
28
base/db/bdb-configure.patch
Normal file
28
base/db/bdb-configure.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- db-5.3.21.org/dist/configure 2012-09-29 19:57:08.668000002 +0000
|
||||
+++ db-5.3.21/dist/configure 2012-09-29 20:10:28.304000001 +0000
|
||||
@@ -21387,7 +21387,7 @@
|
||||
# x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
-
|
||||
+#include <stdlib.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -22458,7 +22458,7 @@
|
||||
if test "$db_cv_atomic" = no; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
-
|
||||
+#include <stdlib.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -23433,6 +23433,7 @@
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/time.h>
|
||||
+#include <time.h>
|
||||
int
|
||||
main ()
|
||||
{
|
55
base/db/db.SMBuild
Executable file
55
base/db/db.SMBuild
Executable file
|
@ -0,0 +1,55 @@
|
|||
APP=db
|
||||
VERSION=6.2.23
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.oracle.com/database/technologies/related/berkeleydb.html'
|
||||
DOWNLOAD='http://download.oracle.com/berkeley-db/db-6.2.23.tar.gz'
|
||||
DESC="Berkeley embedded database library"
|
||||
REQUIRES="gcc-libs"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
if [ "$ARCH" = "aarch64" ]; then
|
||||
db_atomic=gcc-builtin
|
||||
else
|
||||
db_atomic=x86/gcc-assembly
|
||||
fi
|
||||
|
||||
patch -p1 < $SRCDIR/bdb-configure.patch
|
||||
|
||||
cd build_unix
|
||||
|
||||
CFLAGS="-D_GNU_SOURCE" \
|
||||
db_cv_clock_monotonic=yes \
|
||||
db_cv_build_sequence=yes \
|
||||
db_cv_mmap_extend=yes \
|
||||
db_cv_atomic="$db_atomic" \
|
||||
../dist/configure \
|
||||
--prefix="" \
|
||||
--libdir=/lib \
|
||||
--sysconfdir=/etc \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--enable-dbm \
|
||||
--enable-cxx
|
||||
|
||||
sed -i 's/^install_docs:/install_docs:\n\ttrue\ninstall_crap:/' Makefile
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cd ..
|
||||
cp LICENSE $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
beb17661a44a4bb3feb3e95d6670599087fe38dd604f3902f90bf0336dc1d823adc7f56be854a55caa995f1503681896842ecfcd3dd668e47370c624255bd4ee db-6.2.23.tar.lz
|
||||
8a91a6ff079792bf36efc11302140eef857019ab8e66058e39ea8b9a81dc2b4837fe2941b380343cf74e219d800eba2a08194d5b76fb48afc9cf0a599f1bf919 bdb-configure.patch
|
||||
"
|
26
base/dcron/0002-README-var-spool-cron-crontabs-root.patch
Normal file
26
base/dcron/0002-README-var-spool-cron-crontabs-root.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
From 500f3d402a94c6950946515d76ebd72872a6d0e2 Mon Sep 17 00:00:00 2001
|
||||
From: Jim Pryor <profjim@jimpryor.net>
|
||||
Date: Sun, 1 May 2011 18:56:17 -0400
|
||||
Subject: [PATCH 2/9] README: /var/spool/cron/crontabs/root
|
||||
|
||||
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
|
||||
---
|
||||
README | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index de02958..e33b1aa 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -115,7 +115,7 @@ are normally in /var/spool/cron/cronstamps. These directories normally have perm
|
||||
|
||||
Here is the superuser's crontab, created using `sudo crontab -e`:
|
||||
|
||||
- -rw------- 0 root root 513 Jan 6 18:58 /var/spool/cron/root
|
||||
+ -rw------- 0 root root 513 Jan 6 18:58 /var/spool/cron/crontabs/root
|
||||
|
||||
TESTING
|
||||
-------
|
||||
--
|
||||
2.13.2
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
From 65d2649a7c8b72561eefcec239f97e7fd386114e Mon Sep 17 00:00:00 2001
|
||||
From: Corey Theiss <corey.theiss@maclaren.com>
|
||||
Date: Mon, 24 Mar 2014 16:25:31 -0400
|
||||
Subject: [PATCH 6/9] Fixed a bug whereby syncs killed all waiting jobs.
|
||||
|
||||
---
|
||||
database.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/database.c b/database.c
|
||||
index dd971ce..02c5c92 100644
|
||||
--- a/database.c
|
||||
+++ b/database.c
|
||||
@@ -1232,8 +1232,17 @@ CheckJobs(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ nStillRunning += file->cf_Running;
|
||||
+ }
|
||||
+ /* For the purposes of this check, increase the "still running" counter if a file has lines that are waiting */
|
||||
+ if (file->cf_Running == 0) {
|
||||
+ for (line = file->cf_LineBase; line; line = line->cl_Next) {
|
||||
+ if (line->cl_Pid == -2) {
|
||||
+ nStillRunning += 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
- nStillRunning += file->cf_Running;
|
||||
}
|
||||
return(nStillRunning);
|
||||
}
|
||||
--
|
||||
2.13.2
|
||||
|
27
base/dcron/0007-Update-main.c.patch
Normal file
27
base/dcron/0007-Update-main.c.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
From abf8c4bf53a84ef3de530519a3bbb6b599595f2c Mon Sep 17 00:00:00 2001
|
||||
From: robdewit <rdewit@wise-guys.nl>
|
||||
Date: Tue, 31 Mar 2015 14:24:15 +0200
|
||||
Subject: [PATCH 7/9] Update main.c
|
||||
|
||||
Removed bug where cron.update is not picked up while jobs are still running. (We have long running cronjobs and experienced long overdue cron.update files)
|
||||
---
|
||||
main.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/main.c b/main.c
|
||||
index 595f07a..0eba280 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -338,7 +338,8 @@ main(int ac, char **av)
|
||||
SynchronizeDir(SCDir, "root", 0);
|
||||
ReadTimestamps(NULL);
|
||||
}
|
||||
- } else {
|
||||
+ }
|
||||
+ if (rescan < 60) {
|
||||
CheckUpdates(CDir, NULL, t1, t2);
|
||||
CheckUpdates(SCDir, "root", t1, t2);
|
||||
}
|
||||
--
|
||||
2.13.2
|
||||
|
12
base/dcron/crontab.c.O_EXCL.diff
Normal file
12
base/dcron/crontab.c.O_EXCL.diff
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Nur dcron-4.5.orig//crontab.c dcron-4.5/crontab.c
|
||||
--- dcron-4.5.orig//crontab.c 2011-05-01 07:22:09.000000000 -0500
|
||||
+++ dcron-4.5/crontab.c 2011-08-22 16:26:46.778225447 -0500
|
||||
@@ -199,7 +199,7 @@
|
||||
* Read from repFd, write to fd for "$CDir/$USER.new"
|
||||
*/
|
||||
snprintf(path, sizeof(path), "%s.new", pas->pw_name);
|
||||
- if ((fd = open(path, O_CREAT|O_TRUNC|O_EXCL|O_APPEND|O_WRONLY, 0600)) >= 0) {
|
||||
+ if ((fd = open(path, O_CREAT|O_TRUNC|O_APPEND|O_WRONLY, 0600)) >= 0) {
|
||||
while ((n = read(repFd, buf, sizeof(buf))) > 0) {
|
||||
write(fd, buf, n);
|
||||
}
|
22
base/dcron/crontab.root
Normal file
22
base/dcron/crontab.root
Normal file
|
@ -0,0 +1,22 @@
|
|||
# If you don't want the output of a cron job mailed to you, you have to direct
|
||||
# any output to /dev/null. We'll do this here since these jobs should run
|
||||
# properly on a newly installed system. If a script fails, run-parts will
|
||||
# mail a notice to root.
|
||||
#
|
||||
# Run the hourly, daily, weekly, and monthly cron jobs.
|
||||
# Jobs that need different timing may be entered into the crontab as before,
|
||||
# but most really don't need greater granularity than this. If the exact
|
||||
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
|
||||
# needs, feel free to adjust them.
|
||||
#
|
||||
# Run hourly cron jobs at 47 minutes after the hour:
|
||||
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
|
||||
#
|
||||
# Run daily cron jobs at 4:40 every day:
|
||||
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
|
||||
#
|
||||
# Run weekly cron jobs at 4:30 on the first day of the week:
|
||||
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
|
||||
#
|
||||
# Run monthly cron jobs at 4:20 on the first day of the month:
|
||||
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
|
52
base/dcron/dcron.SMBuild
Executable file
52
base/dcron/dcron.SMBuild
Executable file
|
@ -0,0 +1,52 @@
|
|||
APP=dcron
|
||||
VERSION=4.5
|
||||
BUILD=1sml
|
||||
HOMEPAGE='http://www.jimpryor.net/linux/dcron.html'
|
||||
DOWNLOAD='http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz'
|
||||
DESC="Dillons Cron daemon"
|
||||
REQUIRES="musl"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
patch -p1 < $SRCDIR/0002-README-var-spool-cron-crontabs-root.patch
|
||||
patch -p1 < $SRCDIR/0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch
|
||||
patch -p1 < $SRCDIR/0007-Update-main.c.patch
|
||||
patch -p1 < $SRCDIR/crontab.c.O_EXCL.diff
|
||||
|
||||
make PREFIX="" BINDIR=/bin SBINDIR=/bin CRONTAB_GROUP=root
|
||||
|
||||
install -Dm 755 crond $PKG/bin/crond
|
||||
install -Dm 4711 crontab $PKG/bin/crontab
|
||||
install -Dm 755 $SRCDIR/run-parts $PKG/bin/run-parts
|
||||
|
||||
install -Dm 644 crontab.1 $PKG/share/man/man1/crontab.1
|
||||
install -Dm 644 crond.8 $PKG/share/man/man8/crond.8
|
||||
install -Dm 644 $SRCDIR/run-parts.8 $PKG/share/man/man8/run-parts.8
|
||||
|
||||
# Create some other stuff we need
|
||||
mkdir -p $PKG/etc/cron.{hourly,daily,weekly,monthly
|
||||
install -dm 0751 $PKG/var/spool/cron
|
||||
install -dm 750 $PKG/var/spool/cron/crontabs
|
||||
install -dm 750 $PKG/var/spool/cron/cronstamps
|
||||
install -Dm 600 $SRCDIR/crontab.root $PKG/var/spool/cron/crontabs/root.new
|
||||
|
||||
# dcron will whine about "unable to scan this directory", so we'll create it
|
||||
mkdir -p $PKG/etc/cron.d
|
||||
|
||||
cp CHANGELOG README $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
SHA512SUMS="
|
||||
08521391d16ba5adf80278ec2a734319c26c48841fd94b119c0b27d744c2cfb3562b1a3630135a03d1c43b1668d49262713abb20ff5f7ecd397a2a19a2f6105a dcron-4.5.tar.gz
|
||||
687ba63afc4bf6028a7a4f0debfcb8b8758aaacd1ddb317136d55dfae7c57c572d81edf340b4b36476280a38b71b740f23e9f56a02a95ebd0f0aacdcba735c59 0002-README-var-spool-cron-crontabs-root.patch
|
||||
faf6ecee8f678298b1a8cd27f42f42e3e3396062d73ea4bfff14f930ae71e99613354d9ec234407936e19c05b1de9cec46fffbf6df9ef71d4294d8b32bdad74d 0006-Fixed-a-bug-whereby-syncs-killed-all-waiting-jobs.patch
|
||||
534628dfaad83a0d746731b67756fff3dd6a5b305efb07e00e3a7acb6bac9138e7ee3cae22d1314ee3041b22b9dd3574c1342e26af39198d6d0685964318876d 0007-Update-main.c.patch
|
||||
a56862ea0fc1aa2f5fa77c2d341c2e35bb5d2ac5d9942c3dee25662eac6c9078fdd293835ec471ece22b2add4ae21db596cb0d41fb765ee92fb9aa53a4252287 crontab.c.O_EXCL.diff
|
||||
"
|
29
base/dcron/doinst.sh
Normal file
29
base/dcron/doinst.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
config() {
|
||||
for infile in $1; do
|
||||
NEW="$infile"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
done
|
||||
}
|
||||
|
||||
preserve_perms() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
if [ -e $OLD ]; then
|
||||
cp -a $OLD ${NEW}.incoming
|
||||
cat $NEW > ${NEW}.incoming
|
||||
mv ${NEW}.incoming $NEW
|
||||
fi
|
||||
config $NEW
|
||||
}
|
||||
|
||||
config var/spool/cron/crontabs/root.new
|
||||
rm -f var/spool/cron/crontabs/root.new
|
||||
|
46
base/dcron/run-parts
Normal file
46
base/dcron/run-parts
Normal file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
# run-parts: Runs all the scripts found in a directory.
|
||||
|
||||
# keep going when something fails
|
||||
set +e
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: run-parts <directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $1 ]; then
|
||||
echo "Not a directory: $1"
|
||||
echo "Usage: run-parts <directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# There are several types of files that we would like to
|
||||
# ignore automatically, as they are likely to be backups
|
||||
# of other scripts:
|
||||
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
|
||||
|
||||
# Main loop:
|
||||
for SCRIPT in $1/* ; do
|
||||
# If this is not a regular file, skip it:
|
||||
if [ ! -f $SCRIPT ]; then
|
||||
continue
|
||||
fi
|
||||
# Determine if this file should be skipped by suffix:
|
||||
SKIP=false
|
||||
for SUFFIX in $IGNORE_SUFFIXES ; do
|
||||
if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
|
||||
SKIP=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$SKIP" = "true" ]; then
|
||||
continue
|
||||
fi
|
||||
# If we've made it this far, then run the script if it's executable:
|
||||
if [ -x $SCRIPT ]; then
|
||||
$SCRIPT || echo "$SCRIPT failed."
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
36
base/dcron/run-parts.8
Normal file
36
base/dcron/run-parts.8
Normal file
|
@ -0,0 +1,36 @@
|
|||
.\" -*- nroff -*-
|
||||
.ds g \" empty
|
||||
.ds G \" empty
|
||||
.\" Like TP, but if specified indent is more than half
|
||||
.\" the current line-length - indent, use the default indent.
|
||||
.de Tp
|
||||
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
|
||||
.el .TP "\\$1"
|
||||
..
|
||||
.TH RUN-PARTS 8 "14 Apr 2002" "Slackware Version 8.1.0
|
||||
.SH NAME
|
||||
run-parts \- run scripts found in a directory
|
||||
.SH SYNOPSIS
|
||||
.B run-parts <directory>
|
||||
.LP
|
||||
.SH DESCRIPTION
|
||||
.B run-parts
|
||||
is a utility that will run scripts that are found in a directory. For example,
|
||||
it might be useful to create an /etc/cron.daily directory and put scripts in
|
||||
there for daily cron jobs. Then
|
||||
.B run-parts
|
||||
can be called once a day from root's crontab to run all the scripts found in
|
||||
/etc/cron.daily:
|
||||
|
||||
40 4 * * * run-parts /etc/cron.daily
|
||||
|
||||
.B run-parts
|
||||
automatically skips files with certain suffixes that are generally associated
|
||||
with backup or extra files. Any file that ends in one of these will be silently
|
||||
ignored: ~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp
|
||||
.SH AUTHOR
|
||||
Patrick J. Volkerding <volkerdi@slackware.com>, with ideas borrowed from the
|
||||
Red Hat and Debian versions of this utility.
|
||||
.SH "SEE ALSO"
|
||||
.BR crond(8),
|
||||
.BR crontab(8).
|
34
base/desktop-file-utils/desktop-file-utils.SMBuild
Executable file
34
base/desktop-file-utils/desktop-file-utils.SMBuild
Executable file
|
@ -0,0 +1,34 @@
|
|||
APP=desktop-file-utils
|
||||
VERSION=0.24
|
||||
BUILD=1sml
|
||||
HOMEPAGE='https://www.freedesktop.org/wiki/Software/desktop-file-utils/'
|
||||
DESC="Utilities for manipulating desktop files"
|
||||
REQUIRES="glib pcre"
|
||||
|
||||
build() {
|
||||
mkandenterbuilddir
|
||||
rm -rf $APP-$VERSION
|
||||
|
||||
tar xf $SRCDIR/$APP-$VERSION.tar.?z*
|
||||
cd $APP-$VERSION
|
||||
fixbuilddirpermissions
|
||||
|
||||
# Thank you slackware
|
||||
patch -p1 < $SRCDIR/desktop-file-utils.quiet.warnings.diff
|
||||
|
||||
./configure \
|
||||
--prefix="" \
|
||||
--sysconfdir=/etc
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
cp COPYING $PKGDOCS/
|
||||
|
||||
mkfinalpkg
|
||||
}
|
||||
|
||||
SHA512SUMS="
|
||||
cd662fe5d77b5feb6c1063e69a9534b4bba23a32ed5d6ff8685b71d6f26114e4374bae184407c5e407cbaaf4e87812f4c9e71dff76dbe774c23bff6ebf7983f3 desktop-file-utils-0.24.tar.lz
|
||||
f8371a36c4cda77797e6f1b4463dcf1c88d9200b65aa651b37cf902db9f266b7201da370014b181f9369913572aef816bdb9184ce88172a1fd45fc99886cca55 desktop-file-utils.quiet.warnings.diff
|
||||
"
|
|
@ -0,0 +1,18 @@
|
|||
--- ./src/update-desktop-database.c.orig 2010-03-09 20:33:41.000000000 -0600
|
||||
+++ ./src/update-desktop-database.c 2010-05-11 09:00:08.000000000 -0500
|
||||
@@ -135,15 +135,9 @@
|
||||
case MU_VALID:
|
||||
break;
|
||||
case MU_DISCOURAGED:
|
||||
- udd_print (_("Warning in file \"%s\": usage of MIME type \"%s\" is "
|
||||
- "discouraged (%s)\n"),
|
||||
- desktop_file, mime_types[i], valid_error);
|
||||
g_free (valid_error);
|
||||
break;
|
||||
case MU_INVALID:
|
||||
- udd_print (_("Error in file \"%s\": \"%s\" is an invalid MIME type "
|
||||
- "(%s)\n"),
|
||||
- desktop_file, mime_types[i], valid_error);
|
||||
g_free (valid_error);
|
||||
/* not a break: we continue to the next mime type */
|
||||
continue;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue