initial commit. still needs work, but it works.

This commit is contained in:
yafox 2020-11-25 06:21:40 +00:00
commit 49df906573
No known key found for this signature in database
GPG Key ID: B501C30B37F4806C
1247 changed files with 49855 additions and 0 deletions

3
2048-c/default/conf.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "no config for $name yet."

3
2048-c/default/inst.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cp -av 2048 /bin/

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2020 "yafox"
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

8
README Normal file
View File

@ -0,0 +1,8 @@
# how-lix-os-pkgs
provides a set of dependencies and configuration, build, and install scripts for
lix-os' packages. meant to be checked out into the root directory of a "how"
installation as the "pkg" subdirectory.
at present it has many half-completed and deprecated packages which will be
removed from the master branch soon.

15
alsa-lib/default/conf.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh -e
./configure \
--disable-python \
--disable-static \
--enable-shared \
--disable-resmgr \
--enable-rawmidi \
--enable-seq \
--enable-aload \
--disable-dependency-tracking \
--without-versioned \
--build="$BUILD" \
--host="$HOST" \
--prefix="$PREFIX"

12
alsa-lib/default/deps Normal file
View File

@ -0,0 +1,12 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
pkgconf

7
alsa-lib/default/env.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh -e
. ../how/default-env.sh
CFLAGS="$SHARED_CFLAGS"
CXXFLAGS="$SHARED_CXXFLAGS"
LDFLAGS="$SHARED_LDFLAGS"

3
alsa-lib/default/inst.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
make -j1 install

