correction

This commit is contained in:
joborun linux 2024-04-22 02:41:33 +03:00
parent 57c7403d82
commit 1c34ae7820
3 changed files with 0 additions and 497 deletions

View file

@ -1,126 +0,0 @@
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
pkgname=binutils
pkgver=2.40
_commit=0dc8f96598ae1facd1933323e0c633b1ed3ca4e7
pkgrel=6
pkgdesc='A set of programs to assemble and manipulate binary and object files'
arch=(x86_64)
url='https://www.gnu.org/software/binutils/'
license=('GPL3' 'GPL' 'FDL1.3' 'custom:FSFAP')
depends=(glibc jansson libelf zlib zstd)
makedepends=(git)
checkdepends=(dejagnu debuginfod bc)
optdepends=('debuginfod: for debuginfod server/client functionality')
conflicts=(binutils-multilib)
replaces=(binutils-multilib)
backup=('etc/gprofng.rc')
options=(staticlibs !distcc !ccache)
source=(git+https://sourceware.org/git/binutils-gdb.git#commit=${_commit}
gold-warn-unsupported.patch)
sha256sums=('SKIP'
'2d430b66f84a19c154725ec535280c493be1d34f1a90f95208dce02fecd0e4e4')
validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
prepare() {
[[ ! -d binutils-gdb ]] && ln -s binutils-${pkgver} binutils-gdb
mkdir -p binutils-build
cd binutils-gdb
# Turn off development mode (-Werror, gas run-time checks, date in sonames)
sed -i '/^development=/s/true/false/' bfd/development.sh
# Creds @Fedora
# Change the gold configuration script to only warn about
# unsupported targets. This allows the binutils to be built with
# BPF support enabled.
patch -Np1 -i "${srcdir}"/gold-warn-unsupported.patch
}
build() {
cd binutils-build
"${srcdir}"/binutils-gdb/configure \
--prefix=/usr \
--sysconfdir="${pkgdir}"/etc \
--with-lib-path=/usr/lib:/usr/local/lib \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-cet \
--enable-colored-disassembly \
--enable-default-execstack=no \
--enable-deterministic-archives \
--enable-gold \
--enable-install-libiberty \
--enable-jansson \
--enable-ld=default \
--enable-new-dtags \
--enable-pgo-build=lto \
--enable-plugins \
--enable-relro \
--enable-shared \
--enable-targets=x86_64-pep,bpf-unknown-none \
--enable-threads \
--disable-gdb \
--disable-gdbserver \
--disable-libdecnumber \
--disable-readline \
--disable-sim \
--disable-werror \
--with-debuginfod \
--with-pic \
--with-system-zlib
make -O tooldir=/usr
# Extract the FSF All Permissive License
# <https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html>
# used for some linker scripts.
tail -n 5 "${srcdir}"/binutils-gdb/ld/scripttempl/README > FSFAP
}
check() {
cd binutils-build
# Use minimal flags for testsuite
# ld testsuite uses CFLAGS_FOR_TARGET and requires -g
# gold testsuite requires CXXFLAGS/CFLAGS with default PIE/PIC disabled
make -O CFLAGS_FOR_TARGET="-O2 -g" \
CXXFLAGS="-O2 -no-pie -fno-PIC" \
CFLAGS="-O2 -no-pie" \
LDFLAGS="" \
check || true
}
package() {
cd binutils-build
make prefix="${pkgdir}"/usr tooldir="${pkgdir}"/usr install
# install PIC version of libiberty
install -m644 libiberty/pic/libiberty.a "${pkgdir}"/usr/lib
# Remove unwanted files
rm -f "${pkgdir}"/usr/share/man/man1/{dlltool,windres,windmc}*
# No shared linking to these files outside binutils
rm -f "${pkgdir}"/usr/lib/lib{bfd,opcodes}.so
tee "${pkgdir}"/usr/lib/libbfd.so << EOS
/* GNU ld script */
INPUT( /usr/lib/libbfd.a -lsframe -liberty -lz -lzstd -ldl )
EOS
tee "${pkgdir}"/usr/lib/libopcodes.so << EOS
/* GNU ld script */
INPUT( /usr/lib/libopcodes.a -lbfd )
EOS
# install FSF All Permissive License
install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ FSFAP
}

View file

