initialize repository
This commit is contained in:
commit
eb1e3771ee
|
@ -0,0 +1,21 @@
|
||||||
|
# frozenports
|
||||||
|
### Basalt uFreeBSD/Linux Ports Tree
|
||||||
|
---
|
||||||
|
All ports here are built using [tamandua](https://centrifuge.hectabit.org/basalt/tamandua) and follow the tamandua `SCHEMATIC`.
|
||||||
|
<br>
|
||||||
|
For contributions to frozenports, please open a pull request adding a new port/fixing an existing port. Added/modified ports MUST follow the guidelines below:
|
||||||
|
- Must have all dependencies included in the SCHEMATIC
|
||||||
|
- Must be able to be built in the [bootstrap image](https://basalt.hectabit.org/repo/1.0-CURRENT/Linux:4.14.0:amd64/dist/BasaltLinux_x86-64_1.0_CURRENT_Bootstrap.tar.xz) using `tamandua`
|
||||||
|
- Must have all documentation installed
|
||||||
|
- Must not conflict with other ports
|
||||||
|
Additionally, please include the port's `+MANIFEST` and/or a list of all files/folders in `$TAMANDUA_STAGE_DIR`
|
||||||
|
---
|
||||||
|
# CREDITS
|
||||||
|
FreeBSD and FreeBSD Ports:
|
||||||
|
- `pkg(8)`
|
||||||
|
- Port names
|
||||||
|
- Port descriptions
|
||||||
|
- Port categories
|
||||||
|
Linux From Scratch:
|
||||||
|
- Some port `configure` args
|
||||||
|
- SSL certificate scripts
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="bzip2"
|
||||||
|
short_desc="Block-sorting file compressor"
|
||||||
|
desc="This is Bzip2/libbz2; a program and library for lossless, block-sorting data compression."
|
||||||
|
category="archivers"
|
||||||
|
version="1.0.8"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://sourceware.org/bzip2"
|
||||||
|
master_site="ftp://sourceware.org/pub/bzip2"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("bzip2")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
|
||||||
|
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
|
||||||
|
make -j$(nproc) -f Makefile-libbz2_so
|
||||||
|
make clean
|
||||||
|
make -j$(nproc)
|
||||||
|
make PREFIX=$TAMANDUA_STAGE_DIR/usr install
|
||||||
|
cp -av libbz2.so.$version $TAMANDUA_STAGE_DIR/usr/lib
|
||||||
|
ln -sv /usr/lib/libbz2.so.$version $TAMANDUA_STAGE_DIR/usr/lib/libbz2.so
|
||||||
|
ln -sv /usr/lib/libbz2.so.$version $TAMANDUA_STAGE_DIR/usr/lib/libbz2.so.1.0
|
||||||
|
cp -v bzip2-shared $TAMANDUA_STAGE_DIR/usr/bin/bzip2
|
||||||
|
rm $TAMANDUA_STAGE_DIR/usr/bin/bzcat $TAMANDUA_STAGE_DIR/usr/bin/bunzip2
|
||||||
|
ln -s bzip2 $TAMANDUA_STAGE_DIR/usr/bin/bzcat
|
||||||
|
ln -s bzip2 $TAMANDUA_STAGE_DIR/usr/bin/bunzip2
|
||||||
|
rm -fv $TAMANDUA_STAGE_DIR/usr/lib/libbz2.a
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libarchive"
|
||||||
|
short_desc="Multi-format archive and compression library"
|
||||||
|
desc="Includes the libarchive library, the bsdtar and bsdcpio command-line programs, full test suite, and documentation."
|
||||||
|
category="archivers"
|
||||||
|
version="3.7.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.libarchive.org/"
|
||||||
|
master_site="https://www.libarchive.org/downloads"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("libarchive" "BSD-3-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc" "textproc/expat")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR=$TAMANDUA_STAGE_DIR install
|
||||||
|
# we will use libarchive as our primary tool for cpio and tar
|
||||||
|
ln -sv bsdtar $TAMANDUA_STAGE_DIR/usr/bin/tar
|
||||||
|
ln -sv bsdcpio $TAMANDUA_STAGE_DIR/usr/bin/cpio
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="xz"
|
||||||
|
short_desc="The XZ utilities"
|
||||||
|
desc="XZ Utils provide a general-purpose data-compression library plus
|
||||||
|
command-line tools. The native file format is the .xz format, but
|
||||||
|
also the legacy .lzma format is supported. The .xz format supports
|
||||||
|
multiple compression algorithms, which are called "filters" in the
|
||||||
|
context of XZ Utils. The primary filter is currently LZMA2. With
|
||||||
|
typical files, XZ Utils create about 30 % smaller files than gzip."
|
||||||
|
category="archivers"
|
||||||
|
version="5.4.5"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://tukaani.org/xz/"
|
||||||
|
master_site="https://tukaani.org/xz"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("xz" "GPLv3" "GPLv2" "LGPL2")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="zlib"
|
||||||
|
short_desc="A Massively Spiffy Yet Delicately Unobtrusive Compression Library"
|
||||||
|
desc="zlib is designed to be a free, general-purpose, legally unencumbered -- that is,
|
||||||
|
not covered by any patents -- lossless data-compression library for use on
|
||||||
|
virtually any computer hardware and operating system. The zlib data format is
|
||||||
|
itself portable across platforms. Unlike the LZW compression method used in Unix
|
||||||
|
compress(1) and in the GIF image format, the compression method currently used
|
||||||
|
in zlib essentially never expands the data. (LZW can double or triple the file
|
||||||
|
size in extreme cases.) zlib's memory footprint is also independent of the input
|
||||||
|
data and can be reduced, if necessary, at some cost in compression.
|
||||||
|
|
||||||
|
WWW: http://zlib.net/"
|
||||||
|
category="archivers"
|
||||||
|
version="1.3"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="http://zlib.net"
|
||||||
|
master_site="http://zlib.net"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="or" # accepted values: single, and, or
|
||||||
|
licenses=("zlib" "libpng")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
ln -s /usr/lib/libz.so.$VERSION $TAMANDUA_STAGE_DIR/usr/lib/libz.so.1
|
||||||
|
rm -fv $TAMANDUA_STAGE_DIR/usr/lib/libz.a
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="zstd"
|
||||||
|
short_desc="fast compression algorithm"
|
||||||
|
desc="Zstandard is a fast compression algorithm, providing high compression ratios.
|
||||||
|
It also offers a special mode for small data, called dictionary compression.
|
||||||
|
The reference library offers a very wide range of speed / compression trade-off,
|
||||||
|
and is backed by an extremely fast decoder (see benchmarks below).
|
||||||
|
Zstandard library is provided as open source software using a BSD
|
||||||
|
license. Its format is stable and published as IETF RFC 8878."
|
||||||
|
category="archivers"
|
||||||
|
version="1.5.5"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://facebook.github.io/zstd/"
|
||||||
|
master_site="https://github.com/facebook/zstd/releases/download/v$version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-3-CLAUSE" "GPLv2")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
make prefix=/usr -j$(nproc)
|
||||||
|
make prefix=/usr DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gdbm"
|
||||||
|
short_desc="GNU database manager"
|
||||||
|
desc="The GNU dbm is a library of database functions that use extensible hashing
|
||||||
|
and works similar to the standard UNIX dbm functions. These routines are
|
||||||
|
provided to a programmer needing to create and manipulate a hashed database."
|
||||||
|
category="databases"
|
||||||
|
version="1.23"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org.ua/software/gdbm/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/gdbm"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/gcc" "devel/readline")
|
||||||
|
run_dependencies=("system/glibc" "shells/bash" "devel/readline")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--enable-libgdbm-compat
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="acl"
|
||||||
|
short_desc="POSIX Access Control Lists utility"
|
||||||
|
desc="Commands for Manipulating POSIX Access Control Lists."
|
||||||
|
category="devel"
|
||||||
|
version="2.3.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://savannah.nongnu.org/projects/acl/"
|
||||||
|
master_site="https://download.savannah.nongnu.org/releases/acl"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv2+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "devel/attr")
|
||||||
|
run_dependencies=("system/glibc" "devel/attr")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
|
--disable-static || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR=$TAMANDUA_STAGE_DIR install
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="attr"
|
||||||
|
short_desc="Filesystem Extended Attributes utility"
|
||||||
|
desc="Commands for Manipulating Filesystem Extended Attributes."
|
||||||
|
category="devel"
|
||||||
|
version="2.5.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://savannah.nongnu.org/projects/attr/"
|
||||||
|
master_site="https://download.savannah.nongnu.org/releases/attr"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv2+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--disable-static || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR=$TAMANDUA_STAGE_DIR install
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="autoconf"
|
||||||
|
short_desc="M4 macros to configure software"
|
||||||
|
desc="Autoconf is an extensible package of M4 macros that produce shell scripts to automatically
|
||||||
|
configure software source code packages.
|
||||||
|
|
||||||
|
These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention.
|
||||||
|
|
||||||
|
Autoconf creates a configuration script for a package from a template file that lists the operating system
|
||||||
|
features that the package can use, in the form of M4 macro calls."
|
||||||
|
category="devel"
|
||||||
|
version="2.72"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/autoconf/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/autoconf"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/gcc" "devel/m4")
|
||||||
|
run_dependencies=("system/glibc" "devel/m4")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
export M4=gm4
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="binutils"
|
||||||
|
short_desc="GNU binary utils"
|
||||||
|
desc="The GNU Binutils are a collection of binary tools. The main ones are:
|
||||||
|
|
||||||
|
* ld - the GNU linker.
|
||||||
|
* as - the GNU assembler."
|
||||||
|
category="devel"
|
||||||
|
version="2.41"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/binutils/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/binutils"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3" "LGPL3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
mkdir build || exit 1
|
||||||
|
cd build || exit 1
|
||||||
|
../configure --prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--enable-gold \
|
||||||
|
--enable-ld=default \
|
||||||
|
--enable-plugins \
|
||||||
|
--enable-shared \
|
||||||
|
--disable-werror \
|
||||||
|
--enable-64-bit-bfd \
|
||||||
|
--with-system-zlib
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="bison"
|
||||||
|
short_desc="yacc-compatible parser generator"
|
||||||
|
desc="Bison is a general-purpose parser generator that converts an annotated
|
||||||
|
context-free grammar into a deterministic LR or generalized LR (GLR) parser
|
||||||
|
employing LALR(1) parser tables. As an experimental feature, Bison can also
|
||||||
|
generate IELR(1) or canonical LR(1) parser tables. Once you are proficient with
|
||||||
|
Bison, you can use it to develop a wide range of language parsers, from those
|
||||||
|
used in simple desk calculators to complex programming languages.
|
||||||
|
|
||||||
|
Bison is upward compatible with Yacc: all properly-written Yacc grammars ought
|
||||||
|
to work with Bison with no change. Anyone familiar with Yacc should be able to
|
||||||
|
use Bison with little trouble. You need to be fluent in C or C++ programming in
|
||||||
|
order to use Bison. Java is also supported as an experimental feature."
|
||||||
|
category="devel"
|
||||||
|
version="3.8.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/bison/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/bison/"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gettext"
|
||||||
|
short_desc="GNU gettext"
|
||||||
|
desc="GNU gettext is a tool for translation commonly used by GNU programs"
|
||||||
|
category="devel"
|
||||||
|
version="0.22.4"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/gettext/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/gettext"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3" "LGPL3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "devel/ncurses" "textproc/expat")
|
||||||
|
run_dependencies=("system/glibc" "devel/ncurses" "textproc/expat")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR=$TAMANDUA_STAGE_DIR install
|
||||||
|
chmod -v 0755 $TAMANDUA_STAGE_DIR/usr/lib/preloadable_libintl.so
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gmake"
|
||||||
|
short_desc="GNU make"
|
||||||
|
desc="GNU make is a tool that controls the generation of executables and other
|
||||||
|
non-source files from source files."
|
||||||
|
category="devel"
|
||||||
|
version="4.4.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/make/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/make"
|
||||||
|
source_name="make-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "devel/gettext")
|
||||||
|
run_dependencies=("system/glibc" "devel/gettext")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd make-$version || exit 1
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR=$TAMANDUA_STAGE_DIR install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libbsd"
|
||||||
|
short_desc="BSD utility functions"
|
||||||
|
desc="libbsd provides useful functions commonly found on BSD systems, and lacking on others like GNU systems,
|
||||||
|
thus making it easier to port projects with strong BSD origins, without needing to embed the same code over and
|
||||||
|
over again on each project."
|
||||||
|
category="devel"
|
||||||
|
version="0.11.8"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://libbsd.freedesktop.org/wiki/"
|
||||||
|
master_site="https://libbsd.freedesktop.org/releases"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-3-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "devel/libmd")
|
||||||
|
run_dependencies=("system/glibc" "devel/libmd")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
# libbsd.pc is to be deprecated, link libbsd-overlay.pc to libbsd.pc for compat
|
||||||
|
rm -f $TAMANDUA_STAGE_DIR/usr/lib/pkgconfig/libbsd.pc
|
||||||
|
ln -s /usr/lib/pkgconfig/libbsd-overlay.pc $TAMANDUA_STAGE_DIR/usr/lib/pkgconfig/libbsd.pc
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libedit"
|
||||||
|
short_desc="Command line editor library"
|
||||||
|
desc="libedit provides command line editing functionality. Additionally, emacs and vi key
|
||||||
|
bindings are supported."
|
||||||
|
category="devel"
|
||||||
|
version="20230828-3.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://thrysoee.dk/editline/"
|
||||||
|
master_site="https://thrysoee.dk/editline"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-2-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -v "$TAMANDUA_STAGE_DIR/usr/share/man/man3/history.3"
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libmd"
|
||||||
|
short_desc="BSD Message Digest Library"
|
||||||
|
desc="Message Digest functions from BSD"
|
||||||
|
category="devel"
|
||||||
|
version="1.1.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://libbsd.freedesktop.org/wiki/"
|
||||||
|
master_site="https://libbsd.freedesktop.org/releases"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-3-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libxo"
|
||||||
|
short_desc="Library to generate text, XML, JSON, and HTML output"
|
||||||
|
desc="libxo - A Library for Generating Text, XML, JSON, and HTML Output
|
||||||
|
|
||||||
|
The libxo library allows an application to generate text, XML, JSON,
|
||||||
|
and HTML output using a common set of function calls. The application
|
||||||
|
decides at run time which output style should be produced. The
|
||||||
|
application calls a function "xo_emit" to product output that is
|
||||||
|
described in a format string. A 'field descriptor' tells libxo what
|
||||||
|
the field is and what it means."
|
||||||
|
category="devel"
|
||||||
|
version="1.6.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/Juniper/libxo"
|
||||||
|
master_site="https://github.com/Juniper/libxo/releases/download/$version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-2-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
patch -p1 < $TAMANDUA_FILES_DIR/portability.patch || exit 1
|
||||||
|
./configure --prefix=/usr || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
From 32bb8f7baa9892ad98587836d591186b6213ebee Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Date: Sun, 27 Jun 2021 20:14:01 +0200
|
||||||
|
Subject: [PATCH] portability fixes
|
||||||
|
|
||||||
|
---
|
||||||
|
libxo/xo_humanize.h | 2 --
|
||||||
|
libxo/xo_syslog.c | 3 ++-
|
||||||
|
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libxo/xo_humanize.h b/libxo/xo_humanize.h
|
||||||
|
index edf85b8..ca41b86 100644
|
||||||
|
--- a/libxo/xo_humanize.h
|
||||||
|
+++ b/libxo/xo_humanize.h
|
||||||
|
@@ -37,8 +37,6 @@
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include <sys/cdefs.h>
|
||||||
|
-
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
diff --git a/libxo/xo_syslog.c b/libxo/xo_syslog.c
|
||||||
|
index 62da181..d1171e1 100644
|
||||||
|
--- a/libxo/xo_syslog.c
|
||||||
|
+++ b/libxo/xo_syslog.c
|
||||||
|
@@ -38,7 +38,6 @@
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#include <sys/cdefs.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/syslog.h>
|
||||||
|
@@ -58,7 +57,9 @@
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#if 0
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include "xo_config.h"
|
||||||
|
#include "xo.h"
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="linux-headers"
|
||||||
|
short_desc="Linux API headers"
|
||||||
|
desc="Contains necessary headers for building programs
|
||||||
|
that utilize the Linux kernel functions."
|
||||||
|
category="devel"
|
||||||
|
version="6.6.11"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.kernel.org/"
|
||||||
|
master_site="https://cdn.kernel.org/pub/linux/kernel/v6.x"
|
||||||
|
source_name="linux-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv2")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd linux-$version
|
||||||
|
make headers
|
||||||
|
find usr/include -type f ! -name '*.h' -delete
|
||||||
|
mkdir -pv $TAMANDUA_STAGE_DIR/usr
|
||||||
|
cp -rv usr/include $TAMANDUA_STAGE_DIR/usr
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="m4"
|
||||||
|
short_desc="GNU M4"
|
||||||
|
desc="GNU M4 is an implementation of the traditional Unix macro processor.
|
||||||
|
|
||||||
|
It is mostly SVR4 compatible although it has some extensions (for example, handling more than 9 positional
|
||||||
|
parameters to macros).
|
||||||
|
|
||||||
|
GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc. "
|
||||||
|
category="devel"
|
||||||
|
version="1.4.19"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/m4/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/m4"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--program-prefix=g
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="muon"
|
||||||
|
short_desc="Build system compatible with meson"
|
||||||
|
desc="muon is an implementation of the meson build system in c99 with minimal
|
||||||
|
dependencies.
|
||||||
|
|
||||||
|
# Non-features
|
||||||
|
* bug-for-bug compatibility with meson. In fact, muon aspires to be stricter
|
||||||
|
than meson in cases where meson's implementation seems error prone. muon uses
|
||||||
|
the official meson documentation as its specification.
|
||||||
|
* cli compatibility with meson. muon has different flags, subcommands, etc., and
|
||||||
|
should not be renamed/symlinked to meson.
|
||||||
|
|
||||||
|
# Features
|
||||||
|
* muon analyze - a static analyzer for meson.build files. Capable of doing type
|
||||||
|
inference, checking unused variables, undeclared variables, etc.
|
||||||
|
* muon fmt_unstable - a meson.build code formatter
|
||||||
|
* An interactive stepping debugger with the dbg() function.
|
||||||
|
* Fast"
|
||||||
|
category="devel"
|
||||||
|
version="0.2.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://gitea.treehouse.systems/ariadne/pkgconf"
|
||||||
|
master_site="https://git.sr.ht/~lattis/muon/archive"
|
||||||
|
source_name="$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/ninja" "devel/muon" "devel/pkgconf" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc" "devel/ninja")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
PKG_CONFIG_PATH=/usr/lib/pkgconfig muon setup -Dprefix=/usr build
|
||||||
|
ninja -C build
|
||||||
|
DESTDIR=$TAMANDUA_STAGE_DIR muon -C build install
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="ncurses"
|
||||||
|
short_desc="Library for terminal-independent, full-screen output"
|
||||||
|
desc="The ncurses software includes a SVr4 and XSI-Curses compatible
|
||||||
|
curses library as well as terminfo tools including "tic", "infocmp",
|
||||||
|
and "captoinfo". The library is used by other programs for text-mode
|
||||||
|
support of color, multiple highlights, forms-drawing characters,
|
||||||
|
automatic recognition of keypad and function-key sequences, and
|
||||||
|
more."
|
||||||
|
category="devel"
|
||||||
|
version="6.4"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://invisible-island.net/ncurses/announce.html"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/ncurses"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("MIT")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--with-shared \
|
||||||
|
--without-debug \
|
||||||
|
--without-normal \
|
||||||
|
--with-pkg-config-libdir=/usr/lib/pkgconfig \
|
||||||
|
--with-cxx-shared \
|
||||||
|
--enable-pc-files \
|
||||||
|
--enable-widec \
|
||||||
|
--without-ada \
|
||||||
|
--with-pkg-config-libdir=/usr/lib/pkgconfig || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
# compatibility
|
||||||
|
echo "INPUT(-lncursesw)" > $TAMANDUA_STAGE_DIR/usr/lib/libncurses.so
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# broken because python is broken
|
||||||
|
name="ninja"
|
||||||
|
short_desc="Small build system closest in spirit to Make"
|
||||||
|
desc="Ninja is yet another build system. It takes as input the interdependencies
|
||||||
|
of files (typically source code and output executables) and orchestrates
|
||||||
|
building them, quickly.
|
||||||
|
|
||||||
|
Ninja joins a sea of other build systems. Its distinguishing goal is to be
|
||||||
|
fast. It is born from my work on the Chromium browser project, which has
|
||||||
|
over 30,000 source files and whose other build systems (including one built
|
||||||
|
from custom non-recursive Makefiles) can take ten seconds to start building
|
||||||
|
after changing one file. Ninja is under a second."
|
||||||
|
category="devel"
|
||||||
|
version="1.11.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://ninja-build.org/"
|
||||||
|
master_site="https://github.com/ninja-build/ninja/archive/v1.11.1"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("APACHE20")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "lang/python3" "devel/ninja")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
python ./configure.py
|
||||||
|
ninja all
|
||||||
|
|
||||||
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
||||||
|
install -m755 -Dv ninja "$TAMANDUA_STAGE_DIR/usr/bin/ninja"
|
||||||
|
install -m644 -Dv doc/manual.asciidoc "$TAMANDUA_STAGE_DIR/usr/share/doc/ninja/manual.asciidoc"
|
||||||
|
install -Dm644 -v COPYING "$TAMANDUA_STAGE_DIR/usr/share/licenses/ninja/COPYING"
|
||||||
|
|
||||||
|
install -m644 -Dv misc/ninja-mode.el "$TAMANDUA_STAGE_DIR/usr/share/emacs/site-lisp/ninja-mode.el"
|
||||||
|
install -m644 -Dv misc/ninja.vim "$TAMANDUA_STAGE_DIR/usr/share/vim/vimfiles/syntax/ninja.vim"
|
||||||
|
install -m644 -Dv misc/ninja_syntax.py "$TAMANDUA_STAGE_DIR/$site_packages/ninja_syntax.py"
|
||||||
|
|
||||||
|
install -m644 -Dv misc/bash-completion "$TAMANDUA_STAGE_DIR/usr/share/bash-completion/completions/ninja"
|
||||||
|
install -m644 -Dv misc/zsh-completion "$TAMANDUA_STAGE_DIR/usr/share/zsh/site-functions/_ninja"
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="pkgconf"
|
||||||
|
short_desc="Utility to help to configure compiler and linker flags"
|
||||||
|
desc="pkgconf is a program which helps to configure compiler and linker flags for
|
||||||
|
development frameworks. It is similar to pkg-config, but was written from
|
||||||
|
scratch in Summer of 2011 to replace pkg-config, which now needs itself to
|
||||||
|
build itself."
|
||||||
|
category="devel"
|
||||||
|
version="2.0.3"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://gitea.treehouse.systems/ariadne/pkgconf"
|
||||||
|
master_site="https://distfiles.ariadne.space/pkgconf"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("ISCL")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
|| exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
# pkg-config compat
|
||||||
|
ln -s /usr/bin/pkgconf $TAMANDUA_STAGE_DIR/usr/bin/pkg-config
|
||||||
|
ln -s /usr/share/man/man1/pkgconf.1 $TAMANDUA_STAGE_DIR/usr/share/man/man1/pkg-config.1
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="readline"
|
||||||
|
short_desc="Library for editing command lines as they are typed"
|
||||||
|
desc="The GNU Readline library provides a set of functions for use by applications
|
||||||
|
that allow users to edit command lines as they are typed in. Both Emacs and vi
|
||||||
|
editing modes are available. The Readline library includes additional functions
|
||||||
|
to maintain a list of previously-entered command lines, to recall and perhaps
|
||||||
|
reedit those lines, and perform csh-like history expansion on previous commands."
|
||||||
|
category="devel"
|
||||||
|
version="8.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://tiswww.cwru.edu/php/chet/readline/rltop.html"
|
||||||
|
master_site="ftp://ftp.cwru.edu/pub/bash"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "devel/ncurses")
|
||||||
|
run_dependencies=("system/glibc" "devel/ncurses")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
sed -i '/MV.*old/d' Makefile.in
|
||||||
|
sed -i '/{OLDSUFF}/c:' support/shlib-install
|
||||||
|
patch -Np1 -i $TAMANDUA_FILES_DIR/readline-8.2-upstream_fix-1.patch
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--with-curses || exit 1
|
||||||
|
make SHLIB_LIBS="-lncursesw" -j$(nproc) || exit 1
|
||||||
|
make SHLIB_LIBS="-lncursesw" DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
Submitted By: Bruce Dubbs <bdubbs@linuxfromscratch.org>
|
||||||
|
Date: 2021-10-12
|
||||||
|
Initial Package Version: 8.2
|
||||||
|
Upstream Status: Applied
|
||||||
|
Origin: Upstream release repository
|
||||||
|
Starting a readline applications with an invalid locale
|
||||||
|
specification for LC_ALL/LANG/LC_CTYPE can cause the shell
|
||||||
|
to crash.
|
||||||
|
|
||||||
|
diff -Naur readline-8.2-orig/nls.c readline-8.2/nls.c
|
||||||
|
--- readline-8.2-orig/nls.c 2022-08-15 08:38:51.000000000 -0500
|
||||||
|
+++ readline-8.2/nls.c 2022-10-12 19:51:35.881738300 -0500
|
||||||
|
@@ -141,6 +141,10 @@
|
||||||
|
if (lspec == 0)
|
||||||
|
lspec = "";
|
||||||
|
ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
|
||||||
|
+ if (ret == 0 || *ret == 0)
|
||||||
|
+ ret = setlocale (LC_CTYPE, (char *)NULL);
|
||||||
|
+ if (ret == 0 || *ret == 0)
|
||||||
|
+ ret = RL_DEFAULT_LOCALE;
|
||||||
|
#else
|
||||||
|
ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
|
||||||
|
#endif
|
||||||
|
diff -Naur readline-8.2-orig/patchlevel readline-8.2/patchlevel
|
||||||
|
--- readline-8.2-orig/patchlevel 2020-05-21 13:22:40.000000000 -0500
|
||||||
|
+++ readline-8.2/patchlevel 2022-10-12 19:51:35.881738300 -0500
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
# Do not edit -- exists only for use by patch
|
||||||
|
|
||||||
|
-0
|
||||||
|
+1
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="curl"
|
||||||
|
short_desc="Command line tool and library for transferring data with URLs"
|
||||||
|
desc="curl is used in command lines or scripts to transfer data. It is also used in
|
||||||
|
cars, television sets, routers, printers, audio equipment, mobile phones,
|
||||||
|
tablets, settop boxes, media players and is the internet transfer backbone for
|
||||||
|
thousands of software applications affecting billions of humans daily.
|
||||||
|
|
||||||
|
It supports DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP,
|
||||||
|
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, Telnet and
|
||||||
|
TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP
|
||||||
|
form based upload, proxies, HTTP/2, cookies, user+password authentication
|
||||||
|
(Basic, Plain, Digest, CRAM-MD5, NTLM, Negotiate and Kerberos), file transfer
|
||||||
|
resume, proxy tunneling and more."
|
||||||
|
category="ftp"
|
||||||
|
version="8.5.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://curl.se"
|
||||||
|
master_site="https://curl.se/download"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("MIT")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/gcc" "security/openssl")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--with-openssl \
|
||||||
|
--with-ca-path=/etc/ssl/certs \
|
||||||
|
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
|
||||||
|
|| exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# broken
|
||||||
|
name="wget"
|
||||||
|
short_desc="GNU wget tool"
|
||||||
|
desc="GNU Wget is a free software package for retrieving files using HTTP, HTTPS,
|
||||||
|
FTP and FTPS, the most widely used Internet protocols.
|
||||||
|
|
||||||
|
It is a non-interactive commandline tool, so it may easily be called from scripts,
|
||||||
|
cron jobs, terminals without X-Windows support, etc. "
|
||||||
|
category="ftp"
|
||||||
|
version="1.21.4"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/wget/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/wget"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/pkgconf" "devel/gcc" "security/openssl")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--enable-shared \
|
||||||
|
--with-ssl=openssl || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gawk"
|
||||||
|
short_desc="GNU awk"
|
||||||
|
desc="GNU awk is the GNU implementation of the awk language"
|
||||||
|
category="lang"
|
||||||
|
version="5.3.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/gawk/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/gawk"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--program-prefix=g || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gcc"
|
||||||
|
short_desc="GNU Compiler Collection"
|
||||||
|
desc="The GNU Compiler Collection contains a variety of compilers for many languages (such as C, C++, Fortran, and D)
|
||||||
|
|
||||||
|
This package contains the C and C++ compilers."
|
||||||
|
category="lang"
|
||||||
|
version="13.2.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/gcc/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/gcc/$name-$version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3" "GPLv3RLE")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "devel/binutils" "devel/bison" "archivers/zlib" "math/gmp" "math/mpfr" "math/mpc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
mkdir -p build || exit 1
|
||||||
|
cd build || exit 1
|
||||||
|
../configure --prefix=/usr \
|
||||||
|
LD=ld \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--enable-default-pie \
|
||||||
|
--enable-default-ssp \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-bootstrap \
|
||||||
|
--disable-fixincludes \
|
||||||
|
--with-system-zlib || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
ln -sr cpp $TAMANDUA_STAGE_DIR/usr/lib/cpp
|
||||||
|
ln -s gcc $TAMANDUA_STAGE_DIR/usr/bin/cc
|
||||||
|
ln -s gcc $TAMANDUA_STAGE_DIR/usr/bin/c99
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="perl5"
|
||||||
|
short_desc="Practical Extraction and Report Language"
|
||||||
|
desc="Perl is a language that combines some of the features of C, sed, awk and
|
||||||
|
shell. See the manual page for more hype. There are also many books
|
||||||
|
published by O'Reilly & Assoc. See pod/perlbook.pod for more
|
||||||
|
information."
|
||||||
|
category="lang"
|
||||||
|
version="5.38.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.perl.org/"
|
||||||
|
master_site="https://www.cpan.org/src/5.0"
|
||||||
|
source_name="perl-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv1")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd perl-$version || exit 1
|
||||||
|
sh Configure -des \
|
||||||
|
-Dprefix=/usr \
|
||||||
|
-Dvendorprefix=/usr \
|
||||||
|
-Dman1dir=/usr/share/man/man1 \
|
||||||
|
-Dman3dir=/usr/share/man/man3 \
|
||||||
|
-Dpager="/usr/bin/less -isR" \
|
||||||
|
-Duseshrplib \
|
||||||
|
-Dusethreads
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# broken as of now
|
||||||
|
name="python3"
|
||||||
|
short_desc="Interpreted object-oriented programming language"
|
||||||
|
desc="Python is an interpreted object-oriented programming language, and is
|
||||||
|
often compared to Tcl, Perl or Scheme."
|
||||||
|
category="lang"
|
||||||
|
version="3.12.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.python.org/"
|
||||||
|
master_site="https://www.python.org/ftp/python/$version/Python-$version.tgz"
|
||||||
|
source_name="Python-$version.tgz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("PSFL")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "security/openssl" "archivers/bzip2" "archivers/zlib" "textproc/expat")
|
||||||
|
run_dependencies=("system/glibc" "security/openssl" "archivers/bzip2" "archivers/zlib" "textproc/expat")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd Python-$version || exit 1
|
||||||
|
mkdir -p build || exit 1
|
||||||
|
cd build || exit 1
|
||||||
|
../configure --prefix=/usr \
|
||||||
|
--enable-shared \
|
||||||
|
--without-ensurepip \
|
||||||
|
--with-system-ffi \
|
||||||
|
--enable-optimizations \
|
||||||
|
--with-system-expat || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gmp"
|
||||||
|
short_desc="GNU Multiple Precision Arithmetic Library"
|
||||||
|
desc="GMP is a free library for arbitrary precision arithmetic, operating
|
||||||
|
on signed integers, rational numbers, and floating point numbers.
|
||||||
|
There is no limit to the precision except the ones implied by the
|
||||||
|
available memory in the machine GMP runs on. GMP has a rich set of
|
||||||
|
functions, and the functions have a regular interface.
|
||||||
|
|
||||||
|
GMP is designed to be as fast as possible, both for small operands
|
||||||
|
and for huge operands. The speed is achieved by using fullwords as
|
||||||
|
the basic arithmetic type, by using fast algorithms, with carefully
|
||||||
|
optimized assembly code for the most common inner loops for a lot of
|
||||||
|
CPUs, and by a general emphasis on speed (instead of simplicity or
|
||||||
|
elegance).
|
||||||
|
|
||||||
|
GMP is believed to be faster than any other similar library. The
|
||||||
|
advantage for GMP increases with the operand sizes for certain
|
||||||
|
operations, since GMP in many cases has asymptotically faster
|
||||||
|
algorithms."
|
||||||
|
category="math"
|
||||||
|
version="6.3.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://gmplib.org/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/gmp"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("LGPL3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/pkgconf" "lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--host=none-linux-gnu || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="mpc"
|
||||||
|
short_desc="GNU multi-precision library"
|
||||||
|
desc="GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily
|
||||||
|
high precision and correct rounding of the result. It extends the principles of the
|
||||||
|
IEEE-754 standard for fixed precision real floating point numbers to complex numbers,
|
||||||
|
providing well-defined semantics for every operation. At the same time, speed of
|
||||||
|
operation at high precision is a major design goal.
|
||||||
|
|
||||||
|
The library is built upon and follows the same principles as GNU MPFR."
|
||||||
|
category="math"
|
||||||
|
version="1.3.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.multiprecision.org/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/mpc"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("LGPL3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/pkgconf" "devel/gmake" "lang/gcc" "math/mpfr")
|
||||||
|
run_dependencies=("system/glibc" "math/mpfr")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="mpfr"
|
||||||
|
short_desc="GNU MPFR Library"
|
||||||
|
desc="The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.
|
||||||
|
MPFR has continuously been supported by the INRIA and the current main authors
|
||||||
|
come from the Caramba and AriC project-teams at Loria (Nancy, France) and LIP (Lyon, France)
|
||||||
|
respectively; see more on the credit page. MPFR is based on the GMP multiple-precision library.
|
||||||
|
|
||||||
|
The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both
|
||||||
|
efficient and has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for
|
||||||
|
double-precision floating-point arithmetic (53-bit significand)."
|
||||||
|
category="math"
|
||||||
|
version="4.2.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.mpfr.org/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/mpfr"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("LGPL3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/pkgconf" "devel/gmake" "lang/gcc" "math/gmp")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--enable-thread-safe || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libxcrypt"
|
||||||
|
short_desc="Extended crypt library for descrypt, md5crypt, bcrypt, and others"
|
||||||
|
desc="libxcrypt is a modern library for one-way hashing of passwords. It supports a wide variety
|
||||||
|
of both modern and historical hashing methods:
|
||||||
|
|
||||||
|
yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5, sha1crypt, NT, bsdicrypt,bigcrypt, and descrypt.
|
||||||
|
|
||||||
|
It provides the traditional Unix crypt and crypt_r interfaces, as well as a set of extended
|
||||||
|
interfaces pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra."
|
||||||
|
category="security"
|
||||||
|
version="4.4.36"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/besser82/libxcrypt"
|
||||||
|
master_site="https://github.com/besser82/libxcrypt/releases/download/v$version"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("LGPLv2.1")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static \
|
||||||
|
--enable-hashes=strong,glibc \
|
||||||
|
--enable-obsolete-api=no \
|
||||||
|
--disable-failure-tokens \
|
||||||
|
|| exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="openssl"
|
||||||
|
short_desc="TLSv1.3 capable SSL and crypto library"
|
||||||
|
desc="The OpenSSL Project is a collaborative effort to develop a robust,
|
||||||
|
commercial-grade, full-featured, and Open Source toolkit implementing
|
||||||
|
the Secure Sockets Layer (SSL v3) and Transport Layer Security (TLS v1,
|
||||||
|
v1.1, v1.2, v1.3) protocols with full-strength cryptography world-wide.
|
||||||
|
The project is managed by a worldwide community of volunteers that use
|
||||||
|
the Internet to communicate, plan, and develop the OpenSSL tookit
|
||||||
|
and its related documentation.
|
||||||
|
|
||||||
|
OpenSSL is based on the excellent SSLeay library developed by Eric
|
||||||
|
A. Young and Tim J. Hudson. The OpenSSL toolkit is licensed under
|
||||||
|
an Apache-style licence, which basically means that you are free
|
||||||
|
to get and use it for commercial and non-commercial purposes subject
|
||||||
|
to some simple license conditions."
|
||||||
|
category="security"
|
||||||
|
version="3.2.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.openssl.org"
|
||||||
|
master_site="ftp://ftp.fi.muni.cz/pub/openssl/source"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("APACHE20")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake" "archivers/zlib")
|
||||||
|
run_dependencies=("system/glibc" "archivers/zlib")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./config --prefix=/usr \
|
||||||
|
--openssldir=/etc/ssl \
|
||||||
|
--libdir=lib \
|
||||||
|
shared \
|
||||||
|
zlib-dynamic || exit 1
|
||||||
|
make -j$(nproc) depend
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install_sw install_ssldirs install_man_docs
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/etc/ssl/certs
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="pam"
|
||||||
|
short_desc="Linux Pluggable Authentication Modules"
|
||||||
|
desc="libxcrypt is a modern library for one-way hashing of passwords. It supports a wide variety
|
||||||
|
of both modern and historical hashing methods:
|
||||||
|
|
||||||
|
yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, md5crypt, SunMD5, sha1crypt, NT, bsdicrypt,bigcrypt, and descrypt.
|
||||||
|
|
||||||
|
It provides the traditional Unix crypt and crypt_r interfaces, as well as a set of extended
|
||||||
|
interfaces pioneered by Openwall Linux, crypt_rn, crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra."
|
||||||
|
category="security"
|
||||||
|
version="1.5.3"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/linux-pam/linux-pam"
|
||||||
|
master_site="https://github.com/linux-pam/linux-pam/releases/download/v$version"
|
||||||
|
source_name="linux-$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv2")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "security/libxcrypt" "textproc/flex")
|
||||||
|
run_dependencies=("system/glibc" "security/libxcrypt")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd Linux-PAM-$version
|
||||||
|
curl -LO https://github.com/linux-pam/linux-pam/releases/download/v$version/Linux-PAM-$version-docs.tar.xz # fetch docs
|
||||||
|
tar -xf Linux-PAM-$version-docs.tar.xz
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--sbindir=/usr/sbin \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--enable-securedir=/usr/lib/security \
|
||||||
|
--docdir=/usr/share/doc/Linux-PAM \
|
||||||
|
|| exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
chmod -v 4755 $TAMANDUA_STAGE_DIR/usr/sbin/unix_chkpwd
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="shadow"
|
||||||
|
short_desc="programs for converting UNIX password files to the shadow password format"
|
||||||
|
desc="The shadow-utils package includes the necessary programs for converting
|
||||||
|
UNIX password files to the shadow password format, plus programs
|
||||||
|
for managing user and group accounts.
|
||||||
|
|
||||||
|
The pwconv command converts passwords to the shadow password format.
|
||||||
|
|
||||||
|
The pwunconv command unconverts shadow passwords
|
||||||
|
and generates a passwd file (a standard UNIX password file).
|
||||||
|
|
||||||
|
The pwck command checks the integrity of password and shadow files. The lastlog
|
||||||
|
command prints out the last login times for all users.
|
||||||
|
|
||||||
|
The useradd, userdel, and usermod commands are used for managing user accounts.
|
||||||
|
|
||||||
|
The groupadd, groupdel, and groupmod commands are used for managing group accounts."
|
||||||
|
category="security"
|
||||||
|
version="4.14.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/shadow-maint/shadow"
|
||||||
|
master_site="https://github.com/shadow-maint/shadow/releases/download/$version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-3-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake" "security/libxcrypt" "security/pam")
|
||||||
|
run_dependencies=("system/glibc" "security/libxcrypt" "security/pam")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
|
||||||
|
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
|
||||||
|
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
|
||||||
|
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;
|
||||||
|
sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD YESCRYPT:' \
|
||||||
|
-e 's:/var/spool/mail:/var/mail:' \
|
||||||
|
-e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
|
||||||
|
-i etc/login.defs
|
||||||
|
PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure --sysconfdir=/etc \
|
||||||
|
--disable-static \
|
||||||
|
--with-{b,yes}crypt \
|
||||||
|
--with-group-name-max-length=32 || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make exec_prefix=/usr DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
make -C man install-man
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="bash"
|
||||||
|
short_desc="Bourne Again Shell"
|
||||||
|
desc="This is GNU Bash. Bash is the GNU Project's Bourne Again SHell,
|
||||||
|
a complete implementation of the POSIX.2 shell spec, but also
|
||||||
|
with interactive command line editing, job control on architectures
|
||||||
|
that support it, csh-like features such as history substitution and
|
||||||
|
brace expansion, and a slew of other features."
|
||||||
|
category="shells"
|
||||||
|
version="5.2.21"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/bash/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/bash"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+")
|
||||||
|
|
||||||
|
build_dependencies=("devel/ncurses" "devel/readline")
|
||||||
|
run_dependencies=("system/glibc" "devel/ncurses" "devel/readline")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--without-bash-malloc \
|
||||||
|
--with-curses \
|
||||||
|
--with-installed-readline \
|
||||||
|
|| exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/bin
|
||||||
|
ln -sv /usr/bin/bash $TAMANDUA_STAGE_DIR/bin/bash
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="base"
|
||||||
|
short_desc="Base meta-package"
|
||||||
|
desc="Meta-package to install a base system that can be chrooted into
|
||||||
|
|
||||||
|
Contains /etc/os-release"
|
||||||
|
category="system"
|
||||||
|
version="1.0-CURRENT_1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="Basalt Linux Project"
|
||||||
|
master_site="N/A"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("N/A")
|
||||||
|
|
||||||
|
build_dependencies=()
|
||||||
|
run_dependencies=("system/glibc" "system/chimerautils" "www/certs" "system/etc" "system/pkg" "sysutils/bc-gh" "sysutils/libelf" "sysutils/find" "archivers/bzip2" "archivers/libarchive" "archivers/xz" "archivers/zlib" "archivers/zstd" "security/pam" "security/shadow")
|
||||||
|
|
||||||
|
build_process(){
|
||||||
|
echo "Wow"
|
||||||
|
mkdir -pv $TAMANDUA_STAGE_DIR/etc
|
||||||
|
cp -v $TAMANDUA_FILES_DIR/os-release $TAMANDUA_STAGE_DIR/etc/
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
PRETTY_NAME="Basalt Linux 1.0-CURRENT"
|
||||||
|
NAME="Basalt Linux"
|
||||||
|
VERSION_ID="1.0-CURRENT"
|
||||||
|
VERSION="1.0-CURRENT"
|
||||||
|
ID=basalt
|
||||||
|
HOME_URL="https://basalt.hectabit.org/"
|
||||||
|
LOGO=basalt-logo
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="chimerautils"
|
||||||
|
short_desc="FreeBSD userspace from Chimera Linux"
|
||||||
|
desc="chimerautils is the heart of Chimera Linux and Basalt Linux, providing the essential utilities for a system."
|
||||||
|
category="system"
|
||||||
|
version="14.0.4"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/chimera-linux/chimerautils"
|
||||||
|
master_site="https://github.com/chimera-linux/chimerautils/archive/refs/tags"
|
||||||
|
source_name="v$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/muon" "devel/ninja" "devel/acl" "devel/libedit" "devel/libxo")
|
||||||
|
run_dependencies=("system/glibc" "devel/libxo")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
PKG_CONFIG_PATH=/usr/lib/pkgconfig muon setup -Dprefix=/usr -Dbc=false build || exit 1
|
||||||
|
# fix incompatibilities
|
||||||
|
cp -v src.freebsd/{nvi/gen_extern_h.sh,libfetch/gen_errors.sh} build
|
||||||
|
cp -v src.freebsd/nvi/gen_ex_version_h.sh .
|
||||||
|
ninja -C build || exit 1
|
||||||
|
DESTDIR=$TAMANDUA_STAGE_DIR muon -C build install || exit 1
|
||||||
|
mkdir -pv $TAMANDUA_STAGE_DIR/bin
|
||||||
|
ln -sv /usr/bin/sh $TAMANDUA_STAGE_DIR/bin/sh
|
||||||
|
# find doesn't build properly
|
||||||
|
rm -v $TAMANDUA_STAGE_DIR/usr/bin/find
|
||||||
|
# we have xz, bz, zstd from archivers/ in the ports tree, which provide the libraries needed for pkg(8) to build and run.
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/bin/bz*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/bin/lz*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/bin/zstd*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/bin/xz*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/bin/groups*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/share/man/man1/xz*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/share/man/man1/bz*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/share/man/man1/zstd*
|
||||||
|
rm -rv $TAMANDUA_STAGE_DIR/usr/share/man/man1/lz*
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="etc"
|
||||||
|
short_desc="Necessary /etc files (do NOT uninstall)"
|
||||||
|
desc="This package contains the necessary files required for user management. The contents are:
|
||||||
|
/etc/passwd
|
||||||
|
/etc/group
|
||||||
|
/etc/pam.d/other"
|
||||||
|
category="system"
|
||||||
|
version="KROS"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="Basalt Linux Project"
|
||||||
|
master_site="N/A"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("N/A")
|
||||||
|
|
||||||
|
build_dependencies=()
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/etc/pam.d
|
||||||
|
cp $TAMANDUA_FILES_DIR/{group,passwd} $TAMANDUA_STAGE_DIR/etc
|
||||||
|
cp $TAMANDUA_FILES_DIR/other $TAMANDUA_STAGE_DIR/etc/pam.d
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
root:x:0:
|
||||||
|
bin:x:1:daemon
|
||||||
|
sys:x:2:
|
||||||
|
kmem:x:3:
|
||||||
|
tape:x:4:
|
||||||
|
tty:x:5:
|
||||||
|
daemon:x:6:
|
||||||
|
floppy:x:7:
|
||||||
|
disk:x:8:
|
||||||
|
lp:x:9:
|
||||||
|
dialout:x:10:
|
||||||
|
audio:x:11:
|
||||||
|
video:x:12:
|
||||||
|
utmp:x:13:
|
||||||
|
usb:x:14:
|
||||||
|
cdrom:x:15:
|
||||||
|
adm:x:16:
|
||||||
|
messagebus:x:18:
|
||||||
|
systemd-journal:x:23:
|
||||||
|
input:x:24:
|
||||||
|
mail:x:34:
|
||||||
|
kvm:x:61:
|
||||||
|
systemd-journal-gateway:x:73:
|
||||||
|
systemd-journal-remote:x:74:
|
||||||
|
systemd-journal-upload:x:75:
|
||||||
|
systemd-network:x:76:
|
||||||
|
systemd-resolve:x:77:
|
||||||
|
systemd-timesync:x:78:
|
||||||
|
systemd-coredump:x:79:
|
||||||
|
uuidd:x:80:
|
||||||
|
systemd-oom:x:81:
|
||||||
|
wheel:x:97:
|
||||||
|
users:x:999:
|
||||||
|
nogroup:x:65534:
|
|
@ -0,0 +1,4 @@
|
||||||
|
auth required pam_deny.so
|
||||||
|
account required pam_deny.so
|
||||||
|
password required pam_deny.so
|
||||||
|
session required pam_deny.so
|
|
@ -0,0 +1,14 @@
|
||||||
|
root:x:0:0:root:/root:/bin/bash
|
||||||
|
bin:x:1:1:bin:/dev/null:/usr/bin/false
|
||||||
|
daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false
|
||||||
|
messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/usr/bin/false
|
||||||
|
systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/usr/bin/false
|
||||||
|
systemd-journal-remote:x:74:74:systemd Journal Remote:/:/usr/bin/false
|
||||||
|
systemd-journal-upload:x:75:75:systemd Journal Upload:/:/usr/bin/false
|
||||||
|
systemd-network:x:76:76:systemd Network Management:/:/usr/bin/false
|
||||||
|
systemd-resolve:x:77:77:systemd Resolver:/:/usr/bin/false
|
||||||
|
systemd-timesync:x:78:78:systemd Time Synchronization:/:/usr/bin/false
|
||||||
|
systemd-coredump:x:79:79:systemd Core Dumper:/:/usr/bin/false
|
||||||
|
uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false
|
||||||
|
systemd-oom:x:81:81:systemd Out Of Memory Daemon:/:/usr/bin/false
|
||||||
|
nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false
|
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="glibc"
|
||||||
|
short_desc="GNU C Library"
|
||||||
|
desc="The GNU C Library (glibc) is a C library uses as the libc of most Linux distributions.
|
||||||
|
Not only does it contain a libc, it also contains locale configuration."
|
||||||
|
category="system"
|
||||||
|
version="2.38"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/libc/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/libc"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "lang/gawk" "lang/python3" "textproc/sed" "devel/bison" "devel/binutils" "devel/gmake")
|
||||||
|
run_dependencies=()
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
patch -Np1 -i $TAMANDUA_FILES_DIR/glibc-2.38-memalign_fix-1.patch || exit 1
|
||||||
|
patch -Np1 -i $TAMANDUA_FILES_DIR/glibc-2.38-fhs-1.patch || exit 1
|
||||||
|
echo "rootsbindir=/usr/sbin" > configparms || exit 1
|
||||||
|
mkdir -p build || exit 1
|
||||||
|
cd build || exit 1
|
||||||
|
../configure --prefix=/usr \
|
||||||
|
--disable-werror \
|
||||||
|
--disable-nscd \
|
||||||
|
--enable-kernel=4.14 \
|
||||||
|
--with-headers=/usr/include \
|
||||||
|
--enable-stack-protector=strong \
|
||||||
|
libc_cv_slibdir=/usr/lib || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
sed '/RTLDLIST=/s@/usr@@g' -i $TAMANDUA_STAGE_DIR/usr/bin/ldd || exit 1
|
||||||
|
# locale-gen
|
||||||
|
chmod +x $TAMANDUA_FILES_DIR/locale-gen
|
||||||
|
cp $TAMANDUA_FILES_DIR/locale-gen $TAMANDUA_STAGE_DIR/usr/bin/locale-gen
|
||||||
|
echo "# locale-gen configuration file
|
||||||
|
#
|
||||||
|
# The locale-gen utility is a utility that will generate locales and place them
|
||||||
|
# in /usr/lib/locale.
|
||||||
|
#
|
||||||
|
# Uncomment your desired locales, and run locale-gen to generate them.
|
||||||
|
#" > $TAMANDUA_STAGE_DIR/etc/locale.gen
|
||||||
|
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
|
||||||
|
$TAMANDUA_BUILD_DIR/$name-$version/localedata/SUPPORTED >> $TAMANDUA_STAGE_DIR/etc/locale.gen
|
||||||
|
# ld-linux
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/lib64
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/usr/lib/locale
|
||||||
|
ln -sv /usr/lib/ld-linux-x86-64.so.2 $TAMANDUA_STAGE_DIR/lib64/ld-linux-x86-64.so.2
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
Submitted By: Armin K. <krejzi at email dot com>
|
||||||
|
Date: 2013-02-11
|
||||||
|
Initial Package Version: 2.17
|
||||||
|
Upstream Status: Not Applicable
|
||||||
|
Origin: Self
|
||||||
|
Description: This patch removes references to /var/db directory which is not part
|
||||||
|
of FHS and replaces them with more suitable directories in /var
|
||||||
|
hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
|
||||||
|
|
||||||
|
--- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100
|
||||||
|
+++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100
|
||||||
|
@@ -250,7 +250,7 @@
|
||||||
|
|
||||||
|
# Directory for the database files and Makefile for nss_db.
|
||||||
|
ifndef vardbdir
|
||||||
|
-vardbdir = $(localstatedir)/db
|
||||||
|
+vardbdir = $(localstatedir)/lib/nss_db
|
||||||
|
endif
|
||||||
|
inst_vardbdir = $(install_root)$(vardbdir)
|
||||||
|
|
||||||
|
--- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100
|
||||||
|
+++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100
|
||||||
|
@@ -112,11 +112,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
/* Paths of the file for the persistent storage. */
|
||||||
|
-#define _PATH_NSCD_PASSWD_DB "/var/db/nscd/passwd"
|
||||||
|
-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group"
|
||||||
|
-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts"
|
||||||
|
-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services"
|
||||||
|
-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup"
|
||||||
|
+#define _PATH_NSCD_PASSWD_DB "/var/cache/nscd/passwd"
|
||||||
|
+#define _PATH_NSCD_GROUP_DB "/var/cache/nscd/group"
|
||||||
|
+#define _PATH_NSCD_HOSTS_DB "/var/cache/nscd/hosts"
|
||||||
|
+#define _PATH_NSCD_SERVICES_DB "/var/cache/nscd/services"
|
||||||
|
+#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup"
|
||||||
|
|
||||||
|
/* Path used when not using persistent storage. */
|
||||||
|
#define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
|
||||||
|
--- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100
|
||||||
|
+++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
/etc/rpc /etc/services /etc/shadow /etc/gshadow \
|
||||||
|
/etc/netgroup)
|
||||||
|
|
||||||
|
-VAR_DB = /var/db
|
||||||
|
+VAR_DB = /var/lib/nss_db
|
||||||
|
|
||||||
|
AWK = awk
|
||||||
|
MAKEDB = makedb --quiet
|
||||||
|
--- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100
|
||||||
|
+++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100
|
||||||
|
@@ -68,7 +68,7 @@
|
||||||
|
/* Provide trailing slash, since mostly used for building pathnames. */
|
||||||
|
#define _PATH_DEV "/dev/"
|
||||||
|
#define _PATH_TMP "/tmp/"
|
||||||
|
-#define _PATH_VARDB "/var/db/"
|
||||||
|
+#define _PATH_VARDB "/var/lib/nss_db/"
|
||||||
|
#define _PATH_VARRUN "/var/run/"
|
||||||
|
#define _PATH_VARTMP "/var/tmp/"
|
||||||
|
|
||||||
|
--- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100
|
||||||
|
@@ -68,7 +68,7 @@
|
||||||
|
/* Provide trailing slash, since mostly used for building pathnames. */
|
||||||
|
#define _PATH_DEV "/dev/"
|
||||||
|
#define _PATH_TMP "/tmp/"
|
||||||
|
-#define _PATH_VARDB "/var/db/"
|
||||||
|
+#define _PATH_VARDB "/var/lib/nss_db/"
|
||||||
|
#define _PATH_VARRUN "/var/run/"
|
||||||
|
#define _PATH_VARTMP "/var/tmp/"
|
|
@ -0,0 +1,584 @@
|
||||||
|
Submitted By: Xi Ruoyao <xry111 at xry111.site>
|
||||||
|
Date: 2023-08-13
|
||||||
|
Initial Package Version: 2.38
|
||||||
|
Upstream Status: Under review
|
||||||
|
Origin: Upstream & Self
|
||||||
|
- 1/3: https://sourceware.org/git/?p=glibc.git;a=patch;h=542b11058525
|
||||||
|
- 2/3: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
|
||||||
|
- 3/3: Trivial unused code removal
|
||||||
|
Description: Fixes a regression causing posix_memalign()
|
||||||
|
very slow in certain conditions to avoid
|
||||||
|
breaking ffmpeg-based applications.
|
||||||
|
|
||||||
|
From fc01478d06658ace8d57e5328c1e717275acfe84 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Fri, 11 Aug 2023 11:18:17 +0200
|
||||||
|
Subject: [PATCH 1/3] malloc: Enable merging of remainders in memalign (bug
|
||||||
|
30723)
|
||||||
|
|
||||||
|
Previously, calling _int_free from _int_memalign could put remainders
|
||||||
|
into the tcache or into fastbins, where they are invisible to the
|
||||||
|
low-level allocator. This results in missed merge opportunities
|
||||||
|
because once these freed chunks become available to the low-level
|
||||||
|
allocator, further memalign allocations (even of the same size are)
|
||||||
|
likely obstructing merges.
|
||||||
|
|
||||||
|
Furthermore, during forwards merging in _int_memalign, do not
|
||||||
|
completely give up when the remainder is too small to serve as a
|
||||||
|
chunk on its own. We can still give it back if it can be merged
|
||||||
|
with the following unused chunk. This makes it more likely that
|
||||||
|
memalign calls in a loop achieve a compact memory layout,
|
||||||
|
independently of initial heap layout.
|
||||||
|
|
||||||
|
Drop some useless (unsigned long) casts along the way, and tweak
|
||||||
|
the style to more closely match GNU on changed lines.
|
||||||
|
|
||||||
|
Reviewed-by: DJ Delorie <dj@redhat.com>
|
||||||
|
(cherry picked from commit 542b1105852568c3ebc712225ae78b8c8ba31a78)
|
||||||
|
---
|
||||||
|
malloc/malloc.c | 197 +++++++++++++++++++++++++++++-------------------
|
||||||
|
1 file changed, 121 insertions(+), 76 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/malloc/malloc.c b/malloc/malloc.c
|
||||||
|
index e2f1a615a4..948f9759af 100644
|
||||||
|
--- a/malloc/malloc.c
|
||||||
|
+++ b/malloc/malloc.c
|
||||||
|
@@ -1086,6 +1086,11 @@ typedef struct malloc_chunk* mchunkptr;
|
||||||
|
|
||||||
|
static void* _int_malloc(mstate, size_t);
|
||||||
|
static void _int_free(mstate, mchunkptr, int);
|
||||||
|
+static void _int_free_merge_chunk (mstate, mchunkptr, INTERNAL_SIZE_T);
|
||||||
|
+static INTERNAL_SIZE_T _int_free_create_chunk (mstate,
|
||||||
|
+ mchunkptr, INTERNAL_SIZE_T,
|
||||||
|
+ mchunkptr, INTERNAL_SIZE_T);
|
||||||
|
+static void _int_free_maybe_consolidate (mstate, INTERNAL_SIZE_T);
|
||||||
|
static void* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T,
|
||||||
|
INTERNAL_SIZE_T);
|
||||||
|
static void* _int_memalign(mstate, size_t, size_t);
|
||||||
|
@@ -4637,31 +4642,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
|
||||||
|
if (!have_lock)
|
||||||
|
__libc_lock_lock (av->mutex);
|
||||||
|
|
||||||
|
- nextchunk = chunk_at_offset(p, size);
|
||||||
|
-
|
||||||
|
- /* Lightweight tests: check whether the block is already the
|
||||||
|
- top block. */
|
||||||
|
- if (__glibc_unlikely (p == av->top))
|
||||||
|
- malloc_printerr ("double free or corruption (top)");
|
||||||
|
- /* Or whether the next chunk is beyond the boundaries of the arena. */
|
||||||
|
- if (__builtin_expect (contiguous (av)
|
||||||
|
- && (char *) nextchunk
|
||||||
|
- >= ((char *) av->top + chunksize(av->top)), 0))
|
||||||
|
- malloc_printerr ("double free or corruption (out)");
|
||||||
|
- /* Or whether the block is actually not marked used. */
|
||||||
|
- if (__glibc_unlikely (!prev_inuse(nextchunk)))
|
||||||
|
- malloc_printerr ("double free or corruption (!prev)");
|
||||||
|
-
|
||||||
|
- nextsize = chunksize(nextchunk);
|
||||||
|
- if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
|
||||||
|
- || __builtin_expect (nextsize >= av->system_mem, 0))
|
||||||
|
- malloc_printerr ("free(): invalid next size (normal)");
|
||||||
|
+ _int_free_merge_chunk (av, p, size);
|
||||||
|
|
||||||
|
- free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
|
||||||
|
+ if (!have_lock)
|
||||||
|
+ __libc_lock_unlock (av->mutex);
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ If the chunk was allocated via mmap, release via munmap().
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ else {
|
||||||
|
+ munmap_chunk (p);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Try to merge chunk P of SIZE bytes with its neighbors. Put the
|
||||||
|
+ resulting chunk on the appropriate bin list. P must not be on a
|
||||||
|
+ bin list yet, and it can be in use. */
|
||||||
|
+static void
|
||||||
|
+_int_free_merge_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size)
|
||||||
|
+{
|
||||||
|
+ mchunkptr nextchunk = chunk_at_offset(p, size);
|
||||||
|
+
|
||||||
|
+ /* Lightweight tests: check whether the block is already the
|
||||||
|
+ top block. */
|
||||||
|
+ if (__glibc_unlikely (p == av->top))
|
||||||
|
+ malloc_printerr ("double free or corruption (top)");
|
||||||
|
+ /* Or whether the next chunk is beyond the boundaries of the arena. */
|
||||||
|
+ if (__builtin_expect (contiguous (av)
|
||||||
|
+ && (char *) nextchunk
|
||||||
|
+ >= ((char *) av->top + chunksize(av->top)), 0))
|
||||||
|
+ malloc_printerr ("double free or corruption (out)");
|
||||||
|
+ /* Or whether the block is actually not marked used. */
|
||||||
|
+ if (__glibc_unlikely (!prev_inuse(nextchunk)))
|
||||||
|
+ malloc_printerr ("double free or corruption (!prev)");
|
||||||
|
+
|
||||||
|
+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
|
||||||
|
+ if (__builtin_expect (chunksize_nomask (nextchunk) <= CHUNK_HDR_SZ, 0)
|
||||||
|
+ || __builtin_expect (nextsize >= av->system_mem, 0))
|
||||||
|
+ malloc_printerr ("free(): invalid next size (normal)");
|
||||||
|
+
|
||||||
|
+ free_perturb (chunk2mem(p), size - CHUNK_HDR_SZ);
|
||||||
|
|
||||||
|
- /* consolidate backward */
|
||||||
|
- if (!prev_inuse(p)) {
|
||||||
|
- prevsize = prev_size (p);
|
||||||
|
+ /* Consolidate backward. */
|
||||||
|
+ if (!prev_inuse(p))
|
||||||
|
+ {
|
||||||
|
+ INTERNAL_SIZE_T prevsize = prev_size (p);
|
||||||
|
size += prevsize;
|
||||||
|
p = chunk_at_offset(p, -((long) prevsize));
|
||||||
|
if (__glibc_unlikely (chunksize(p) != prevsize))
|
||||||
|
@@ -4669,9 +4695,25 @@ _int_free (mstate av, mchunkptr p, int have_lock)
|
||||||
|
unlink_chunk (av, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (nextchunk != av->top) {
|
||||||
|
+ /* Write the chunk header, maybe after merging with the following chunk. */
|
||||||
|
+ size = _int_free_create_chunk (av, p, size, nextchunk, nextsize);
|
||||||
|
+ _int_free_maybe_consolidate (av, size);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Create a chunk at P of SIZE bytes, with SIZE potentially increased
|
||||||
|
+ to cover the immediately following chunk NEXTCHUNK of NEXTSIZE
|
||||||
|
+ bytes (if NEXTCHUNK is unused). The chunk at P is not actually
|
||||||
|
+ read and does not have to be initialized. After creation, it is
|
||||||
|
+ placed on the appropriate bin list. The function returns the size
|
||||||
|
+ of the new chunk. */
|
||||||
|
+static INTERNAL_SIZE_T
|
||||||
|
+_int_free_create_chunk (mstate av, mchunkptr p, INTERNAL_SIZE_T size,
|
||||||
|
+ mchunkptr nextchunk, INTERNAL_SIZE_T nextsize)
|
||||||
|
+{
|
||||||
|
+ if (nextchunk != av->top)
|
||||||
|
+ {
|
||||||
|
/* get and clear inuse bit */
|
||||||
|
- nextinuse = inuse_bit_at_offset(nextchunk, nextsize);
|
||||||
|
+ bool nextinuse = inuse_bit_at_offset (nextchunk, nextsize);
|
||||||
|
|
||||||
|
/* consolidate forward */
|
||||||
|
if (!nextinuse) {
|
||||||
|
@@ -4686,8 +4728,8 @@ _int_free (mstate av, mchunkptr p, int have_lock)
|
||||||
|
been given one chance to be used in malloc.
|
||||||
|
*/
|
||||||
|
|
||||||
|
- bck = unsorted_chunks(av);
|
||||||
|
- fwd = bck->fd;
|
||||||
|
+ mchunkptr bck = unsorted_chunks (av);
|
||||||
|
+ mchunkptr fwd = bck->fd;
|
||||||
|
if (__glibc_unlikely (fwd->bk != bck))
|
||||||
|
malloc_printerr ("free(): corrupted unsorted chunks");
|
||||||
|
p->fd = fwd;
|
||||||
|
@@ -4706,61 +4748,52 @@ _int_free (mstate av, mchunkptr p, int have_lock)
|
||||||
|
check_free_chunk(av, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- If the chunk borders the current high end of memory,
|
||||||
|
- consolidate into top
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
- else {
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ /* If the chunk borders the current high end of memory,
|
||||||
|
+ consolidate into top. */
|
||||||
|
size += nextsize;
|
||||||
|
set_head(p, size | PREV_INUSE);
|
||||||
|
av->top = p;
|
||||||
|
check_chunk(av, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- If freeing a large space, consolidate possibly-surrounding
|
||||||
|
- chunks. Then, if the total unused topmost memory exceeds trim
|
||||||
|
- threshold, ask malloc_trim to reduce top.
|
||||||
|
-
|
||||||
|
- Unless max_fast is 0, we don't know if there are fastbins
|
||||||
|
- bordering top, so we cannot tell for sure whether threshold
|
||||||
|
- has been reached unless fastbins are consolidated. But we
|
||||||
|
- don't want to consolidate on each free. As a compromise,
|
||||||
|
- consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD
|
||||||
|
- is reached.
|
||||||
|
- */
|
||||||
|
+ return size;
|
||||||
|
+}
|
||||||
|
|
||||||
|
- if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {
|
||||||
|
+/* If freeing a large space, consolidate possibly-surrounding
|
||||||
|
+ chunks. Then, if the total unused topmost memory exceeds trim
|
||||||
|
+ threshold, ask malloc_trim to reduce top. */
|
||||||
|
+static void
|
||||||
|
+_int_free_maybe_consolidate (mstate av, INTERNAL_SIZE_T size)
|
||||||
|
+{
|
||||||
|
+ /* Unless max_fast is 0, we don't know if there are fastbins
|
||||||
|
+ bordering top, so we cannot tell for sure whether threshold has
|
||||||
|
+ been reached unless fastbins are consolidated. But we don't want
|
||||||
|
+ to consolidate on each free. As a compromise, consolidation is
|
||||||
|
+ performed if FASTBIN_CONSOLIDATION_THRESHOLD is reached. */
|
||||||
|
+ if (size >= FASTBIN_CONSOLIDATION_THRESHOLD)
|
||||||
|
+ {
|
||||||
|
if (atomic_load_relaxed (&av->have_fastchunks))
|
||||||
|
malloc_consolidate(av);
|
||||||
|
|
||||||
|
- if (av == &main_arena) {
|
||||||
|
+ if (av == &main_arena)
|
||||||
|
+ {
|
||||||
|
#ifndef MORECORE_CANNOT_TRIM
|
||||||
|
- if ((unsigned long)(chunksize(av->top)) >=
|
||||||
|
- (unsigned long)(mp_.trim_threshold))
|
||||||
|
- systrim(mp_.top_pad, av);
|
||||||
|
+ if (chunksize (av->top) >= mp_.trim_threshold)
|
||||||
|
+ systrim (mp_.top_pad, av);
|
||||||
|
#endif
|
||||||
|
- } else {
|
||||||
|
- /* Always try heap_trim(), even if the top chunk is not
|
||||||
|
- large, because the corresponding heap might go away. */
|
||||||
|
- heap_info *heap = heap_for_ptr(top(av));
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ /* Always try heap_trim, even if the top chunk is not large,
|
||||||
|
+ because the corresponding heap might go away. */
|
||||||
|
+ heap_info *heap = heap_for_ptr (top (av));
|
||||||
|
|
||||||
|
- assert(heap->ar_ptr == av);
|
||||||
|
- heap_trim(heap, mp_.top_pad);
|
||||||
|
- }
|
||||||
|
+ assert (heap->ar_ptr == av);
|
||||||
|
+ heap_trim (heap, mp_.top_pad);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if (!have_lock)
|
||||||
|
- __libc_lock_unlock (av->mutex);
|
||||||
|
- }
|
||||||
|
- /*
|
||||||
|
- If the chunk was allocated via mmap, release via munmap().
|
||||||
|
- */
|
||||||
|
-
|
||||||
|
- else {
|
||||||
|
- munmap_chunk (p);
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -5221,7 +5254,7 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
|
||||||
|
(av != &main_arena ? NON_MAIN_ARENA : 0));
|
||||||
|
set_inuse_bit_at_offset (newp, newsize);
|
||||||
|
set_head_size (p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
|
||||||
|
- _int_free (av, p, 1);
|
||||||
|
+ _int_free_merge_chunk (av, p, leadsize);
|
||||||
|
p = newp;
|
||||||
|
|
||||||
|
assert (newsize >= nb &&
|
||||||
|
@@ -5232,15 +5265,27 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
|
||||||
|
if (!chunk_is_mmapped (p))
|
||||||
|
{
|
||||||
|
size = chunksize (p);
|
||||||
|
- if ((unsigned long) (size) > (unsigned long) (nb + MINSIZE))
|
||||||
|
+ mchunkptr nextchunk = chunk_at_offset(p, size);
|
||||||
|
+ INTERNAL_SIZE_T nextsize = chunksize(nextchunk);
|
||||||
|
+ if (size > nb)
|
||||||
|
{
|
||||||
|
remainder_size = size - nb;
|
||||||
|
- remainder = chunk_at_offset (p, nb);
|
||||||
|
- set_head (remainder, remainder_size | PREV_INUSE |
|
||||||
|
- (av != &main_arena ? NON_MAIN_ARENA : 0));
|
||||||
|
- set_head_size (p, nb);
|
||||||
|
- _int_free (av, remainder, 1);
|
||||||
|
- }
|
||||||
|
+ if (remainder_size >= MINSIZE
|
||||||
|
+ || nextchunk == av->top
|
||||||
|
+ || !inuse_bit_at_offset (nextchunk, nextsize))
|
||||||
|
+ {
|
||||||
|
+ /* We can only give back the tail if it is larger than
|
||||||
|
+ MINSIZE, or if the following chunk is unused (top
|
||||||
|
+ chunk or unused in-heap chunk). Otherwise we would
|
||||||
|
+ create a chunk that is smaller than MINSIZE. */
|
||||||
|
+ remainder = chunk_at_offset (p, nb);
|
||||||
|
+ set_head_size (p, nb);
|
||||||
|
+ remainder_size = _int_free_create_chunk (av, remainder,
|
||||||
|
+ remainder_size,
|
||||||
|
+ nextchunk, nextsize);
|
||||||
|
+ _int_free_maybe_consolidate (av, remainder_size);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
check_inuse_chunk (av, p);
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
|
From b37e836b7cc2dba672e1de1cc7e076ba1c712614 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Fri, 11 Aug 2023 17:48:13 +0200
|
||||||
|
Subject: [PATCH 2/3] malloc: Remove bin scanning from memalign (bug 30723)
|
||||||
|
|
||||||
|
On the test workload (mpv --cache=yes with VP9 video decoding), the
|
||||||
|
bin scanning has a very poor success rate (less than 2%). The tcache
|
||||||
|
scanning has about 50% success rate, so keep that.
|
||||||
|
|
||||||
|
Update comments in malloc/tst-memalign-2 to indicate the purpose
|
||||||
|
of the tests. Even with the scanning removed, the additional
|
||||||
|
merging opportunities since commit 542b1105852568c3ebc712225ae78b
|
||||||
|
("malloc: Enable merging of remainders in memalign (bug 30723)")
|
||||||
|
are sufficient to pass the existing large bins test.
|
||||||
|
|
||||||
|
Link: https://sourceware.org/pipermail/libc-alpha/2023-August/150857.html
|
||||||
|
---
|
||||||
|
malloc/malloc.c | 127 ++--------------------------------------
|
||||||
|
malloc/tst-memalign-2.c | 7 ++-
|
||||||
|
2 files changed, 10 insertions(+), 124 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/malloc/malloc.c b/malloc/malloc.c
|
||||||
|
index 948f9759af..9c2cab7a59 100644
|
||||||
|
--- a/malloc/malloc.c
|
||||||
|
+++ b/malloc/malloc.c
|
||||||
|
@@ -5082,7 +5082,6 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
|
||||||
|
mchunkptr remainder; /* spare room at end to split off */
|
||||||
|
unsigned long remainder_size; /* its size */
|
||||||
|
INTERNAL_SIZE_T size;
|
||||||
|
- mchunkptr victim;
|
||||||
|
|
||||||
|
nb = checked_request2size (bytes);
|
||||||
|
if (nb == 0)
|
||||||
|
@@ -5101,129 +5100,13 @@ _int_memalign (mstate av, size_t alignment, size_t bytes)
|
||||||
|
we don't find anything in those bins, the common malloc code will
|
||||||
|
scan starting at 2x. */
|
||||||
|
|
||||||
|
- /* This will be set if we found a candidate chunk. */
|
||||||
|
- victim = NULL;
|
||||||
|
+ /* Call malloc with worst case padding to hit alignment. */
|
||||||
|
+ m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
|
||||||
|
|
||||||
|
- /* Fast bins are singly-linked, hard to remove a chunk from the middle
|
||||||
|
- and unlikely to meet our alignment requirements. We have not done
|
||||||
|
- any experimentation with searching for aligned fastbins. */
|
||||||
|
+ if (m == 0)
|
||||||
|
+ return 0; /* propagate failure */
|
||||||
|
|
||||||
|
- if (av != NULL)
|
||||||
|
- {
|
||||||
|
- int first_bin_index;
|
||||||
|
- int first_largebin_index;
|
||||||
|
- int last_bin_index;
|
||||||
|
-
|
||||||
|
- if (in_smallbin_range (nb))
|
||||||
|
- first_bin_index = smallbin_index (nb);
|
||||||
|
- else
|
||||||
|
- first_bin_index = largebin_index (nb);
|
||||||
|
-
|
||||||
|
- if (in_smallbin_range (nb * 2))
|
||||||
|
- last_bin_index = smallbin_index (nb * 2);
|
||||||
|
- else
|
||||||
|
- last_bin_index = largebin_index (nb * 2);
|
||||||
|
-
|
||||||
|
- first_largebin_index = largebin_index (MIN_LARGE_SIZE);
|
||||||
|
-
|
||||||
|
- int victim_index; /* its bin index */
|
||||||
|
-
|
||||||
|
- for (victim_index = first_bin_index;
|
||||||
|
- victim_index < last_bin_index;
|
||||||
|
- victim_index ++)
|
||||||
|
- {
|
||||||
|
- victim = NULL;
|
||||||
|
-
|
||||||
|
- if (victim_index < first_largebin_index)
|
||||||
|
- {
|
||||||
|
- /* Check small bins. Small bin chunks are doubly-linked despite
|
||||||
|
- being the same size. */
|
||||||
|
-
|
||||||
|
- mchunkptr fwd; /* misc temp for linking */
|
||||||
|
- mchunkptr bck; /* misc temp for linking */
|
||||||
|
-
|
||||||
|
- bck = bin_at (av, victim_index);
|
||||||
|
- fwd = bck->fd;
|
||||||
|
- while (fwd != bck)
|
||||||
|
- {
|
||||||
|
- if (chunk_ok_for_memalign (fwd, alignment, nb) > 0)
|
||||||
|
- {
|
||||||
|
- victim = fwd;
|
||||||
|
-
|
||||||
|
- /* Unlink it */
|
||||||
|
- victim->fd->bk = victim->bk;
|
||||||
|
- victim->bk->fd = victim->fd;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- fwd = fwd->fd;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- /* Check large bins. */
|
||||||
|
- mchunkptr fwd; /* misc temp for linking */
|
||||||
|
- mchunkptr bck; /* misc temp for linking */
|
||||||
|
- mchunkptr best = NULL;
|
||||||
|
- size_t best_size = 0;
|
||||||
|
-
|
||||||
|
- bck = bin_at (av, victim_index);
|
||||||
|
- fwd = bck->fd;
|
||||||
|
-
|
||||||
|
- while (fwd != bck)
|
||||||
|
- {
|
||||||
|
- int extra;
|
||||||
|
-
|
||||||
|
- if (chunksize (fwd) < nb)
|
||||||
|
- break;
|
||||||
|
- extra = chunk_ok_for_memalign (fwd, alignment, nb);
|
||||||
|
- if (extra > 0
|
||||||
|
- && (extra <= best_size || best == NULL))
|
||||||
|
- {
|
||||||
|
- best = fwd;
|
||||||
|
- best_size = extra;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- fwd = fwd->fd;
|
||||||
|
- }
|
||||||
|
- victim = best;
|
||||||
|
-
|
||||||
|
- if (victim != NULL)
|
||||||
|
- {
|
||||||
|
- unlink_chunk (av, victim);
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (victim != NULL)
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* Strategy: find a spot within that chunk that meets the alignment
|
||||||
|
- request, and then possibly free the leading and trailing space.
|
||||||
|
- This strategy is incredibly costly and can lead to external
|
||||||
|
- fragmentation if header and footer chunks are unused. */
|
||||||
|
-
|
||||||
|
- if (victim != NULL)
|
||||||
|
- {
|
||||||
|
- p = victim;
|
||||||
|
- m = chunk2mem (p);
|
||||||
|
- set_inuse (p);
|
||||||
|
- if (av != &main_arena)
|
||||||
|
- set_non_main_arena (p);
|
||||||
|
- }
|
||||||
|
- else
|
||||||
|
- {
|
||||||
|
- /* Call malloc with worst case padding to hit alignment. */
|
||||||
|
-
|
||||||
|
- m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
|
||||||
|
-
|
||||||
|
- if (m == 0)
|
||||||
|
- return 0; /* propagate failure */
|
||||||
|
-
|
||||||
|
- p = mem2chunk (m);
|
||||||
|
- }
|
||||||
|
+ p = mem2chunk (m);
|
||||||
|
|
||||||
|
if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
|
||||||
|
{
|
||||||
|
diff --git a/malloc/tst-memalign-2.c b/malloc/tst-memalign-2.c
|
||||||
|
index f229283dbf..ecd6fa249e 100644
|
||||||
|
--- a/malloc/tst-memalign-2.c
|
||||||
|
+++ b/malloc/tst-memalign-2.c
|
||||||
|
@@ -86,7 +86,8 @@ do_test (void)
|
||||||
|
TEST_VERIFY (tcache_allocs[i].ptr1 == tcache_allocs[i].ptr2);
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Test for non-head tcache hits. */
|
||||||
|
+ /* Test for non-head tcache hits. This exercises the memalign
|
||||||
|
+ scanning code to find matching allocations. */
|
||||||
|
for (i = 0; i < array_length (ptr); ++ i)
|
||||||
|
{
|
||||||
|
if (i == 4)
|
||||||
|
@@ -113,7 +114,9 @@ do_test (void)
|
||||||
|
free (p);
|
||||||
|
TEST_VERIFY (count > 0);
|
||||||
|
|
||||||
|
- /* Large bins test. */
|
||||||
|
+ /* Large bins test. This verifies that the over-allocated parts
|
||||||
|
+ that memalign releases for future allocations can be reused by
|
||||||
|
+ memalign itself at least in some cases. */
|
||||||
|
|
||||||
|
for (i = 0; i < LN; ++ i)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
|
From 26973f7b09c33e67f6bcbc79371796c8dd334528 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xi Ruoyao <xry111@xry111.site>
|
||||||
|
Date: Mon, 14 Aug 2023 11:05:18 +0800
|
||||||
|
Subject: [PATCH 3/3] malloc: Remove unused functions and variables
|
||||||
|
|
||||||
|
Remove unused chunk_ok_for_memalign function and unused local variables
|
||||||
|
in _int_free.
|
||||||
|
|
||||||
|
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
|
||||||
|
---
|
||||||
|
malloc/malloc.c | 42 ------------------------------------------
|
||||||
|
1 file changed, 42 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/malloc/malloc.c b/malloc/malloc.c
|
||||||
|
index 9c2cab7a59..d0bbbf3710 100644
|
||||||
|
--- a/malloc/malloc.c
|
||||||
|
+++ b/malloc/malloc.c
|
||||||
|
@@ -4488,12 +4488,6 @@ _int_free (mstate av, mchunkptr p, int have_lock)
|
||||||
|
{
|
||||||
|
INTERNAL_SIZE_T size; /* its size */
|
||||||
|
mfastbinptr *fb; /* associated fastbin */
|
||||||
|
- mchunkptr nextchunk; /* next contiguous chunk */
|
||||||
|
- INTERNAL_SIZE_T nextsize; /* its size */
|
||||||
|
- int nextinuse; /* true if nextchunk is used */
|
||||||
|
- INTERNAL_SIZE_T prevsize; /* size of previous contiguous chunk */
|
||||||
|
- mchunkptr bck; /* misc temp for linking */
|
||||||
|
- mchunkptr fwd; /* misc temp for linking */
|
||||||
|
|
||||||
|
size = chunksize (p);
|
||||||
|
|
||||||
|
@@ -5032,42 +5026,6 @@ _int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
|
||||||
|
------------------------------ memalign ------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
-/* Returns 0 if the chunk is not and does not contain the requested
|
||||||
|
- aligned sub-chunk, else returns the amount of "waste" from
|
||||||
|
- trimming. NB is the *chunk* byte size, not the user byte
|
||||||
|
- size. */
|
||||||
|
-static size_t
|
||||||
|
-chunk_ok_for_memalign (mchunkptr p, size_t alignment, size_t nb)
|
||||||
|
-{
|
||||||
|
- void *m = chunk2mem (p);
|
||||||
|
- INTERNAL_SIZE_T size = chunksize (p);
|
||||||
|
- void *aligned_m = m;
|
||||||
|
-
|
||||||
|
- if (__glibc_unlikely (misaligned_chunk (p)))
|
||||||
|
- malloc_printerr ("_int_memalign(): unaligned chunk detected");
|
||||||
|
-
|
||||||
|
- aligned_m = PTR_ALIGN_UP (m, alignment);
|
||||||
|
-
|
||||||
|
- INTERNAL_SIZE_T front_extra = (intptr_t) aligned_m - (intptr_t) m;
|
||||||
|
-
|
||||||
|
- /* We can't trim off the front as it's too small. */
|
||||||
|
- if (front_extra > 0 && front_extra < MINSIZE)
|
||||||
|
- return 0;
|
||||||
|
-
|
||||||
|
- /* If it's a perfect fit, it's an exception to the return value rule
|
||||||
|
- (we would return zero waste, which looks like "not usable"), so
|
||||||
|
- handle it here by returning a small non-zero value instead. */
|
||||||
|
- if (size == nb && front_extra == 0)
|
||||||
|
- return 1;
|
||||||
|
-
|
||||||
|
- /* If the block we need fits in the chunk, calculate total waste. */
|
||||||
|
- if (size > nb + front_extra)
|
||||||
|
- return size - nb;
|
||||||
|
-
|
||||||
|
- /* Can't use this chunk. */
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
/* BYTES is user requested bytes, not requested chunksize bytes. */
|
||||||
|
static void *
|
||||||
|
_int_memalign (mstate av, size_t alignment, size_t bytes)
|
||||||
|
--
|
||||||
|
2.41.0
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
LOCALEGEN=/etc/locale.gen
|
||||||
|
LOCALES=/usr/share/i18n/locales
|
||||||
|
if [ -n "$POSIXLY_CORRECT" ]; then
|
||||||
|
unset POSIXLY_CORRECT
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
|
||||||
|
|
||||||
|
# Remove all old locale dir and locale-archive before generating new
|
||||||
|
# locale data.
|
||||||
|
rm -rf /usr/lib/locale/locale-archive || true
|
||||||
|
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
is_entry_ok() {
|
||||||
|
if [ -n "$locale" -a -n "$charset" ] ; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
echo "error: Bad entry '$locale $charset'"
|
||||||
|
false
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Generating locales..."
|
||||||
|
while read locale charset; do \
|
||||||
|
case $locale in \#*) continue;; "") continue;; esac; \
|
||||||
|
is_entry_ok || continue
|
||||||
|
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
|
||||||
|
echo -n ".$charset"; \
|
||||||
|
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
|
||||||
|
echo -n '...'; \
|
||||||
|
if [ -f $LOCALES/$locale ]; then input=$locale; else \
|
||||||
|
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
|
||||||
|
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
|
||||||
|
echo ' done'; \
|
||||||
|
done < $LOCALEGEN
|
||||||
|
echo "Generation complete."
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="pkg"
|
||||||
|
short_desc="Package manager"
|
||||||
|
desc="A binary package manager for FreeBSD"
|
||||||
|
category="system"
|
||||||
|
version="1.20.8"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/freebsd/pkg"
|
||||||
|
master_site="https://github.com/freebsd/pkg/archive/refs/tags"
|
||||||
|
source_name="$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-2-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc" "sysutils/libelf" "devel/libmd" "devel/libbsd")
|
||||||
|
run_dependencies=("system/glibc" "sysutils/libelf" "devel/libmd" "devel/libbsd")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="bc-gh"
|
||||||
|
short_desc="POSIX bc/dc"
|
||||||
|
desc="An implementation of the POSIX bc calculator with GNU extensions and dc"
|
||||||
|
category="sysutils"
|
||||||
|
version="6.7.2"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/gavinhoward/bc"
|
||||||
|
master_site="https://github.com/gavinhoward/bc/releases/download/$version"
|
||||||
|
source_name="bc-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-2-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake" "system/chimerautils")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd bc-$version
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="find"
|
||||||
|
short_desc="find(1) command"
|
||||||
|
desc="find(1) command from toybox"
|
||||||
|
category="sysutils"
|
||||||
|
version="0.8.10"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://landley.net/toybox/"
|
||||||
|
master_site="https://landley.net/toybox/downloads"
|
||||||
|
source_name="toybox-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv2")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd toybox-$version
|
||||||
|
make defconfig
|
||||||
|
make HOSTCC="$CC" -j$(nproc) find
|
||||||
|
mkdir -pv "$TAMANDUA_STAGE_DIR/usr/bin"
|
||||||
|
mv -v ./find "$TAMANDUA_STAGE_DIR/usr/bin"
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="libelf"
|
||||||
|
short_desc="ELF Library from elfutils"
|
||||||
|
desc="libelf (from elfutils) provides the elf32, elf64, and gelf functions to read, modify, and create ELF files"
|
||||||
|
category="sysutils"
|
||||||
|
version="0.190"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://sourceware.org/elfutils/"
|
||||||
|
master_site="ftp://sourceware.org/pub/elfutils/$version"
|
||||||
|
source_name="elfutils-$version.tar.bz2"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv2+" "LGPL3+")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd elfutils-$version
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-debuginfod \
|
||||||
|
--enable-libdebuginfod=dummy
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" -C libelf install
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/usr/lib/pkgconfig
|
||||||
|
install -vm644 config/libelf.pc $TAMANDUA_STAGE_DIR/usr/lib/pkgconfig/libelf.pc
|
||||||
|
rm $TAMANDUA_STAGE_DIR/usr/lib/libelf.a
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="expat"
|
||||||
|
short_desc="XML parser written in C"
|
||||||
|
desc="Expat is a stream-oriented XML parser library written in C.
|
||||||
|
It excels with files too large to fit RAM, and where performance and flexibility are crucial."
|
||||||
|
category="textproc"
|
||||||
|
version="2.5.0"
|
||||||
|
tag_version="2_5_0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://libexpat.github.io/"
|
||||||
|
master_site="https://github.com/libexpat/libexpat/releases/download/R_$tag_version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("MIT")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="flex"
|
||||||
|
short_desc="The Fast Lexical Analyzer"
|
||||||
|
desc="This is flex, the fast lexical analyzer generator.
|
||||||
|
|
||||||
|
flex is a tool for generating scanners: programs which recognize lexical patterns in text.
|
||||||
|
|
||||||
|
The flex codebase is kept in Git on GitHub. Source releases of flex with some intermediate
|
||||||
|
files already built can be found on the github releases page."
|
||||||
|
category="textproc"
|
||||||
|
version="2.6.4"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://github.com/westes/flex"
|
||||||
|
master_site="https://github.com/westes/flex/releases/download/v$version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("BSD-3-CLAUSE")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--disable-static || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
ln -sv /usr/bin/flex $TAMANDUA_STAGE_DIR/usr/bin/lex
|
||||||
|
ln -sv /usr/share/man/man1/flex.1 $TAMANDUA_STAGE_DIR/usr/share/man/man1/lex.1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="grep"
|
||||||
|
short_desc="GNU grep pattern matching utility"
|
||||||
|
desc="The grep command searches one or more input files for lines containing a match
|
||||||
|
to a specified pattern. By default, grep prints the matching lines."
|
||||||
|
category="textproc"
|
||||||
|
version="3.11"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/grep/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/grep"
|
||||||
|
source_name="$name-$version.tar.xz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr/local || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/local/share/info
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="gsed"
|
||||||
|
short_desc="GNU stream editor"
|
||||||
|
desc="The Free Software Foundation's "sed" stream editor."
|
||||||
|
category="textproc"
|
||||||
|
version="4.9"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/sed/"
|
||||||
|
master_site="ftp://ftp.gnu.org/gnu/sed"
|
||||||
|
source_name="sed-$version.tar.xz"
|
||||||
|
license_logic="and" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3+" "GFDL")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd sed-$version || exit 1
|
||||||
|
./configure --prefix=/usr/local \
|
||||||
|
--program-prefix=g || exit 1
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/local/share/info
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="jq"
|
||||||
|
short_desc="CLI JSON processor"
|
||||||
|
desc="jq is like sed for JSON data - you can use it to slice and
|
||||||
|
filter and map and transform structured data with the same
|
||||||
|
ease that sed, awk, grep and friends let you play with text."
|
||||||
|
category="textproc"
|
||||||
|
version="1.7.1"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://jqlang.github.io/jq/"
|
||||||
|
master_site="https://github.com/jqlang/jq/releases/download/jq-$version"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("MIT")
|
||||||
|
|
||||||
|
build_dependencies=("lang/gcc" "devel/gmake")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version || exit 1
|
||||||
|
./configure --prefix=/usr
|
||||||
|
make -j$(nproc) || exit 1
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install || exit 1
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="certs"
|
||||||
|
short_desc="SSL Certificates"
|
||||||
|
desc="This package contains /etc/ssl/cert.pem"
|
||||||
|
category="system"
|
||||||
|
version="20240115"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://hg.mozilla.org/releases/mozilla-release/file/default/security/nss/lib/ckfw/builtins/certdata.txt"
|
||||||
|
master_site="N/A" # accepted values: "url (sftp://, ftp://, http://, https://)", "N/A"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("CA")
|
||||||
|
|
||||||
|
build_dependencies=("lang/perl5")
|
||||||
|
run_dependencies=("system/glibc" "lang/perl5" "security/openssl")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/etc/ssl
|
||||||
|
curl -O https://anduin.linuxfromscratch.org/BLFS/other/certdata.txt
|
||||||
|
chmod +x $TAMANDUA_FILES_DIR/*.{sh,pl}
|
||||||
|
CONVERTSCRIPT=$TAMANDUA_FILES_DIR/make-cert.pl $TAMANDUA_FILES_DIR/make-ca.sh
|
||||||
|
remove-expired-certs.sh certs
|
||||||
|
install -d $TAMANDUA_STAGE_DIR/etc/ssl/certs
|
||||||
|
cp -r certs/*.pem $TAMANDUA_STAGE_DIR/etc/ssl/certs
|
||||||
|
install ca-bundle-*.crt $TAMANDUA_STAGE_DIR/etc/ssl/ca-bundle.crt
|
||||||
|
ln -sv /etc/ssl/ca-bundle.crt $TAMANDUA_STAGE_DIR/etc/ssl/certs/ca-certificates.crt
|
||||||
|
}
|
||||||
|
|
||||||
|
# install scripts
|
||||||
|
# they will be run during pkg installation
|
||||||
|
post_install="c_rehash"
|
|
@ -0,0 +1,97 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Begin make-ca.sh
|
||||||
|
# Script to populate OpenSSL's CApath from a bundle of PEM formatted CAs
|
||||||
|
#
|
||||||
|
# The file certdata.txt must exist in the local directory
|
||||||
|
# Version number is obtained from the version of the data.
|
||||||
|
#
|
||||||
|
# Authors: DJ Lucas
|
||||||
|
# Bruce Dubbs
|
||||||
|
#
|
||||||
|
# Version 20120211
|
||||||
|
|
||||||
|
# Some data in the certs have UTF-8 characters
|
||||||
|
export LANG=en_US.utf8
|
||||||
|
|
||||||
|
certdata="certdata.txt"
|
||||||
|
|
||||||
|
if [ ! -r $certdata ]; then
|
||||||
|
echo "$certdata must be in the local directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
REVISION=$(grep CVS_ID $certdata | cut -f4 -d'$')
|
||||||
|
|
||||||
|
if [ -z "${REVISION}" ]; then
|
||||||
|
echo "$certfile has no 'Revision' in CVS_ID"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION=$(echo $REVISION | cut -f2 -d" ")
|
||||||
|
|
||||||
|
TEMPDIR=$(mktemp -d)
|
||||||
|
TRUSTATTRIBUTES="CKA_TRUST_SERVER_AUTH"
|
||||||
|
BUNDLE="ca-bundle-${VERSION}.crt"
|
||||||
|
SSLDIR="/etc/ssl"
|
||||||
|
|
||||||
|
mkdir "${TEMPDIR}/certs"
|
||||||
|
|
||||||
|
# Get a list of starting lines for each cert
|
||||||
|
CERTBEGINLIST=$(grep -n "^# Certificate" "${certdata}" | cut -d ":" -f1)
|
||||||
|
|
||||||
|
# Get a list of ending lines for each cert
|
||||||
|
CERTENDLIST=`grep -n "^CKA_TRUST_STEP_UP_APPROVED" "${certdata}" | cut -d ":" -f 1`
|
||||||
|
|
||||||
|
# Start a loop
|
||||||
|
for certbegin in ${CERTBEGINLIST}; do
|
||||||
|
for certend in ${CERTENDLIST}; do
|
||||||
|
if test "${certend}" -gt "${certbegin}"; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Dump to a temp file with the name of the file as the beginning line number
|
||||||
|
sed -n "${certbegin},${certend}p" "${certdata}" > "${TEMPDIR}/certs/${certbegin}.tmp"
|
||||||
|
done
|
||||||
|
|
||||||
|
unset CERTBEGINLIST CERTDATA CERTENDLIST certbegin certend
|
||||||
|
|
||||||
|
mkdir -p certs
|
||||||
|
rm -f certs/* # Make sure the directory is clean
|
||||||
|
|
||||||
|
for tempfile in ${TEMPDIR}/certs/*.tmp; do
|
||||||
|
# Make sure that the cert is trusted...
|
||||||
|
grep "CKA_TRUST_SERVER_AUTH" "${tempfile}" | \
|
||||||
|
egrep "TRUST_UNKNOWN|NOT_TRUSTED" > /dev/null
|
||||||
|
|
||||||
|
if test "${?}" = "0"; then
|
||||||
|
# Throw a meaningful error and remove the file
|
||||||
|
cp "${tempfile}" tempfile.cer
|
||||||
|
perl ${CONVERTSCRIPT} > tempfile.crt
|
||||||
|
keyhash=$(openssl x509 -noout -in tempfile.crt -hash)
|
||||||
|
echo "Certificate ${keyhash} is not trusted! Removing..."
|
||||||
|
rm -f tempfile.cer tempfile.crt "${tempfile}"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If execution made it to here in the loop, the temp cert is trusted
|
||||||
|
# Find the cert data and generate a cert file for it
|
||||||
|
|
||||||
|
cp "${tempfile}" tempfile.cer
|
||||||
|
perl ${CONVERTSCRIPT} > tempfile.crt
|
||||||
|
keyhash=$(openssl x509 -noout -in tempfile.crt -hash)
|
||||||
|
mv tempfile.crt "certs/${keyhash}.pem"
|
||||||
|
rm -f tempfile.cer "${tempfile}"
|
||||||
|
echo "Created ${keyhash}.pem"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove blacklisted files
|
||||||
|
# MD5 Collision Proof of Concept CA
|
||||||
|
if test -f certs/8f111d69.pem; then
|
||||||
|
echo "Certificate 8f111d69 is not trusted! Removing..."
|
||||||
|
rm -f certs/8f111d69.pem
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Finally, generate the bundle and clean up.
|
||||||
|
cat certs/*.pem > ${BUNDLE}
|
||||||
|
rm -r "${TEMPDIR}"
|
|
@ -0,0 +1,49 @@
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# Used to generate PEM encoded files from Mozilla certdata.txt.
|
||||||
|
# Run as ./make-cert.pl > certificate.crt
|
||||||
|
#
|
||||||
|
# Parts of this script courtesy of RedHat (mkcabundle.pl)
|
||||||
|
#
|
||||||
|
# This script modified for use with single file data (tempfile.cer) extracted
|
||||||
|
# from certdata.txt, taken from the latest version in the Mozilla NSS source.
|
||||||
|
# mozilla/security/nss/lib/ckfw/builtins/certdata.txt
|
||||||
|
#
|
||||||
|
# Authors: DJ Lucas
|
||||||
|
# Bruce Dubbs
|
||||||
|
#
|
||||||
|
# Version 20120211
|
||||||
|
|
||||||
|
my $certdata = './tempfile.cer';
|
||||||
|
|
||||||
|
open( IN, "cat $certdata|" )
|
||||||
|
|| die "could not open $certdata";
|
||||||
|
|
||||||
|
my $incert = 0;
|
||||||
|
|
||||||
|
while ( <IN> )
|
||||||
|
{
|
||||||
|
if ( /^CKA_VALUE MULTILINE_OCTAL/ )
|
||||||
|
{
|
||||||
|
$incert = 1;
|
||||||
|
open( OUT, "|openssl x509 -text -inform DER -fingerprint" )
|
||||||
|
|| die "could not pipe to openssl x509";
|
||||||
|
}
|
||||||
|
|
||||||
|
elsif ( /^END/ && $incert )
|
||||||
|
{
|
||||||
|
close( OUT );
|
||||||
|
$incert = 0;
|
||||||
|
print "\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
elsif ($incert)
|
||||||
|
{
|
||||||
|
my @bs = split( /\\/ );
|
||||||
|
foreach my $b (@bs)
|
||||||
|
{
|
||||||
|
chomp $b;
|
||||||
|
printf( OUT "%c", oct($b) ) unless $b eq '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Begin /usr/sbin/remove-expired-certs.sh
|
||||||
|
#
|
||||||
|
# Version 20120211
|
||||||
|
|
||||||
|
# Make sure the date is parsed correctly on all systems
|
||||||
|
mydate()
|
||||||
|
{
|
||||||
|
local y=$( echo $1 | cut -d" " -f4 )
|
||||||
|
local M=$( echo $1 | cut -d" " -f1 )
|
||||||
|
local d=$( echo $1 | cut -d" " -f2 )
|
||||||
|
local m
|
||||||
|
|
||||||
|
if [ ${d} -lt 10 ]; then d="0${d}"; fi
|
||||||
|
|
||||||
|
case $M in
|
||||||
|
Jan) m="01";;
|
||||||
|
Feb) m="02";;
|
||||||
|
Mar) m="03";;
|
||||||
|
Apr) m="04";;
|
||||||
|
May) m="05";;
|
||||||
|
Jun) m="06";;
|
||||||
|
Jul) m="07";;
|
||||||
|
Aug) m="08";;
|
||||||
|
Sep) m="09";;
|
||||||
|
Oct) m="10";;
|
||||||
|
Nov) m="11";;
|
||||||
|
Dec) m="12";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
certdate="${y}${m}${d}"
|
||||||
|
}
|
||||||
|
|
||||||
|
OPENSSL=/usr/bin/openssl
|
||||||
|
DIR=/etc/ssl/certs
|
||||||
|
|
||||||
|
if [ $# -gt 0 ]; then
|
||||||
|
DIR="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
certs=$( find ${DIR} -type f -name "*.pem" -o -name "*.crt" )
|
||||||
|
today=$( date +%Y%m%d )
|
||||||
|
|
||||||
|
for cert in $certs; do
|
||||||
|
notafter=$( $OPENSSL x509 -enddate -in "${cert}" -noout )
|
||||||
|
date=$( echo ${notafter} | sed 's/^notAfter=//' )
|
||||||
|
mydate "$date"
|
||||||
|
|
||||||
|
if [ ${certdate} -lt ${today} ]; then
|
||||||
|
echo "${cert} expired on ${certdate}! Removing..."
|
||||||
|
rm -f "${cert}"
|
||||||
|
fi
|
||||||
|
done
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="iana-etc"
|
||||||
|
short_desc="/etc networking folders"
|
||||||
|
desc="Provides /etc/protocols and /etc/services"
|
||||||
|
category="www"
|
||||||
|
version="20240105"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/inetutils/"
|
||||||
|
master_site="https://github.com/Mic92/iana-etc/releases/download/$version"
|
||||||
|
source_name="iana-etc-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=()
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
mkdir -p $TAMANDUA_STAGE_DIR/etc
|
||||||
|
cp services protocols $TAMANDUA_STAGE_DIR/etc
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="inetutils"
|
||||||
|
short_desc="Common network programs"
|
||||||
|
desc="Inetutils is a collection of common network programs. It includes:
|
||||||
|
Network tools: ping, ping6, traceroute, whois.
|
||||||
|
Admin tools: hostname, dnsdomainname, ifconfig, logger
|
||||||
|
And more..
|
||||||
|
|
||||||
|
Most of them are improved versions of programs originally from BSD. Some
|
||||||
|
others are original versions, written from scratch. "
|
||||||
|
category="www"
|
||||||
|
version="2.5"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://www.gnu.org/software/inetutils/"
|
||||||
|
master_site="https://ftp.gnu.org/gnu/inetutils/"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--bindir=/usr/bin \
|
||||||
|
--localstatedir=/var \
|
||||||
|
--disable-logger \
|
||||||
|
--disable-whois \
|
||||||
|
--disable-rcp \
|
||||||
|
--disable-rexec \
|
||||||
|
--disable-rlogin \
|
||||||
|
--disable-telnet \
|
||||||
|
--disable-hostname \
|
||||||
|
--disable-rsh \
|
||||||
|
--disable-servers || exit 1
|
||||||
|
make -j$(nproc)
|
||||||
|
make DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
rm -r $TAMANDUA_STAGE_DIR/usr/share/info
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
name="iproute2"
|
||||||
|
short_desc="TCP/IP utilities"
|
||||||
|
desc="Iproute2 is a collection of utilities for controlling TCP / IP networking and
|
||||||
|
traffic control in Linux. It is currently maintained by Stephen Hemminger
|
||||||
|
<stephen@networkplumber.org>. The original author, Alexey Kuznetsov,
|
||||||
|
is well known for the QoS implementation in the Linux kernel."
|
||||||
|
category="www"
|
||||||
|
version="6.7.0"
|
||||||
|
maintainer="ffqq@danwin1210.de"
|
||||||
|
www="https://wiki.linuxfoundation.org/networking/iproute2"
|
||||||
|
master_site="https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2"
|
||||||
|
source_name="$name-$version.tar.gz"
|
||||||
|
license_logic="single" # accepted values: single, and, or
|
||||||
|
licenses=("GPLv3")
|
||||||
|
|
||||||
|
build_dependencies=("devel/gmake" "lang/gcc")
|
||||||
|
run_dependencies=("system/glibc" "www/iana-etc")
|
||||||
|
|
||||||
|
build_process() {
|
||||||
|
cd $name-$version
|
||||||
|
sed -i /ARPD/d Makefile
|
||||||
|
rm -fv man/man8/arpd.8
|
||||||
|
make NETNS_RUN_DIR=/run/netns -j$(nproc)
|
||||||
|
make SBINDIR=/usr/sbin DESTDIR="$TAMANDUA_STAGE_DIR" install
|
||||||
|
mkdir -pv $TAMANDUA_STAGE_DIR/usr/share/doc/iproute2
|
||||||
|
cp -v README* COPYING $TAMANDUA_STAGE_DIR/usr/share/doc/iproute2
|
||||||
|
}
|
Loading…
Reference in New Issue