5
alsa-lib/default/make.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
make
rm -rf include/sound/*
printf "all:\ncheck:\ninstall:\n" > include/sound/Makefile

View File

@ -0,0 +1,32 @@
Patch is from master branch:
https://github.com/alsa-project/alsa-lib/commit/ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e
From ad8c8e5503980295dd8e5e54a6285d2d7e32eb1e Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Thu, 22 Oct 2020 20:57:32 +0200
Subject: [PATCH] dlmisc: the snd_plugin_dir_set / snd_plugin_dir must be
declared even for \!DL_ORIGIN_AVAILABLE
Fixes: 8580c081c2 ("dlsym: add support for ALSA_PLUGIN_DIR environment variable")
BugLink: https://github.com/alsa-project/alsa-lib/issues/91
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/dlmisc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/dlmisc.c b/src/dlmisc.c
index c9517c55..f20eb593 100644
--- a/src/dlmisc.c
+++ b/src/dlmisc.c
@@ -42,11 +42,9 @@
#ifndef PIC
struct snd_dlsym_link *snd_dlsym_start = NULL;
#endif
-#ifdef DL_ORIGIN_AVAILABLE
static int snd_plugin_dir_set = 0;
static char *snd_plugin_dir = NULL;
#endif
-#endif
#if defined(DL_ORIGIN_AVAILABLE) && defined(HAVE_LIBPTHREAD)
static pthread_mutex_t snd_dlpath_mutex = PTHREAD_MUTEX_INITIALIZER;

View 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

View File

@ -0,0 +1 @@
../patches-available/fix-dlo.patch

View File

@ -0,0 +1 @@
../patches-available/remove-test.patch

3
argon2/default/conf.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
${EDITOR:-vi} Makefile

13
argon2/default/deps Normal file
View File

@ -0,0 +1,13 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
ncurses
$EDITORDEP

3
at-spi2-atk/default/conf.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
meson --prefix="$PREFIX" ../build

31
at-spi2-atk/default/deps Normal file
View File

@ -0,0 +1,31 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
pkgconf
samurai
python3-dynamic
py3-ordered-set
py3-appdirs
py3-parsing
py3-six
py3-packaging
py3-setuptools
meson
libxml2
xz
zlib
gzip
libffi
glib
dbus
at-spi2-core
atk
gtk-dynamic >= 3.0.0

View File

@ -0,0 +1,7 @@
#!/bin/sh -e
. ../how/default-env.sh
CFLAGS="$SHARED_CFLAGS"
CXXFLAGS="$SHARED_CXXFLAGS"
LDFLAGS="$SHARED_LDFLAGS -lz -llzma"

3
at-spi2-atk/default/inst.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
samu -j$(nproc) -C ../build install

3
at-spi2-atk/default/make.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
samu -j$(nproc) -C ../build

3
at-spi2-core/default/conf.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
meson --prefix="$PREFIX" ../build

25
at-spi2-core/default/deps Normal file
View File

@ -0,0 +1,25 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
pkgconf
samurai
python3-dynamic
py3-ordered-set
py3-appdirs
py3-parsing
py3-six
py3-packaging
py3-setuptools
meson
zlib
libffi
glib
dbus

View File

@ -0,0 +1,7 @@
#!/bin/sh -e
. ../how/default-env.sh
CFLAGS="$SHARED_CFLAGS"
CXXFLAGS="$SHARED_CXXFLAGS"
LDFLAGS="$SHARED_LDFLAGS"

3
at-spi2-core/default/inst.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
samu -j$(nproc) -C ../build install

3
at-spi2-core/default/make.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
samu -j$(nproc) -C ../build

6
atk/default/conf.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh -e
CFLAGS="$SHARED_CFLAGS" \
CXXFLAGS="$SHARED_CXXFLAGS" \
LDFLAGS="$SHARED_LDFLAGS" \
meson --prefix=$PREFIX ../build

26
atk/default/deps Normal file
View File

@ -0,0 +1,26 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
ldd
libffi
pkgconf
zlib
glib
gobject-introspection-dynamic
samurai
python3-dynamic
py3-ordered-set
py3-appdirs
py3-parsing
py3-six
py3-packaging
py3-setuptools
meson

3
atk/default/inst.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
meson install --no-rebuild -C ../build

6
atk/default/make.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh -e
CFLAGS="$SHARED_CFLAGS" \
CXXFLAGS="$SHARED_CXXFLAGS" \
LDFLAGS="$SHARED_LDFLAGS" \
meson compile -j$(nproc) -C ../build

13
attr/default/deps Normal file
View File

@ -0,0 +1,13 @@
lix-os-filesystem
linux-kernel
sbase
ubase
musl-cross-make
make
automake
autoconf
dash
patch
awk
gnu-grep
gnu-sed

View File

@ -0,0 +1,15 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
pkgconf
perl
m4
autoconf

View File

@ -0,0 +1,5 @@
--- /dev/null
+++ src-mod/.tarball-version
@@ -0,0 +1 @@
+2.69.209-8a09
\ No newline at end of file

17
autoconf/default/conf.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
set -e
autoreconf -vi
./configure \
--build=$(uname -m)-lix-linux-musl \
--host=$(uname -m)-lix-linux-musl \
--prefix=
## explanation
#
# --build: make sure the correct build string is set.
#
# --host: make sure the correct host string is set.
#
# --prefix: respect the "no /usr/local" scheme.

17
autoconf/default/deps Normal file
View File

@ -0,0 +1,17 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
m4
help2man
texinfo
automake
autoconf != $version
perl

5
autoconf/v2.69b/patch Normal file
View File

@ -0,0 +1,5 @@
--- /dev/null
+++ src-mod/.tarball-version
@@ -0,0 +1 @@
+2.69b-5878
\ No newline at end of file

21
automake/default/conf.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
CC="nonexistent" \
CPP="nonexistent" \
CXX="nonexistent" \
./configure #\
# --build="$BUILD" \
# --host="$HOST" \
# --prefix="/"
## explanation
#
# --disable-shared: don't build anything with dynamic linking.
#
# --enable-static: use static linking instead.
#
# --build: make sure the build string gets set correctly.
#
# --host: make sure the host string gets set correctly.
#
# --prefix: respect the "no /usr/local" policy.

12
automake/default/deps Normal file
View File

@ -0,0 +1,12 @@
lix-os-filesystem
linux-kernel
sbase
ubase
dash
patch
perl
m4
autoconf
gnu-grep
awk
make

5
awk/default/conf.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
${EDITOR:-vi} makefile

9
awk/default/deps Normal file
View File

@ -0,0 +1,9 @@
lix-os-filesystem
linux-kernel
patch
sbase
ubase
dash
musl-cross-make
m4
bison

6
awk/default/inst.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
[ ! -e /bin/awk ] || rm /bin/awk
cp -v a.out /bin/awk

11
awk/default/patch Normal file
View File

@ -0,0 +1,11 @@
--- a/makefile 2020-08-02 20:28:55.385968902 +0000
+++ b/makefile 2020-08-08 21:34:09.350000000 +0000
@@ -31,7 +31,7 @@
#CC = gcc -Wall -g -Wwrite-strings
#CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing
#CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov
-HOSTCC = gcc -g -Wall -pedantic -Wcast-qual
+HOSTCC = gcc -g -Wall -pedantic -Wcast-qual -static --static
CC = $(HOSTCC) # change this is cross-compiling.
# yacc options. pick one; this varies a lot by system.

20
bash/default/conf.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
./configure \
--enable-static-link \
--without-bash-malloc \
--disable-nls \
--build=$(uname -m)-lix-linux-musl \
--prefix=
## explanation
#
# --enable-static-link: links dynamically otherwise.
#
# --without-bash-malloc: use musl's malloc. bash malloc does not work here.
#
# --disable-nls: disable localisation.
#
# --build: configure assumes a glibc system otherwise.
#
# --prefix: respect the "no /usr/local" scheme.

14
bash/default/deps Normal file
View File

@ -0,0 +1,14 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
bison
flex
ncurses

6
bash/default/inst.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
make -j$(nproc) install
ln -sf bash /bin/sh

17
bc/default/conf.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
CC="gcc" \
./configure --bc-only --disable-generated-tests --disable-nls --prefix=/
## explanation
#
# CC: configure tries to use `c99` otherwise.
#
# --bc-only: don't bother building dc as well.
#
# --disable-generated-tests:
# tests depend on bc already being present and aren't really necessary.
#
# --disable-nls: skip locale support.
#
# --prefix: respect lix os' file structure.

5
bearssl/default/conf.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -e
${EDITOR:-vi} conf/Unix.mk

14
bearssl/default/deps Normal file
View File

@ -0,0 +1,14 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
ncurses
tls-certs
$EDITORDEP

8
bearssl/default/inst.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -e
cp -v build/brssl /bin/brssl
cp -v build/libbearssl.a /lib/
cp -v build/libbearssl.so /lib/
cp -v inc/*.h /include/

17
bison/default/deps Normal file
View File

@ -0,0 +1,17 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
m4 != 1.4.15
m4 != 1.4.14
m4 != 1.4.13
m4 != 1.4.12
m4 != 1.4.11
m4 >= 1.4.6

21
bit-babbler/default/conf.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# regenerate the 'configure' script for this system.
autoreconf -ivf
SEEDD_CONTROL_SOCKET=/var/run/bit-babbler/seedd.socket \
./configure \
--disable-shared \
--enable-static \
--without-udev \
--prefix=
## explanation
#
# SEEDD_CONTROL_SOCKET: put the ipc socket in /var/run instead of /run.
#
# --disable-shared --enable-static: link statically.
#
# --without-udev: avoid udev. it's not necessary. smdev handles hotplugging.
#
# --prefix: respect the "no /usr/local" scheme.

13
bit-babbler/default/deps Normal file
View File

@ -0,0 +1,13 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
libusb
bash

14
bit-babbler/default/inst.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
make -j$(nproc) install-seedd install-seedd-conf install-bbctl \
install-bbcheck install-bbvirt install-vm-conf install-man1
# explanation
#
# installs all targets EXCEPT the systemd service and the munin scripts.
# automagically creating startup scripts is not "the lix way." nothing should
# ever happen without the user's explicit say-so. making assumptions about
# what service runner the user is using is a bridge too far, as is setting up
# something to run every time the user logs in. if the user wants something
# to run automatically when they boot up, they need to make that happen in a
# way consistent with their preferred init system.

60
bit-babbler/default/patch Normal file
View File

@ -0,0 +1,60 @@
diff -ruN src/include/bit-babbler/impl/log.h src-mod/include/bit-babbler/impl/log.h
--- src/include/bit-babbler/impl/log.h 2018-02-08 18:05:43.000000000 +0000
+++ src-mod/include/bit-babbler/impl/log.h 2020-05-10 18:42:06.440000000 +0000
@@ -294,7 +294,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
- #if EM_PLATFORM_LINUX
+ #if EM_PLATFORM_LINUX && defined(__GLIBC__) // not all linuxes use glibc
// Querying the string length with a NULL for the output is a GNU extension.
// The glibc docs specify that behaviour but SUSv4 does not define it.
diff -ruN src/include/bit-babbler/qa.h src-mod/include/bit-babbler/qa.h
--- src/include/bit-babbler/qa.h 2018-02-08 18:05:43.000000000 +0000
+++ src-mod/include/bit-babbler/qa.h 2020-05-11 20:50:26.570000000 +0000
@@ -436,7 +436,7 @@
public:
// Accumulators
- size_t bin[ NBINS ];
+ size_t* bin;
size_t samples;
size_t inradius;
@@ -464,6 +464,7 @@
Data()
{
+ bin = new size_t[ NBINS ];
clear();
result[MIN].clear( MIN );
result[MAX].clear( MAX );
@@ -474,6 +475,7 @@
, inradius( data["PiIn"]->As<size_t>() )
, pisamples( data["PiSamples"]->As<size_t>() )
{ //{{{
+ bin = new size_t[ NBINS ];
Json::Data::Handle binarray = data["Bins"];
@@ -497,6 +499,7 @@
Data( Results_Only_, const Json::Data::Handle &data )
{ //{{{
+ bin = new size_t[ NBINS ];
clear();
samples = data["Samples"]->As<size_t>();
@@ -508,6 +511,11 @@
} //}}}
+ ~Data()
+ { //{{{
+ delete [] bin;
+ } //}}}
+
void clear()
{ //{{{

23
brotli/default/conf.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
sed -i 's,/usr/bin/env bash,/bin/sh,' tests/*.sh
./bootstrap
./configure \
--enable-shared \
--enable-static \
--build="$BUILD" \
--host="$HOST" \
--prefix="$PREFIX"
## explanation
#
# --enable-shared: produce shared libraries
#
# --enable-static: produce static libraries
#
# --build: make sure the build string gets set correctly.
#
# --host: make sure the host string gets set correctly.
#
# --prefix: respect the "no /usr/local" policy.

18
brotli/default/deps Normal file
View File

@ -0,0 +1,18 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
perl
m4
autoconf
automake
bc
libtool
python3-dynamic

View File

@ -0,0 +1,49 @@
Upstream: Yes
Reason: Fixes #11948
From 092446fafb4bfb81738853b7c7f76b293cd92a80 Mon Sep 17 00:00:00 2001
From: Evgenii Kliuchnikov <eustas.ru@gmail.com>
Date: Wed, 2 Sep 2020 10:49:49 +0200
Subject: [PATCH] Revert "Add runtime linker path to pkg-config files (#740)"
This reverts commit 31754d4ffce14153b5c2addf7a11019ec23f51c1.
---
scripts/libbrotlicommon.pc.in | 2 +-
scripts/libbrotlidec.pc.in | 2 +-
scripts/libbrotlienc.pc.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in
index 10ca969e..2a8cf7a3 100644
--- a/scripts/libbrotlicommon.pc.in
+++ b/scripts/libbrotlicommon.pc.in
@@ -7,5 +7,5 @@ Name: libbrotlicommon
URL: https://github.com/google/brotli
Description: Brotli common dictionary library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlicommon
+Libs: -L${libdir} -lbrotlicommon
Cflags: -I${includedir}
diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in
index e7c3124f..6f8ef2e4 100644
--- a/scripts/libbrotlidec.pc.in
+++ b/scripts/libbrotlidec.pc.in
@@ -7,6 +7,6 @@ Name: libbrotlidec
URL: https://github.com/google/brotli
Description: Brotli decoder library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlidec
+Libs: -L${libdir} -lbrotlidec
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}
diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in
index 4dd0811b..2098afe2 100644
--- a/scripts/libbrotlienc.pc.in
+++ b/scripts/libbrotlienc.pc.in
@@ -7,6 +7,6 @@ Name: libbrotlienc
URL: https://github.com/google/brotli
Description: Brotli encoder library
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -R${libdir} -lbrotlienc
+Libs: -L${libdir} -lbrotlienc
Requires.private: libbrotlicommon >= 1.0.2
Cflags: -I${includedir}

View File

@ -0,0 +1,16 @@
Upstream: no.
Reason: Without it the tool is linked staticlly.
GH has an issue requesting an option to build against the shared lib.
URL: https://github.com/google/brotli/issues/803
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,7 +183,7 @@
# Build the brotli executable
add_executable(brotli ${BROTLI_CLI_C})
-target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC})
+target_link_libraries(brotli ${BROTLI_LIBRARIES})
# Installation
if(NOT BROTLI_BUNDLED_MODE)

View File

@ -0,0 +1,115 @@
diff --git a/c/common/platform.h b/c/common/platform.h
index 84c448c..853fa83 100755
--- a/c/common/platform.h
+++ b/c/common/platform.h
@@ -223,12 +223,21 @@ OR:
#define BROTLI_TARGET_RISCV64
#endif
+#if defined(__s390x__)
+#define BROTLI_TARGET_S390X
+#endif
+
+#if defined(__mips64)
+#define BROTLI_TARGET_MIPS64
+#endif
+
#if defined(BROTLI_BUILD_64_BIT)
#define BROTLI_64_BITS 1
#elif defined(BROTLI_BUILD_32_BIT)
#define BROTLI_64_BITS 0
#elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \
- defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
+ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) || \
+ defined(BROTLI_TARGET_S390X) || defined(BROTLI_TARGET_MIPS64)
#define BROTLI_64_BITS 1
#else
#define BROTLI_64_BITS 0
@@ -279,7 +288,7 @@ OR:
#define BROTLI_ALIGNED_READ (!!1)
#elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8_ANY) || \
- defined(BROTLI_TARGET_RISCV64)
+ defined(BROTLI_TARGET_RISCV64) || defined(BROTLI_TARGET_S390X)
/* Allow unaligned read only for white-listed CPUs. */
#define BROTLI_ALIGNED_READ (!!0)
#else
@@ -289,22 +298,42 @@ OR:
#if BROTLI_ALIGNED_READ
/* Portable unaligned memory access: read / write values via memcpy. */
static BROTLI_INLINE uint16_t BrotliUnalignedRead16(const void* p) {
+#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
+ const struct { uint16_t x; } __attribute__((__packed__)) *t = p;
+ return t->x;
+#else
uint16_t t;
memcpy(&t, p, sizeof t);
return t;
+#endif
}
static BROTLI_INLINE uint32_t BrotliUnalignedRead32(const void* p) {
+#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
+ const struct { uint32_t x; } __attribute__((__packed__)) *t = p;
+ return t->x;
+#else
uint32_t t;
memcpy(&t, p, sizeof t);
return t;
+#endif
}
static BROTLI_INLINE uint64_t BrotliUnalignedRead64(const void* p) {
+#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
+ const struct { uint64_t x; } __attribute__((__packed__)) *t = p;
+ return t->x;
+#else
uint64_t t;
memcpy(&t, p, sizeof t);
return t;
+#endif
}
static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
+#if defined(__mips__) && (!defined(__mips_isa_rev) || __mips_isa_rev < 6)
+ struct { uint64_t x; } __attribute__((__packed__)) *t = p;
+ t->x = v;
+#else
memcpy(p, &v, sizeof v);
+#endif
}
#else /* BROTLI_ALIGNED_READ */
/* Unaligned memory access is allowed: just cast pointer to requested type. */
@@ -385,31 +414,20 @@ static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) {
#define BROTLI_UNALIGNED_STORE64LE BrotliUnalignedWrite64
#elif BROTLI_BIG_ENDIAN /* BROTLI_LITTLE_ENDIAN */
/* Explain compiler to byte-swap values. */
-#define BROTLI_BSWAP16_(V) ((uint16_t)( \
- (((V) & 0xFFU) << 8) | \
- (((V) >> 8) & 0xFFU)))
static BROTLI_INLINE uint16_t BROTLI_UNALIGNED_LOAD16LE(const void* p) {
uint16_t value = BrotliUnalignedRead16(p);
- return BROTLI_BSWAP16_(value);
+ return __builtin_bswap16(value);
}
-#define BROTLI_BSWAP32_(V) ( \
- (((V) & 0xFFU) << 24) | (((V) & 0xFF00U) << 8) | \
- (((V) >> 8) & 0xFF00U) | (((V) >> 24) & 0xFFU))
static BROTLI_INLINE uint32_t BROTLI_UNALIGNED_LOAD32LE(const void* p) {
uint32_t value = BrotliUnalignedRead32(p);
- return BROTLI_BSWAP32_(value);
+ return __builtin_bswap32(value);
}
-#define BROTLI_BSWAP64_(V) ( \
- (((V) & 0xFFU) << 56) | (((V) & 0xFF00U) << 40) | \
- (((V) & 0xFF0000U) << 24) | (((V) & 0xFF000000U) << 8) | \
- (((V) >> 8) & 0xFF000000U) | (((V) >> 24) & 0xFF0000U) | \
- (((V) >> 40) & 0xFF00U) | (((V) >> 56) & 0xFFU))
static BROTLI_INLINE uint64_t BROTLI_UNALIGNED_LOAD64LE(const void* p) {
uint64_t value = BrotliUnalignedRead64(p);
- return BROTLI_BSWAP64_(value);
+ return __builtin_bswap64(value);
}
static BROTLI_INLINE void BROTLI_UNALIGNED_STORE64LE(void* p, uint64_t v) {
- uint64_t value = BROTLI_BSWAP64_(v);
+ uint64_t value = __builtin_bswap64(v);
BrotliUnalignedWrite64(p, value);
}
#else /* BROTLI_LITTLE_ENDIAN */