@ -1,219 +0,0 @@
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase=linux-lts
pkgver=5.15.43
pkgrel=1
pkgdesc='LTS Linux'
url="https://www.kernel.org/"
arch=(x86_64)
license=(GPL2)
makedepends=(
bc libelf pahole cpio perl tar xz
xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick texlive-latexextra
)
options=('!strip')
_srcname=linux-$pkgver
source=(
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
config # the main kernel config file
0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
0002-PCI_Add_more_NVIDIA_controllers_to_the_MSI_masking_quirk.patch
0003-iommu_intel_do_deep_dma-unmapping_to_avoid_kernel-flooding.patch
0004-Bluetooth_btintel_Fix_bdaddress_comparison_with_garbage_value.patch
0005-lg-laptop_Recognize_more_models.patch
0006_fix_NFSv4_mount_regression.diff
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
# https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
sha256sums=('064b913a9d58773a85cafa62f2a2f9031aeee724d7e41b66631037d9a6571c12'
'SKIP'
'68de8b84a6e6a61b7107ca1ba6dd3f729531af890af8bebe3b9ba4bb1ec0d118'
'99df282c594cc269d9a5d19bb86ea887892d3654cfc53c4ce94a644cf3278423'
'c35018601f04ae81e0a2018a8597595db6ae053158c206845399cdebb2d2b706'
'7c7707c738983f3683d76295b496f578996b7341fa39ad334ec2833bfe4b966e'
'3fa8a4af66d5a3b99b48ca979a247c61e81c9b2d3bcdffa9d3895a5532a420b4'
'79266c6cc970733fd35881d9a8f0a74c25c00b4d81741b8d4bba6827c48f7c78'
'e9527ad81d5b1821a7b17c56cb3abaec85785563f51e448cb3c06f1c68e2966f')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
prepare() {
cd $_srcname
# fix NFSv4 mounting issue regression - FS#73838 / FS#73860
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/patch/?id=6f2836341d8a39e1e000572b10959347d7e61fd9
patch -Rp1 -i ../0006_fix_NFSv4_mount_regression.diff
echo "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
echo "${pkgbase#linux}" > localversion.20-pkgname
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
echo "Setting config..."
cp ../config .config
make olddefconfig
# diff -u ../config .config || :
#return 1
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
make all
make htmldocs
}
_package() {
pkgdesc="The $pkgdesc kernel and modules"
depends=(coreutils kmod initramfs)
optdepends=('wireless-regdb: to set the correct wireless channels of your country'
'linux-firmware: firmware images needed for some devices')
provides=(VIRTUALBOX-GUEST-MODULES WIREGUARD-MODULE)
replaces=(wireguard-lts)
cd $_srcname
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
echo "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
# remove build and source links
rm "$modulesdir"/{source,build}
}
_package-headers() {
pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel"
depends=(pahole)
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
# add objtool for external module building and enabled VALIDATION_STACK option
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
echo "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# https://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# https://bugs.archlinux.org/task/20402
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
# https://bugs.archlinux.org/task/71392
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
done
echo "Removing documentation..."
rm -r "$builddir/Documentation"
echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -bi "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
echo "Stripping vmlinux..."
strip -v $STRIP_STATIC "$builddir/vmlinux"
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
}
_package-docs() {
pkgdesc="Documentation for the $pkgdesc kernel"
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
echo "Installing documentation..."
local src dst
while read -rd '' src; do
dst="${src#Documentation/}"
dst="$builddir/Documentation/${dst#output/}"
install -Dm644 "$src" "$dst"
done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/share/doc"
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
}
pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
for _p in "${pkgname[@]}"; do
eval "package_$_p() {
$(declare -f "_package${_p#$pkgbase}")
_package${_p#$pkgbase}
}"
done
# vim:set ts=8 sts=2 sw=2 et:
4076fafd2c0a4fbcf76a41b8db47c75d2d6ca4a791d0ec18621410ae2bc000f3 config

View file

@ -1,152 +0,0 @@
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgbase="sqlite"
pkgname=('sqlite' 'sqlite-tcl' 'sqlite-analyzer' 'lemon' 'sqlite-doc')
_srcver=3430100
_docver=${_srcver}
#_docver=3330000
pkgver=3.43.1
pkgrel=1
pkgdesc="A C library that implements an SQL database engine"
arch=('x86_64')
license=('custom:Public Domain')
url="https://www.sqlite.org/"
makedepends=('tcl' 'readline' 'zlib')
options=('!emptydirs')
source=(https://www.sqlite.org/2023/sqlite-src-${_srcver}.zip
https://www.sqlite.org/2023/sqlite-doc-${_docver}.zip
sqlite-lemon-system-template.patch
license.txt)
# upstream now switched to sha3sums - currently not supported by makepkg
sha256sums=('22e9c2ef49fe6f8a2dbc93c4d3dce09c6d6a4f563de52b0a8171ad49a8c72917'
'de4e2b6489f3ef4f7068c77d9df11a7c099851cd2431c457c88ee194eb56d41d'
'55746d93b0df4b349c4aa4f09535746dac3530f9fd6de241c9f38e2c92e8ee97'
'4e57d9ac979f1c9872e69799c2597eeef4c6ce7224f3ede0bf9dc8d217b1e65d')
prepare() {
cd sqlite-src-$_srcver
# patch taken from Fedora
# https://src.fedoraproject.org/rpms/sqlite/blob/master/f/sqlite.spec
patch -Np1 -i ../sqlite-lemon-system-template.patch
#autoreconf -vfi
}
build() {
# this uses malloc_usable_size, which is incompatible with fortification level 3
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CPPFLAGS="$CPPFLAGS \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_SECURE_DELETE \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-DSQLITE_MAX_EXPR_DEPTH=10000 \
-DSQLITE_ENABLE_MATH_FUNCTIONS"
# build sqlite
cd sqlite-src-$_srcver
./configure --prefix=/usr \
--disable-static \
--enable-fts3 \
--enable-fts4 \
--enable-fts5 \
--enable-rtree \
TCLLIBDIR=/usr/lib/sqlite$pkgver
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
# build additional tools
make showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
}
package_sqlite() {
pkgdesc="A C library that implements an SQL database engine"
depends=('readline' 'zlib' 'glibc')
provides=("sqlite3=$pkgver" 'libsqlite3.so')
replaces=("sqlite3")
cd sqlite-src-$_srcver
make DESTDIR="${pkgdir}" install
install -m755 showdb showjournal showstat4 showwal sqldiff "${pkgdir}"/usr/bin/
# install manpage
install -m755 -d "${pkgdir}"/usr/share/man/man1
install -m644 sqlite3.1 "${pkgdir}"/usr/share/man/man1/
# license - no linking required because pkgbase=pkgname
install -D -m644 "${srcdir}"/license.txt "${pkgdir}"/usr/share/licenses/${pkgbase}/license.txt
# split out tcl extension
mkdir "$srcdir"/tcl
mv "$pkgdir"/usr/lib/sqlite* "$srcdir"/tcl
}
package_sqlite-tcl() {
pkgdesc="sqlite Tcl Extension Architecture (TEA)"
depends=('sqlite' 'glibc')
provides=("sqlite3-tcl=$pkgver")
replaces=("sqlite3-tcl")
install -m755 -d "${pkgdir}"/usr/lib
mv "$srcdir"/tcl/* "${pkgdir}"/usr/lib
# install manpage
install -m755 -d "${pkgdir}"/usr/share/man/mann
install -m644 "${srcdir}"/sqlite-src-$_srcver/autoconf/tea/doc/sqlite3.n "${pkgdir}"/usr/share/man/mann/
# link license
install -m755 -d "${pkgdir}"/usr/share/licenses
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
}
package_sqlite-analyzer() {
pkgdesc="An analysis program for sqlite3 database files"
depends=('sqlite' 'tcl' 'glibc')
cd sqlite-src-$_srcver
install -m755 -d "${pkgdir}"/usr/bin
install -m755 sqlite3_analyzer "${pkgdir}"/usr/bin/
}
package_lemon() {
# https://www.sqlite.org/lemon.html
pkgdesc="A parser generator"
depends=('glibc')
cd sqlite-src-$_srcver
# ELF file ('usr/bin/lemon') lacks FULL RELRO, check LDFLAGS. - no fix found so far
install -Dm755 lemon ${pkgdir}/usr/bin/lemon
install -Dm644 lempar.c ${pkgdir}/usr/share/lemon/lempar.c
mkdir -p "${pkgdir}"/usr/share/doc/${pkgname}
cp ../sqlite-doc-${_docver}/lemon.html "${pkgdir}"/usr/share/doc/${pkgname}/
install -m755 -d "${pkgdir}"/usr/share/licenses
ln -sf /usr/share/licenses/${pkgbase} "${pkgdir}/usr/share/licenses/${pkgname}"
}
package_sqlite-doc() {
pkgdesc="most of the static HTML files that comprise this website, including all of the SQL Syntax and the C/C++ interface specs and other miscellaneous documentation"
#arch=('any') - not yet supported
provides=("sqlite3-doc=$pkgver")
replaces=("sqlite3-doc")
cd sqlite-doc-${_docver}
mkdir -p "${pkgdir}"/usr/share/doc/${pkgbase}
cp -R * "${pkgdir}"/usr/share/doc/${pkgbase}/
rm "${pkgdir}"/usr/share/doc/${pkgbase}/lemon.html
}