View File

@ -0,0 +1 @@
../patches-available/838.patch

View File

@ -0,0 +1 @@
../patches-available/build-tool-against-shared-lib.patch

View File

@ -0,0 +1 @@
../patches-available/optimize-mips-s390x.patch

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "no configuration."

View File

@ -0,0 +1,5 @@
#!/bin/sh
cp -r sys /include/
echo "installed headers to /include"

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "nothing to build."

File diff suppressed because it is too large Load Diff

21
bubblewrap/default/conf.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
NOCONFIGURE=1 ./autogen.sh
./configure \
--with-priv-mode=setuid \
--build="$(uname -m)-lix-linux-musl" \
--host="$(uname -m)-lix-linux-musl" \
--prefix=$PREFIX
## explanation
#
# --disable-shared: don't build anything with dynamic linking.
#
# --enable-static: use static linking instead.
#
# --build: make sure the build string gets set correctly.
#
# --host: make sure the host string gets set correctly.
#
# --prefix: respect the "no /usr/local" policy.

19
bubblewrap/default/deps Normal file
View File

@ -0,0 +1,19 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
docbook-xsl
perl
m4
autoconf
automake
pkgconf
libtool
libcap

View 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)

View File

@ -0,0 +1 @@
../patches-available/realpath-workaround.patch

4
busybox/default/inst.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
make CONFIG_PREFIX="/" install
chmod -v 4755 "/bin/busybox"

13
bzip2/default/PATCH-NOTES Normal file
View File

@ -0,0 +1,13 @@
the bzip2 patch is pretty extensive, so here's a brief explanation.
1. the first part just sets the correct environmental variable values for a
static build that gets installed to / instead of /usr/local.
2. most of the other changes consist of replacing $(PREFIX)/man with
$(PREFIX)/share/man. without these changes, bzip2 creates a /man directory
and installs the manpages there instead of in /share/man like every other
package.
3. in the recommended alpine linux bootstrap host, copying over a symlink to
busybox doesn't replace the symlink. instead it replaces the busybox binary!
so changes were added to remove possible symlinks before copying "over" them.

3
bzip2/default/conf.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
${EDITOR:-vi} Makefile

12
bzip2/default/deps Normal file
View File

@ -0,0 +1,12 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
$EDITORDEP

4
bzip2/default/inst.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
make install
cp libbz2.so* /lib/

4
bzip2/default/make.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
make -j$(nproc) -f Makefile
make -j$(nproc) -f Makefile-libbz2_so

67
bzip2/default/patch Normal file
View File

@ -0,0 +1,67 @@
--- a/Makefile 2019-07-13 17:50:05.000000000 +0000
+++ b/Makefile 2020-10-05 01:48:19.780000000 +0000
@@ -18,13 +18,12 @@
CC=gcc
AR=ar
RANLIB=ranlib
-LDFLAGS=
BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
+CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) -static --static
# Where you want it installed when you do 'make install'
-PREFIX=/usr/local
+PREFIX=
OBJS= blocksort.o \
@@ -72,9 +71,12 @@
install: bzip2 bzip2recover
if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+ if ( test ! -d $(PREFIX)/share/man ) ; then mkdir -p $(PREFIX)/share/man ; fi
+ if ( test ! -d $(PREFIX)/share/man/man1 ) ; then mkdir -p $(PREFIX)/share/man/man1 ; fi
if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
+ if ( test -f $(PREFIX)/bin/bzip2 ) ; then rm $(PREFIX)/bin/bzip2 ; fi
+ if ( test -f $(PREFIX)/bin/bunzip2 ) ; then rm $(PREFIX)/bin/bunzip2 ; fi
+ if ( test -f $(PREFIX)/bin/bzcat ) ; then rm $(PREFIX)/bin/bzcat ; fi
cp -f bzip2 $(PREFIX)/bin/bzip2
cp -f bzip2 $(PREFIX)/bin/bunzip2
cp -f bzip2 $(PREFIX)/bin/bzcat
@@ -83,8 +85,8 @@
chmod a+x $(PREFIX)/bin/bunzip2
chmod a+x $(PREFIX)/bin/bzcat
chmod a+x $(PREFIX)/bin/bzip2recover
- cp -f bzip2.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzip2.1
+ cp -f bzip2.1 $(PREFIX)/share/man/man1
+ chmod a+r $(PREFIX)/share/man/man1/bzip2.1
cp -f bzlib.h $(PREFIX)/include
chmod a+r $(PREFIX)/include/bzlib.h
cp -f libbz2.a $(PREFIX)/lib
@@ -99,14 +101,14 @@
cp -f bzdiff $(PREFIX)/bin/bzdiff
ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/share/man/man1
+ chmod a+r $(PREFIX)/share/man/man1/bzgrep.1
+ chmod a+r $(PREFIX)/share/man/man1/bzmore.1
+ chmod a+r $(PREFIX)/share/man/man1/bzdiff.1
+ echo ".so share/man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzegrep.1
+ echo ".so share/man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzfgrep.1
+ echo ".so share/man1/bzmore.1" > $(PREFIX)/share/man/man1/bzless.1
+ echo ".so share/man1/bzdiff.1" > $(PREFIX)/share/man/man1/bzcmp.1
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \

34
cairo/default/conf.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
#CFLAGS="$SHARED_CFLAGS -I/include/glib-2.0 -I/lib/glib-2.0/include -DEGL_NO_X11" \
CFLAGS="$SHARED_CFLAGS" \
CXXFLAGS="$SHARED_CXXFLAGS" \
LDFLAGS="$SHARED_LDFLAGS" \
./configure \
--enable-gobject \
--enable-ft \
--enable-fc \
--enable-pdf \
--enable-ps \
--enable-png \
--enable-svg \
--enable-tee \
--enable-egl \
--enable-glesv2 \
--enable-shared \
--enable-static \
--build="$(uname -m)-lix-linux-musl" \
--host="$(uname -m)-lix-linux-musl" \
--prefix=
## explanation
#
# --disable-shared: don't build anything with dynamic linking.
#
# --enable-static: use static linking instead.
#
# --build: make sure the build string gets set correctly.
#
# --host: make sure the host string gets set correctly.
#
# --prefix: respect the "no /usr/local" policy.

35
cairo/default/deps Normal file
View File

@ -0,0 +1,35 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
libffi
glib
gobject-introspection-dynamic
libdrm-dynamic
perl
m4
autoconf
automake
libtool
pkgconf
bzip2
gzip
xz
zlib
glib
eudev
pixman
libpng
harfbuzz
freetype-harfbuzz
fontconfig
expat
mesa-dynamic
wayland

View File

@ -0,0 +1,30 @@
From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
From: Carlos Garcia Campos <cgarcia@igalia.com>
Date: Mon, 19 Nov 2018 12:33:07 +0100
Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
cairo_ft_apply_variations
Fixes a crash when using freetype >= 2.9
---
src/cairo-ft-font.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 325dd61b4..981973f78 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -2393,7 +2393,11 @@ skip:
done:
free (coords);
free (current_coords);
+#if HAVE_FT_DONE_MM_VAR
+ FT_Done_MM_Var (face->glyph->library, ft_mm_var);
+#else
free (ft_mm_var);
+#endif
}
}
--
2.18.1

View File

@ -0,0 +1,23 @@
Reduce the footprint of stack frame usage by turning
some large(r) structures as `static __thread` instead.
--- a/src/cairo-rectangular-scan-converter.c 2015-10-27 22:04:21.000000000 +0100
+++ b/src/cairo-rectangular-scan-converter.c 2016-05-07 04:25:26.640851782 +0200
@@ -489,7 +489,7 @@
cairo_span_renderer_t *renderer,
rectangle_t **rectangles)
{
- sweep_line_t sweep_line;
+ static __thread sweep_line_t sweep_line;
rectangle_t *start, *stop;
cairo_status_t status;
@@ -656,7 +656,7 @@
cairo_span_renderer_t *renderer)
{
cairo_rectangular_scan_converter_t *self = converter;
- rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)];
+ static __thread rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)];
rectangle_t **rectangles;
struct _cairo_rectangular_scan_converter_chunk *chunk;
cairo_status_t status;

View File

@ -0,0 +1,33 @@
From https://cgit.freedesktop.org/cairo/commit/?id=4c8813f0eaacc32c27126ad2296951a626300b89
Fixes https://gitlab.freedesktop.org/cairo/cairo/issues/342
From 4c8813f0eaacc32c27126ad2296951a626300b89 Mon Sep 17 00:00:00 2001
From: Adrian Johnson <ajohnson@redneon.com>
Date: Thu, 25 Oct 2018 18:46:17 +1030
Subject: pdf: add missing flush
Issue #342
---
src/cairo-pdf-surface.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 7eb61aa..939b2d2 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -7711,6 +7711,11 @@ _cairo_pdf_surface_mask (void *abstract_surface,
* and most common, case to handle. */
if (_cairo_pattern_is_constant_alpha (mask, &extents.bounded, &alpha) &&
_can_paint_pattern (source)) {
+
+ status = _cairo_pdf_operators_flush (&surface->pdf_operators);
+ if (unlikely (status))
+ goto cleanup;
+
_cairo_output_stream_printf (surface->output, "q\n");
status = _cairo_pdf_surface_paint_pattern (surface,
op,
--
cgit v1.1

View File

@ -0,0 +1 @@
../patches-available/CVE-2018-19876.patch

View File

@ -0,0 +1 @@
../patches-available/musl-stacksize.patch

View File

@ -0,0 +1 @@
../patches-available/pdf-flush.patch

12
ccache/default/deps Normal file
View File

@ -0,0 +1,12 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
zlib

19
ccache/default/inst.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
make install
host="$(cc -dumpmachine)"
mkdir -p /usr/lib/ccache/bin
echo "cc
gcc
g++
cpp
c++
$host-gcc
$host-g++
$host-cpp
$host-c++" | while read link; do
ln -sf /usr/bin/ccache /usr/lib/ccache/bin/$link
done

37
ccid/default/conf.sh Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
set -e
PCSC_LIBS="/lib/libpcsclite.so" \
LIBUSB_LIBS="/lib/libusb-1.0.so" \
PCSC_CFLAGS="-I/include/PCSC" \
LIBUSB_CFLAGS="-I/include/libusb-1.0" \
./configure \
--build="$(uname -m)-lix-linux-musl" \
--host="$(uname -m)-lix-linux-musl" \
--enable-static \
--sysconfdir=/etc \
--enable-usbdropdir=/lib/pcsc/drivers \
--prefix=
## explanation
#
# PCSC_LIBS: configure needs an explicit path for libpcslite.
#
# LIBUSB_LIBS: configure needs an explicit path for libusb.
#
# PCSC_CFLAGS: configure needs an explicit path for libpcslite headers.
#
# LIBUSB_CFLAGS: configure needs an explicit path for libusb headers.
#
# --build: set the correct build string.
#
# --host: set the correct host string.
#
# --enable-static: build the static library as well.
#
# --sysconfdir: look for configuration files in /etc.
#
# --enable-usbdropdir: the directory for dynamically loaded smartcard drivers.
#
# --prefix: respect the "no /usr/local" policy.

16
ccid/default/deps Normal file
View File

@ -0,0 +1,16 @@
lix-os-filesystem
linux-kernel
sbase
ubase
musl-cross-make
make
automake
autoconf
dash
patch
awk
gnu-grep
gnu-sed
perl
libusb
pcsc-lite-first-pass

7
ccid/default/env.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# TODO: remove the need for these lines by making musl-cross-make build a gcc
# with a header search path of /include only, with all headers contained there.
CPATH="$CPATH:/include:/powerpc64le-lix-linux-musl/include"
CPATH="$CPATH:/include/c++/9.2.0/powerpc64le-lix-linux-musl:/include/c++/9.2.0"
export CPATH

8
ccid/default/inst.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
set -e
cp src/.libs/libccid.* /lib/
echo "copied to /lib the following:"
cd src/.libs && ls libccid.*

View File

@ -0,0 +1,54 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cdparanoia
pkgver=10.2
pkgrel=9
pkgdesc="An audio CD extraction application"
url="http://www.xiph.org/paranoia"
arch="all"
options="!check" # Build system has test suite commented out.
license="LGPL-2.0-or-later"
makedepends="libtool autoconf automake linux-headers"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-$pkgver.src.tgz
gcc.patch
fix-includes.patch
no-cuserid.patch"
builddir="$srcdir/$pkgname-III-$pkgver"
prepare() {
default_prepare
mv configure.guess config.guess
mv configure.sub config.sub
update_config_sub
sed -i -e '/configure.\(guess\|sub\)/d' configure.in
aclocal && autoconf
libtoolize
}
build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info
make -j1
}
package() {
make prefix="$pkgdir"/usr MANDIR="$pkgdir"/usr/share/man install
}
libs() {
pkgdesc="Libraries for libcdda_paranoia (Paranoia III)"
replaces="cdparanoia"
install -d "$subpkgdir"/usr
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
sha512sums="4ab0a0f5ef44d56c1af72d1fc1035566a1a89c4eeddb9e8baea675fe51c06138d913342afc8bed167d9fa55672fa25a2763ce21f7e24c1232e4739aff20733a7 cdparanoia-III-10.2.src.tgz
27bf216e8b5b9d6971e3999166544025f166587df06065b89657dac62d0d53c01b76f53146c1e9a400dd71460567fadb8fd4ce00576836f972914d69e8855909 gcc.patch
e8a5ef0f5bcdba697d2d49e31346832bfa2460e6f6cac9256420f57c74a5da2945bdc664368c91365a880ba76e638f58773468d8e8bd16e7afcaff955a1a82ce fix-includes.patch
52882bdc689e1a34bc0f3961aa649f400232a3fe769526a01fcbff4ba0d5183c1ad0737265b69668b857b0887b4e4e3f2c78bad913329cc7b621b14d47e873f9 no-cuserid.patch"

13
cdparanoia/default/conf.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
cp -a /share/automake-*/config.guess configure.guess
cp -a /share/automake-*/config.sub configure.sub
aclocal && autoconf
libtoolize
./configure \
--enable-static \
--enable-shared \
--build="$BUILD" \
--host="$HOST" \
--prefix="$PREFIX"

17
cdparanoia/default/deps Normal file
View File

@ -0,0 +1,17 @@
lix-os-filesystem
linux-kernel
musl-cross-make
patch
sbase
ubase
awk
make
dash
gnu-grep
gnu-sed
pkgconf
perl
m4
autoconf
automake
libtool

View File

@ -0,0 +1,7 @@
#!/bin/sh -e
. ../how/default-env.sh
CFLAGS="$SHARED_CFLAGS"
CXXFLAGS="$SHARED_CXXFLAGS"
LDFLAGS="$SHARED_LDFLAGS"

3
cdparanoia/default/inst.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
make prefix="$PREFIX" MANDIR="$PREFIX"/share/man install

3
cdparanoia/default/make.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
make -j1

View File

@ -0,0 +1,7 @@
--- cdparanoia-III-10.2.orig/utils.h
+++ cdparanoia-III-10.2/utils.h
@@ -1,3 +1,4 @@
+#include <sys/types.h>
#include <stdlib.h>
#include <endian.h>
#include <stdio.h>

View File

@ -0,0 +1,582 @@
Index: interface/test_interface.c
===================================================================
--- a/interface/test_interface.c (Revision 15337)
+++ b/interface/test_interface.c (Revision 15340)
@@ -66,9 +66,9 @@
if(!fd)fd=fdopen(d->cdda_fd,"r");
if(begin<lastread)
- d->private->last_milliseconds=20;
+ d->private_data->last_milliseconds=20;
else
- d->private->last_milliseconds=sectors;
+ d->private_data->last_milliseconds=sectors;
#ifdef CDDA_TEST_UNDERRUN
sectors-=1;
Index: interface/cdda_interface.h
===================================================================
--- a/interface/cdda_interface.h (Revision 15337)
+++ b/interface/cdda_interface.h (Revision 15340)
@@ -84,7 +84,7 @@
int is_atapi;
int is_mmc;
- cdda_private_data_t *private;
+ cdda_private_data_t *private_data;
void *reserved;
unsigned char inqbytes[4];
Index: interface/interface.c
===================================================================
--- a/interface/interface.c (Revision 15337)
+++ b/interface/interface.c (Revision 15340)
@@ -39,9 +39,9 @@
if(d->drive_model)free(d->drive_model);
if(d->cdda_fd!=-1)close(d->cdda_fd);
if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
- if(d->private){
- if(d->private->sg_hd)free(d->private->sg_hd);
- free(d->private);
+ if(d->private_data){
+ if(d->private_data->sg_hd)free(d->private_data->sg_hd);
+ free(d->private_data);
}
free(d);
@@ -127,7 +127,7 @@
}
}
}
- if(ms)*ms=d->private->last_milliseconds;
+ if(ms)*ms=d->private_data->last_milliseconds;
return(sectors);
}
Index: interface/scsi_interface.c
===================================================================
--- a/interface/scsi_interface.c (Revision 15337)
+++ b/interface/scsi_interface.c (Revision 15340)
@@ -15,13 +15,13 @@
static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
struct timespec tv1;
struct timespec tv2;
- int ret1=clock_gettime(d->private->clock,&tv1);
+ int ret1=clock_gettime(d->private_data->clock,&tv1);
int ret2=ioctl(fd, command,arg);
- int ret3=clock_gettime(d->private->clock,&tv2);
+ int ret3=clock_gettime(d->private_data->clock,&tv2);
if(ret1<0 || ret3<0){
- d->private->last_milliseconds=-1;
+ d->private_data->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
}
return ret2;
}
@@ -96,7 +96,7 @@
static void clear_garbage(cdrom_drive *d){
fd_set fdset;
struct timeval tv;
- struct sg_header *sg_hd=d->private->sg_hd;
+ struct sg_header *sg_hd=d->private_data->sg_hd;
int flag=0;
/* clear out any possibly preexisting garbage */
@@ -185,7 +185,7 @@
struct timespec tv2;
int tret1,tret2;
int status = 0;
- struct sg_header *sg_hd=d->private->sg_hd;
+ struct sg_header *sg_hd=d->private_data->sg_hd;
long writebytes=SG_OFF+cmd_len+in_size;
/* generic scsi device services */
@@ -195,7 +195,7 @@
memset(sg_hd,0,sizeof(sg_hd));
memset(sense_buffer,0,SG_MAX_SENSE);
- memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
+ memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size);
sg_hd->twelve_byte = cmd_len == 12;
sg_hd->result = 0;
sg_hd->reply_len = SG_OFF + out_size;
@@ -209,7 +209,7 @@
tell if the command failed. Scared yet? */
if(bytecheck && out_size>in_size){
- memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
+ memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size);
/* the size does not remove cmd_len due to the way the kernel
driver copies buffers */
writebytes+=(out_size-in_size);
@@ -243,7 +243,7 @@
}
sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
- tret1=clock_gettime(d->private->clock,&tv1);
+ tret1=clock_gettime(d->private_data->clock,&tv1);
errno=0;
status = write(d->cdda_fd, sg_hd, writebytes );
@@ -289,7 +289,7 @@
}
}
- tret2=clock_gettime(d->private->clock,&tv2);
+ tret2=clock_gettime(d->private_data->clock,&tv2);
errno=0;
status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL );
@@ -313,7 +313,7 @@
if(bytecheck && in_size+cmd_len<out_size){
long i,flag=0;
for(i=in_size;i<out_size;i++)
- if(d->private->sg_buffer[i]!=bytefill){
+ if(d->private_data->sg_buffer[i]!=bytefill){
flag=1;
break;
}
@@ -326,9 +326,9 @@
errno=0;
if(tret1<0 || tret2<0){
- d->private->last_milliseconds=-1;
+ d->private_data->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
}
return(0);
}
@@ -347,7 +347,7 @@
memset(&hdr,0,sizeof(hdr));
memset(sense,0,sizeof(sense));
- memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
+ memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size);
hdr.cmdp = cmd;
hdr.cmd_len = cmd_len;
@@ -355,7 +355,7 @@
hdr.mx_sb_len = SG_MAX_SENSE;
hdr.timeout = 50000;
hdr.interface_id = 'S';
- hdr.dxferp = d->private->sg_buffer;
+ hdr.dxferp = d->private_data->sg_buffer;
hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */
/* scary buffer fill hack */
@@ -400,7 +400,7 @@
if(bytecheck && in_size<out_size){
long i,flag=0;
for(i=in_size;i<out_size;i++)
- if(d->private->sg_buffer[i]!=bytefill){
+ if(d->private_data->sg_buffer[i]!=bytefill){
flag=1;
break;
}
@@ -412,7 +412,7 @@
}
/* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
- /* d->private->last_milliseconds = hdr.duration; */
+ /* d->private_data->last_milliseconds = hdr.duration; */
errno = 0;
return 0;
@@ -445,9 +445,9 @@
handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
- key = d->private->sg_buffer[2] & 0xf;
- ASC = d->private->sg_buffer[12];
- ASCQ = d->private->sg_buffer[13];
+ key = d->private_data->sg_buffer[2] & 0xf;
+ ASC = d->private_data->sg_buffer[12];
+ ASCQ = d->private_data->sg_buffer[13];
if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
return 1;
@@ -492,7 +492,7 @@
if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1);
{
- unsigned char *b=d->private->sg_buffer;
+ unsigned char *b=d->private_data->sg_buffer;
if(b[0])return(1); /* Handles only up to 256 bytes */
if(b[6])return(1); /* Handles only up to 256 bytes */
@@ -604,8 +604,8 @@
static unsigned int get_orig_sectorsize(cdrom_drive *d){
if(mode_sense(d,12,0x01))return(-1);
- d->orgdens = d->private->sg_buffer[4];
- return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
+ d->orgdens = d->private_data->sg_buffer[4];
+ return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]);
}
/* switch CDROM scsi drives to given sector size */
@@ -664,8 +664,8 @@
return(-4);
}
- first=d->private->sg_buffer[2];
- last=d->private->sg_buffer[3];
+ first=d->private_data->sg_buffer[2];
+ last=d->private_data->sg_buffer[3];
tracks=last-first+1;
if (last > MAXTRK || first > MAXTRK || last<0 || first<0) {
@@ -683,7 +683,7 @@
return(-5);
}
{
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
d->disc_toc[i-first].bFlags=toc->bFlags;
d->disc_toc[i-first].bTrack=i;
@@ -704,7 +704,7 @@
return(-2);
}
{
- scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
+ scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
d->disc_toc[i-first].bFlags=toc->bFlags;
d->disc_toc[i-first].bTrack=0xAA;
@@ -738,7 +738,7 @@
}
/* copy to our structure and convert start sector */
- tracks = d->private->sg_buffer[1];
+ tracks = d->private_data->sg_buffer[1];
if (tracks > MAXTRK) {
cderror(d,"003: CDROM reporting illegal number of tracks\n");
return(-3);
@@ -754,33 +754,33 @@
return(-5);
}
- d->disc_toc[i].bFlags = d->private->sg_buffer[10];
+ d->disc_toc[i].bFlags = d->private_data->sg_buffer[10];
d->disc_toc[i].bTrack = i + 1;
d->disc_toc[i].dwStartSector= d->adjust_ssize *
- (((signed char)(d->private->sg_buffer[2])<<24) |
- (d->private->sg_buffer[3]<<16)|
- (d->private->sg_buffer[4]<<8)|
- (d->private->sg_buffer[5]));
+ (((signed char)(d->private_data->sg_buffer[2])<<24) |
+ (d->private_data->sg_buffer[3]<<16)|
+ (d->private_data->sg_buffer[4]<<8)|
+ (d->private_data->sg_buffer[5]));
}
d->disc_toc[i].bFlags = 0;
d->disc_toc[i].bTrack = i + 1;
- memcpy (&foo, d->private->sg_buffer+2, 4);
- memcpy (&bar, d->private->sg_buffer+6, 4);
+ memcpy (&foo, d->private_data->sg_buffer+2, 4);
+ memcpy (&bar, d->private_data->sg_buffer+6, 4);
d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
be32_to_cpu(bar));
d->disc_toc[i].dwStartSector= d->adjust_ssize *
- ((((signed char)(d->private->sg_buffer[2])<<24) |
- (d->private->sg_buffer[3]<<16)|
- (d->private->sg_buffer[4]<<8)|
- (d->private->sg_buffer[5]))+
+ ((((signed char)(d->private_data->sg_buffer[2])<<24) |
+ (d->private_data->sg_buffer[3]<<16)|
+ (d->private_data->sg_buffer[4]<<8)|
+ (d->private_data->sg_buffer[5]))+
- ((((signed char)(d->private->sg_buffer[6])<<24) |
- (d->private->sg_buffer[7]<<16)|
- (d->private->sg_buffer[8]<<8)|
- (d->private->sg_buffer[9]))));
+ ((((signed char)(d->private_data->sg_buffer[6])<<24) |
+ (d->private_data->sg_buffer[7]<<16)|
+ (d->private_data->sg_buffer[8]<<8)|
+ (d->private_data->sg_buffer[9]))));
d->cd_extra = FixupTOC(d,tracks+1);
@@ -817,7 +817,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -836,7 +836,7 @@
cmd[9] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -854,7 +854,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -872,7 +872,7 @@
cmd[9] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -890,7 +890,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -908,7 +908,7 @@
cmd[9] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -922,7 +922,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -936,7 +936,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -950,7 +950,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -964,7 +964,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -978,7 +978,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -992,7 +992,7 @@
cmd[8] = sectors;
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1026,7 +1026,7 @@
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1039,7 +1039,7 @@
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1052,7 +1052,7 @@
if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
return(ret);
- if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+ if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
return(0);
}
@@ -1275,7 +1275,7 @@
static int count_2352_bytes(cdrom_drive *d){
long i;
for(i=2351;i>=0;i--)
- if(d->private->sg_buffer[i]!=(unsigned char)'\177')
+ if(d->private_data->sg_buffer[i]!=(unsigned char)'\177')
return(((i+3)>>2)<<2);
return(0);
@@ -1284,7 +1284,7 @@
static int verify_nonzero(cdrom_drive *d){
long i,flag=0;
for(i=0;i<2352;i++)
- if(d->private->sg_buffer[i]!=0){
+ if(d->private_data->sg_buffer[i]!=0){
flag=1;
break;
}
@@ -1621,7 +1621,7 @@
d->is_mmc=0;
if(mode_sense(d,22,0x2A)==0){
- b=d->private->sg_buffer;
+ b=d->private_data->sg_buffer;
b+=b[3]+4;
if((b[0]&0x3F)==0x2A){
@@ -1669,7 +1669,7 @@
cderror(d,"008: Unable to identify CDROM model\n");
return(NULL);
}
- return (d->private->sg_buffer);
+ return (d->private_data->sg_buffer);
}
int scsi_init_drive(cdrom_drive *d){
@@ -1725,8 +1725,8 @@
check_cache(d);
d->error_retry=1;
- d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
+ d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
+ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
d->report_all=1;
return(0);
}
Index: interface/cooked_interface.c
===================================================================
--- a/interface/cooked_interface.c (Revision 15337)
+++ b/interface/cooked_interface.c (Revision 15340)
@@ -13,13 +13,13 @@
static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){
struct timespec tv1;
struct timespec tv2;
- int ret1=clock_gettime(d->private->clock,&tv1);
+ int ret1=clock_gettime(d->private_data->clock,&tv1);
int ret2=ioctl(fd, command,arg);
- int ret3=clock_gettime(d->private->clock,&tv2);
+ int ret3=clock_gettime(d->private_data->clock,&tv2);
if(ret1<0 || ret3<0){
- d->private->last_milliseconds=-1;
+ d->private_data->last_milliseconds=-1;
}else{
- d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+ d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
}
return ret2;
}
Index: interface/scan_devices.c
===================================================================
--- a/interface/scan_devices.c (Revision 15337)
+++ b/interface/scan_devices.c (Revision 15340)
@@ -264,11 +264,11 @@
d->interface=COOKED_IOCTL;
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
- d->private=calloc(1,sizeof(*d->private));
+ d->private_data=calloc(1,sizeof(*d->private_data));
{
/* goddamnit */
struct timespec tv;
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
}
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -674,15 +674,15 @@
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
d->messagedest = messagedest;
- d->private=calloc(1,sizeof(*d->private));
+ d->private_data=calloc(1,sizeof(*d->private_data));
{
/* goddamnit */
struct timespec tv;
- d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+ d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
}
if(use_sgio){
d->interface=SGIO_SCSI;
- d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
+ d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
g_fd=d->cdda_fd=dup(d->ioctl_fd);
}else{
version=verify_SG_version(d,messagedest,messages);
@@ -696,8 +696,8 @@
}
/* malloc our big buffer for scsi commands */
- d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
- d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
+ d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
+ d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
}
{
@@ -772,9 +772,9 @@
if(i_fd!=-1)close(i_fd);
if(g_fd!=-1)close(g_fd);
if(d){
- if(d->private){
- if(d->private->sg_hd)free(d->private->sg_hd);
- free(d->private);
+ if(d->private_data){
+ if(d->private_data->sg_hd)free(d->private_data->sg_hd);
+ free(d->private_data);
}
free(d);
}
@@ -821,7 +821,7 @@
d->interface=TEST_INTERFACE;
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
- d->private=calloc(1,sizeof(*d->private));
+ d->private_data=calloc(1,sizeof(*d->private_data));
d->drive_model=copystring("File based test interface");
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);

View File

@ -0,0 +1,32 @@
Since IEEE 1003.1-1988 cuserid is not standardized anymore. The musl
libc, used by Alpine Linux, currently does not supporting using it with
a NULL pointer argument [1]. Doing so causes a segmentation fault, to
fix this remove use of cuserid entirely. This is currently achieved by
not including the user name in the error message, while it would be
possible to achieve the same output using getpwuid(geteuid()) this
requires error handling and would make the patch more complicated.
[1]: https://www.openwall.com/lists/musl/2020/01/29/2
diff -upr cdparanoia-III-10.2.orig/interface/scan_devices.c cdparanoia-III-10.2/interface/scan_devices.c
--- cdparanoia-III-10.2.orig/interface/scan_devices.c 2020-02-12 20:29:46.232958848 +0100
+++ cdparanoia-III-10.2/interface/scan_devices.c 2020-02-12 20:30:06.336297868 +0100
@@ -6,8 +6,6 @@
*
******************************************************************/
-#define _GNU_SOURCE /* get cuserid */
-#define _USE_XOPEN /* get cuserid */
#include <limits.h>
#include <stdio.h>
#include <unistd.h>
@@ -93,8 +91,7 @@ cdrom_drive *cdda_find_a_cdrom(int messa
i++;
}
idmessage(messagedest,messages,
- "\n\nNo cdrom drives accessible to %s found.\n",
- cuserid(NULL));
+ "\n\nNo cdrom drives accessible to current user found.\n", NULL);
return(NULL);
}

View File

@ -0,0 +1 @@
../patches-available/fix-includes.patch

Some files were not shown because too many files have changed in this diff Show More