ADDED PKGBUILDs/acl/PKGBUILD Index: PKGBUILDs/acl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/acl/PKGBUILD @@ -0,0 +1,32 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Thomas Bächler + +pkgname=acl +pkgver=2.2.52 +pkgrel=2 +pkgdesc="Access control list utilities, libraries and headers" +arch=('i586') +url="http://savannah.nongnu.org/projects/acl" +license=('LGPL') +depends=('attr>=2.4.46') +replaces=('xfsacl') +provides=('xfsacl') +conflicts=('xfsacl') +source=("http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.src.tar.gz"{,.sig}) +sha256sums=('179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23' + 'SKIP') + +build() { + cd "$pkgname-$pkgver" + + export INSTALL_USER=root INSTALL_GROUP=root + ./configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib \ + --disable-gettext + make +} + +package() { + make -C "$pkgname-$pkgver" DIST_ROOT="$pkgdir" install install-lib install-dev +} ADDED PKGBUILDs/asciidoc/PKGBUILD Index: PKGBUILDs/asciidoc/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/asciidoc/PKGBUILD @@ -0,0 +1,69 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Contributor: Chris Brannon +# (Arch Linux) Contributor: Geoffroy Carrier +# (Arch Linux) Contributor: Dan McGee +# (Arch Linux) Contributor: Jaroslaw Rosiek +# (Arch Linux) Contributor: Darwin Bautista +# (Arch Linux) Contributor: Daniel J Griffiths +# (Arch Linux) Maintainer: Florian Pritz + +pkgname=asciidoc +pkgver=8.6.9 +pkgrel=1 +pkgdesc='Text document format for short documents, articles, books and UNIX man pages.' +arch=('any') +url='http://www.methods.co.nz/asciidoc/' +license=('GPL') +depends=('python2' 'libxslt' 'docbook-xsl') +optdepends=('lilypond: music-filter' + 'imagemagick: music-filter (used in conjunction with lilypond)' + 'source-highlight: source-highlight-filter' + 'dblatex: pdf generation' + 'fop: alternative pdf generation' + 'lynx: text generation' + 'w3m: text generation (alternative to lynx)') +noextract=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz") + +prepare() { + tar xvzf ../${pkgname}-${pkgver}.tar.gz + cd ${pkgname}-${pkgver} + + # python2 fix + for file in asciidocapi.py a2x.py asciidoc.py filters/music/music2png.py filters/latex/latex2png.py \ + filters/code/code-filter.py filters/graphviz/graphviz2png.py; do + sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file + done + #sed -i -e 's_sys:python_sys:python2_g' -e 's_sys3:python_sys3:python2_g' xhtml11.conf + #sed -i 's_sys:python_sys:python2_g' xhtml11-quirks.conf + #sed -i -e 's/{python}/{python2}/g' \ + #-e 's#{language@python:py:#{language@python2:py:#' \ + #filters/source/source-highlight-filter.conf \ + #html5.conf xhtml11.conf xhtml11-quirks.conf + #sed -i -e "s#'python'#'python2'#g" filters/code/code-filter.py +} + +build() { + cd ${pkgname}-${pkgver} + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc +} + +package() { + cd ${pkgname}-${pkgver} + + make install DESTDIR=${pkgdir} + + install -Dm644 asciidocapi.py \ + ${pkgdir}/usr/lib/python2.7/site-packages/asciidocapi.py + + install -Dm644 vim/syntax/asciidoc.vim \ + ${pkgdir}/usr/share/vim/vimfiles/syntax/asciidoc.vim + + # fix FS#21579 - [asciidoc] 8.6.2-2 "asciidoc" table style doesn't work (mismatched python version) + #sed -i 's/python/python2/' \ + #${pkgdir}/etc/asciidoc/asciidoc.conf +} ADDED PKGBUILDs/attr/PKGBUILD Index: PKGBUILDs/attr/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/attr/PKGBUILD @@ -0,0 +1,49 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Thomas Bächler + +pkgname=attr +pkgver=2.4.47 +pkgrel=1 +pkgdesc="Extended attribute support library for ACL support" +arch=('i586') +url="http://savannah.nongnu.org/projects/attr" +license=('LGPL') +depends=('musl') +#makedepends=('gettext') +replaces=('xfsattr') +provides=('xfsattr') +conflicts=('xfsattr') +source=("http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$pkgver.src.tar.gz"{,.sig} +fix-headers.patch) + +prepare() { + + cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i ../fix-headers.patch + +} + +build() { + cd "$pkgname-$pkgver" + + export INSTALL_USER=root INSTALL_GROUP=root + ./configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib \ + --disable-gettext + make +} + +package() { + make -C "$pkgname-$pkgver" DIST_ROOT="$pkgdir" install install-lib install-dev + + # tidy up + rm -f "$pkgdir"/usr/lib/libattr.a + chmod 0755 "$pkgdir"/usr/lib/libattr.so.*.*.* + + # remove conflicting manpages + rm -rf "$pkgdir"/usr/share/man/man2 +} +sha256sums=('25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859' + 'SKIP' + '53b669f9fb365961aa393a8528c1d671c76a2687c6d7f3b171335bd902feca3e') ADDED PKGBUILDs/attr/fix-headers.patch Index: PKGBUILDs/attr/fix-headers.patch ================================================================== --- /dev/null +++ PKGBUILDs/attr/fix-headers.patch @@ -0,0 +1,54 @@ +--- attr-2.4.47/include/xattr.h ++++ attr-2.4.47/include/xattr.h +@@ -31,33 +31,37 @@ + #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ + + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + extern int setxattr (const char *__path, const char *__name, +- const void *__value, size_t __size, int __flags) __THROW; ++ const void *__value, size_t __size, int __flags); + extern int lsetxattr (const char *__path, const char *__name, +- const void *__value, size_t __size, int __flags) __THROW; ++ const void *__value, size_t __size, int __flags); + extern int fsetxattr (int __filedes, const char *__name, +- const void *__value, size_t __size, int __flags) __THROW; ++ const void *__value, size_t __size, int __flags); + + extern ssize_t getxattr (const char *__path, const char *__name, +- void *__value, size_t __size) __THROW; ++ void *__value, size_t __size); + extern ssize_t lgetxattr (const char *__path, const char *__name, +- void *__value, size_t __size) __THROW; ++ void *__value, size_t __size); + extern ssize_t fgetxattr (int __filedes, const char *__name, +- void *__value, size_t __size) __THROW; ++ void *__value, size_t __size); + + extern ssize_t listxattr (const char *__path, char *__list, +- size_t __size) __THROW; ++ size_t __size); + extern ssize_t llistxattr (const char *__path, char *__list, +- size_t __size) __THROW; ++ size_t __size); + extern ssize_t flistxattr (int __filedes, char *__list, +- size_t __size) __THROW; ++ size_t __size); + +-extern int removexattr (const char *__path, const char *__name) __THROW; +-extern int lremovexattr (const char *__path, const char *__name) __THROW; +-extern int fremovexattr (int __filedes, const char *__name) __THROW; ++extern int removexattr (const char *__path, const char *__name); ++extern int lremovexattr (const char *__path, const char *__name); ++extern int fremovexattr (int __filedes, const char *__name); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __XATTR_H__ */ ADDED PKGBUILDs/autoconf/PKGBUILD Index: PKGBUILDs/autoconf/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/autoconf/PKGBUILD @@ -0,0 +1,44 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=autoconf +pkgver=2.69 +pkgrel=1 +pkgdesc="A GNU tool for automatically configuring source code" +arch=('any') +license=('GPL2' 'GPL3' 'custom') +url="http://www.gnu.org/software/autoconf" +groups=('base-devel') +depends=('awk' 'm4' 'diffutils' 'bash') +# for test-suite +#makedepends=('gcc-fortran' 'erlang') +install=autoconf.install +source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig}) +md5sums=('50f97f4159805e374639a73e2636f22e' + '2941e2fe687e05b3431eac6b714053bc') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + + # license exception + install -Dm644 COPYING.EXCEPTION \ + $pkgdir/usr/share/licenses/autoconf/COPYING.EXCEPTION + + # conflict with bintuils + rm -f ${pkgdir}/usr/share/info/standards.info +} ADDED PKGBUILDs/autoconf/autoconf.install Index: PKGBUILDs/autoconf/autoconf.install ================================================================== --- /dev/null +++ PKGBUILDs/autoconf/autoconf.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(autoconf.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/automake/PKGBUILD Index: PKGBUILDs/automake/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/automake/PKGBUILD @@ -0,0 +1,44 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=automake +pkgver=1.14.1 +pkgrel=1 +pkgdesc="A GNU tool for automatically creating Makefiles" +arch=('any') +license=('GPL') +url="http://www.gnu.org/software/automake" +groups=('base-devel') +depends=('perl' 'bash') +makedepends=('autoconf') +#checkdepends=('dejagnu' 'python' 'gcc-fortran' 'java-environment' 'vala' 'emacs' 'cscope') +install=automake.install +source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig}) +md5sums=('7fc29854c520f56b07aa232a0f880292' + 'SKIP') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + + # skip failing test... + sed -i "/instmany-python.sh/d" Makefile.in +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/automake/automake.install Index: PKGBUILDs/automake/automake.install ================================================================== --- /dev/null +++ PKGBUILDs/automake/automake.install @@ -0,0 +1,22 @@ +infodir=/usr/share/info +filelist=(automake.info automake.info-1 automake.info-2) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/bash/PKGBUILD Index: PKGBUILDs/bash/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/bash/PKGBUILD @@ -0,0 +1,122 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# Arch Linux Maintainer: Bartłomiej Piotrowski +# Arch Linux Contributor: Allan McRae +# Arch Linux Contributor: Aaron Griffin + +pkgname=bash +_basever=4.3 +_patchlevel=018 +pkgver=$_basever.$_patchlevel +pkgrel=2 +pkgdesc='The GNU Bourne Again shell' +arch=('i586') +license=('GPL') +url='http://www.gnu.org/software/bash/bash.html' +groups=('base') +backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout}) +depends=('readline>=6.3' 'musl') +provides=('sh') +install=bash.install +noextract=(http://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}) +source=(dot.bashrc + dot.bash_profile + dot.bash_logout + system.bashrc + system.bash_logout + privmode-setuid-fail.patch) + +if [[ $((10#${_patchlevel})) -gt 0 ]]; then + for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do + source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p){,.sig}) + done +fi + +prepare() { + tar xvzf ../bash-${_basever}.tar.gz + cd $pkgname-$_basever + + for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do + msg "applying patch bash${_basever//.}-$(printf "%03d" $_p)" + patch -p0 -i ../bash${_basever//.}-$(printf "%03d" $_p) + done + + patch -p0 -i ../privmode-setuid-fail.patch + +} + +build() { + cd $pkgname-$_basever + + _bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/bin\"\' + -DSTANDARD_UTILS_PATH=\'\"/usr/bin\"\' + -DSYS_BASHRC=\'\"/etc/bash.bashrc\"\' + -DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\') + export CFLAGS="${CFLAGS} ${_bashconfig[@]}" + + ./configure --prefix=/usr --with-curses --enable-readline \ + --without-bash-malloc --with-installed-readline --build=i586-pc-linux-musl + make +} + +check() { + make -C $pkgname-$_basever check +} + +package() { + make -C $pkgname-$_basever DESTDIR="$pkgdir" install + ln -s bash "$pkgdir"/usr/bin/sh + + install -dm755 "$pkgdir"/etc/skel/ + # system-wide configuration files + install -m644 system.bashrc $pkgdir/etc/bash.bashrc + install -m644 system.bash_logout "$pkgdir"/etc/bash.bash_logout + + # user configuration file skeletons + install -m644 dot.bashrc "$pkgdir"/etc/skel/.bashrc + install -m644 dot.bash_profile "$pkgdir"/etc/skel/.bash_profile + install -m644 dot.bash_logout "$pkgdir"/etc/skel/.bash_logout +} +md5sums=('027d6bd8f5f6a06b75bb7698cb478089' + '2902e0fee7a9168f3a4fd2ccd60ff047' + '42f4400ed2314bd7519c020d0187edc5' + '561949793177116b7be29a07c385ba8b' + '472f536d7c9e8250dc4568ec4cfaf294' + 'a577d42e38249d298d6a8d4bf2823883' + '1ab682b4e36afa4cf1b426aa7ac81c0d' + 'SKIP' + '8fc22cf50ec85da00f6af3d66f7ddc1b' + 'SKIP' + 'a41728eca78858758e26b5dea64ae506' + 'SKIP' + 'bf8d53d227829d67235927689a03cc7a' + 'SKIP' + 'c0c00935c8b8ffff76e8ab77e7be7d15' + 'SKIP' + '6f01e364cd092faa28dd7119f47ddb5f' + 'SKIP' + 'dcf471d222bcd83283d3094e6ceeb6f8' + 'SKIP' + 'f7553416646dc26c266454c78a916d36' + 'SKIP' + '7e73d2151f4064b484a4ba2c4b09960e' + 'SKIP' + 'a275463d21735bb6d7161f9fbd320d8f' + 'SKIP' + 'c17103ee20420d77e46b224c8d3fceda' + 'SKIP' + '3e2a057a19d02b3f92a3a09eacbc03ae' + 'SKIP' + 'fb377143a996d4ff087a2771bc8332f9' + 'SKIP' + '1a1aaecc99a9d0cbc310e8e247dcc8b6' + 'SKIP' + '4f04387458a3c1b4d460d199f49991a8' + 'SKIP' + '90e759709720c4f877525bebc9d5dc06' + 'SKIP' + '11e4046e1b86070f6adbb7ffc89641be' + 'SKIP' + 'cd5a9b46f5bea0dc0248c93c7dfac011' + 'SKIP') ADDED PKGBUILDs/bash/bash-4.2-do-not-use-memcpy-on-overlapping-memory.patch Index: PKGBUILDs/bash/bash-4.2-do-not-use-memcpy-on-overlapping-memory.patch ================================================================== --- /dev/null +++ PKGBUILDs/bash/bash-4.2-do-not-use-memcpy-on-overlapping-memory.patch @@ -0,0 +1,12 @@ +diff -Naur bash-4.2-orig/general.c bash-4.2/general.c +--- bash-4.2-orig/general.c 2010-12-13 06:06:27.000000000 +1000 ++++ bash-4.2/general.c 2013-08-25 21:52:36.681484302 +1000 +@@ -766,7 +766,7 @@ + *nbeg++ = '.'; + + nlen = nend - ntail; +- memcpy (nbeg, ntail, nlen); ++ memmove (nbeg, ntail, nlen); + nbeg[nlen] = '\0'; + + return name; ADDED PKGBUILDs/bash/bash-4.3-debug-trap.patch Index: PKGBUILDs/bash/bash-4.3-debug-trap.patch ================================================================== --- /dev/null +++ PKGBUILDs/bash/bash-4.3-debug-trap.patch @@ -0,0 +1,30 @@ +*** ../bash-4.3/trap.c 2014-02-05 10:03:21.000000000 -0500 +--- trap.c 2014-02-28 09:51:43.000000000 -0500 +*************** +*** 921,925 **** + + #if defined (JOB_CONTROL) +! save_pipeline (1); /* XXX only provides one save level */ + #endif + +--- 921,926 ---- + + #if defined (JOB_CONTROL) +! if (sig != DEBUG_TRAP) /* run_debug_trap does this */ +! save_pipeline (1); /* XXX only provides one save level */ + #endif + +*************** +*** 941,945 **** + + #if defined (JOB_CONTROL) +! restore_pipeline (1); + #endif + +--- 942,947 ---- + + #if defined (JOB_CONTROL) +! if (sig != DEBUG_TRAP) /* run_debug_trap does this */ +! restore_pipeline (1); + #endif + ADDED PKGBUILDs/bash/bash-4.3-test-nameref.patch Index: PKGBUILDs/bash/bash-4.3-test-nameref.patch ================================================================== --- /dev/null +++ PKGBUILDs/bash/bash-4.3-test-nameref.patch @@ -0,0 +1,25 @@ +*** ../bash-4.3/test.c 2014-02-04 16:52:58.000000000 -0500 +--- test.c 2014-02-28 21:22:44.000000000 -0500 +*************** +*** 647,652 **** + + case 'R': +! v = find_variable (arg); +! return (v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v) ? TRUE : FALSE); + } + +--- 647,652 ---- + + case 'R': +! v = find_variable_noref (arg); +! return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE); + } + +*************** +*** 724,727 **** +--- 724,728 ---- + case 'u': case 'v': case 'w': case 'x': case 'z': + case 'G': case 'L': case 'O': case 'S': case 'N': ++ case 'R': + return (1); + } ADDED PKGBUILDs/bash/bash.install Index: PKGBUILDs/bash/bash.install ================================================================== --- /dev/null +++ PKGBUILDs/bash/bash.install @@ -0,0 +1,16 @@ +info_dir=usr/share/info +info_files=(bash.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + usr/bin/install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} ADDED PKGBUILDs/bash/dot.bash_logout Index: PKGBUILDs/bash/dot.bash_logout ================================================================== --- /dev/null +++ PKGBUILDs/bash/dot.bash_logout @@ -0,0 +1,3 @@ +# +# ~/.bash_logout +# ADDED PKGBUILDs/bash/dot.bash_profile Index: PKGBUILDs/bash/dot.bash_profile ================================================================== --- /dev/null +++ PKGBUILDs/bash/dot.bash_profile @@ -0,0 +1,5 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc ADDED PKGBUILDs/bash/dot.bashrc Index: PKGBUILDs/bash/dot.bashrc ================================================================== --- /dev/null +++ PKGBUILDs/bash/dot.bashrc @@ -0,0 +1,9 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +PS1='[\u@\h \W]\$ ' ADDED PKGBUILDs/bash/privmode-setuid-fail.patch Index: PKGBUILDs/bash/privmode-setuid-fail.patch ================================================================== --- /dev/null +++ PKGBUILDs/bash/privmode-setuid-fail.patch @@ -0,0 +1,29 @@ +*** ../bash-4.3-patched/shell.c 2014-01-14 08:04:32.000000000 -0500 +--- shell.c 2014-06-06 16:29:01.000000000 -0400 +*************** +*** 1227,1232 **** + disable_priv_mode () + { +! setuid (current_user.uid); +! setgid (current_user.gid); + current_user.euid = current_user.uid; + current_user.egid = current_user.gid; +--- 1229,1246 ---- + disable_priv_mode () + { +! int e; +! +! if (setuid (current_user.uid) < 0) +! { +! e = errno; +! sys_error (_("cannot set uid to %d: effective uid %d"), current_user.uid, current_user.euid); +! #if defined (EXIT_ON_SETUID_FAILURE) +! if (e == EAGAIN) +! exit (e); +! #endif +! } +! if (setgid (current_user.gid) < 0) +! sys_error (_("cannot set gid to %d: effective gid %d"), current_user.gid, current_user.egid); +! + current_user.euid = current_user.uid; + current_user.egid = current_user.gid; ADDED PKGBUILDs/bash/system.bash_logout Index: PKGBUILDs/bash/system.bash_logout ================================================================== --- /dev/null +++ PKGBUILDs/bash/system.bash_logout @@ -0,0 +1,3 @@ +# +# /etc/bash.bash_logout +# ADDED PKGBUILDs/bash/system.bashrc Index: PKGBUILDs/bash/system.bashrc ================================================================== --- /dev/null +++ PKGBUILDs/bash/system.bashrc @@ -0,0 +1,23 @@ +# +# /etc/bash.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +PS1='[\u@\h \W]\$ ' +PS2='> ' +PS3='> ' +PS4='+ ' + +case ${TERM} in + xterm*|rxvt*|Eterm|aterm|kterm|gnome*) + PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' + + ;; + screen) + PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' + ;; +esac + +[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion ADDED PKGBUILDs/bc/PKGBUILD Index: PKGBUILDs/bc/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/bc/PKGBUILD @@ -0,0 +1,45 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: dorphell + +pkgname=bc +pkgver=1.06.95 +pkgrel=1 +pkgdesc="An arbitrary precision calculator language" +arch=('i586') +url="http://www.gnu.org/software/bc/" +license=('GPL') +depends=('readline') +replaces=('bc-readline') +conflicts=('bc-readline') +install=bc.install +source=(ftp://alpha.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig} + bc-1.06.95-void_uninitialized.patch) +md5sums=('5126a721b73f97d715bb72c13c889035' + 'SKIP' + 'fe85d42dd4151801e9b8c2d2c4d990bf') + +prepare() { + cd "${pkgname}-${pkgver}" + + # https://bugs.gentoo.org/show_bug.cgi?id=349339 + patch -Np0 -i ${srcdir}/bc-1.06.95-void_uninitialized.patch +} + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr --mandir=/usr/share/man \ + --infodir=/usr/share/info --with-readline + make +} + +check () { + cd "${pkgname}-${pkgver}" + echo "quit" | ./bc/bc -l Test/checklib.b # 10 failures +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/bc/bc-1.06.95-void_uninitialized.patch Index: PKGBUILDs/bc/bc-1.06.95-void_uninitialized.patch ================================================================== --- /dev/null +++ PKGBUILDs/bc/bc-1.06.95-void_uninitialized.patch @@ -0,0 +1,14 @@ +http://www.pixelbeat.org/programming/oss_bug_flow.html +https://bugs.gentoo.org/349339 + +--- bc/storage.c ++++ bc/storage.c +@@ -99,6 +99,7 @@ + { + f = &functions[indx]; + f->f_defined = FALSE; ++ f->f_void = FALSE; + f->f_body = (char *) bc_malloc (BC_START_SIZE); + f->f_body_size = BC_START_SIZE; + f->f_code_size = 0; + ADDED PKGBUILDs/bc/bc.install Index: PKGBUILDs/bc/bc.install ================================================================== --- /dev/null +++ PKGBUILDs/bc/bc.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(bc.info.gz dc.info.gz) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/binutils/PKGBUILD Index: PKGBUILDs/binutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/binutils/PKGBUILD @@ -0,0 +1,69 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc + +pkgname=binutils +pkgver=2.24 +pkgrel=2 +pkgdesc="A set of programs to assemble and manipulate binary and object files" +arch=('i586') +url="http://www.gnu.org/software/binutils/" +license=('GPL') +groups=('base-devel') +depends=('musl' 'zlib') +checkdepends=('dejagnu' 'bc') +conflicts=('binutils-multilib') +replaces=('binutils-multilib') +options=('staticlibs' '!distcc' '!ccache') +install=binutils.install +source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig}) +md5sums=('e0f71a7b2ddab0f8612336ac81d9636b' + 'SKIP') + +prepare() { + cd ${srcdir}/binutils-${pkgver} + + # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure + + mkdir ${srcdir}/binutils-build +} + +build() { + cd ${srcdir}/binutils-build + + ${srcdir}/binutils-${pkgver}/configure --prefix=/usr \ + --with-lib-path=/usr/lib:/usr/local/lib \ + --with-bugurl=https://bugs.archlinux.org/ \ + --enable-threads --enable-shared \ + --enable-ld=default --enable-gold --enable-plugins \ + --disable-werror + + # check the host environment and makes sure all the necessary tools are available + make configure-host + + make tooldir=/usr +} + +check() { + cd ${srcdir}/binutils-build + + # unset LDFLAGS as testsuite makes assumptions about which ones are active + # do not abort on errors - manually check log files + make LDFLAGS="" -k check || true +} + +package() { + cd ${srcdir}/binutils-build + make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install + + # Remove unwanted files + rm ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}* + rm ${pkgdir}/usr/share/info/{configure,standards}.info + + # No shared linking to these files outside binutils + rm ${pkgdir}/usr/lib/lib{bfd,opcodes}.so +} ADDED PKGBUILDs/binutils/binutils-2.23.2-texinfo-5.0.patch Index: PKGBUILDs/binutils/binutils-2.23.2-texinfo-5.0.patch ================================================================== --- /dev/null +++ PKGBUILDs/binutils/binutils-2.23.2-texinfo-5.0.patch @@ -0,0 +1,162 @@ +diff --git a/bfd/doc/bfd.texinfo b/bfd/doc/bfd.texinfo +index 45ffa73..3aa3300 100644 +--- a/bfd/doc/bfd.texinfo ++++ b/bfd/doc/bfd.texinfo +@@ -322,7 +324,7 @@ All of BFD lives in one directory. + @printindex cp + + @tex +-% I think something like @colophon should be in texinfo. In the ++% I think something like @@colophon should be in texinfo. In the + % meantime: + \long\def\colophon{\hbox to0pt{}\vfill + \centerline{The body of this manual is set in} +@@ -333,7 +335,7 @@ All of BFD lives in one directory. + \centerline{{\sl\fontname\tensl\/}} + \centerline{are used for emphasis.}\vfill} + \page\colophon +-% Blame: doc@cygnus.com, 28mar91. ++% Blame: doc@@cygnus.com, 28mar91. + @end tex + + @bye +diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi +index 56a0510..fb1802b 100644 +--- a/binutils/doc/binutils.texi ++++ b/binutils/doc/binutils.texi +@@ -148,18 +148,18 @@ in the section entitled ``GNU Free Documentation License''. + * objcopy:: Copy and translate object files + * objdump:: Display information from object files + * ranlib:: Generate index to archive contents +-* readelf:: Display the contents of ELF format files + * size:: List section sizes and total size + * strings:: List printable strings from files + * strip:: Discard symbols +-* elfedit:: Update the ELF header of ELF files + * c++filt:: Filter to demangle encoded C++ symbols + * cxxfilt: c++filt. MS-DOS name for c++filt + * addr2line:: Convert addresses to file and line + * nlmconv:: Converts object code into an NLM +-* windres:: Manipulate Windows resources + * windmc:: Generator for Windows message resources ++* windres:: Manipulate Windows resources + * dlltool:: Create files needed to build and use DLLs ++* readelf:: Display the contents of ELF format files ++* elfedit:: Update the ELF header of ELF files + * Common Options:: Command-line options for all utilities + * Selecting the Target System:: How these utilities determine the target + * Reporting Bugs:: Reporting Bugs +@@ -2907,7 +2907,7 @@ the Info entries for @file{binutils}. + @c man end + @end ignore + +-@node c++filt, addr2line, elfedit, Top ++@node c++filt, addr2line, strip, Top + @chapter c++filt + + @kindex c++filt +@@ -4384,7 +4384,7 @@ equivalent. At least one of the @option{--output-mach}, + + @table @env + +-@itemx --input-mach=@var{machine} ++@item --input-mach=@var{machine} + Set the matching input ELF machine type to @var{machine}. If + @option{--input-mach} isn't specified, it will match any ELF + machine types. +@@ -4392,21 +4392,21 @@ machine types. + The supported ELF machine types are, @var{L1OM}, @var{K1OM} and + @var{x86-64}. + +-@itemx --output-mach=@var{machine} ++@item --output-mach=@var{machine} + Change the ELF machine type in the ELF header to @var{machine}. The + supported ELF machine types are the same as @option{--input-mach}. + +-@itemx --input-type=@var{type} ++@item --input-type=@var{type} + Set the matching input ELF file type to @var{type}. If + @option{--input-type} isn't specified, it will match any ELF file types. + + The supported ELF file types are, @var{rel}, @var{exec} and @var{dyn}. + +-@itemx --output-type=@var{type} ++@item --output-type=@var{type} + Change the ELF file type in the ELF header to @var{type}. The + supported ELF types are the same as @option{--input-type}. + +-@itemx --input-osabi=@var{osabi} ++@item --input-osabi=@var{osabi} + Set the matching input ELF file OSABI to @var{osabi}. If + @option{--input-osabi} isn't specified, it will match any ELF OSABIs. + +@@ -4416,7 +4416,7 @@ The supported ELF OSABIs are, @var{none}, @var{HPUX}, @var{NetBSD}, + @var{FreeBSD}, @var{TRU64}, @var{Modesto}, @var{OpenBSD}, @var{OpenVMS}, + @var{NSK}, @var{AROS} and @var{FenixOS}. + +-@itemx --output-osabi=@var{osabi} ++@item --output-osabi=@var{osabi} + Change the ELF OSABI in the ELF header to @var{osabi}. The + supported ELF OSABI are the same as @option{--input-osabi}. + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index c7ae2a5..4777ad5 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -142,12 +144,12 @@ in the section entitled ``GNU Free Documentation License''. + @ifset ARM + * ARM:: ld and the ARM family + @end ifset +-@ifset HPPA +-* HPPA ELF32:: ld and HPPA 32-bit ELF +-@end ifset + @ifset M68HC11 + * M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families + @end ifset ++@ifset HPPA ++* HPPA ELF32:: ld and HPPA 32-bit ELF ++@end ifset + @ifset M68K + * M68K:: ld and Motorola 68K family + @end ifset +@@ -6012,6 +6014,9 @@ functionality are not listed. + @ifset I960 + * i960:: @command{ld} and the Intel 960 family + @end ifset ++@ifset M68HC11 ++* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families ++@end ifset + @ifset ARM + * ARM:: @command{ld} and the ARM family + @end ifset +@@ -6027,9 +6032,6 @@ functionality are not listed. + @ifset MSP430 + * MSP430:: @command{ld} and MSP430 + @end ifset +-@ifset M68HC11 +-* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families +-@end ifset + @ifset POWERPC + * PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support + @end ifset +@@ -7877,7 +7879,7 @@ If you have more than one @code{SECT} statement for the same + @printindex cp + + @tex +-% I think something like @colophon should be in texinfo. In the ++% I think something like @@colophon should be in texinfo. In the + % meantime: + \long\def\colophon{\hbox to0pt{}\vfill + \centerline{The body of this manual is set in} +@@ -7888,7 +7890,7 @@ If you have more than one @code{SECT} statement for the same + \centerline{{\sl\fontname\tensl\/}} + \centerline{are used for emphasis.}\vfill} + \page\colophon +-% Blame: doc@cygnus.com, 28mar91. ++% Blame: doc@@cygnus.com, 28mar91. + @end tex + + @bye +-- +1.7.1 + ADDED PKGBUILDs/binutils/binutils.install Index: PKGBUILDs/binutils/binutils.install ================================================================== --- /dev/null +++ PKGBUILDs/binutils/binutils.install @@ -0,0 +1,17 @@ +infodir=usr/share/info +filelist=(as.info bfd.info binutils.info gprof.info ld.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + ADDED PKGBUILDs/bison/PKGBUILD Index: PKGBUILDs/bison/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/bison/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Eric Belanger + +pkgname=bison +pkgver=3.0.2 +pkgrel=1 +pkgdesc="The GNU general-purpose parser generator" +arch=('i586') +license=('GPL3') +url="http://www.gnu.org/software/bison/bison.html" +depends=('musl' 'm4' 'sh') +groups=('base-devel') +options=('staticlibs') +install=bison.install +source=(ftp://ftp.gnu.org/gnu/bison/${pkgname}-${pkgver}.tar.xz{,.sig}) +md5sums=('146be9ff9fbd27497f0bf2286a5a2082' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr --datadir=/usr/share + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + rm ${pkgdir}/usr/lib/charset.alias +} ADDED PKGBUILDs/bison/bison.install Index: PKGBUILDs/bison/bison.install ================================================================== --- /dev/null +++ PKGBUILDs/bison/bison.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +file=bison.info.gz + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file $infodir/dir 2> /dev/null +} ADDED PKGBUILDs/bzip2/PKGBUILD Index: PKGBUILDs/bzip2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/bzip2/PKGBUILD @@ -0,0 +1,66 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Ronald van Haren +# (Arch Linux) Contributor: Judd + +pkgname=bzip2 +pkgver=1.0.6 +pkgrel=5 +pkgdesc="A high-quality data compression program" +arch=('i586') +license=('custom') +url="http://sources.redhat.com/bzip2" +groups=('base') +depends=('musl') +source=(http://www.bzip.org/$pkgver/bzip2-$pkgver.tar.gz + bzip2-1.0.4-bzip2recover.patch) +sha1sums=('3f89f861209ce81a6bab1fd1998c0ef311712002' + '85ce76fdb67f52f152bba368c1de81132dcdbdb5') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # add large-file support + sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./Makefile-libbz2_so + + # use our optimization + sed -i "s|-O2|${CFLAGS}|g" Makefile + sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so + + patch -Np1 < ../bzip2-1.0.4-bzip2recover.patch + + make -f Makefile-libbz2_so + make bzip2 bzip2recover +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + make test +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + install -dm755 $pkgdir/usr/{bin,lib,include,share/man/man1} + + install -m755 bzip2-shared $pkgdir/usr/bin/bzip2 + install -m755 bzip2recover bzdiff bzgrep bzmore $pkgdir/usr/bin + ln -sf bzip2 $pkgdir/usr/bin/bunzip2 + ln -sf bzip2 $pkgdir/usr/bin/bzcat + + install -m755 libbz2.so.1.0.6 $pkgdir/usr/lib + ln -s libbz2.so.1.0.6 $pkgdir/usr/lib/libbz2.so + ln -s libbz2.so.1.0.6 $pkgdir/usr/lib/libbz2.so.1 + ln -s libbz2.so.1.0.6 $pkgdir/usr/lib/libbz2.so.1.0 + + install -m644 bzlib.h $pkgdir/usr/include/ + + install -m644 bzip2.1 $pkgdir/usr/share/man/man1/ + ln -sf bzip2.1 $pkgdir/usr/share/man/man1/bunzip2.1 + ln -sf bzip2.1 $pkgdir/usr/share/man/man1/bzcat.1 + ln -sf bzip2.1 $pkgdir/usr/share/man/man1/bzip2recover.1 + + install -Dm644 $srcdir/${pkgname}-${pkgver}/LICENSE \ + $pkgdir/usr/share/licenses/${pkgname}/LICENSE +} ADDED PKGBUILDs/bzip2/bzip2-1.0.4-bzip2recover.patch Index: PKGBUILDs/bzip2/bzip2-1.0.4-bzip2recover.patch ================================================================== --- /dev/null +++ PKGBUILDs/bzip2/bzip2-1.0.4-bzip2recover.patch @@ -0,0 +1,12 @@ +--- bzip2-1.0.4/bzip2recover.c.pom 2007-01-03 03:00:55.000000000 +0100 ++++ bzip2-1.0.4/bzip2recover.c 2007-02-05 11:55:17.000000000 +0100 +@@ -309,7 +309,8 @@ + UInt32 buffHi, buffLo, blockCRC; + Char* p; + +- strcpy ( progName, argv[0] ); ++ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1); ++ progName[BZ_MAX_FILENAME-1]='\0'; + inFileName[0] = outFileName[0] = 0; + + fprintf ( stderr, ADDED PKGBUILDs/ca-certificates/PKGBUILD Index: PKGBUILDs/ca-certificates/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/ca-certificates/PKGBUILD @@ -0,0 +1,45 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Pierre Schmitz + +pkgname=ca-certificates +pkgver=20140325 +pkgrel=1 +pkgdesc='Common CA certificates' +arch=('any') +url='http://packages.qa.debian.org/c/ca-certificates.html' +license=('MPL' 'GPL') +source=("http://ftp.debian.org/debian/pool/main/c/${pkgname}/${pkgname}_${pkgver}.tar.xz") +depends=('bash' 'run-parts' 'openssl' 'findutils' 'coreutils' 'sed') +makedepends=('python2') +install='ca-certificates.install' +backup=('etc/ca-certificates.conf') +sha256sums=('c0e3d8c517995db2737f7f1a9b69d654b8823fa6d337871c6ce111fcf083454a') + +prepare() { + cd ${srcdir}/${pkgname} + sed 's|/usr/bin/python|/usr/bin/python2|g' -i mozilla/certdata2pem.py + sed 's|python|python2|g' -i mozilla/Makefile +} + +build() { + cd ${srcdir}/${pkgname} + make SUBDIRS=mozilla +} + +package() { + cd ${srcdir}/${pkgname} + install -d -m755 ${pkgdir}/{etc/ca-certificates/update.d,usr/{sbin,share/ca-certificates},etc/ssl/certs} + make install SUBDIRS=mozilla DESTDIR=${pkgdir} + mv ${pkgdir}/usr/sbin ${pkgdir}/usr/bin + install -D -m644 sbin/update-ca-certificates.8 ${pkgdir}/usr/share/man/man8/update-ca-certificates.8 + + ( + echo "# Automatically generated by ${pkgname}-${pkgver}-${pkgrel}" + echo "# see update-ca-certificates man page" + echo "# " + cd ${pkgdir}/usr/share/ca-certificates + find . -name '*.crt' | sort | cut -b3- + ) > ${pkgdir}/etc/ca-certificates.conf +} ADDED PKGBUILDs/ca-certificates/ca-certificates.install Index: PKGBUILDs/ca-certificates/ca-certificates.install ================================================================== --- /dev/null +++ PKGBUILDs/ca-certificates/ca-certificates.install @@ -0,0 +1,23 @@ +export LC_ALL=C + +post_install() { + usr/bin/update-ca-certificates --fresh >/dev/null 2>&1 +} + +post_upgrade() { + usr/bin/update-ca-certificates --fresh >/dev/null 2>&1 +} + +pre_remove() { + # clean up certificates + local _backup=$(mktemp) + mv etc/ca-certificates.conf ${_backup} + echo > etc/ca-certificates.conf + usr/bin/update-ca-certificates --fresh >/dev/null 2>&1 + mv ${_backup} etc/ca-certificates.conf +} + +post_remove() { + # remove the cert file if it is empty + [[ -s etc/ssl/certs/ca-certificates.crt ]] || rm -f etc/ssl/certs/ca-certificates.crt +} ADDED PKGBUILDs/check/PKGBUILD Index: PKGBUILDs/check/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/check/PKGBUILD @@ -0,0 +1,42 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan Alexander Steffens (heftig) +# (Arch Linux) Contributor: Jaroslav Lichtblau +# (Arch Linux) Contributor: Jeremy Cowgar + +pkgname=check +pkgver=0.9.12 +pkgrel=1 +pkgdesc="A unit testing framework for C" +arch=('i586') +url="http://check.sourceforge.net/" +license=('LGPL') +install=$pkgname.install +depends=('awk') +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) +md5sums=('46fe540d1a03714c7a1967dbc6d484e7') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd $pkgname-$pkgver + # Extremely long + #make -k check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + + # get rid of the package's info directory, + # install-info adds entries for us at install-time + rm "$pkgdir/usr/share/info/dir" + + # svn log file is too big + rm "$pkgdir"/usr/share/doc/check/*ChangeLog* +} ADDED PKGBUILDs/check/check.install Index: PKGBUILDs/check/check.install ================================================================== --- /dev/null +++ PKGBUILDs/check/check.install @@ -0,0 +1,20 @@ +_infodir=/usr/share/info +_filelist=(check.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${_filelist[@]}; do + install-info $_infodir/$file $_infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${_filelist[@]}; do + install-info --delete $_infodir/$file $_infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/chrpath/PKGBUILD Index: PKGBUILDs/chrpath/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/chrpath/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Sergej Pupykin +# (Arch Linux) Contributor: Gerardo Exequiel Pozzi + +pkgname=chrpath +pkgver=0.16 +pkgrel=1 +pkgdesc="Change or delete the rpath or runpath in ELF files" +arch=('i586') +url="http://directory.fsf.org/project/chrpath/" +license=('GPL2') +depends=('musl') +source=("https://alioth.debian.org/frs/download.php/latestfile/813/chrpath-$pkgver.tar.gz") +md5sums=('2bf8d1d1ee345fc8a7915576f5649982') + +prepare() { + cd "${srcdir}"/$pkgname-$pkgver +# rm -f config.guess +# aclocal +# libtoolize +# automake --add-missing +# autoconf +} + +build() { + cd "${srcdir}"/$pkgname-$pkgver + ./configure --prefix=/usr --mandir=/usr/share/man + make +} + +package() { + cd "${srcdir}"/$pkgname-$pkgver + make DESTDIR="${pkgdir}" docdir=/usr/share/doc/chrpath install +} ADDED PKGBUILDs/cloog/PKGBUILD Index: PKGBUILDs/cloog/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/cloog/PKGBUILD @@ -0,0 +1,31 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae + +pkgname=cloog +pkgver=0.18.1 +pkgrel=2 +pkgdesc="Library that generates loops for scanning polyhedra" +arch=('i586') +url="http://www.bastoul.net/cloog/" +license=('GPL') +depends=('isl') +source=(http://www.bastoul.net/cloog/pages/download/$pkgname-$pkgver.tar.gz) +md5sums=('e34fca0540d840e5d0f6427e98c92252') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --with-isl=system + make +} + +check() { + cd $srcdir/$pkgname-$pkgver + make check +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir/ install +} ADDED PKGBUILDs/cmake/FindPython-Interp-Libs-Search-for-Python-3.4.patch Index: PKGBUILDs/cmake/FindPython-Interp-Libs-Search-for-Python-3.4.patch ================================================================== --- /dev/null +++ PKGBUILDs/cmake/FindPython-Interp-Libs-Search-for-Python-3.4.patch @@ -0,0 +1,40 @@ +From ab6201ab647c13fee44c44822b8502e9848faaaf Mon Sep 17 00:00:00 2001 +From: Matt McCormick +Date: Wed, 5 Mar 2014 17:41:47 -0500 +Subject: [PATCH] FindPython{Interp,Libs}: Search for Python 3.4. + +Python 3.4.0rnc1 was released on 2014-02-20. +--- + Modules/FindPythonInterp.cmake | 2 +- + Modules/FindPythonLibs.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake +index 8da848c..e23a58b 100644 +--- a/Modules/FindPythonInterp.cmake ++++ b/Modules/FindPythonInterp.cmake +@@ -47,7 +47,7 @@ unset(_Python_NAMES) + + set(_PYTHON1_VERSIONS 1.6 1.5) + set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) ++set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0) + + if(PythonInterp_FIND_VERSION) + if(PythonInterp_FIND_VERSION_COUNT GREATER 1) +diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake +index 0749efc..1dbc967 100644 +--- a/Modules/FindPythonLibs.cmake ++++ b/Modules/FindPythonLibs.cmake +@@ -51,7 +51,7 @@ CMAKE_FIND_FRAMEWORKS(Python) + + set(_PYTHON1_VERSIONS 1.6 1.5) + set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +-set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) ++set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0) + + if(PythonLibs_FIND_VERSION) + if(PythonLibs_FIND_VERSION_COUNT GREATER 1) +-- +1.9.0 + ADDED PKGBUILDs/cmake/PKGBUILD Index: PKGBUILDs/cmake/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/cmake/PKGBUILD @@ -0,0 +1,47 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Andrea Scarpino +# (Arch Linux) Contributor: Pierre Schmitz + +pkgname=cmake +pkgver=2.8.12.2 +pkgrel=2 +pkgdesc="A cross-platform open-source make system" +arch=('i586') +url="http://www.cmake.org/" +license=('custom') +depends=('curl' 'libarchive' 'shared-mime-info') +install="${pkgname}.install" +source=("http://www.cmake.org/files/v2.8/${pkgname}-${pkgver}.tar.gz" + "findfreetype.patch" + "FindPython-Interp-Libs-Search-for-Python-3.4.patch") +md5sums=('17c6513483d23590cbce6957ec6d1e66' + '90321de1d9d46cd8d6609d0509dbd7b0' + '5e036a37f9b0b3368b8cfcc5784d1514') + +build() { + cd ${pkgname}-${pkgver} + + patch -Np1 < ${srcdir}/findfreetype.patch + patch -Np1 < ${srcdir}/FindPython-Interp-Libs-Search-for-Python-3.4.patch + + ./bootstrap --prefix=/usr \ + --mandir=/share/man \ + --docdir=/share/doc/cmake \ + --system-libs \ + --parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN) + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + vimpath="${pkgdir}/usr/share/vim/vimfiles" + install -Dm644 Docs/cmake-indent.vim "${vimpath}"/indent/cmake-indent.vim + install -Dm644 Docs/cmake-syntax.vim "${vimpath}"/syntax/cmake-syntax.vim + + install -Dm644 Copyright.txt \ + "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} ADDED PKGBUILDs/cmake/cmake.install Index: PKGBUILDs/cmake/cmake.install ================================================================== --- /dev/null +++ PKGBUILDs/cmake/cmake.install @@ -0,0 +1,12 @@ +post_install() { + update-mime-database usr/share/mime &> /dev/null + [[ -x usr/bin/update-desktop-database ]] && update-desktop-database -q || true +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} ADDED PKGBUILDs/cmake/findfreetype.patch Index: PKGBUILDs/cmake/findfreetype.patch ================================================================== --- /dev/null +++ PKGBUILDs/cmake/findfreetype.patch @@ -0,0 +1,26 @@ +diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake +index 179dc00..0f5a2b4 100644 +--- a/Modules/FindFreetype.cmake ++++ b/Modules/FindFreetype.cmake +@@ -62,10 +62,10 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] +- PATH_SUFFIXES include/freetype2 include ++ PATH_SUFFIXES include/freetype2 include/freetype include + ) + +-find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h ++find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h + HINTS + ENV FREETYPE_DIR + PATHS +@@ -76,7 +76,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] +- PATH_SUFFIXES include/freetype2 include ++ PATH_SUFFIXES include/freetype2 include/freetype include include/freetype2/freetype + ) + + find_library(FREETYPE_LIBRARY ADDED PKGBUILDs/coreutils/0001-cp-don-t-reserve-a-device-number.patch Index: PKGBUILDs/coreutils/0001-cp-don-t-reserve-a-device-number.patch ================================================================== --- /dev/null +++ PKGBUILDs/coreutils/0001-cp-don-t-reserve-a-device-number.patch @@ -0,0 +1,77 @@ +From d0294ff3b90430750a631556277c75f1a555dd44 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Thu, 3 Apr 2014 09:48:22 -0700 +Subject: [PATCH] cp: don't reserve a device number + +* src/copy.c (copy_internal): Replace dev_t arg DEVICE with struct +stat pointer arg PARENT. All callers changed. This removes an +unwarranted assumption that dev_t values of 0 cannot occur in file +systems. See: http://bugs.gnu.org/17179 +--- + src/copy.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +diff --git a/src/copy.c b/src/copy.c +index 781cc1e..d471a77 100644 +--- a/src/copy.c ++++ b/src/copy.c +@@ -117,7 +117,7 @@ struct dir_list + #define DEST_INFO_INITIAL_CAPACITY 61 + + static bool copy_internal (char const *src_name, char const *dst_name, +- bool new_dst, dev_t device, ++ bool new_dst, struct stat const *parent, + struct dir_list *ancestors, + const struct cp_options *x, + bool command_line_arg, +@@ -621,7 +621,7 @@ copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst, + char *dst_name = file_name_concat (dst_name_in, namep, NULL); + bool first_dir_created = *first_dir_created_per_command_line_arg; + +- ok &= copy_internal (src_name, dst_name, new_dst, src_sb->st_dev, ++ ok &= copy_internal (src_name, dst_name, new_dst, src_sb, + ancestors, &non_command_line_options, false, + &first_dir_created, + &local_copy_into_self, NULL); +@@ -1725,9 +1725,8 @@ should_dereference (const struct cp_options *x, bool command_line_arg) + /* Copy the file SRC_NAME to the file DST_NAME. The files may be of + any type. NEW_DST should be true if the file DST_NAME cannot + exist because its parent directory was just created; NEW_DST should +- be false if DST_NAME might already exist. DEVICE is the device +- number of the parent directory, or 0 if the parent of this file is +- not known. ANCESTORS points to a linked, null terminated list of ++ be false if DST_NAME might already exist. A nonnull PARENT describes the ++ parent directory. ANCESTORS points to a linked, null terminated list of + devices and inodes of parent directories of SRC_NAME. COMMAND_LINE_ARG + is true iff SRC_NAME was specified on the command line. + FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG is both input and output. +@@ -1737,7 +1736,7 @@ should_dereference (const struct cp_options *x, bool command_line_arg) + static bool + copy_internal (char const *src_name, char const *dst_name, + bool new_dst, +- dev_t device, ++ struct stat const *parent, + struct dir_list *ancestors, + const struct cp_options *x, + bool command_line_arg, +@@ -2434,7 +2433,7 @@ copy_internal (char const *src_name, char const *dst_name, + } + + /* Decide whether to copy the contents of the directory. */ +- if (x->one_file_system && device != 0 && device != src_sb.st_dev) ++ if (x->one_file_system && parent && parent->st_dev != src_sb.st_dev) + { + /* Here, we are crossing a file system boundary and cp's -x option + is in effect: so don't copy the contents of this directory. */ +@@ -2827,7 +2826,7 @@ copy (char const *src_name, char const *dst_name, + top_level_dst_name = dst_name; + + bool first_dir_created_per_command_line_arg = false; +- return copy_internal (src_name, dst_name, nonexistent_dst, 0, NULL, ++ return copy_internal (src_name, dst_name, nonexistent_dst, NULL, NULL, + options, true, + &first_dir_created_per_command_line_arg, + copy_into_self, rename_succeeded); +-- +1.9.1 + ADDED PKGBUILDs/coreutils/PKGBUILD Index: PKGBUILDs/coreutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/coreutils/PKGBUILD @@ -0,0 +1,49 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Sébastien "Seblu" Luttringer +# (Arch Linux) Maintainer: Bartłomiej Piotrowski +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=coreutils +pkgver=8.22 +pkgrel=4 +pkgdesc='The basic file, shell and text manipulation utilities of the GNU operating system' +arch=('i586') +license=('GPL3') +url='http://www.gnu.org/software/coreutils' +groups=('base') +depends=('musl' 'pam' 'acl' 'gmp' 'libcap' 'openssl') +install=$pkgname.install +source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig} + coreutils-8.22-shuf-segfault.patch + 0001-cp-don-t-reserve-a-device-number.patch) +md5sums=('8fb0ae2267aa6e728958adc38f8163a2' + 'SKIP' + '94f7e6f373f37beb236caabed8fcdb52' + 'ac3825f60b6e0300e375f656a3667c52') + +prepare() { + cd $pkgname-$pkgver + patch -p1 -i ../coreutils-8.22-shuf-segfault.patch + patch -p1 -i ../0001-cp-don-t-reserve-a-device-number.patch +} + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --libexecdir=/usr/lib --with-openssl \ + --enable-no-install-program=groups,hostname,kill,uptime + make +} + +check() { + cd $pkgname-$pkgver + make RUN_EXPENSIVE_TESTS=yes check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + rm "${pkgdir}"/usr/lib/charset.alias +} ADDED PKGBUILDs/coreutils/coreutils-8.22-shuf-segfault.patch Index: PKGBUILDs/coreutils/coreutils-8.22-shuf-segfault.patch ================================================================== --- /dev/null +++ PKGBUILDs/coreutils/coreutils-8.22-shuf-segfault.patch @@ -0,0 +1,74 @@ +From 24eb395471176e24762b08bfcef7562911537504 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 23 Feb 2014 15:34:48 -0800 +Subject: [PATCH] shuf: with -r, don't dump core if the input is empty + +Problem reported by valiant xiao in . +* NEWS: Document this. +* src/shuf.c (main): With -r, report an error if the input is empty. +* tests/misc/shuf.sh: Test for the bug. +--- + NEWS | 3 +++ + src/shuf.c | 15 +++++++++++---- + tests/misc/shuf.sh | 4 ++++ + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/NEWS b/NEWS +index e72942b..2df246d 100644 +--- a/NEWS ++++ b/NEWS +@@ -22,6 +22,9 @@ GNU coreutils NEWS -*- outline -*- + it would display an error, requiring --no-dereference to avoid the issue. + [bug introduced in coreutils-5.3.0] + ++ shuf -r no longer dumps core if the input is empty. ++ [bug introduced in coreutils-8.22] ++ + ** New features + + od accepts a new option: --endian=TYPE to handle inputs with different byte +diff --git a/src/shuf.c b/src/shuf.c +index d4641fe..2a91072 100644 +--- a/src/shuf.c ++++ b/src/shuf.c +@@ -576,11 +576,18 @@ main (int argc, char **argv) + /* Generate output according to requested method */ + if (repeat) + { +- if (input_range) +- i = write_random_numbers (randint_source, head_lines, +- lo_input, hi_input, eolbyte); ++ if (head_lines == 0) ++ i = 0; + else +- i = write_random_lines (randint_source, head_lines, line, n_lines); ++ { ++ if (n_lines == 0) ++ error (EXIT_FAILURE, 0, _("No lines to repeat")); ++ if (input_range) ++ i = write_random_numbers (randint_source, head_lines, ++ lo_input, hi_input, eolbyte); ++ else ++ i = write_random_lines (randint_source, head_lines, line, n_lines); ++ } + } + else + { +diff --git a/tests/misc/shuf.sh b/tests/misc/shuf.sh +index d3ea1f2..d7251d1 100755 +--- a/tests/misc/shuf.sh ++++ b/tests/misc/shuf.sh +@@ -43,6 +43,10 @@ compare in out1 || { fail=1; echo "not a permutation" 1>&2; } + t=$(shuf -e a b c d e | sort | fmt) + test "$t" = 'a b c d e' || { fail=1; echo "not a permutation" 1>&2; } + ++# coreutils-8.22 dumps core. ++shuf -er ++test $? -eq 1 || fail=1 ++ + # Before coreutils-6.3, this would infloop. + # "seq 1860" produces 8193 (8K + 1) bytes of output. + seq 1860 | shuf > /dev/null || fail=1 +-- +1.8.5.3 + ADDED PKGBUILDs/coreutils/coreutils.install Index: PKGBUILDs/coreutils/coreutils.install ================================================================== --- /dev/null +++ PKGBUILDs/coreutils/coreutils.install @@ -0,0 +1,17 @@ +infodir=usr/share/info +file=coreutils.info + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + install-info $infodir/$file.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null +} + ADDED PKGBUILDs/cracklib/PKGBUILD Index: PKGBUILDs/cracklib/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/cracklib/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tobias Powalowski +# (Arch Linux) Contributor: Federico Quagliata (quaqo) + +pkgname=cracklib +pkgver=2.9.0 +pkgrel=2 +pkgdesc="Password Checking Library" +arch=('i586') +license=('GPL') +url="http://sourceforge.net/projects/cracklib" +depends=('musl' 'zlib') +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) +md5sums=('e0f94ac2138fd33c7e77b19c1e9a9390') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --sbindir=/usr/bin --without-python + make +} + +check() { + cd $srcdir/$pkgname-$pkgver + make check +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install + # symlink cracklib-small #34778 + mkdir -p $pkgdir/usr/share/dict + ln -sf /usr/share/cracklib/cracklib-small $pkgdir/usr/share/dict/cracklib-small + sh ./util/cracklib-format dicts/cracklib-small \ + | sh ./util/cracklib-packer $pkgdir/usr/share/cracklib/pw_dict +} ADDED PKGBUILDs/curl/PKGBUILD Index: PKGBUILDs/curl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/curl/PKGBUILD @@ -0,0 +1,66 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Dave Reisner +# (Arch Linux) Contributor: Angel Velasquez +# (Arch Linux) Contributor: Eric Belanger +# (Arch Linux) Contributor: Lucien Immink +# (Arch Linux) Contributor: Daniel J Griffiths + +pkgname=curl +pkgver=7.37.0 +pkgrel=1 +pkgdesc="An URL retrieval utility and library" +arch=('i586') +url="http://curl.haxx.se" +license=('MIT') +depends=('ca-certificates' 'krb5' 'libssh2' 'openssl' 'zlib') +provides=('libcurl.so') +options=('strip' 'debug') +source=("http://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc} + curlbuild.h) +md5sums=('c35d0b20a7ef38951da81b6cae7e5c36' + 'SKIP' + '751bd433ede935c8fae727377625a8ae') + +build() { + cd "$pkgname-$pkgver" + + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --disable-ldap \ + --disable-ldaps \ + --enable-ipv6 \ + --enable-manual \ + --enable-versioned-symbols \ + --enable-threaded-resolver \ + --with-gssapi \ + --without-libidn \ + --with-random=/dev/urandom \ + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt + + make +} + +package() { + cd "$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + + local ptrsize=$(cpp <<<'__SIZEOF_POINTER__' | sed '/^#/d') + case $ptrsize in + 8) _curlbuild=curlbuild-64.h ;; + 4) _curlbuild=curlbuild-32.h ;; + *) error "unknown pointer size for architecture: %s bytes" "$ptrsize" + exit 1 + ;; + esac + + # license + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + + # devel + mv "$pkgdir/usr/include/curl/curlbuild.h" "$pkgdir/usr/include/curl/$_curlbuild" + install -m644 "$srcdir/curlbuild.h" "$pkgdir/usr/include/curl/curlbuild.h" +} ADDED PKGBUILDs/curl/curlbuild.h Index: PKGBUILDs/curl/curlbuild.h ================================================================== --- /dev/null +++ PKGBUILDs/curl/curlbuild.h @@ -0,0 +1,9 @@ +#include + +#if __WORDSIZE == 32 +#include "curlbuild-32.h" +#elif __WORDSIZE == 64 +#include "curlbuild-64.h" +#else +#error "Unknown word size" +#endif ADDED PKGBUILDs/db/PKGBUILD Index: PKGBUILDs/db/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/db/PKGBUILD @@ -0,0 +1,32 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Stéphane Gaudreault +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=db +pkgver=5.3.28 +pkgrel=1 +pkgdesc="The Berkeley DB embedded database system" +arch=('i586') +url="http://www.oracle.com/technology/software/products/berkeley-db/index.html" +license=('custom') +depends=('gcc-libs' 'sh') +source=(http://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz) +sha1sums=('fa3f8a41ad5101f43d08bc0efb6241c9b6fc1ae9') + +build() { + cd "${srcdir}"/$pkgname-${pkgver}/build_unix + ../dist/configure --prefix=/usr --enable-compat185 \ + --enable-shared --enable-static --enable-cxx --enable-dbm + make LIBSO_LIBS=-lpthread +} + +package() { + cd "${srcdir}"/$pkgname-${pkgver}/build_unix + make DESTDIR="${pkgdir}" install + rm -r "${pkgdir}"/usr/docs + install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE \ + "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} ADDED PKGBUILDs/dejagnu/PKGBUILD Index: PKGBUILDs/dejagnu/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/dejagnu/PKGBUILD @@ -0,0 +1,33 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae + +pkgname=dejagnu +pkgver=1.5.1 +pkgrel=1 +pkgdesc="Framework for testing other programs" +arch=('any') +url="http://www.gnu.org/software/dejagnu/" +license=('GPL') +depends=('sh' 'expect') +install=dejagnu.install +source=(http://ftp.gnu.org/gnu/dejagnu/${pkgname}-${pkgver}.tar.gz{,.sig}) +md5sums=('8386e04e362345f50ad169f052f4c4ab' + '59335adf4900b889c64827c5a9426252') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make +} + +check() { + cd $srcdir/$pkgname-$pkgver + make check +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir/ install +} ADDED PKGBUILDs/dejagnu/dejagnu.install Index: PKGBUILDs/dejagnu/dejagnu.install ================================================================== --- /dev/null +++ PKGBUILDs/dejagnu/dejagnu.install @@ -0,0 +1,15 @@ +infodir=usr/share/info + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/dejagnu.info.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/dejagnu.info.gz $infodir/dir 2> /dev/null +} ADDED PKGBUILDs/diffutils/PKGBUILD Index: PKGBUILDs/diffutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/diffutils/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=diffutils +pkgver=3.3 +pkgrel=1 +pkgdesc="Utility programs used for creating patch files" +arch=('i586') +url="http://www.gnu.org/software/diffutils" +license=('GPL3') +groups=('base') +depends=('musl' 'sh') +install=diffutils.install +source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig}) +md5sums=('99180208ec2a82ce71f55b0d7389f1b3' + '203a2f2101dfcc09cdac655be353fd78') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + rm -r "${pkgdir}"/usr/lib +} ADDED PKGBUILDs/diffutils/diffutils.install Index: PKGBUILDs/diffutils/diffutils.install ================================================================== --- /dev/null +++ PKGBUILDs/diffutils/diffutils.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(diffutils.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/dnssec-anchors/LICENSE Index: PKGBUILDs/dnssec-anchors/LICENSE ================================================================== --- /dev/null +++ PKGBUILDs/dnssec-anchors/LICENSE @@ -0,0 +1,1 @@ +The contents of this package are inelligible for copyright protection. ADDED PKGBUILDs/dnssec-anchors/PKGBUILD Index: PKGBUILDs/dnssec-anchors/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/dnssec-anchors/PKGBUILD @@ -0,0 +1,38 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Contributor: Thomas Mudrunka +# (Arch Linux) Contributor: m4xm4n +# (Arch Linux) Maintainer: Gaetan Bisson + +pkgname=dnssec-anchors +pkgver=20130320 +pkgrel=1 +pkgdesc='DNSSEC trust anchors for the root zone' +url='http://data.iana.org/root-anchors/' +license=('custom:NoCopyright') +arch=('any') +source=('LICENSE' + 'trusted-key.key') +sha256sums=('dd37e92942d5a4024f1c77df49d61ca77fc6284691814903a741785df61f78cb' + 'ca6388cc16223b29b607f07a9aa77e0aa52f653106d440cdc92cc40e145a4bb5') + +get_trusted-key() { + drill -z -s DNSKEY . > root.key + + curl http://data.iana.org/root-anchors/root-anchors.xml | + awk 'BEGIN{ORS=" "}(NR>4){gsub(/<[^>]*>/,"");print tolower($0)}' | + sed 's/ /\n/' > root.ds + + # Any of those tests failing is suspicious; check thoroughly! + [[ "$( trusted-key.key +} + +package() { + cd "${srcdir}" + install -Dm644 trusted-key.key "${pkgdir}"/etc/trusted-key.key + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} ADDED PKGBUILDs/dnssec-anchors/trusted-key.key Index: PKGBUILDs/dnssec-anchors/trusted-key.key ================================================================== --- /dev/null +++ PKGBUILDs/dnssec-anchors/trusted-key.key @@ -0,0 +1,1 @@ +. 166750 IN DNSKEY 257 3 8 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1ihz0= ADDED PKGBUILDs/docbook-xml/LICENSE Index: PKGBUILDs/docbook-xml/LICENSE ================================================================== --- /dev/null +++ PKGBUILDs/docbook-xml/LICENSE @@ -0,0 +1,24 @@ + Copyright 1992-2006 HaL Computer Systems, Inc., + O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software + Corporation, Norman Walsh, Sun Microsystems, Inc., and the + Organization for the Advancement of Structured Information + Standards (OASIS). + + See also http://docbook.org/specs/ + + Permission to use, copy, modify and distribute the DocBook XML DTD + and its accompanying documentation for any purpose and without fee + is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright + holders make no representation about the suitability of the DTD for + any purpose. It is provided "as is" without expressed or implied + warranty. + + If you modify the DocBook DTD in any way, except for declaring and + referencing additional sets of general entities and declaring + additional notations, label your DTD as a variant of DocBook. See + the maintenance documentation for more information. + + Please direct all questions, bug reports, or suggestions for + changes to the docbook@lists.oasis-open.org mailing list. For more + information, see http://www.oasis-open.org/docbook/. ADDED PKGBUILDs/docbook-xml/PKGBUILD Index: PKGBUILDs/docbook-xml/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/docbook-xml/PKGBUILD @@ -0,0 +1,275 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: dorphell +# (Arch Linux) Committer: Judd Vinet + +pkgname=docbook-xml +pkgver=4.5 +pkgrel=5 +pkgdesc="A widely used XML scheme for writing documentation and help" +arch=('any') +url="http://www.oasis-open.org/docbook/" +license=('MIT') +depends=('libxml2') +install=docbook-xml.install +source=('http://www.docbook.org/xml/4.5/docbook-xml-4.5.zip' + 'http://www.docbook.org/xml/4.4/docbook-xml-4.4.zip' + 'http://www.docbook.org/xml/4.3/docbook-xml-4.3.zip' + 'http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip' + 'http://www.docbook.org/xml/4.1.2/docbkx412.zip' + 'LICENSE') +noextract=('docbook-xml-4.5.zip' 'docbook-xml-4.4.zip' 'docbook-xml-4.3.zip' 'docbook-xml-4.2.zip' 'docbkx412.zip') +md5sums=('03083e288e87a7e829e437358da7ef9e' + 'cbb04e9a700955d88c50962ef22c1634' + 'ab200202b9e136a144db1e0864c45074' + '73fe50dfe74ca631c1602f558ed8961f' + '900d7609fb7e6d78901b357e4acfbc17' + '50e1eea70bc071b812e963e65af6707e') + +package() { + for ver in 4.2 4.3 4.4 4.5; do + mkdir docbook-xml-${ver} + pushd docbook-xml-${ver} + bsdtar xf "${srcdir}/docbook-xml-${ver}.zip" + mkdir -p "${pkgdir}/usr/share/xml/docbook/xml-dtd-${ver}" + cp -dRf docbook.cat *.dtd ent/ *.mod \ + "${pkgdir}/usr/share/xml/docbook/xml-dtd-${ver}/" + popd + done + mkdir docbook-xml-4.1.2 + pushd docbook-xml-4.1.2 + bsdtar xf "${srcdir}/docbkx412.zip" + mkdir -p "${pkgdir}/usr/share/xml/docbook/xml-dtd-4.1.2" + cp -dRf docbook.cat *.dtd ent/ *.mod \ + "${pkgdir}/usr/share/xml/docbook/xml-dtd-4.1.2/" + popd + + mkdir -p "${pkgdir}/etc/xml" + xmlcatalog --noout --create "${pkgdir}/etc/xml/docbook-xml" + + # V4.1.2 + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/calstblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/soextblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/dbpoolx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/dbhierx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/dbgenent.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/dbnotnx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.1.2/dbcentx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/4.1.2" \ + "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/4.1.2" \ + "file:///usr/share/xml/docbook/xml-dtd-4.1.2" \ + "${pkgdir}/etc/xml/docbook-xml" + + # V4.2 + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook CALS Table Model V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/calstblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/soextblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Information Pool V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/dbpoolx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/dbhierx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Additional General Entities V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/dbgenent.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Notations V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/dbnotnx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Character Entities V4.2//EN" \ + "http://www.oasis-open.org/docbook/xml/4.2/dbcentx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/4.2" \ + "file:///usr/share/xml/docbook/xml-dtd-4.2" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/4.2" \ + "file:///usr/share/xml/docbook/xml-dtd-4.2" \ + "${pkgdir}/etc/xml/docbook-xml" + + # V4.3 + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook CALS Table Model V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/calstblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/soextblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Information Pool V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/dbpoolx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/dbhierx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Additional General Entities V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/dbgenent.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Notations V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/dbnotnx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Character Entities V4.3//EN" \ + "http://www.oasis-open.org/docbook/xml/4.3/dbcentx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/4.3" \ + "file:///usr/share/xml/docbook/xml-dtd-4.3" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/4.3" \ + "file:///usr/share/xml/docbook/xml-dtd-4.3" \ + "${pkgdir}/etc/xml/docbook-xml" + + # V4.4 + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook CALS Table Model V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/calstblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/htmltblx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/soextblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Information Pool V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/dbpoolx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/dbhierx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Additional General Entities V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/dbgenent.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Notations V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/dbnotnx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook Character Entities V4.4//EN" \ + "http://www.oasis-open.org/docbook/xml/4.4/dbcentx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/4.4" \ + "file:///usr/share/xml/docbook/xml-dtd-4.4" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/4.4" \ + "file:///usr/share/xml/docbook/xml-dtd-4.4" \ + "${pkgdir}/etc/xml/docbook-xml" + + # V4.5 + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML V4.5//EN" \ + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD DocBook XML CALS Table Model V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/calstblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/soextblx.dtd" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/dbpoolx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/dbhierx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/htmltblx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Notations V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/dbnotnx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Character Entities V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/dbcentx.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "public" \ + "-//OASIS//ENTITIES DocBook XML Additional General Entities V4.5//EN" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5/dbgenent.mod" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteSystem" \ + "http://www.oasis-open.org/docbook/xml/4.5" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5" \ + "${pkgdir}/etc/xml/docbook-xml" + xmlcatalog --noout --add "rewriteURI" \ + "http://www.oasis-open.org/docbook/xml/4.5" \ + "file:///usr/share/xml/docbook/xml-dtd-4.5" \ + "${pkgdir}/etc/xml/docbook-xml" + +# license + install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} ADDED PKGBUILDs/docbook-xml/docbook-xml.install Index: PKGBUILDs/docbook-xml/docbook-xml.install ================================================================== --- /dev/null +++ PKGBUILDs/docbook-xml/docbook-xml.install @@ -0,0 +1,42 @@ +post_install() { + if [ -e etc/xml/catalog.preserve ]; then + mv etc/xml/catalog.preserve etc/xml/catalog + elif [ ! -e etc/xml/catalog ]; then + xmlcatalog --noout --create etc/xml/catalog + fi + xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//ENTITIES DocBook XML" \ + "file:///etc/xml/docbook-xml" \ + etc/xml/catalog + xmlcatalog --noout --add "delegatePublic" \ + "-//OASIS//DTD DocBook XML" \ + "file:///etc/xml/docbook-xml" \ + etc/xml/catalog + xmlcatalog --noout --add "delegateSystem" \ + "http://www.oasis-open.org/docbook/" \ + "file:///etc/xml/docbook-xml" \ + etc/xml/catalog + xmlcatalog --noout --add "delegateURI" \ + "http://www.oasis-open.org/docbook/" \ + "file:///etc/xml/docbook-xml" \ + etc/xml/catalog +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + if [ $(vercmp $2 4.5) -lt 0 ]; then + xmlcatalog --del "file:///etc/xml/docbook" etc/xml/catalog > etc/xml/catalog.preserve + fi +} + +post_upgrade() { + if [ $(vercmp $2 4.5) -ge 0 ]; then + post_remove + fi + post_install +} + +post_remove() { + xmlcatalog --noout --del file:///etc/xml/docbook-xml etc/xml/catalog +} ADDED PKGBUILDs/docbook-xsl/PKGBUILD Index: PKGBUILDs/docbook-xsl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/docbook-xsl/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tom Gundersen +# (Arch Linux) Contributor: Jan de Groot +# (Arch Linux) Contributor: Sean Middleditch +# (Arch Linux) Contributor: Daniel J Griffiths + +pkgname=docbook-xsl +pkgver=1.78.1 +pkgrel=1 +pkgdesc='XML stylesheets for Docbook-xml transformations' +arch=('any') +license=('custom') +url='http://docbook.sourceforge.net/' +depends=('libxml2' 'libxslt' 'docbook-xml') +install="$pkgname.install" +source=("http://downloads.sourceforge.net/docbook/${pkgname}-${pkgver}.tar.bz2") + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + _pkgroot=${pkgdir}/usr/share/xml/docbook/xsl-stylesheets-${pkgver} + + install -dm755 ${_pkgroot} + install -m644 VERSION VERSION.xsl ${_pkgroot} + + for fn in assembly common eclipse epub epub3 fo highlighting html htmlhelp javahelp lib \ + manpages params profiling roundtrip template website xhtml xhtml-1_1 xhtml5; do + install -dm755 ${_pkgroot}/${fn} + install -m644 ${fn}/*.{xml,xsl,dtd,ent} ${_pkgroot}/${fn} || true # ignore missing files + done + + install -dm755 ${pkgdir}/etc/xml + install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} +md5sums=('6dd0f89131cc35bf4f2ed105a1c17771') ADDED PKGBUILDs/docbook-xsl/docbook-xsl.install Index: PKGBUILDs/docbook-xsl/docbook-xsl.install ================================================================== --- /dev/null +++ PKGBUILDs/docbook-xsl/docbook-xsl.install @@ -0,0 +1,41 @@ +post_install() { + if [ ! -f etc/xml/catalog ]; then + xmlcatalog --noout --create etc/xml/catalog + fi + _NEW=`echo $1 | sed 's|\(.*\)\-.*|\1|'` + + xmlcatalog --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl/${_NEW}" \ + "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \ + etc/xml/catalog + + xmlcatalog --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl/${_NEW}" \ + "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \ + etc/xml/catalog && + + xmlcatalog --noout --add "rewriteSystem" \ + "http://docbook.sourceforge.net/release/xsl/current" \ + "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \ + etc/xml/catalog && + + xmlcatalog --noout --add "rewriteURI" \ + "http://docbook.sourceforge.net/release/xsl/current" \ + "/usr/share/xml/docbook/xsl-stylesheets-${_NEW}" \ + etc/xml/catalog +} + +post_upgrade() { + post_remove $2 + post_install $1 +} + +post_remove() { + _OLD=`echo $1 | sed 's|\(.*\)\-.*|\1|'` + xmlcatalog --noout --del "/usr/share/xml/docbook/xsl-stylesheets-${_OLD}" etc/xml/catalog + + if [ $(vercmp $1 1.72.0-3) -lt 0 ]; then + xmlcatalog --noout --del "/usr/share/xml/docbook" etc/xml/catalog + xmlcatalog --noout --del "file:///etc/xml/docbook" etc/xml/catalog + fi +} ADDED PKGBUILDs/e2fsprogs/MIT-LICENSE Index: PKGBUILDs/e2fsprogs/MIT-LICENSE ================================================================== --- /dev/null +++ PKGBUILDs/e2fsprogs/MIT-LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2003-2007 Theodore Ts'o +Copyright (c) 1997-2003 Yann Dirson +Copyright (c) 2001 Alcove +Copyright (c) 1997 Klee Dienes +Copyright (c) 1995-1996 Michael Nonweiler + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject +to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ADDED PKGBUILDs/e2fsprogs/PKGBUILD Index: PKGBUILDs/e2fsprogs/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/e2fsprogs/PKGBUILD @@ -0,0 +1,57 @@ +# Taken from Arch Linux with patches from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Ronald van Haren +# (Arch Linux) Contributor: judd + +pkgname=e2fsprogs +pkgver=1.42.10 +pkgrel=1 +pkgdesc="Ext2/3/4 filesystem utilities" +arch=('i586') +license=('GPL' 'LGPL' 'MIT') +url="http://e2fsprogs.sourceforge.net" +groups=('base') +depends=('sh' 'libutil-linux') +makedepends=('bc' 'util-linux') +source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'MIT-LICENSE') +# 0001-implement-com_right_r.patch +# fix_uint64_t.patch) +backup=('etc/mke2fs.conf') +options=('staticlibs') +install=${pkgname}.install +sha1sums=('06eba8a78ce1d5032fdcaf34f09025f01ceaca79' + 'f4a0d5b0cdb980e3fedd6f5e7dde0b0ffb7bbdfb') +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Remove unnecessary init.d directory + sed -i '/init\.d/s|^|#|' misc/Makefile.in + + ./configure --prefix=/usr --with-root-prefix="" --libdir=/usr/lib \ + --sbindir=/usr/bin --enable-elf-shlibs --disable-fsck --disable-uuidd \ + --disable-libuuid --disable-libblkid + + make +} + +package() { + unset MAKEFLAGS + + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install install-libs + + sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et" + + # remove references to build directory + sed -i -e 's#^SS_DIR=.*#SS_DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds" + sed -i -e 's#^ET_DIR=.*#ET_DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et" + + # remove static libraries with a shared counterpart + rm "${pkgdir}"/usr/lib/lib{com_err,e2p,ext2fs,ss}.a + + # install MIT license + install -Dm644 "${srcdir}/MIT-LICENSE" \ + "${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE" + ADDED PKGBUILDs/e2fsprogs/e2fsprogs.install Index: PKGBUILDs/e2fsprogs/e2fsprogs.install ================================================================== --- /dev/null +++ PKGBUILDs/e2fsprogs/e2fsprogs.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(libext2fs.info.gz) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/e2fsprogs/mke2fs.conf Index: PKGBUILDs/e2fsprogs/mke2fs.conf ================================================================== --- /dev/null +++ PKGBUILDs/e2fsprogs/mke2fs.conf @@ -0,0 +1,26 @@ +[defaults] + base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr + blocksize = 4096 + inode_size = 128 + inode_ratio = 16384 + +[fs_types] + small = { + blocksize = 1024 + inode_size = 128 + inode_ratio = 4096 + } + floppy = { + blocksize = 1024 + inode_size = 128 + inode_ratio = 8192 + } + news = { + inode_ratio = 4096 + } + largefile = { + inode_ratio = 1048576 + } + largefile4 = { + inode_ratio = 4194304 + } ADDED PKGBUILDs/ed/PKGBUILD Index: PKGBUILDs/ed/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/ed/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Dave Reisner +# (Arch Linux) Maintainer: Andreas Radke + +pkgname=ed +pkgver=1.10 +pkgrel=1 +pkgdesc="A POSIX-compliant line-oriented text editor" +arch=('i586') +license=('GPL') +url="http://www.gnu.org/software/ed/ed.html" +depends=('musl' 'sh') +options=('!emptydirs') +source=("ftp://ftp.gnu.org/gnu/ed/$pkgname-$pkgver.tar.lz"{,.sig}) +install='ed.install' +md5sums=('d1e51bb6e78417af8fb12684c31fd9eb' + 'SKIP') + +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/ \ + --bindir=/usr/bin \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + "CFLAGS=$CFLAGS" \ + "LDFLAGS=$LDFLAGS" + + make +} + +check() { + make -C "$pkgname-$pkgver" check +} + +package() { + make -C "$pkgname-$pkgver" "DESTDIR=$pkgdir" install +} ADDED PKGBUILDs/ed/ed.install Index: PKGBUILDs/ed/ed.install ================================================================== --- /dev/null +++ PKGBUILDs/ed/ed.install @@ -0,0 +1,18 @@ +infodir=usr/share/info +filelist=(ed.info) + +post_install() { + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2>/dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2>/dev/null + done +} ADDED PKGBUILDs/elfutils/PKGBUILD Index: PKGBUILDs/elfutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/elfutils/PKGBUILD @@ -0,0 +1,75 @@ +# Taken from Arch Linux with patches from Sabotage Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Stéphane Gaudreault +# (Arch Linux) Contributor: Andrej Gelenberg + +pkgname=elfutils +pkgver=0.152 +pkgrel=1 +pkgdesc="Libraries and utilities to handle ELF object files and DWARF debugging information" +arch=('i586') +url="https://fedorahosted.org/elfutils/" +license=('LGPL3' 'GPL' 'GPL3') +depends=('gcc-libs' 'zlib' 'bzip2' 'xz') +provides=('libelf') +replaces=('libelf') +conflicts=('libelf') +source=(https://fedorahosted.org/releases/e/l/elfutils/${pkgver}/elfutils-${pkgver}.tar.bz2 + elfutils-portability.patch + elfutils-musl-compat.patch) +options=('staticlibs') +sha1sums=('b22380205ed3ad5145586b4074be190057eb2537' + 'c989fa702fd473f01d4af1261ad39b02b889a305' + 'c6fac5d9284efd4ef2a8e6fe896bbdc0d7ce8169') + +prepare() { + cd ${pkgname}-${pkgver} + +patch -Np1 -i ../elfutils-portability.patch || exit 1 +patch -Np1 -i ../elfutils-musl-compat.patch || exit 1 + +sed -i 's@loff_t@off_t@g' libelf/libelf.h +sed -i "/stdint/s@.*@&\n#define TEMP_FAILURE_RETRY(x) x\n#define rawmemchr(s,c) memchr((s),(size_t)-1,(c))@" lib/system.h +sed -i '/cdefs/d' lib/fixedsizehash.h +sed -i -e \ + "s@__BEGIN_DECLS@#ifdef __cplusplus\nextern \"C\" {\n#endif@" \ + -e "s@__END_DECLS@#ifdef __cplusplus\n}\n#endif@" libelf/elf.h +sed -i 's@__mempcpy@mempcpy@g' libelf/elf_begin.c +} + +build() { + cd ${pkgname}-${pkgver} + +# CFLAGS+=" -g" # required for test-suite success +# ./configure --prefix=/usr --program-prefix="eu-" + +# make + + +CC="gcc -static -D_LARGEFILE64_SOURCE" ./configure -C --prefix="$butch_prefix" \ + --disable-nls \ + ac_cv_tls=no || exit 1 +find . -name Makefile -exec sed -i 's/-Werror//g' '{}' \; +find . -name Makefile -exec sed -i 's/if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi$//' "{}" \; +sed -i 's,am__EXEEXT_1 = libelf.so$(EXEEXT),,' libelf/Makefile +sed -i 's,install: install-am libelf.so,install: install-am\n\nfoobar:\n,' libelf/Makefile +make -C libelf -j$MAKE_THREADS || exit 1 + +} + +#check() { +# cd ${pkgname}-${pkgver} + +# make check +#} + +package() { + cd ${pkgname}-${pkgver} + +# make DESTDIR="${pkgdir}" install + +# rm "${pkgdir}"/usr/lib/lib{asm,dw,elf}.a + +make DESTDIR="${pkgdir}" -C libelf install || exit 1 +} ADDED PKGBUILDs/elfutils/elfutils-musl-compat.patch Index: PKGBUILDs/elfutils/elfutils-musl-compat.patch ================================================================== --- /dev/null +++ PKGBUILDs/elfutils/elfutils-musl-compat.patch @@ -0,0 +1,22 @@ +--- elfutils-0.152-org/libelf/libelfP.h ++++ elfutils-0.152/libelf/libelfP.h +@@ -63,6 +63,19 @@ + #include + #include + ++#ifndef MIN ++# define MIN(a,b) (((a)<(b))?(a):(b)) ++#endif ++#ifndef MAX ++# define MAX(a,b) (((a)>(b))?(a):(b)) ++#endif ++#ifndef powerof2 ++# define powerof2(x) ((((x) - 1) & (x)) == 0) ++#endif ++#ifndef __CONCAT ++#define __CONCAT(x,y) x ## y ++#endif ++ + /* gettext helper macros. */ + #define _(Str) dgettext ("elfutils", Str) + ADDED PKGBUILDs/elfutils/elfutils-portability.patch Index: PKGBUILDs/elfutils/elfutils-portability.patch ================================================================== --- /dev/null +++ PKGBUILDs/elfutils/elfutils-portability.patch @@ -0,0 +1,1245 @@ +--- elfutils/backends/ChangeLog ++++ elfutils/backends/ChangeLog +@@ -111,6 +111,10 @@ + * ppc_attrs.c (ppc_check_object_attribute): Handle tag + GNU_Power_ABI_Struct_Return. + ++2009-01-23 Roland McGrath ++ ++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED). ++ + 2008-10-04 Ulrich Drepper + + * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and +@@ -438,6 +442,11 @@ + * sparc_init.c: Likewise. + * x86_64_init.c: Likewise. + ++2005-11-22 Roland McGrath ++ ++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure. ++ (libebl_%.so rule): Use it in place of -Wl,--as-needed. ++ + 2005-11-19 Roland McGrath + + * ppc64_reloc.def: REL30 -> ADDR30. +@@ -460,6 +469,9 @@ + * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). + (CLEANFILES): Add libebl_$(m).so. + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + * ppc_reloc.def: Update bits per Alan Modra . + * ppc64_reloc.def: Likewise. + +--- elfutils/backends/Makefile.am ++++ elfutils/backends/Makefile.am +@@ -103,7 +103,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ +- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) ++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) + $(textrel_check) + + libebl_i386.so: $(cpu_i386) +--- elfutils/backends/Makefile.in ++++ elfutils/backends/Makefile.in +@@ -165,6 +165,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -194,6 +195,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -257,7 +259,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) + @MUDFLAP_FALSE@libmudflap = +@@ -698,7 +700,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ +- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) ++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) + $(textrel_check) + + libebl_i386.so: $(cpu_i386) +--- elfutils/ChangeLog ++++ elfutils/ChangeLog +@@ -13,6 +13,10 @@ + + * configure.ac (LOCALEDIR, DATADIRNAME): Removed. + ++2009-11-22 Roland McGrath ++ ++ * configure.ac: Use sed and expr instead of modern bash extensions. ++ + 2009-09-21 Ulrich Drepper + + * configure.ac: Update for more modern autoconf. +@@ -21,6 +25,10 @@ + + * configure.ac (zip_LIBS): Check for liblzma too. + ++2009-08-17 Roland McGrath ++ ++ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works. ++ + 2009-04-19 Roland McGrath + + * configure.ac (eu_version): Round down here, not in version.h macros. +@@ -32,6 +40,8 @@ + + 2009-01-23 Roland McGrath + ++ * configure.ac: Check for __builtin_popcount. ++ + * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. + + * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of +@@ -112,6 +122,10 @@ + * configure.ac: Add dummy automake conditional to get dependencies + for non-generic linker right. See src/Makefile.am. + ++2005-11-22 Roland McGrath ++ ++ * configure.ac: Check for --as-needed linker option. ++ + 2005-11-18 Roland McGrath + + * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. +@@ -159,6 +173,17 @@ + * Makefile.am (all_SUBDIRS): Add libdwfl. + * configure.ac: Write libdwfl/Makefile. + ++2005-05-31 Roland McGrath ++ ++ * configure.ac (WEXTRA): Check for -Wextra and set this substitution. ++ ++ * configure.ac: Check for struct stat st_?tim members. ++ * src/strip.c (process_file): Use st_?time if st_?tim are not there. ++ ++ * configure.ac: Check for futimes function. ++ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead. ++ (handle_ar) [! HAVE_FUTIMES]: Likewise. ++ + 2005-05-19 Roland McGrath + + * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros. +--- elfutils/config/eu.am ++++ elfutils/config/eu.am +@@ -25,11 +25,14 @@ + ## . + ## + ++WEXTRA = @WEXTRA@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ ++ + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ + $(if $($(*F)_no_Werror),,-Werror) \ +- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ ++ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ + $($(*F)_CFLAGS) + +--- elfutils/config/Makefile.in ++++ elfutils/config/Makefile.in +@@ -76,6 +76,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -105,6 +106,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/config.h.in ++++ elfutils/config.h.in +@@ -1,5 +1,8 @@ + /* config.h.in. Generated from configure.ac by autoheader. */ + ++/* Have __builtin_popcount. */ ++#undef HAVE_BUILTIN_POPCOUNT ++ + /* $libdir subdirectory containing libebl modules. */ + #undef LIBEBL_SUBDIR + +@@ -55,4 +58,7 @@ + /* Define for large files, on AIX-style hosts. */ + #undef _LARGE_FILES + ++/* Stubbed out if missing compiler support. */ ++#undef __thread ++ + #include +--- elfutils/configure ++++ elfutils/configure +@@ -602,6 +602,8 @@ NEVER_TRUE + base_cpu + NATIVE_LD_FALSE + NATIVE_LD_TRUE ++LD_AS_NEEDED ++WEXTRA + LEXLIB + LEX_OUTPUT_ROOT + LEX +@@ -3856,6 +3858,130 @@ if test "x$ac_cv_c99" != xyes; then : + as_fn_error $? "gcc with C99 support required" "$LINENO" 5 + fi + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5 ++$as_echo_n "checking for -Wextra option to $CC... " >&6; } ++if test "${ac_cv_cc_wextra+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wextra" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++void foo (void) { } ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_cc_wextra=yes ++else ++ ac_cv_cc_wextra=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++CFLAGS="$old_CFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5 ++$as_echo "$ac_cv_cc_wextra" >&6; } ++ ++if test "x$ac_cv_cc_wextra" = xyes; then : ++ WEXTRA=-Wextra ++else ++ WEXTRA=-W ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5 ++$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; } ++if test "${ac_cv_cc_gnu89_inline+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -fgnu89-inline -Werror" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++void foo (void) ++{ ++ inline void bar (void) {} ++ bar (); ++} ++extern inline void baz (void) {} ++ ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_cc_gnu89_inline=yes ++else ++ ac_cv_cc_gnu89_inline=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++CFLAGS="$old_CFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5 ++$as_echo "$ac_cv_cc_gnu89_inline" >&6; } ++if test "x$ac_cv_cc_gnu89_inline" = xyes; then : ++ WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline" ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5 ++$as_echo_n "checking for --as-needed linker option... " >&6; } ++if test "${ac_cv_as_needed+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat > conftest.c <&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; } ++then ++ ac_cv_as_needed=yes ++else ++ ac_cv_as_needed=no ++fi ++rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5 ++$as_echo "$ac_cv_as_needed" >&6; } ++if test "x$ac_cv_as_needed" = xyes; then : ++ LD_AS_NEEDED=-Wl,--as-needed ++else ++ LD_AS_NEEDED= ++fi ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5 ++$as_echo_n "checking for __builtin_popcount... " >&6; } ++if test "${ac_cv_popcount+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++exit (__builtin_popcount (127)); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_popcount=yes ++else ++ ac_cv_popcount=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_popcount" >&5 ++$as_echo "$ac_cv_popcount" >&6; } ++if test "x$ac_cv_popcount" = xyes; then : ++ ++$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h ++ ++fi ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5 + $as_echo_n "checking for __thread support... " >&6; } + if test "${ac_cv_tls+set}" = set; then : +@@ -3892,7 +4018,13 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 + $as_echo "$ac_cv_tls" >&6; } + if test "x$ac_cv_tls" != xyes; then : +- as_fn_error $? "__thread support required" "$LINENO" 5 ++ if test "$use_locks" = yes; then : ++ as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5 ++else ++ ++$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h ++ ++fi + fi + + # Check whether --enable-largefile was given. +@@ -4878,7 +5010,7 @@ ac_config_files="$ac_config_files versio + + # 1.234 -> 1234 + case "$PACKAGE_VERSION" in +-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;; ++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;; + *) as_fn_error $? "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;; + esac + case "$eu_version" in +@@ -4907,7 +5039,7 @@ case "$eu_version" in + esac + + # Round up to the next release API (x.y) version. +-eu_version=$[($eu_version + 999) / 1000] ++eu_version=`expr \( $eu_version + 999 \) / 1000` + + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure +--- elfutils/configure.ac ++++ elfutils/configure.ac +@@ -70,6 +70,54 @@ CFLAGS="$old_CFLAGS"]) + AS_IF([test "x$ac_cv_c99" != xyes], + AC_MSG_ERROR([gcc with C99 support required])) + ++AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl ++old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wextra" ++AC_COMPILE_IFELSE([void foo (void) { }], ++ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) ++CFLAGS="$old_CFLAGS"]) ++AC_SUBST(WEXTRA) ++AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W]) ++ ++AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl ++old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -fgnu89-inline -Werror" ++AC_COMPILE_IFELSE([ ++void foo (void) ++{ ++ inline void bar (void) {} ++ bar (); ++} ++extern inline void baz (void) {} ++], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no) ++CFLAGS="$old_CFLAGS"]) ++AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes], ++ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"]) ++ ++AC_CACHE_CHECK([for --as-needed linker option], ++ ac_cv_as_needed, [dnl ++cat > conftest.c <&AS_MESSAGE_LOG_FD]) ++then ++ ac_cv_as_needed=yes ++else ++ ac_cv_as_needed=no ++fi ++rm -f conftest*]) ++AS_IF([test "x$ac_cv_as_needed" = xyes], ++ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=]) ++AC_SUBST(LD_AS_NEEDED) ++ ++AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl ++AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])], ++ ac_cv_popcount=yes, ac_cv_popcount=no)]) ++AS_IF([test "x$ac_cv_popcount" = xyes], ++ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])]) ++ + AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl + # Use the same flags that we use for our DSOs, so the test is representative. + # Some old compiler/linker/libc combinations fail some ways and not others. +@@ -85,7 +133,10 @@ static __thread int a; int foo (int b) { + CFLAGS="$save_CFLAGS" + LDFLAGS="$save_LDFLAGS"]) + AS_IF([test "x$ac_cv_tls" != xyes], +- AC_MSG_ERROR([__thread support required])) ++ [AS_IF([test "$use_locks" = yes], ++ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])], ++ [AC_DEFINE([__thread], [/* empty: no multi-thread support */], ++ [Stubbed out if missing compiler support.])])]) + + dnl This test must come as early as possible after the compiler configuration + dnl tests, because the choice of the file model can (in principle) affect +@@ -248,7 +299,7 @@ AC_SUBST([eu_version]) + + # 1.234 -> 1234 + case "$PACKAGE_VERSION" in +-[[0-9]].*) eu_version="${PACKAGE_VERSION/./}" ;; ++[[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;; + *) AC_MSG_ERROR([confused by version number '$PACKAGE_VERSION']) ;; + esac + case "$eu_version" in +@@ -277,6 +328,6 @@ case "$eu_version" in + esac + + # Round up to the next release API (x.y) version. +-[eu_version=$[($eu_version + 999) / 1000]] ++eu_version=`expr \( $eu_version + 999 \) / 1000` + + AC_OUTPUT +--- elfutils/lib/ChangeLog ++++ elfutils/lib/ChangeLog +@@ -14,6 +14,9 @@ + + 2009-01-23 Roland McGrath + ++ * eu-config.h [! HAVE_BUILTIN_POPCOUNT] ++ (__builtin_popcount): New inline function. ++ + * eu-config.h: Add multiple inclusion protection. + + 2009-01-17 Ulrich Drepper +@@ -70,6 +73,11 @@ + * Makefile.am (libeu_a_SOURCES): Add it. + * system.h: Declare crc32_file. + ++2005-02-07 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-04-30 Ulrich Drepper + + * Makefile.am: Use -ffunction-sections for xmalloc.c. +--- elfutils/lib/eu-config.h ++++ elfutils/lib/eu-config.h +@@ -182,6 +182,17 @@ asm (".section predict_data, \"aw\"; .pr + /* This macro is used by the tests conditionalize for standalone building. */ + #define ELFUTILS_HEADER(name) + ++#ifndef HAVE_BUILTIN_POPCOUNT ++# define __builtin_popcount hakmem_popcount ++static inline unsigned int __attribute__ ((unused)) ++hakmem_popcount (unsigned int x) ++{ ++ /* HAKMEM 169 */ ++ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111); ++ return ((n + (n >> 3)) & 030707070707) % 63; ++} ++#endif /* HAVE_BUILTIN_POPCOUNT */ ++ + + #ifdef SHARED + # define OLD_VERSION(name, version) \ +--- elfutils/lib/Makefile.in ++++ elfutils/lib/Makefile.in +@@ -99,6 +99,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -128,6 +129,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -190,7 +192,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libelf + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) -fpic + @MUDFLAP_FALSE@libmudflap = +--- elfutils/libasm/ChangeLog ++++ elfutils/libasm/ChangeLog +@@ -71,6 +71,11 @@ + * asm_error.c: Add new error ASM_E_IOERROR. + * libasmP.h: Add ASM_E_IOERROR definition. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-02-15 Ulrich Drepper + + * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. +--- elfutils/libasm/Makefile.in ++++ elfutils/libasm/Makefile.in +@@ -147,6 +147,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -176,6 +177,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -239,7 +241,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(top_srcdir)/libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) + @MUDFLAP_FALSE@libmudflap = +--- elfutils/libcpu/ChangeLog ++++ elfutils/libcpu/ChangeLog +@@ -15,6 +15,9 @@ + + 2009-01-23 Roland McGrath + ++ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old ++ compilers that don't realize it's noreturn. ++ + * Makefile.am (i386_parse_CFLAGS): Use quotes around command + substitution that can produce leading whitespace. + +@@ -344,6 +347,11 @@ + * defs/i386.doc: New file. + * defs/x86_64: New file. + ++2005-04-04 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it instead of -Wextra. ++ + 2005-02-15 Ulrich Drepper + + * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. +--- elfutils/libcpu/i386_disasm.c ++++ elfutils/libcpu/i386_disasm.c +@@ -791,6 +791,7 @@ i386_disasm (const uint8_t **startp, con + + default: + assert (! "INVALID not handled"); ++ abort (); + } + } + else +--- elfutils/libcpu/Makefile.in ++++ elfutils/libcpu/Makefile.in +@@ -116,6 +116,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = lex.$( ++ ++ * libdw.h: Disable extern inlines for GCC 4.2. ++ + 2009-08-10 Roland McGrath + + * dwarf_getscopevar.c: Use dwarf_diename. +@@ -1076,6 +1080,11 @@ + + 2005-05-31 Roland McGrath + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ ++2005-05-31 Roland McGrath ++ + * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to + formref offset. + +--- elfutils/libdw/libdw.h ++++ elfutils/libdw/libdw.h +@@ -852,7 +852,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( + + + /* Inline optimizations. */ +-#ifdef __OPTIMIZE__ ++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) + /* Return attribute code of given attribute. */ + __libdw_extern_inline unsigned int + dwarf_whatattr (Dwarf_Attribute *attr) +--- elfutils/libdw/Makefile.in ++++ elfutils/libdw/Makefile.in +@@ -192,6 +192,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -221,6 +222,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -283,7 +285,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libelf + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = +--- elfutils/libdwfl/ChangeLog ++++ elfutils/libdwfl/ChangeLog +@@ -1366,6 +1366,11 @@ + + 2005-07-21 Roland McGrath + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ ++2005-07-21 Roland McGrath ++ + * Makefile.am (noinst_HEADERS): Add loc2c.c. + + * test2.c (main): Check sscanf result to quiet warning. +--- elfutils/libdwfl/Makefile.in ++++ elfutils/libdwfl/Makefile.in +@@ -182,6 +182,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -211,6 +212,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -274,7 +276,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) + @MUDFLAP_FALSE@libmudflap = +--- elfutils/libebl/ChangeLog ++++ elfutils/libebl/ChangeLog +@@ -628,6 +628,11 @@ + * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency + tracking works right. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-21 Ulrich Drepper + + * libebl_x86_64.map: Add x86_64_core_note. +--- elfutils/libebl/Makefile.in ++++ elfutils/libebl/Makefile.in +@@ -143,6 +143,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -172,6 +173,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -235,7 +237,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libasm + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) -fpic + @MUDFLAP_FALSE@libmudflap = +--- elfutils/libelf/ChangeLog ++++ elfutils/libelf/ChangeLog +@@ -671,6 +671,11 @@ + + * elf.h: Update from glibc. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-08 Roland McGrath + + * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now. +--- elfutils/libelf/common.h ++++ elfutils/libelf/common.h +@@ -160,7 +160,7 @@ libelf_release_all (Elf *elf) + (Var) = (sizeof (Var) == 1 \ + ? (unsigned char) (Var) \ + : (sizeof (Var) == 2 \ +- ? bswap_16 (Var) \ ++ ? (unsigned short int) bswap_16 (Var) \ + : (sizeof (Var) == 4 \ + ? bswap_32 (Var) \ + : bswap_64 (Var)))) +@@ -169,7 +169,7 @@ libelf_release_all (Elf *elf) + (Dst) = (sizeof (Var) == 1 \ + ? (unsigned char) (Var) \ + : (sizeof (Var) == 2 \ +- ? bswap_16 (Var) \ ++ ? (unsigned short int) bswap_16 (Var) \ + : (sizeof (Var) == 4 \ + ? bswap_32 (Var) \ + : bswap_64 (Var)))) +--- elfutils/libelf/Makefile.in ++++ elfutils/libelf/Makefile.in +@@ -189,6 +189,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -218,6 +219,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -279,7 +281,7 @@ zip_LIBS = @zip_LIBS@ + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = +--- elfutils/m4/Makefile.in ++++ elfutils/m4/Makefile.in +@@ -75,6 +75,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -104,6 +105,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/Makefile.in ++++ elfutils/Makefile.in +@@ -155,6 +155,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -184,6 +185,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/src/addr2line.c ++++ elfutils/src/addr2line.c +@@ -455,10 +455,10 @@ handle_address (const char *string, Dwfl + bool parsed = false; + int i, j; + char *name = NULL; +- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 ++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 + && string[i] == '\0') + parsed = adjust_to_section (name, &addr, dwfl); +- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) ++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) + { + default: + break; +--- elfutils/src/ChangeLog ++++ elfutils/src/ChangeLog +@@ -260,8 +260,16 @@ + * readelf.c (attr_callback): Use print_block only when we don't use + print_ops. + ++2009-08-17 Roland McGrath ++ ++ * ld.h: Disable extern inlines for GCC 4.2. ++ + 2009-08-14 Roland McGrath + ++ * strings.c (read_block): Conditionalize posix_fadvise use ++ on [POSIX_FADV_SEQUENTIAL]. ++ From Petr Salinger . ++ + * ar.c (do_oper_extract): Use pathconf instead of statfs. + + 2009-08-01 Ulrich Drepper +@@ -425,6 +433,8 @@ + * readelf.c (print_debug_frame_section): Use t instead of j formats + for ptrdiff_t OFFSET. + ++ * addr2line.c (handle_address): Use %a instead of %m for compatibility. ++ + 2009-01-21 Ulrich Drepper + + * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section +@@ -608,6 +618,11 @@ + that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really + is valid in RELRO. + ++2008-03-01 Roland McGrath ++ ++ * readelf.c (dump_archive_index): Tweak portability hack ++ to match [__GNUC__ < 4] too. ++ + 2008-02-29 Roland McGrath + + * readelf.c (print_attributes): Add a cast. +@@ -859,6 +874,8 @@ + + * readelf.c (hex_dump): Fix rounding error in whitespace calculation. + ++ * Makefile.am (readelf_no_Werror): New variable. ++ + 2007-10-15 Roland McGrath + + * make-debug-archive.in: New file. +@@ -1298,6 +1315,10 @@ + * elflint.c (valid_e_machine): Add EM_ALPHA. + Reported by Christian Aichinger . + ++ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to ++ MADV_SEQUENTIAL if undefined. Don't call posix_madvise ++ if neither is defined. ++ + 2006-08-08 Ulrich Drepper + + * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. +@@ -1374,6 +1395,10 @@ + * Makefile.am: Add hacks to create dependency files for non-generic + linker. + ++2006-04-05 Roland McGrath ++ ++ * strings.c (MAP_POPULATE): Define to 0 if undefined. ++ + 2006-06-12 Ulrich Drepper + + * ldgeneric.c (ld_generic_generate_sections): Don't create .interp +@@ -1722,6 +1747,11 @@ + * readelf.c (print_debug_loc_section): Fix indentation for larger + address size. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-30 Roland McGrath + + * readelf.c (print_debug_line_section): Print section offset of each +--- elfutils/src/findtextrel.c ++++ elfutils/src/findtextrel.c +@@ -504,7 +504,11 @@ ptrcompare (const void *p1, const void * + + + static void +-check_rel (size_t nsegments, struct segments segments[nsegments], ++check_rel (size_t nsegments, struct segments segments[ ++#if __GNUC__ >= 4 ++ nsegments ++#endif ++ ], + GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw, + const char *fname, bool more_than_one, void **knownsrcs) + { +--- elfutils/src/ld.h ++++ elfutils/src/ld.h +@@ -1122,6 +1122,7 @@ extern bool dynamically_linked_p (void); + + /* Checked whether the symbol is undefined and referenced from a DSO. */ + extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); ++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) + #ifdef __GNUC_STDC_INLINE__ + __attribute__ ((__gnu_inline__)) + #endif +@@ -1139,5 +1140,6 @@ linked_from_dso_p (struct scninfo *scnin + + return sym->defined && sym->in_dso; + } ++#endif /* Optimizing and not GCC 4.2. */ + + #endif /* ld.h */ +--- elfutils/src/Makefile.am ++++ elfutils/src/Makefile.am +@@ -99,6 +99,9 @@ addr2line_no_Wformat = yes + # XXX While the file is not finished, don't warn about this + ldgeneric_no_Wunused = yes + ++# Buggy old compilers. ++readelf_no_Werror = yes ++ + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + size_LDADD = $(libelf) $(libeu) $(libmudflap) +--- elfutils/src/Makefile.in ++++ elfutils/src/Makefile.in +@@ -228,6 +228,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -257,6 +258,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -321,7 +323,7 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libasm + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) + @MUDFLAP_FALSE@libmudflap = +@@ -368,6 +370,9 @@ strings_no_Wformat = yes + addr2line_no_Wformat = yes + # XXX While the file is not finished, don't warn about this + ldgeneric_no_Wunused = yes ++ ++# Buggy old compilers. ++readelf_no_Werror = yes + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + size_LDADD = $(libelf) $(libeu) $(libmudflap) +--- elfutils/src/readelf.c ++++ elfutils/src/readelf.c +@@ -4274,10 +4274,11 @@ struct listptr + #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4) + #define listptr_address_size(p) ((p)->addr64 ? 8 : 4) + ++static const char *listptr_name; + static int +-compare_listptr (const void *a, const void *b, void *arg) ++compare_listptr (const void *a, const void *b) + { +- const char *name = arg; ++ const char *const name = listptr_name; + struct listptr *p1 = (void *) a; + struct listptr *p2 = (void *) b; + +@@ -4357,8 +4358,11 @@ static void + sort_listptr (struct listptr_table *table, const char *name) + { + if (table->n > 0) +- qsort_r (table->table, table->n, sizeof table->table[0], +- &compare_listptr, (void *) name); ++ { ++ listptr_name = name; ++ qsort (table->table, table->n, sizeof table->table[0], ++ &compare_listptr); ++ } + } + + static bool +@@ -8098,7 +8102,7 @@ dump_archive_index (Elf *elf, const char + if (unlikely (elf_rand (elf, as_off) == 0) + || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) + == NULL)) +-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) ++#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4 + while (1) + #endif + error (EXIT_FAILURE, 0, +--- elfutils/src/strings.c ++++ elfutils/src/strings.c +@@ -51,6 +51,10 @@ + + #include + ++#ifndef MAP_POPULATE ++# define MAP_POPULATE 0 ++#endif ++ + + /* Prototypes of local functions. */ + static int read_fd (int fd, const char *fname, off64_t fdlen); +@@ -491,8 +495,13 @@ map_file (int fd, off64_t start_off, off + fd, start_off); + if (mem != MAP_FAILED) + { ++#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL ++# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL ++#endif ++#ifdef POSIX_MADV_SEQUENTIAL + /* We will go through the mapping sequentially. */ + (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL); ++#endif + break; + } + if (errno != EINVAL && errno != ENOMEM) +@@ -584,9 +593,11 @@ read_block (int fd, const char *fname, o + elfmap_off = from & ~(ps - 1); + elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); + ++#ifdef POSIX_FADV_SEQUENTIAL + if (unlikely (elfmap == MAP_FAILED)) + /* Let the kernel know we are going to read everything in sequence. */ + (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL); ++#endif + } + + if (unlikely (elfmap == MAP_FAILED)) +--- elfutils/src/strip.c ++++ elfutils/src/strip.c +@@ -53,6 +53,12 @@ + #include + #include + ++#ifdef HAVE_FUTIMES ++# define FUTIMES(fd, fname, tvp) futimes (fd, tvp) ++#else ++# define FUTIMES(fd, fname, tvp) utimes (fname, tvp) ++#endif ++ + + /* Name and version of program. */ + static void print_version (FILE *stream, struct argp_state *state); +@@ -311,8 +317,18 @@ process_file (const char *fname) + + /* If we have to preserve the timestamp, we need it in the + format utimes() understands. */ ++#ifdef HAVE_STRUCT_STAT_ST_ATIM + TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim); ++#else ++ tv[0].tv_sec = pre_st.st_atime; ++ tv[0].tv_usec = 0; ++#endif ++#ifdef HAVE_STRUCT_STAT_ST_MTIM + TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim); ++#else ++ tv[1].tv_sec = pre_st.st_atime; ++ tv[1].tv_usec = 0; ++#endif + } + + /* Open the file. */ +@@ -1809,7 +1825,7 @@ while computing checksum for debug infor + /* If requested, preserve the timestamp. */ + if (tvp != NULL) + { +- if (futimes (fd, tvp) != 0) ++ if (FUTIMES (fd, output_fname, tvp) != 0) + { + error (0, errno, gettext ("\ + cannot set access and modification date of '%s'"), +@@ -1866,7 +1882,7 @@ handle_ar (int fd, Elf *elf, const char + + if (tvp != NULL) + { +- if (unlikely (futimes (fd, tvp) != 0)) ++ if (unlikely (FUTIMES (fd, fname, tvp) != 0)) + { + error (0, errno, gettext ("\ + cannot set access and modification date of '%s'"), fname); +--- elfutils/tests/ChangeLog ++++ elfutils/tests/ChangeLog +@@ -205,6 +205,8 @@ + + 2008-01-21 Roland McGrath + ++ * line2addr.c (main): Revert last change. ++ + * testfile45.S.bz2: Add tests for cltq, cqto. + * testfile45.expect.bz2: Adjust. + +@@ -913,6 +915,11 @@ + * Makefile.am (TESTS): Add run-elflint-test.sh. + (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-24 Ulrich Drepper + + * get-files.c (main): Use correct format specifier. +--- elfutils/tests/line2addr.c ++++ elfutils/tests/line2addr.c +@@ -132,7 +132,7 @@ main (int argc, char *argv[]) + { + struct args a = { .arg = argv[cnt] }; + +- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) ++ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) + { + default: + case 0: +--- elfutils/tests/Makefile.in ++++ elfutils/tests/Makefile.in +@@ -372,6 +372,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -401,6 +402,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -462,7 +464,7 @@ zip_LIBS = @zip_LIBS@ + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ + $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ + $(am__append_1) + @MUDFLAP_FALSE@libmudflap = ADDED PKGBUILDs/eudev/PKGBUILD Index: PKGBUILDs/eudev/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/eudev/PKGBUILD @@ -0,0 +1,86 @@ +# Taken from the AUR +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: artoo +# (Arch Linux) Contributor: Alexey D. +# (Arch Linux) Contributor: Ivailo Monev + +_udevver=213 +#_gentoo_uri="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86" + +pkgname=eudev +pkgver=1.7 +pkgrel=3 +arch=('i586') +license=('GPL') +url="http://dev.gentoo.org/~blueness/eudev" +makedepends=('acl' 'dbus' 'hwids' 'kbd' 'kmod' 'pam' + 'gobject-introspection' 'gperf' 'gtk-doc' 'intltool') +options=(!makeflags !libtool) +source=("${url}/${pkgname}-${pkgver}.tar.gz" + 'initcpio_hooks' + 'initcpio_install' + #"${_gentoo_uri}/sys-fs/eudev/files/udev-postmount") + 'udev-postmount') +sha256sums=('7c4186904a87e553ec731458478e53a2bed97331e6ba215c4c480a8e2e6e1930' + '892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13' + '1a70e48d5f5b476ed624f745b03988f2e8950e33ae864c6b1c4ef088882c8390' + '0220e949b1f31832a205021c0a8615e77b27b73b7c9b16ef4a61bbd2774aeecb') + +_pkgver() { + date +%Y%m%d +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure \ + --prefix=/usr \ + --with-rootprefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --sbindir=/usr/bin \ + --with-firmware-path=/usr/lib/firmware/updates:/usr/lib/firmware \ + --with-modprobe=/usr/bin/modprobe \ + --with-html-dir=/usr/share/doc/${pkgname}-${pkgver}/html \ + --enable-doc \ + --enable-gtk-doc \ + --enable-gudev \ + --enable-introspection \ + --enable-split-usr \ + --enable-rule-generator + make +} + +package_eudev() { + pkgdesc="The userspace dev tools (udev) forked by Gentoo" + depends=('glib2' 'hwids' 'kbd' 'kmod') + optdepends=('eudev-openrc: eudev postmount script' + 'dbus-eudev: dbus without systemd' + 'upower-pm-utils-eudev: upower without systemd' + 'udisks2-eudev: udisks2 without systemd' + 'libpulse-eudev: libpulse without systemd' + 'cups-eudev: cups without systemd' + 'procps-ng-eudev: procps-ng without systemd') + provides=("udev=${_udevver}" + "systemd=${_udevver}" + "libsystemd=${_udevver}" + "systemd-tools=${_udevver}" + 'libudev.so' + 'libgudev-1.0.so') + conflicts=('systemd' + 'libsystemd' + 'systemd-tools') + backup=('etc/udev/udev.conf') + + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + for i in "${pkgdir}/usr/lib/udev/rules.d/"*.rules; do + sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g; + s#GROUP="tape"#GROUP="storage"#g; + s#GROUP="cdrom"#GROUP="optical"#g' "${i}" + done + + install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev" + install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev" +} ADDED PKGBUILDs/eudev/eudev.install Index: PKGBUILDs/eudev/eudev.install ================================================================== --- /dev/null +++ PKGBUILDs/eudev/eudev.install @@ -0,0 +1,14 @@ +_svc="udev-postmount" +_rlvl="default" + +post_install() { + rc-update add ${_svc} ${_rlvl} +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + rc-update del ${_svc} ${_rlvl} +} ADDED PKGBUILDs/eudev/initcpio_hooks Index: PKGBUILDs/eudev/initcpio_hooks ================================================================== --- /dev/null +++ PKGBUILDs/eudev/initcpio_hooks @@ -0,0 +1,20 @@ +#!/usr/bin/ash + +run_earlyhook() { + udevd --daemon --resolve-names=never + udevd_running=1 +} + +run_hook() { + msg ":: Triggering uevents..." + udevadm trigger --action=add --type=subsystems + udevadm trigger --action=add --type=devices + udevadm settle +} + +run_cleanuphook() { + udevadm control --exit + udevadm info --cleanup-db +} + +# vim: set ft=sh ts=4 sw=4 et: ADDED PKGBUILDs/eudev/initcpio_install Index: PKGBUILDs/eudev/initcpio_install ================================================================== --- /dev/null +++ PKGBUILDs/eudev/initcpio_install @@ -0,0 +1,27 @@ +#!/bin/bash + +build() { + add_file "/etc/udev/udev.conf" + add_binary /usr/bin/udevd + add_binary /usr/bin/udevadm + + for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers-modprobe.rules; do + add_file "/usr/lib/udev/rules.d/$rule" + done + + for tool in ata_id scsi_id; do + add_file "/usr/lib/udev/$tool" + done + + add_runscript +} + +help() { + cat </dev/null && rm "$1"/.test.$$ +} + +# store persistent-rules that got created while booting +# when / was still read-only +store_persistent_rules() +{ + # create /etc/udev/rules.d if it does not exist and /etc/udev is writable + [ -d /etc/udev/rules.d ] || \ + dir_writeable /etc/udev && \ + mkdir -p /etc/udev/rules.d + + # only continue if rules-directory is writable + dir_writeable /etc/udev/rules.d || return 0 + + local file dest + for file in /run/udev/tmp-rules--*; do + dest=${file##*tmp-rules--} + [ "$dest" = '*' ] && break + type=${dest##70-persistent-} + type=${type%%.rules} + ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d" + cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file" + eend $? "Failed moving persistent rules!" + done +} + +start() +{ + # check if this system uses udev + [ -d /run/udev ] || return 0 + + # store persistent-rules that got created while booting + # when / was still read-only + store_persistent_rules +} + +stop() +{ + return 0 +} + +# vim:ts=4 ADDED PKGBUILDs/eventlog/PKGBUILD Index: PKGBUILDs/eventlog/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/eventlog/PKGBUILD @@ -0,0 +1,27 @@ +# Taken from Arch Linux +# Modififed by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=eventlog +pkgver=0.2.12 +pkgrel=4 +pkgdesc="API to format and send structured log messages" +arch=('i586') +url="http://www.balabit.com/support/community/products/" +license=('BSD') +depends=('musl') +source=(http://www.balabit.com/downloads/files/${pkgname}/${pkgver%.*}/${pkgname}_${pkgver}.tar.gz) +sha1sums=('3e35a634e7de029ab9d36995a085bfcb00ed6a4d') + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + install -D -m644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} ADDED PKGBUILDs/expat/PKGBUILD Index: PKGBUILDs/expat/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/expat/PKGBUILD @@ -0,0 +1,33 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Committer: Judd Vinet + +pkgname=expat +pkgver=2.1.0 +pkgrel=3 +pkgdesc="An XML parser library" +arch=('i586') +url="http://expat.sourceforge.net/" +license=('custom') +depends=('musl') +source=(http://downloads.sourceforge.net/sourceforge/expat/${pkgname}-${pkgver}.tar.gz) +md5sums=('dd7dab7a5fea97d2a6a43f511449b7cd') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING +} ADDED PKGBUILDs/expect/PKGBUILD Index: PKGBUILDs/expect/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/expect/PKGBUILD @@ -0,0 +1,28 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae + +pkgname=expect +pkgver=5.45 +pkgrel=3 +pkgdesc="A tool for automating interactive applications" +arch=('i586') +url="http://www.nist.gov/el/msid/expect.cfm" +license=('custom') +depends=('tcl') +source=(http://downloads.sourceforge.net/project/expect/Expect/${pkgver}/expect${pkgver}.tar.gz) +md5sums=('44e1a4f4c877e9ddc5a542dfa7ecc92b') + +build() { + cd ${srcdir}/expect${pkgver} + ./configure --prefix=/usr --mandir=/usr/share/man + make +} + +package() { + cd ${srcdir}/expect${pkgver} + make DESTDIR=${pkgdir} install + + install -D -m644 README ${pkgdir}/usr/share/licenses/${pkgname}/README +} ADDED PKGBUILDs/file/PKGBUILD Index: PKGBUILDs/file/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/file/PKGBUILD @@ -0,0 +1,31 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Mainainer: Sébastien Luttringer +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=file +pkgver=5.19 +pkgrel=1 +pkgdesc='File type identification utility' +arch=('i586') +license=('custom') +groups=('base' 'base-devel') +url='http://www.darwinsys.com/file/' +depends=('musl' 'zlib') +source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz") +md5sums=('e3526f59023f3f7d1ffa4d541335edab') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --datadir=/usr/share/file + make +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + rmdir "$pkgdir/usr/share/man/man5" +} ADDED PKGBUILDs/filesystem/PKGBUILD Index: PKGBUILDs/filesystem/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/PKGBUILD @@ -0,0 +1,128 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tom Gundersen + +pkgname=filesystem +pkgver=2013.05 +pkgrel=2 +pkgdesc='Base filesystem' +arch=('i586') +license=('GPL') +url='http://www.archlinux.org' +groups=('base') +install='filesystem.install' +makedepends=('asciidoc') +depends=('iana-etc') +backup=('etc/fstab' 'etc/crypttab' 'etc/group' 'etc/hosts' 'etc/ld.so.conf' 'etc/passwd' + 'etc/shadow' 'etc/gshadow' 'etc/resolv.conf' 'etc/motd' 'etc/nsswitch.conf' + 'etc/shells' 'etc/host.conf' 'etc/securetty' 'etc/profile' 'etc/issue') +source=('group' 'issue' 'nsswitch.conf' 'securetty' 'host.conf' 'ld.so.conf' + 'passwd' 'shadow' 'fstab' 'crypttab' 'hosts' 'motd' 'os-release' 'resolv.conf' + 'shells' 'gshadow' 'profile' 'modprobe.d.usb-load-ehci-first' 'archlinux.7.txt' + 'locale.sh') + +build() { + cd ${srcdir} + a2x -d manpage -f manpage archlinux.7.txt +} + +package() { + cd ${pkgdir} + + # + # setup root filesystem + # + for d in boot dev etc home mnt usr var opt srv/http run; do + install -d -m755 ${d} + done + install -d -m555 proc + install -d -m555 sys + install -d -m0750 root + install -d -m1777 tmp + # vsftpd won't run with write perms on /srv/ftp + install -d -m555 -g ftp srv/ftp + + # setup /etc + install -d etc/{ld.so.conf.d,skel,profile.d} + for f in fstab group host.conf hosts issue ld.so.conf motd nsswitch.conf os-release passwd resolv.conf securetty shells profile; do + install -m644 ${srcdir}/${f} etc/ + done + ln -s /proc/self/mounts etc/mtab + for f in gshadow shadow crypttab; do + install -m600 ${srcdir}/${f} etc/ + done + touch etc/arch-release + install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first usr/lib/modprobe.d/usb-load-ehci-first.conf + install -m755 ${srcdir}/locale.sh etc/profile.d/locale.sh + + # setup /var + for d in cache/man local opt log/old lib/misc empty; do + install -d -m755 var/${d} + done + install -d -m1777 var/{tmp,spool/mail} + # allow setgid games to write scores + install -d -m775 -g games var/games + ln -s spool/mail var/mail + ln -s ../run var/run + ln -s ../run/lock var/lock + + # + # setup /usr hierarchy + # + for d in bin include lib share/misc src; do + install -d -m755 usr/${d} + done + for d in $(seq 8); do + install -d -m755 usr/share/man/man${d} + done + + # + # add lib symlinks + # + ln -s usr/lib ${pkgdir}/lib + [[ ${CARCH} = "x86_64" ]] && ( + ln -s usr/lib ${pkgdir}/lib64 + ln -s lib ${pkgdir}/usr/lib64 + ) + + # + # add bin symlinks + # + ln -s usr/bin ${pkgdir}/bin + ln -s usr/bin ${pkgdir}/sbin + ln -s bin ${pkgdir}/usr/sbin + + # + # install archlinux(7) manpage + # + install -D -m644 ${srcdir}/archlinux.7 usr/share/man/man7/archlinux.7 + + # + # setup /usr/local hierarchy + # + for d in bin etc games include lib man sbin share src; do + install -d -m755 usr/local/${d} + done + ln -s ../man usr/local/share/man +} +md5sums=('7b8e40f8f793e60f471511641bb1c9f2' + '7813c481156f6b280a3ba91fc6236368' + '9e4533df61f0c82d6b2e2371f7376282' + '4c4540eeb748bf1f71d631b8c1dcf0b3' + 'f28150d4c0b22a017be51b9f7f9977ed' + '6e488ffecc8ba142c0cf7e2d7aeb832e' + '1cfd310dff0804a7d21958487c32a3b1' + '2ef2429c2c98d0883906aa6f5363be80' + '693c97f2c9a519bb97a17008e92c2b74' + '1745349eb24ed21b4cfaa6f423bddb76' + '7bc65f234dfb6abf24e7c3b03e86f4ff' + 'd41d8cd98f00b204e9800998ecf8427e' + 'b16a4674ccf3a932ff34c6c8393a4f33' + '6f48288b6fcaf0065fcb7b0e525413e0' + '22518e922891f9359f971f4f5b4e793c' + 'f45389e116ab0b9e9968287617d27c7d' + '0b6f835598c7640184e476057b3c7722' + 'a8a962370cd0128465d514e6a1f74130' + '2e193c4a37245f2323ebe87f1a673563' + '3807d07215d9116331fe1cf8feeaa0f8') ADDED PKGBUILDs/filesystem/archlinux.7.txt Index: PKGBUILDs/filesystem/archlinux.7.txt ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/archlinux.7.txt @@ -0,0 +1,90 @@ +///// +vim:set ts=4 sw=4 syntax=asciidoc noet: +///// +archlinux(7) +============ + +NAME +---- +archlinux - basic configuration + +SYNOPSIS +-------- +Overview of the basic configuration of Arch Linux. + +DESCRIPTION +----------- +Arch Linux exposes the user to the system without hiding any details. +This man page gives a brief overview of the configuration files that should be set up on a fresh install. + +SYSTEM SERVICES[[S]] +-------------------- +System services to be started at boot can be enabled using 'systemctl enable '. +To view available services, use 'systemctl list-unit-files'. + +HOSTNAME[[H]] +------------- +The hostname of the machine can be set using 'hostnamectl set-hostname '. +It will then be written to /etc/hostname. + +LOCALIZATION[[L]] +----------------- +Various locales may be enabled in /etc/locale.gen and are generated by 'locale-gen'. +The system-wide locale to be used can be configured in /etc/locale.conf. +These settings can be overridden on a per-user basis by keeping a user-specific locale.conf in $HOME/.config/locale.conf. +The user-specific file will take precedence if it exists. + +VIRTUAL CONSOLE[[V]] +-------------------- +The virtual console is configured in /etc/vconsole.conf. +It allows you to set a font and a keyboard layout, among other things. +Note that these settings only apply to the console and do not apply if you use X. + +TIME[[T]] +--------- +The local time zone is configured by calling 'timedatectl set-timezone '. +A relative *symlink* is then created from /etc/localtime to the correct zoneinfo file under /usr/share/zoneinfo/. For example, + + /etc/localtime -> ../usr/share/zoneinfo/Europe/Paris + +The real-time clock, which keeps track of time when the computer is off, can be configured to either +be in UTC or in local time by calling 'timedatectl set-local-rtc '. +The default is UTC. + +FILE SYSTEMS[[F]] +----------------- +File systems are configured in /etc/fstab, and encryption mappings are configured in /etc/crypttab. + +INITRAMFS[[R]] +-------------- +The initramfs is generated by 'mkinitcpio -p '. +The default preset is "linux". +The initramfs can be configured in /etc/mkinitcpio.conf and must be regenerated after making configuration changes. + +PACKAGE MANAGER[[P]] +-------------------- +The package manager, pacman, is configured in /etc/pacman.conf. + +BOOT LOADER[[B]] +---------------- +GRUB's configuration is generated from /etc/default/grub by 'grub-mkconfig -o /boot/grub/grub.cfg'. +Syslinux is configured in /boot/syslinux/syslinux.cfg. + +MODULES[[M]] +------------ +Most modules should be loaded on-demand. +Modules to be unconditionally loaded at boot can be specified in /etc/modules-load.d/, +and modules to be blacklisted from automatically loading can be configured in /etc/modprobe.d/. + +SEE ALSO +-------- + +*systemctl*(1), *hostnamectl*(1), *hostname*(5), *locale.conf*(5), +*vconsole.conf*(5), *timedatectl*(1), *timezone*(3), *hwclock*(8), +*fstab*(5), *crypttab*(5), *mkinitcpio*(8), *pacman*(8), *pacman.conf*(5), +*grub-mkconfig*(8), *syslinux*(1), *modules-load.d*(5), *modprobe.d*(5), +*systemd*(1) + +AUTHORS +------- +Written by Tom Gundersen. ADDED PKGBUILDs/filesystem/crypttab Index: PKGBUILDs/filesystem/crypttab ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/crypttab @@ -0,0 +1,17 @@ +# crypttab: mappings for encrypted partitions +# +# Each mapped device will be created in /dev/mapper, so your /etc/fstab +# should use the /dev/mapper/ paths for encrypted devices. +# +# The Arch specific syntax has been deprecated, see crypttab(5) for the +# new supported syntax. +# +# NOTE: Do not list your root (/) partition here, it must be set up +# beforehand by the initramfs (/etc/mkinitcpio.conf). + +# +# home /dev/hda4 /etc/mypassword1 +# data1 /dev/hda3 /etc/mypassword2 +# data2 /dev/hda5 /etc/cryptfs.key +# swap /dev/hdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256 +# vol /dev/hdb7 none ADDED PKGBUILDs/filesystem/filesystem.install Index: PKGBUILDs/filesystem/filesystem.install ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/filesystem.install @@ -0,0 +1,53 @@ +# args: [options] +_addgroup() { + if ! getent group "$1" >/dev/null; then + groupadd "$@" >/dev/null + fi +} + +# args: [options] +_adduser() { + if ! getent passwd "$1" >/dev/null; then + useradd "$@" >/dev/null + fi +} + +post_upgrade() { + _addgroup optical -g 93 + _addgroup audio -g 92 + _addgroup video -g 91 + _addgroup floppy -g 94 + _addgroup storage -g 95 + _addgroup log -g 19 + _addgroup utmp -g 20 + _addgroup power -g 98 + _addgroup network -g 90 + _addgroup games -g 50 + _addgroup uucp -g 14 + _addgroup http -g 33 + _adduser http -u 33 -d /srv/http -g http -s /bin/false + _addgroup scanner -g 96 + _addgroup rfkill -g 24 + _addgroup lock -g 54 + _addgroup uuidd -g 68 + _adduser uuidd -u 68 -d / -g uuidd -s /sbin/nologin + _addgroup dbus -g 81 + _adduser dbus -u 81 -d / -g dbus -s /sbin/nologin + _addgroup systemd-journal -g 190 + + # sync gshadow to group (fixes FS#19869) + if ! grep -q '^lock:' etc/gshadow; then + grpconv >/dev/null + fi + + if ! grep -q '^include /etc/ld.so.conf.d/\*.conf$' etc/ld.so.conf; then + echo 'include /etc/ld.so.conf.d/*.conf' >> etc/ld.so.conf + fi + + # set "Last password change" > 0; otherwise su $user wont work + for user in bin daemon mail ftp http nobody; do + if LANG=C chage -l ${user} | grep -q 'password must be changed'; then + chage -d 14871 ${user} + fi + done +} ADDED PKGBUILDs/filesystem/fstab Index: PKGBUILDs/filesystem/fstab ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/fstab @@ -0,0 +1,4 @@ +# +# /etc/fstab: static file system information +# +# ADDED PKGBUILDs/filesystem/group Index: PKGBUILDs/filesystem/group ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/group @@ -0,0 +1,35 @@ +root:x:0:root +bin:x:1:root,bin,daemon +daemon:x:2:root,bin,daemon +sys:x:3:root,bin +adm:x:4:root,daemon +tty:x:5: +disk:x:6:root +lp:x:7:daemon +mem:x:8: +kmem:x:9: +wheel:x:10:root +ftp:x:11: +mail:x:12: +uucp:x:14: +log:x:19:root +utmp:x:20: +locate:x:21: +rfkill:x:24: +smmsp:x:25: +http:x:33: +games:x:50: +lock:x:54: +uuidd:x:68: +dbus:x:81: +network:x:90: +video:x:91: +audio:x:92: +optical:x:93: +floppy:x:94: +storage:x:95: +scanner:x:96: +power:x:98: +nobody:x:99: +users:x:100: +systemd-journal:x:190: ADDED PKGBUILDs/filesystem/gshadow Index: PKGBUILDs/filesystem/gshadow ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/gshadow @@ -0,0 +1,35 @@ +root:::root +bin:::root,bin,daemon +daemon:::root,bin,daemon +sys:::root,bin +adm:::root,daemon +tty::: +disk:::root +lp:::daemon +mem::: +kmem::: +wheel:::root +ftp::: +mail::: +uucp::: +log:::root +utmp:x:: +locate::: +rfkill:x:: +smmsp::: +http::: +games::: +lock::: +uuidd:x:: +dbus:x:: +network:x:: +video:x:: +audio::: +optical::: +floppy:x:: +storage:x:: +scanner:x:: +power:x:: +nobody::: +users::: +systemd-journal:x:: ADDED PKGBUILDs/filesystem/host.conf Index: PKGBUILDs/filesystem/host.conf ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/host.conf @@ -0,0 +1,8 @@ +# +# /etc/host.conf +# + +order hosts,bind +multi on + +# End of file ADDED PKGBUILDs/filesystem/hosts Index: PKGBUILDs/filesystem/hosts ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/hosts @@ -0,0 +1,9 @@ +# +# /etc/hosts: static lookup table for host names +# + +# +127.0.0.1 localhost.localdomain localhost +::1 localhost.localdomain localhost + +# End of file ADDED PKGBUILDs/filesystem/issue Index: PKGBUILDs/filesystem/issue ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/issue @@ -0,0 +1,2 @@ +Arch Linux \r (\l) + ADDED PKGBUILDs/filesystem/ld.so.conf Index: PKGBUILDs/filesystem/ld.so.conf ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/ld.so.conf @@ -0,0 +1,7 @@ +# +# /etc/ld.so.conf +# + +include /etc/ld.so.conf.d/*.conf + +# End of file ADDED PKGBUILDs/filesystem/locale.sh Index: PKGBUILDs/filesystem/locale.sh ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/locale.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES \ + LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION + +if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then + . "$XDG_CONFIG_HOME/locale.conf" +elif [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then + . "$HOME/.config/locale.conf" +elif [ -r /etc/locale.conf ]; then + . /etc/locale.conf +elif [ -r /etc/rc.conf ]; then + LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE") +fi + +export LANG="${LANG:-C}" +[ -n "$LC_CTYPE" ] && export LC_CTYPE +[ -n "$LC_NUMERIC" ] && export LC_NUMERIC +[ -n "$LC_TIME" ] && export LC_TIME +[ -n "$LC_COLLATE" ] && export LC_COLLATE +[ -n "$LC_MONETARY" ] && export LC_MONETARY +[ -n "$LC_MESSAGES" ] && export LC_MESSAGES +[ -n "$LC_PAPER" ] && export LC_PAPER +[ -n "$LC_NAME" ] && export LC_NAME +[ -n "$LC_ADDRESS" ] && export LC_ADDRESS +[ -n "$LC_TELEPHONE" ] && export LC_TELEPHONE +[ -n "$LC_MEASUREMENT" ] && export LC_MEASUREMENT +[ -n "$LC_IDENTIFICATION" ] && export LC_IDENTIFICATION ADDED PKGBUILDs/filesystem/modprobe.d.usb-load-ehci-first Index: PKGBUILDs/filesystem/modprobe.d.usb-load-ehci-first ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/modprobe.d.usb-load-ehci-first @@ -0,0 +1,2 @@ +softdep ohci_hcd pre: ehci_hcd +softdep uhci_hcd pre: ehci_hcd ADDED PKGBUILDs/filesystem/motd Index: PKGBUILDs/filesystem/motd ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/motd ADDED PKGBUILDs/filesystem/nsswitch.conf Index: PKGBUILDs/filesystem/nsswitch.conf ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/nsswitch.conf @@ -0,0 +1,19 @@ +# Begin /etc/nsswitch.conf + +passwd: files +group: files +shadow: files + +publickey: files + +hosts: files dns myhostname +networks: files + +protocols: files +services: files +ethers: files +rpc: files + +netgroup: files + +# End /etc/nsswitch.conf ADDED PKGBUILDs/filesystem/os-release Index: PKGBUILDs/filesystem/os-release ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/os-release @@ -0,0 +1,8 @@ +NAME="Arch Linux" +ID=arch +PRETTY_NAME="Arch Linux" +ANSI_COLOR="0;36" +HOME_URL="https://www.archlinux.org/" +SUPPORT_URL="https://bbs.archlinux.org/" +BUG_REPORT_URL="https://bugs.archlinux.org/" + ADDED PKGBUILDs/filesystem/passwd Index: PKGBUILDs/filesystem/passwd ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/passwd @@ -0,0 +1,9 @@ +root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/bin:/bin/false +daemon:x:2:2:daemon:/sbin:/bin/false +mail:x:8:12:mail:/var/spool/mail:/bin/false +ftp:x:14:11:ftp:/srv/ftp:/bin/false +http:x:33:33:http:/srv/http:/bin/false +uuidd:x:68:68:uuidd:/:/sbin/nologin +dbus:x:81:81:dbus:/:/sbin/nologin +nobody:x:99:99:nobody:/:/bin/false ADDED PKGBUILDs/filesystem/profile Index: PKGBUILDs/filesystem/profile ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/profile @@ -0,0 +1,27 @@ +# /etc/profile + +#Set our umask +umask 022 + +# Set our default path +PATH="/usr/local/sbin:/usr/local/bin:/usr/bin" +export PATH + +# Load profiles from /etc/profile.d +if test -d /etc/profile.d/; then + for profile in /etc/profile.d/*.sh; do + test -r "$profile" && . "$profile" + done + unset profile +fi + +# Source global bash config +if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then + . /etc/bash.bashrc +fi + +# Termcap is outdated, old, and crusty, kill it. +unset TERMCAP + +# Man is much better than us at figuring this out +unset MANPATH ADDED PKGBUILDs/filesystem/resolv.conf Index: PKGBUILDs/filesystem/resolv.conf ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/resolv.conf @@ -0,0 +1,8 @@ +# +# /etc/resolv.conf +# + +#search +#nameserver + +# End of file ADDED PKGBUILDs/filesystem/securetty Index: PKGBUILDs/filesystem/securetty ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/securetty @@ -0,0 +1,15 @@ +# +# /etc/securetty +# + +console +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +ttyS0 +hvc0 + +# End of file ADDED PKGBUILDs/filesystem/shadow Index: PKGBUILDs/filesystem/shadow ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/shadow @@ -0,0 +1,9 @@ +root::14871:::::: +bin:x:14871:::::: +daemon:x:14871:::::: +mail:x:14871:::::: +ftp:x:14871:::::: +http:x:14871:::::: +uuidd:x:14871:::::: +dbus:x:14871:::::: +nobody:x:14871:::::: ADDED PKGBUILDs/filesystem/shells Index: PKGBUILDs/filesystem/shells ================================================================== --- /dev/null +++ PKGBUILDs/filesystem/shells @@ -0,0 +1,8 @@ +# +# /etc/shells +# + +/bin/sh +/bin/bash + +# End of file ADDED PKGBUILDs/findutils/PKGBUILD Index: PKGBUILDs/findutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/findutils/PKGBUILD @@ -0,0 +1,49 @@ +# Taken from Arch Linux with patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: + +pkgname=findutils +pkgver=4.4.2 +pkgrel=5 +pkgdesc="GNU utilities to locate files" +arch=('i586') +license=('GPL3') +groups=('base' 'base-devel') +depends=('musl' 'sh') +url="http://www.gnu.org/software/findutils" +source=(ftp://ftp.gnu.org/pub/gnu/findutils/${pkgname}-${pkgver}.tar.gz{,.sig} + fix-gnulib-freadahead.patch) +install=findutils.install +sha1sums=('e8dd88fa2cc58abffd0bfc1eddab9020231bb024' + 'SKIP' + '9e19416f640251c57085bb3d621f971b142b2ef8') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p1 -i ../fix-gnulib-freadahead.patch + +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Don't build or install locate because we use mlocate, + # which is a secure version of locate. + sed -i '/^SUBDIRS/s/locate//' Makefile.in + + ./configure --prefix=/usr + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR=$pkgdir install + rm -r "${pkgdir}"/usr/lib +} ADDED PKGBUILDs/findutils/findutils.install Index: PKGBUILDs/findutils/findutils.install ================================================================== --- /dev/null +++ PKGBUILDs/findutils/findutils.install @@ -0,0 +1,22 @@ +infodir=/usr/share/info +filelist=(find-maint.info find.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/findutils/fix-gnulib-freadahead.patch Index: PKGBUILDs/findutils/fix-gnulib-freadahead.patch ================================================================== --- /dev/null +++ PKGBUILDs/findutils/fix-gnulib-freadahead.patch @@ -0,0 +1,38 @@ +--- findutils-4.4.2.orig/gnulib/lib/freadahead.c ++++ findutils-4.4.2/gnulib/lib/freadahead.c +@@ -19,6 +19,7 @@ + /* Specification. */ + #include "freadahead.h" + ++#ifndef HAVE___FREADAHEAD + size_t + freadahead (FILE *fp) + { +@@ -64,3 +65,4 @@ + #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread on your system, then report this to bug-gnulib." + #endif + } ++#endif +--- findutils-4.4.2.orig/gnulib/lib/freadahead.h ++++ findutils-4.4.2/gnulib/lib/freadahead.h +@@ -29,7 +29,20 @@ + + STREAM must not be wide-character oriented. */ + ++#if HAVE___FREADAHEAD || (defined(__linux__) && !defined(__GLIBC__) && !defined(__UCLIBC__)) /* musl libc */ ++ ++#ifndef HAVE___FREADAHEAD ++#define HAVE___FREADAHEAD 1 ++#endif ++ ++# include ++# define freadahead(stream) __freadahead (stream) ++ ++#else ++ + extern size_t freadahead (FILE *stream); ++ ++#endif + + #ifdef __cplusplus + } ADDED PKGBUILDs/flex/PKGBUILD Index: PKGBUILDs/flex/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/flex/PKGBUILD @@ -0,0 +1,44 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=flex +pkgver=2.5.39 +pkgrel=1 +pkgdesc="A tool for generating text-scanning programs" +arch=('i586') +url="http://flex.sourceforge.net" +license=('custom') +groups=('base-devel') +depends=('musl' 'm4' 'sh') +install=flex.install +source=(http://downloads.sourceforge.net/sourceforge/flex/flex-$pkgver.tar.xz) +md5sums=('477679c37ff8b28248a9b05f1da29a82') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --host=i586-pc-linux + make +} + +check() { + cd $srcdir/$pkgname-$pkgver + + # these tests are incompatible with latest bison + sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in + + make check +} + +package() { + cd $srcdir/$pkgname-$pkgver + + make DESTDIR=$pkgdir install + ln -s flex ${pkgdir}/usr/bin/lex + + install -Dm644 COPYING \ + $pkgdir/usr/share/licenses/$pkgname/license.txt +} + ADDED PKGBUILDs/flex/flex.install Index: PKGBUILDs/flex/flex.install ================================================================== --- /dev/null +++ PKGBUILDs/flex/flex.install @@ -0,0 +1,22 @@ +infodir=/usr/share/info +filelist=(flex.info{,-1,-2}) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/gawk/PKGBUILD Index: PKGBUILDs/gawk/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gawk/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: +# (Arch Linux) Contributor: Tom Newsom + +pkgname=gawk +pkgver=4.1.1 +pkgrel=1 +pkgdesc="GNU version of awk" +arch=('i586') +url="http://www.gnu.org/software/gawk/" +license=('GPL') +groups=('base' 'base-devel') +depends=('sh' 'musl' 'mpfr') +provides=('awk') +install=gawk.install +source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig}) +md5sums=('45f5b09aa87b4744c4c53bf274e96ed0' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr --libexecdir=/usr/lib --without-libsigsegv + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + + #install -dm755 ${pkgdir}/bin + #ln -sf /usr/bin/gawk ${pkgdir}/bin/ + #ln -sf gawk ${pkgdir}/bin/awk +} ADDED PKGBUILDs/gawk/gawk.install Index: PKGBUILDs/gawk/gawk.install ================================================================== --- /dev/null +++ PKGBUILDs/gawk/gawk.install @@ -0,0 +1,22 @@ +infodir=usr/share/info +filelist=(gawk.info.gz gawkinet.info.gz) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/gc/PKGBUILD Index: PKGBUILDs/gc/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gc/PKGBUILD @@ -0,0 +1,41 @@ +# Taken from Arch Linux, patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Daniel Isenmann +# (Arch Linux) Contributor: dorphell + +pkgname=gc +pkgver=7.4.0 +pkgrel=1 +pkgdesc="A garbage collector for C and C++" +arch=('i586') +url="http://www.hboehm.info/gc/" +license=('GPL') +source=("http://www.hboehm.info/gc/gc_source/${pkgname}-${pkgver}.tar.gz" + fix-boehm-gc.patch) +depends=('gcc-libs' 'libatomic_ops') +md5sums=('f40d9a47c90d60791eeecb484f8df5ee' + '2580315e6df59bb167b8292c351f82f5') + +prepare() { + cd ${pkgname}-${pkgver} + sed -i 's#pkgdata#doc#' doc/doc.am + patch -p1 -i ../fix-boehm-gc.patch +} + +build() { + cd ${pkgname}-${pkgver} + #autoreconf -fi + export CFLAGS="${CFLAGS} -D_GNU_SOURCE -DNO_GETCONTEXT -DUSE_MMAP" + ./configure --prefix=/usr --enable-cplusplus #--disable-static + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + sed -i -e 's/GC_MALLOC 1L/gc 3/' doc/gc.man + install -m755 -d "${pkgdir}/usr/share/man/man3" + install -m644 doc/gc.man "${pkgdir}/usr/share/man/man3/gc.3" +} ADDED PKGBUILDs/gc/fix-boehm-gc.patch Index: PKGBUILDs/gc/fix-boehm-gc.patch ================================================================== --- /dev/null +++ PKGBUILDs/gc/fix-boehm-gc.patch @@ -0,0 +1,11 @@ +--- gc-7.2.orig/os_dep.c ++++ gc-7.2/os_dep.c +@@ -26,7 +26,7 @@ + # define __KERNEL__ + # include + # undef __KERNEL__ +-# else ++# elif defined(__GLIBC__) + /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */ + /* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */ + /* prototypes, so we have to include the top-level sigcontext.h to */ ADDED PKGBUILDs/gdb/05_all_readline-headers.patch Index: PKGBUILDs/gdb/05_all_readline-headers.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdb/05_all_readline-headers.patch @@ -0,0 +1,42 @@ +--- a/readline/complete.c ++++ b/readline/complete.c +@@ -25,6 +25,11 @@ + # include + #endif + ++#ifdef HAVE_WCHAR_H /* wcwidth() */ ++# define _GNU_SOURCE ++# include ++#endif ++ + #include + #include + #if defined (HAVE_SYS_FILE_H) +--- a/readline/display.c ++++ b/readline/display.c +@@ -25,6 +25,11 @@ + # include + #endif + ++#ifdef HAVE_WCHAR_H /* wcwidth() */ ++# define _GNU_SOURCE ++# include ++#endif ++ + #include + + #if defined (HAVE_UNISTD_H) +--- a/readline/mbutil.c ++++ b/readline/mbutil.c +@@ -25,6 +25,11 @@ + # include + #endif + ++#ifdef HAVE_WCHAR_H /* wcwidth() */ ++# define _GNU_SOURCE ++# include ++#endif ++ + #include + #include + #include "posixjmp.h" ADDED PKGBUILDs/gdb/PKGBUILD Index: PKGBUILDs/gdb/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gdb/PKGBUILD @@ -0,0 +1,75 @@ +# Taken from Arch Linux with patches from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Jan de Groot + +pkgname=gdb +pkgver=7.6.1 +pkgrel=1 +pkgdesc="The GNU Debugger" +arch=('i586') +url="http://www.gnu.org/software/gdb/" +license=('GPL3') +depends=('ncurses' 'expat' 'python2') +makedepends=('texinfo') +backup=('etc/gdb/gdbinit') +install=gdb.install +source=(http://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.bz2{,.sig} + 05_all_readline-headers.patch + cpuid-pic.patch + gdb-amd64-debugreg.patch + gdb-linux_nat.patch + gdb-linux_osdata.patch + gdb-linux_threaddb.patch) +md5sums=('fbc4dab4181e6e9937075b43a4ce2732' + 'SKIP' + '701b030be4c141eab6409d37f5afa11b' + 'a679796124dc56798cdebffa524f661c' + 'c66ba0aa72baea5bea429461607c5664' + 'fa690484f7cdd2d552216d515653b97f' + '58e5c62bd1104f61d1f01809aab55abb' + '70777c7a82f3cbab0a70a9088feea4ac') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + + patch -p1 -i ../05_all_readline-headers.patch + patch -p1 -i ../cpuid-pic.patch + patch -p1 -i ../gdb-amd64-debugreg.patch + patch -p1 -i ../gdb-linux_nat.patch + patch -p1 -i ../gdb-linux_osdata.patch + patch -p1 -i ../gdb-linux_threaddb.patch + + # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure + + sed '23a #include ' -i gdb/common/linux-ptrace.h + +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + ./configure --prefix=/usr --disable-nls \ + --disable-gdbserver \ + --with-system-readline \ + --with-python=/usr/bin/python2 \ + --with-system-gdbinit=/etc/gdb/gdbinit \ + --disable-werror + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + + # install "custom" system gdbinit + install -dm755 $pkgdir/etc/gdb + touch $pkgdir/etc/gdb/gdbinit + + # resolve conflicts with binutils + rm ${pkgdir}/usr/include/{ansidecl,bfd,bfdlink,dis-asm,symcat}.h + rm ${pkgdir}/usr/share/info/{bfd,configure,standards}.info + rm -r ${pkgdir}/usr/lib +} ADDED PKGBUILDs/gdb/cpuid-pic.patch Index: PKGBUILDs/gdb/cpuid-pic.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdb/cpuid-pic.patch @@ -0,0 +1,41 @@ +--- ./gdb/common/linux-btrace.c.orig 2013-04-29 07:44:49.320273451 +0000 ++++ ./gdb/common/linux-btrace.c 2013-04-29 08:05:02.111631215 +0000 +@@ -342,10 +342,12 @@ + #if defined __i386__ || defined __x86_64__ + unsigned int cpuid, model, family; + +- __asm__ __volatile__ ("movl $1, %%eax;" ++ __asm__ __volatile__ ("movl %%ebx, %%edi;" ++ "movl $1, %%eax;" + "cpuid;" ++ "movl %%edi, %%ebx;" + : "=a" (cpuid) +- :: "%ebx", "%ecx", "%edx"); ++ :: "%ecx", "%edx", "%edi"); + + family = (cpuid >> 8) & 0xf; + model = (cpuid >> 4) & 0xf; +@@ -392,7 +394,8 @@ + #if defined __i386__ || defined __x86_64__ + char vendor[13]; + +- __asm__ __volatile__ ("xorl %%ebx, %%ebx;" ++ __asm__ __volatile__ ("movl %%ebx, %%edi;" ++ "xorl %%ebx, %%ebx;" + "xorl %%ecx, %%ecx;" + "xorl %%edx, %%edx;" + "movl $0, %%eax;" +@@ -400,11 +403,12 @@ + "movl %%ebx, %0;" + "movl %%edx, %1;" + "movl %%ecx, %2;" ++ "movl %%edi, %%ebx;" + : "=m" (vendor[0]), + "=m" (vendor[4]), + "=m" (vendor[8]) + : +- : "%eax", "%ebx", "%ecx", "%edx"); ++ : "%eax", "%ecx", "%edx", "%edi"); + vendor[12] = '\0'; + + if (strcmp (vendor, "GenuineIntel") == 0) ADDED PKGBUILDs/gdb/gdb-amd64-debugreg.patch Index: PKGBUILDs/gdb/gdb-amd64-debugreg.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdb/gdb-amd64-debugreg.patch @@ -0,0 +1,64 @@ +diff -u -r -N gdb-7.3.1-org//gdb/amd64-linux-nat.c gdb-7.3.1-patched//gdb/amd64-linux-nat.c +--- gdb-7.3.1-org//gdb/amd64-linux-nat.c 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.3.1-patched//gdb/amd64-linux-nat.c 2011-09-22 22:20:23.438841813 +0000 +@@ -32,7 +32,7 @@ + #include "elf/common.h" + #include + #include +-#include ++#include "debugreg.h" + #include + #include + #include +diff -u -r -N gdb-7.3.1-org//gdb/debugreg.h gdb-7.3.1-patched//gdb/debugreg.h +--- gdb-7.3.1-org//gdb/debugreg.h 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.3.1-patched//gdb/debugreg.h 2011-09-22 22:20:01.381841813 +0000 +@@ -0,0 +1,48 @@ ++#ifndef SYS_DEBUGREG_H ++#define SYS_DEBUGREG_H ++ ++#include ++ ++#define DR_FIRSTADDR 0 ++#define DR_LASTADDR 3 ++ ++#define DR_STATUS 6 ++#define DR_CONTROL 7 ++ ++#define DR_TRAP0 (0x1) ++#define DR_TRAP1 (0x2) ++#define DR_TRAP2 (0x4) ++#define DR_TRAP3 (0x8) ++ ++#define DR_STEP (0x4000) ++#define DR_SWITCH (0x8000) ++ ++#define DR_CONTROL_SHIFT 16 ++#define DR_CONTROL_SIZE 4 ++ ++#define DR_RW_EXECUTE (0x0) ++#define DR_RW_WRITE (0x1) ++#define DR_RW_READ (0x3) ++ ++#define DR_LEN_1 (0x0) ++#define DR_LEN_2 (0x4) ++#define DR_LEN_4 (0xC) ++#define DR_LEN_8 (0x8) ++ ++#define DR_LOCAL_ENABLE_SHIFT 0 ++#define DR_GLOBAL_ENABLE_SHIFT 1 ++#define DR_ENABLE_SIZE 2 ++ ++#define DR_LOCAL_ENABLE_MASK (0x55) ++#define DR_GLOBAL_ENABLE_MASK (0xAA) ++ ++ ++#if SIZE_MAX > 4294967295 ++# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL) ++#else ++# define DR_CONTROL_RESERVED (0x00FC00U) ++#endif ++#define DR_LOCAL_SLOWDOWN (0x100) ++#define DR_GLOBAL_SLOWDOWN (0x200) ++ ++#endif ADDED PKGBUILDs/gdb/gdb-linux_nat.patch Index: PKGBUILDs/gdb/gdb-linux_nat.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdb/gdb-linux_nat.patch @@ -0,0 +1,30 @@ +diff -u -r -N gdb-7.3.1-org//gdb/linux-nat.c gdb-7.3.1-patched//gdb/linux-nat.c +--- gdb-7.3.1-org//gdb/linux-nat.c 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.3.1-patched//gdb/linux-nat.c 2011-09-22 22:17:38.647841814 +0000 +@@ -18,6 +18,7 @@ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + ++#include "stopcode.h" + #include "defs.h" + #include "inferior.h" + #include "target.h" +@@ -68,6 +69,10 @@ + # endif + #endif /* HAVE_PERSONALITY */ + ++#ifndef __SIGRTMIN ++#define __SIGRTMIN SIGRTMIN ++#endif ++ + /* This comment documents high-level logic of this file. + + Waiting for events in sync mode +diff -u -r -N gdb-7.3.1-org//gdb/stopcode.h gdb-7.3.1-patched//gdb/stopcode.h +--- gdb-7.3.1-org//gdb/stopcode.h 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.3.1-patched//gdb/stopcode.h 2011-09-22 22:17:38.648841814 +0000 +@@ -0,0 +1,4 @@ ++#ifndef W_STOPCODE ++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) ++#endif ++ ADDED PKGBUILDs/gdb/gdb-linux_osdata.patch Index: PKGBUILDs/gdb/gdb-linux_osdata.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdb/gdb-linux_osdata.patch @@ -0,0 +1,10 @@ +--- gdb-7.6/gdb/common/linux-osdata.c.orig ++++ gdb-7.6/gdb/common/linux-osdata.c +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + #include + #include ADDED PKGBUILDs/gdb/gdb-linux_threaddb.patch Index: PKGBUILDs/gdb/gdb-linux_threaddb.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdb/gdb-linux_threaddb.patch @@ -0,0 +1,28 @@ +diff -u -r -N gdb-7.3.1-org//gdb/linux-thread-db.c gdb-7.3.1-patched//gdb/linux-thread-db.c +--- gdb-7.3.1-org//gdb/linux-thread-db.c 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.3.1-patched//gdb/linux-thread-db.c 2011-09-22 22:17:38.648841814 +0000 +@@ -47,6 +47,8 @@ + #include + #endif + ++#include "threadpathhack.h" ++ + /* GNU/Linux libthread_db support. + + libthread_db is a library, provided along with libpthread.so, which +diff -u -r -N gdb-7.3.1-org//gdb/threadpathhack.h gdb-7.3.1-patched//gdb/threadpathhack.h +--- gdb-7.3.1-org//gdb/threadpathhack.h 1970-01-01 00:00:00.000000000 +0000 ++++ gdb-7.3.1-patched//gdb/threadpathhack.h 2011-09-22 22:17:38.648841814 +0000 +@@ -0,0 +1,12 @@ ++#ifndef HACK_PATH_SO ++#define HACK_PATH_SO ++ ++#ifndef LIBTHREAD_DB_SO ++#define LIBTHREAD_DB_SO "bug.so" ++#endif ++#ifndef LIBTHREAD_DB_SEARCH_PATH ++#define LIBTHREAD_DB_SEARCH_PATH "/lib" ++#endif ++ ++#endif ++ ADDED PKGBUILDs/gdb/gdb.install Index: PKGBUILDs/gdb/gdb.install ================================================================== --- /dev/null +++ PKGBUILDs/gdb/gdb.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(annotate.info gdb.info{,-{1,2,3,4,5,6}} stabs.info) + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/gdbm/PKGBUILD Index: PKGBUILDs/gdbm/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gdbm/PKGBUILD @@ -0,0 +1,56 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Contributor: Stéphane Gaudreault +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=gdbm +pkgver=1.11 +pkgrel=1 +pkgdesc="GNU database library" +url="http://www.gnu.org/software/gdbm/gdbm.html" +license=('GPL3') +arch=('i586') +depends=('musl' 'sh') +source=(ftp://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz{,.sig} + gdbm-1.10-zeroheaders.patch) +options=('!makeflags') +install=gdbm.install +md5sums=('72c832680cf0999caedbe5b265c8c1bd' + 'SKIP' + 'ac255b10452005237836cd2d3a470733') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Prevent gdbm from storing uninitialized memory content + # to database files. This patch improves security, as the + # uninitialized memory might contain sensitive informations + # from other applications. + # https://bugzilla.redhat.com/show_bug.cgi?id=4457 + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927 + patch -Np1 -i ../gdbm-1.10-zeroheaders.patch +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --enable-libgdbm-compat + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + # create symlinks for compatibility + install -dm755 "${pkgdir}"/usr/include/gdbm + ln -sf ../gdbm.h "${pkgdir}"/usr/include/gdbm/gdbm.h + ln -sf ../ndbm.h "${pkgdir}"/usr/include/gdbm/ndbm.h + ln -sf ../dbm.h "${pkgdir}"/usr/include/gdbm/dbm.h +} ADDED PKGBUILDs/gdbm/gdbm-1.10-zeroheaders.patch Index: PKGBUILDs/gdbm/gdbm-1.10-zeroheaders.patch ================================================================== --- /dev/null +++ PKGBUILDs/gdbm/gdbm-1.10-zeroheaders.patch @@ -0,0 +1,33 @@ +diff -up gdbm-1.10/src/falloc.c.zeroheaders gdbm-1.10/src/falloc.c +--- gdbm-1.10/src/falloc.c.zeroheaders 2011-11-11 11:59:11.000000000 +0100 ++++ gdbm-1.10/src/falloc.c 2011-11-14 17:34:32.487604027 +0100 +@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf) + + + /* Split the header block. */ +- temp = (avail_block *) malloc (av_size); ++ temp = (avail_block *) calloc (1, av_size); + if (temp == NULL) _gdbm_fatal (dbf, _("malloc error")); + /* Set the size to be correct AFTER the pop_avail_block. */ + temp->size = dbf->header->avail.size; +diff -up gdbm-1.10/src/gdbmopen.c.zeroheaders gdbm-1.10/src/gdbmopen.c +--- gdbm-1.10/src/gdbmopen.c.zeroheaders 2011-11-11 19:39:42.000000000 +0100 ++++ gdbm-1.10/src/gdbmopen.c 2011-11-14 17:33:24.867608650 +0100 +@@ -264,7 +264,7 @@ gdbm_open (const char *file, int block_s + (dbf->header->block_size - sizeof (hash_bucket)) + / sizeof (bucket_element) + 1; + dbf->header->bucket_size = dbf->header->block_size; +- dbf->bucket = (hash_bucket *) malloc (dbf->header->bucket_size); ++ dbf->bucket = (hash_bucket *) calloc (1, dbf->header->bucket_size); + if (dbf->bucket == NULL) + { + gdbm_close (dbf); +@@ -456,7 +456,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s + for(index = 0; index < size; index++) + { + (dbf->bucket_cache[index]).ca_bucket +- = (hash_bucket *) malloc (dbf->header->bucket_size); ++ = (hash_bucket *) calloc (1, dbf->header->bucket_size); + if ((dbf->bucket_cache[index]).ca_bucket == NULL) + { + gdbm_errno = GDBM_MALLOC_ERROR; ADDED PKGBUILDs/gdbm/gdbm.install Index: PKGBUILDs/gdbm/gdbm.install ================================================================== --- /dev/null +++ PKGBUILDs/gdbm/gdbm.install @@ -0,0 +1,21 @@ +infodir=/usr/share/info +filelist=(gdbm.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + usr/bin/install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + usr/bin/install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} + ADDED PKGBUILDs/gettext/PKGBUILD Index: PKGBUILDs/gettext/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gettext/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: + +pkgname=gettext +pkgver=0.18.3.2 +pkgrel=1 +pkgdesc="GNU internationalization library" +arch=('i586') +url="http://www.gnu.org/software/gettext/" +license=('GPL') +groups=('base' 'base-devel') +depends=('gcc-libs' 'acl' 'sh' 'glib2' 'libunistring') +optdepends=('cvs: for autopoint tool') +options=(!docs) +install=gettext.install +source=(ftp://ftp.gnu.org/pub/gnu/gettext/${pkgname}-${pkgver}.tar.gz{,.sig}) +md5sums=('241aba309d07aa428252c74b40a818ef' + 'SKIP') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --enable-threads=posix --disable-static + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + rm ${pkgdir}/usr/lib/charset.alias +} ADDED PKGBUILDs/gettext/gettext.install Index: PKGBUILDs/gettext/gettext.install ================================================================== --- /dev/null +++ PKGBUILDs/gettext/gettext.install @@ -0,0 +1,22 @@ +infodir=/usr/share/info +filelist=(gettext.info.gz autosprintf.info.gz) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/glib2/PKGBUILD Index: PKGBUILDs/glib2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/glib2/PKGBUILD @@ -0,0 +1,70 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +pkgbase=glib2 +pkgname=(glib2 glib2-docs) +pkgver=2.40.0 +pkgrel=1 +pkgdesc="Common C routines used by GTK+ and other libs" +url="http://www.gtk.org/" +arch=('i586') +makedepends=('pkg-config' 'python2' 'libxslt' 'docbook-xml' 'pcre' 'libffi' 'elfutils') +source=(http://ftp.gnome.org/pub/GNOME/sources/glib/${pkgver:0:4}/glib-$pkgver.tar.xz + revert-warn-glib-compile-schemas.patch) +sha256sums=('0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5' + '049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97') + +prepare() { + cd glib-$pkgver + patch -Rp1 -i ../revert-warn-glib-compile-schemas.patch +} + +build() { + cd glib-$pkgver + PYTHON=/usr/bin/python2 ./configure --prefix=/usr --libdir=/usr/lib \ + --sysconfdir=/etc \ + --with-pcre=system \ + --disable-fam --disable-gtk-doc + make +} + +check() { + cd glib-$pkgver + #make -k check || : +} + +package_glib2() { + depends=('pcre' 'libffi') + optdepends=('python2: for gdbus-codegen and gtester-report' + 'elfutils: gresource inspection tool') + options=('!docs' '!emptydirs') + license=('LGPL') + + cd glib-$pkgver + make completiondir=/usr/share/bash-completion/completions DESTDIR="$pkgdir" install + + for _i in "$pkgdir/usr/share/bash-completion/completions/"*; do + chmod -x "$_i" + done + + # Our gdb does not ship the required python modules, so remove it + rm -rf "$pkgdir/usr/share/gdb/" + rm "${pkgdir}"/usr/lib/charset.alias +} + +package_glib2-docs() { + pkgdesc="Documentation for glib2" + conflicts=('gobject2-docs') + replaces=('gobject2-docs') + license=('custom') + options=('docs' '!emptydirs') + + cd glib-$pkgver/docs + make DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/licenses/glib2-docs" + install -m644 reference/COPYING "${pkgdir}/usr/share/licenses/glib2-docs/" + + rm -rf "${pkgdir}/usr/share/man" +} ADDED PKGBUILDs/glib2/revert-warn-glib-compile-schemas.patch Index: PKGBUILDs/glib2/revert-warn-glib-compile-schemas.patch ================================================================== --- /dev/null +++ PKGBUILDs/glib2/revert-warn-glib-compile-schemas.patch @@ -0,0 +1,33 @@ +From 6560b37450cd19c4a7c7b690e279fe97b7bfdcaa Mon Sep 17 00:00:00 2001 +From: Ryan Lortie +Date: Thu, 12 Apr 2012 23:55:34 +0000 +Subject: glib-compile-schemas: warn about bad dconf paths + +For quite some time the recommended usage of GSettings and dconf has +been to use paths like /org/gnome/example/. Use of /apps/ has spilled +over from GConf and is continuing to make its way into a number of +applications as they port. + +glib-compile-schemas will now warn about these types of paths being +used. This generates a lot of noise, but hopefully it will reduce the +number of ported applications making this mistake. +--- +diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c +index cf02389..27d0181 100644 +--- a/gio/glib-compile-schemas.c ++++ b/gio/glib-compile-schemas.c +@@ -1204,6 +1204,12 @@ parse_state_start_schema (ParseState *state, + return; + } + ++ if (path && (g_str_has_prefix (path, "/apps/") || ++ g_str_has_prefix (path, "/desktop/") || ++ g_str_has_prefix (path, "/system/"))) ++ g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with " ++ "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path); ++ + state->schema_state = schema_state_new (path, gettext_domain, + extends, extends_name, list_of); + +-- +cgit v0.9.0.2 ADDED PKGBUILDs/gmp/PKGBUILD Index: PKGBUILDs/gmp/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gmp/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributer: Jan de Groot + +pkgname=gmp +pkgver=6.0.0 +pkgrel=1 +pkgdesc="A free library for arbitrary precision arithmetic" +arch=('i586') +url="http://gmplib.org/" +depends=('gcc-libs' 'sh') +license=('LGPL3') +install=gmp.install +source=(ftp://ftp.gmplib.org/pub/gmp-${pkgver}/gmp-${pkgver}a.tar.xz{,.sig}) +md5sums=('1e6da4e434553d2811437aa42c7f7c76' + 'SKIP') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --build=${CHOST} \ + --prefix=/usr --enable-cxx + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/gmp/gmp.install Index: PKGBUILDs/gmp/gmp.install ================================================================== --- /dev/null +++ PKGBUILDs/gmp/gmp.install @@ -0,0 +1,20 @@ +info_dir=usr/share/info +info_files=(gmp.info gmp.info-1 gmp.info-2) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} ADDED PKGBUILDs/gnome-doc-utils/PKGBUILD Index: PKGBUILDs/gnome-doc-utils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gnome-doc-utils/PKGBUILD @@ -0,0 +1,28 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +pkgname=gnome-doc-utils +pkgver=0.20.10 +pkgrel=1 +pkgdesc="Documentation utilities for Gnome" +arch=('any') +license=('GPL' 'LGPL') +depends=('libxslt' 'python2' 'docbook-xml' 'rarian') +makedepends=('intltool') +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('cb0639ffa9550b6ddf3b62f3b1add92fb92ab4690d351f2353cffe668be8c4a6') + +build() { + cd "$pkgname-$pkgver" + PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ + --sysconfdir=/etc --mandir=/usr/share/man \ + --localstatedir=/var --disable-scrollkeeper + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} ADDED PKGBUILDs/gnupg1/PKGBUILD Index: PKGBUILDs/gnupg1/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gnupg1/PKGBUILD @@ -0,0 +1,39 @@ +# Taken from the AUR +# Modified by kraileth +############################################################################### +# (Arch Linux) Contributor: Andreas Radke +# (Arch Linux) Committer: Judd Vinet + +pkgname=gnupg1 +pkgname_=gnupg +pkgver=1.4.16 +pkgrel=2 +pkgdesc="GNU Privacy Guard - a PGP replacement tool" +arch=('i586') +license=('GPL3') +conflicts=('gnupg') +provides=('gnupg') +depends=('zlib' 'bzip2' 'libldap>=2.4.18' 'libusb-compat' 'curl>=7.16.2' 'readline>=6.0.00') +source=("http://mirrors.dotsrc.org/gcrypt/gnupg/$pkgname_-$pkgver.tar.bz2"{,.sig}) +install=gnupg.install +url="http://www.gnupg.org/" +sha1sums=('0bf5e475f3eb6f33d5474d017fe5bf66070e43f4' 'SKIP') + +build() { + cd "${srcdir}/${pkgname_}-${pkgver}" + ./configure --prefix=/usr \ + --libexecdir=/usr/lib \ + --enable-noexecstack --host=i586-pc-linux-musl + make + #ln -s ${pkgname}-${pkgver}/scripts .. # seems obsolete now +} + +check() { + cd "$srcdir/$pkgname_-$pkgver" + make -k check #All 27 tests passed +} + +package () { + cd "${srcdir}/${pkgname_}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/gnupg1/gnupg.install Index: PKGBUILDs/gnupg1/gnupg.install ================================================================== --- /dev/null +++ PKGBUILDs/gnupg1/gnupg.install @@ -0,0 +1,21 @@ +info_dir=/usr/share/info +info_files=(gnupg1.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + usr/bin/install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/gobject-introspection/PKGBUILD Index: PKGBUILDs/gobject-introspection/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gobject-introspection/PKGBUILD @@ -0,0 +1,30 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +pkgname=gobject-introspection +pkgver=1.40.0 +pkgrel=1 +pkgdesc="Introspection system for GObject-based libraries" +url="https://live.gnome.org/GObjectIntrospection" +arch=('i586') +license=('LGPL' 'GPL') +depends=('glib2' 'python2' 'python2-mako') +makedepends=('cairo') +source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz) +sha256sums=('96ea75e9679083e7fe39a105e810e2ead2d708abf189a5ba420bfccfffa24e98') + +build() { + cd "$pkgname-$pkgver" + PYTHON=/usr/bin/python2 ./configure --prefix=/usr --disable-static --enable-doctool + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + sed -i '1s|#!/usr/bin/env python$|&2|' \ + "$pkgdir"/usr/lib/gobject-introspection/giscanner/*.py +} ADDED PKGBUILDs/gperf/PKGBUILD Index: PKGBUILDs/gperf/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gperf/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +# Modifief by kraileth +############################################################################### +# (Arch Linux) Maintainer: +# (Arch Linux) Contributor: Jan de Groot + +pkgname=gperf +pkgver=3.0.4 +pkgrel=4 +pkgdesc="Perfect hash function generator" +arch=('i586') +url="http://www.gnu.org/software/gperf/" +license=('GPL3') +depends=('gcc-libs' 'texinfo') +install=gperf.install +source=("http://ftp.gnu.org/pub/gnu/gperf/${pkgname}-${pkgver}.tar.gz"{,.sig}) +sha1sums=('e32d4aff8f0c730c9a56554377b2c6d82d0951b8' + '85b8c44964a70a63d751afa5906796a0417e64ce') +options=('!makeflags') + +build() { + cd "${srcdir}"/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --docdir=/usr/share/gperf/doc/ + make +} + +check() { + cd "${srcdir}"/${pkgname}-${pkgver} + make check +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/gperf/gperf.install Index: PKGBUILDs/gperf/gperf.install ================================================================== --- /dev/null +++ PKGBUILDs/gperf/gperf.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +file=gperf.info.gz + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file $infodir/dir 2> /dev/null +} ADDED PKGBUILDs/gpgme/PKGBUILD Index: PKGBUILDs/gpgme/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gpgme/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tobias Powalowski +# (Arch Linux) Contributor: Roman Kyrylych +# (Arch Linux) Contributor: Sarah Hay + +pkgname=gpgme +pkgver=1.4.3 +pkgrel=1 +pkgdesc="A C wrapper library for GnuPG" +arch=('i586') +url="http://www.gnupg.org/related_software/gpgme/" +license=('LGPL') +depends=('libgpg-error' 'gnupg') +install=${pkgname}.install +options=('!emptydirs') +source=(ftp://ftp.gnupg.org/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig}) +md5sums=('334e524cffa8af4e2f43ae8afe585672' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr --disable-fd-passing --disable-static \ + --disable-gpgsm-test + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/gpgme/gpgme.install Index: PKGBUILDs/gpgme/gpgme.install ================================================================== --- /dev/null +++ PKGBUILDs/gpgme/gpgme.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gpgme.info gpgme.info-1 gpgme.info-2) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/grep/PKGBUILD Index: PKGBUILDs/grep/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/grep/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=grep +pkgver=2.18 +pkgrel=1 +pkgdesc="A string search utility" +arch=('i586') +license=('GPL3') +url="http://www.gnu.org/software/grep/grep.html" +groups=('base' 'base-devel') +depends=('musl' 'pcre' 'sh') +makedepends=('texinfo') +install=${pkgname}.install +source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}) +md5sums=('7439f8266f50844b56cc3e2721606541' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + rm -r "${pkgdir}"/usr/lib +} ADDED PKGBUILDs/grep/grep-2.11-exclude-dir-crash.patch Index: PKGBUILDs/grep/grep-2.11-exclude-dir-crash.patch ================================================================== --- /dev/null +++ PKGBUILDs/grep/grep-2.11-exclude-dir-crash.patch @@ -0,0 +1,44 @@ +From 12c957f786b12a4dd116f9c40a715d671d17fa16 Mon Sep 17 00:00:00 2001 +From: Allan McRae +Date: Mon, 12 Mar 2012 09:28:01 +0100 +Subject: [PATCH] grep: fix segfault with -r --exclude-dir and no file operand + +* src/main.c (grepdir): Don't invoke excluded_file_name on NULL. +* NEWS (Bug fixes): Mention it. +--- + NEWS | 5 +++++ + src/main.c | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/NEWS b/NEWS +index d0a63d5..d4d70f5 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*- + + * Noteworthy changes in release ?.? (????-??-??) [?] + ++** Bug fixes ++ ++ grep no longer segfaults with -r --exclude-dir and no file operand. ++ I.e., ":|grep -r --exclude-dir=D PAT" would segfault. ++ + + * Noteworthy changes in release 2.11 (2012-03-02) [stable] + +diff --git a/src/main.c b/src/main.c +index 2f6c761..f4f1235 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1361,7 +1361,7 @@ grepdir (char const *dir, struct stats const *stats) + struct stats const *ancestor; + char *name_space; + int status = 1; +- if (excluded_directory_patterns ++ if (dir && excluded_directory_patterns + && excluded_file_name (excluded_directory_patterns, dir)) + return 1; + +-- +1.7.9.3 + ADDED PKGBUILDs/grep/grep.install Index: PKGBUILDs/grep/grep.install ================================================================== --- /dev/null +++ PKGBUILDs/grep/grep.install @@ -0,0 +1,17 @@ +infodir=usr/share/info +file=grep.info + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null +} + ADDED PKGBUILDs/gtk-doc/PKGBUILD Index: PKGBUILDs/gtk-doc/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gtk-doc/PKGBUILD @@ -0,0 +1,30 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +pkgname=gtk-doc +pkgver=1.20 +pkgrel=1 +pkgdesc="Documentation tool for public library API" +arch=('any') +license=('GPL' 'FDL') +depends=('docbook-xsl' 'gnome-doc-utils' 'perl') # 'source-highlight') +makedepends=('pkg-config' 'itstool') # 'jade' 'dblatex') +optdepends=('jade: SGML support' + 'dblatex: PDF support') +url="http://www.gtk.org/gtk-doc/" +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz) +sha256sums=('3e6ecf134dbf92a74c24d79848fea3a48e59ab95408a38c6405905d95a293011') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + export PYTHON=/usr/bin/python2 + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/gzip/PKGBUILD Index: PKGBUILDs/gzip/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/gzip/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=gzip +pkgver=1.6 +pkgrel=1 +pkgdesc="GNU compression utility" +arch=('i586') +url="http://www.gnu.org/software/gzip/" +license=('GPL3') +groups=('base' 'base-devel') +depends=('musl' 'bash' 'less') +install=gzip.install +source=(ftp://ftp.gnu.org/pub/gnu/gzip/gzip-$pkgver.tar.xz{,.sig}) +md5sums=('da981f86677d58a106496e68de6f8995' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + export DEFS="NO_ASM" # Will segfault during compilation otherwise + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make prefix=${pkgdir}/usr install + rm -r "${pkgdir}"/usr/lib +} ADDED PKGBUILDs/gzip/gzip-1.5-yesno-declaration.patch Index: PKGBUILDs/gzip/gzip-1.5-yesno-declaration.patch ================================================================== --- /dev/null +++ PKGBUILDs/gzip/gzip-1.5-yesno-declaration.patch @@ -0,0 +1,36 @@ +From e40a9b65ae95ed6face7ce1336905f0ab0a4992b Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Tue, 05 Feb 2013 21:37:40 +0000 +Subject: gzip: fix bug where you say "n" and gzip acts as if you said "y" + +Problem reported for GCC 4.7 x86-64 -O2 by Allan McRae in +. +* NEWS: Document this. Use consistent format in earlier note. +* gzip.c: Include yesno.h. +* gzip.h (yesno): Remove decl; that's yesno.h's job. +--- +diff --git a/gzip.c b/gzip.c +index b9b4d64..66529e0 100644 +--- a/gzip.c ++++ b/gzip.c +@@ -74,6 +74,7 @@ static char const *const license_msg[] = { + #include "ignore-value.h" + #include "stat-time.h" + #include "version.h" ++#include "yesno.h" + + /* configuration */ + +diff --git a/gzip.h b/gzip.h +index bf253d0..648073e 100644 +--- a/gzip.h ++++ b/gzip.h +@@ -321,6 +321,3 @@ extern void fprint_off (FILE *, off_t, int); + + /* in inflate.c */ + extern int inflate (void); +- +- /* in yesno.c */ +-extern int yesno (void); +-- +cgit v0.9.0.2 ADDED PKGBUILDs/gzip/gzip.install Index: PKGBUILDs/gzip/gzip.install ================================================================== --- /dev/null +++ PKGBUILDs/gzip/gzip.install @@ -0,0 +1,15 @@ +infodir=usr/share/info + +post_install() { + [ -x usr/bin/install-info ] || return 0 + usr/bin/install-info $infodir/gzip.info.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + usr/bin/install-info --delete $infodir/gzip.info.gz $infodir/dir 2> /dev/null +} ADDED PKGBUILDs/help2man/PKGBUILD Index: PKGBUILDs/help2man/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/help2man/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Giovanni Scafora +# (Arch Linux) Contributor: Paul Mattal + +pkgname=help2man +pkgver=1.44.1 +pkgrel=1 +pkgdesc="Conversion tool to create man files" +arch=('i586') +url="http://www.gnu.org/software/help2man/" +license=('GPL') +depends=('perl-locale-gettext') +install=help2man.install +noextract=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz") +md5sums=('a5dc6530340b41f0e492d400670dd7ae') + +prepare() { + cd "${srcdir}" + + tar xvJf ../${pkgname}-${pkgver}.tar.xz + +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --libdir=/usr/lib + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/help2man/help2man.install Index: PKGBUILDs/help2man/help2man.install ================================================================== --- /dev/null +++ PKGBUILDs/help2man/help2man.install @@ -0,0 +1,18 @@ +info_dir=/usr/share/info +info_files=(help2man.info) + +post_install() { + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install +} + +pre_remove() { + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} ADDED PKGBUILDs/hwids/PKGBUILD Index: PKGBUILDs/hwids/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/hwids/PKGBUILD @@ -0,0 +1,22 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Maintainer: Tom Gundersen + +pkgname=hwids +pkgver=20130915.1 +pkgrel=1 +pkgdesc="hardware identification databases" +makedepends=('git') +url=https://github.com/gentoo/hwids +license=('GPL2') +arch=('any') +source=("git://github.com/gentoo/hwids.git#tag=${pkgname}-${pkgver}") + +package() { + cd hwids + + for ids in pci.ids usb.ids; do + install -Dm644 "$ids" "${pkgdir}/usr/share/hwdata/${ids}" + done +} +md5sums=('SKIP') ADDED PKGBUILDs/iana-etc/PKGBUILD Index: PKGBUILDs/iana-etc/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/iana-etc/PKGBUILD @@ -0,0 +1,46 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Contributor: Thomas Bächler +# (Arch Linux) Maintainer: Gaetan Bisson + +pkgname=iana-etc +pkgver=2.30 +pkgrel=4 +pkgdesc='/etc/protocols and /etc/services provided by IANA' +url='http://sethwklein.net/iana-etc.html' +arch=('any') +license=('custom') +backup=('etc/'{protocols,services}) +source=("http://sethwklein.net/${pkgname}-${pkgver}.tar.bz2" + 'protocols.gawk' + 'services.gawk' + 'newer.patch') +sha1sums=('218593bcb9264014c4e397d838b2c218eac9df06' + '48c1b94d9069f73e8a919301da564f414c4108f8' + 'c04278a7f11466efc64b80c193ef630857d9698a' + '2ff4a7aa0854a2b191b0b1a5c36eff072cd6885e') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + cp ../protocols.gawk ../services.gawk . + patch -p1 -i ../newer.patch +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + make get + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make test +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/iana-etc/LICENSE" + install -Dm644 port-numbers.iana "${pkgdir}/usr/share/iana-etc/port-numbers.iana" + install -Dm644 protocol-numbers.iana "${pkgdir}/usr/share/iana-etc/protocol-numbers.iana" +} ADDED PKGBUILDs/iana-etc/newer.patch Index: PKGBUILDs/iana-etc/newer.patch ================================================================== --- /dev/null +++ PKGBUILDs/iana-etc/newer.patch @@ -0,0 +1,29 @@ +diff -Naur old/Makefile new/Makefile +--- old/Makefile 2008-03-05 08:02:40.000000000 -1000 ++++ new/Makefile 2013-11-20 11:30:01.387562517 -1000 +@@ -42,11 +42,11 @@ + protocol-numbers.iana port-numbers.iana + + protocol-numbers.iana: +- $(AWK) -f get.gawk -v file=protocol-numbers >protocol-numbers.iana ++ $(AWK) -f get.gawk -v file=protocol-numbers/protocol-numbers.xml >protocol-numbers.iana + rm -f protocol-numbers + + port-numbers.iana: +- $(AWK) -f get.gawk -v file=port-numbers >port-numbers.iana ++ $(AWK) -f get.gawk -v file=service-names-port-numbers/service-names-port-numbers.xml >port-numbers.iana + rm -f port-numbers + + protocol-numbers: +diff -Naur old/get.gawk new/get.gawk +--- old/get.gawk 2008-03-05 08:04:18.000000000 -1000 ++++ new/get.gawk 2013-11-20 11:30:01.387562517 -1000 +@@ -26,7 +26,7 @@ + NR++ + + if (in_content) { print } +- if (/^$/) { in_content=1 } ++ if (/^\r?$/) { in_content=1 } + } + + printf "\n" >"/dev/stderr" ADDED PKGBUILDs/iana-etc/protocols.gawk Index: PKGBUILDs/iana-etc/protocols.gawk ================================================================== --- /dev/null +++ PKGBUILDs/iana-etc/protocols.gawk @@ -0,0 +1,13 @@ +#!/usr/bin/awk -f + +BEGIN { + print "# See the full IANA XML file at: /usr/share/iana-etc/protocol-numbers.iana\n" + FS="[<>]" +} + +{ + if (/ + +pkgname=ignite +pkgver=20140612 +pkgrel=1 +pkgdesc="A replacement for sysvinit based upon runit, Git HEAD version" +url="https://github.com/chneukirchen/ignite" +license=('custom') +arch=('i586') +depends=('bash' 'util-linux' 'procps-ng' 'runit') +makedepends=('gcc' 'make' 'coreutils' 'sed' 'git' 'musl') +groups=('base') +conflicts=('sysvinit') +install=ignite.install +source=('git+https://github.com/chneukirchen/ignite.git') +md5sums=('SKIP') + +# /etc/sv gets added below to this! +backup=('etc/runit/1' + 'etc/runit/2' + 'etc/runit/3' + 'etc/runit/ctrlaltdel') + +pkgver() { + cd "$srcdir/ignite" + git log -1 --format="%cd" --date=short | sed 's|-||g' +} + +build() { + cd "$srcdir/ignite/ignite/util" + sed -i -e 's!CC=musl-gcc!cc=gcc!' Makefile + make +} + +package() { + cd "$srcdir/ignite/ignite" + + backup+=(etc/sv/*/run) + backup+=(etc/sv/*/finish) + + cp -r etc $pkgdir/ + chmod -R u=rwX,g=rX,o=rX $pkgdir/etc + + install -D -m0755 util/pause $pkgdir/usr/bin/pause + install -D -m0644 util/pause.1 $pkgdir/usr/share/man/man1/pause.1 + + install -D -m0755 util/halt $pkgdir/usr/bin/halt + install -D -m0755 util/poweroff $pkgdir/usr/bin/poweroff + install -D -m0755 util/reboot $pkgdir/usr/bin/reboot + install -D -m0755 util/shutdown.sh $pkgdir/usr/bin/shutdown + install -D -m0755 util/runlevel.sh $pkgdir/usr/bin/runlevel + + install -D -m0644 ../COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING + install -D -m0644 ../README $pkgdir/usr/share/doc/$pkgname/README + install -D -m0644 rc.conf.example $pkgdir/usr/share/doc/$pkgname/rc.conf.example +} ADDED PKGBUILDs/ignite/ignite.install Index: PKGBUILDs/ignite/ignite.install ================================================================== --- /dev/null +++ PKGBUILDs/ignite/ignite.install @@ -0,0 +1,17 @@ +post_install() { + post_upgrade + echo "ignite is installed, restart with /sbin/init.sysv 6 if you booted with sysvinit." +} + +post_upgrade() { + if [ ! -L /sbin/init ];then + echo "Moving /sbin/init to /sbin/init.sysv" + mv /sbin/init /sbin/init.sysv + fi + echo "Linking /sbin/init to runit-init" + ln -sf runit-init /sbin/init +} + +post_remove() { + [ -L /sbin/init ] && [ -f /sbin/init.sysv ] && rm /sbin/init && mv /sbin/init.sysv /sbin/init +} ADDED PKGBUILDs/inetutils/PKGBUILD Index: PKGBUILDs/inetutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/PKGBUILD @@ -0,0 +1,72 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=inetutils +pkgver=1.9.2 +pkgrel=1 +pkgdesc="A collection of common network programs" +arch=('i586') +url="http://www.gnu.org/software/inetutils/" +license=('GPL3') +groups=('base') +depends=('pam') +makedepends=('help2man') +backup=('etc/xinetd.d/telnet' 'etc/xinetd.d/talk' + 'etc/xinetd.d/rlogin' 'etc/xinetd.d/rsh' + 'etc/pam.d/rlogin' 'etc/pam.d/rsh') +options=('!emptydirs') +install=inetutils.install +source=(http://ftp.gnu.org/gnu/inetutils/${pkgname}-${pkgver}.tar.gz{,.sig} + rlogin.pam rlogin.xinetd rsh.pam rsh.xinetd talk.xinetd telnet.xinetd) +sha1sums=('b5aa9902e3a82bfd6e75b9aa80b72111e5418447' + 'SKIP' + '387b371cbaa3611b95d30f806c0dd08b621a584a' + 'd9b8f8aab094ecb779d0f16f21b4683ab327516f' + '556b5372cbab8794e931e110b896fa8a61628bb1' + '26763ae31b8a5be256666a0ba55746941d75d6ee' + 'b15ab4faa9d97652e182c98c1e3a3b3cbbf6383c' + '2b2dd71eb3233e5090f4c2df8abe9b4924d323f3') + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr --libexec=/usr/bin \ + --localstatedir=/var --sysconfdir=/etc \ + --without-wrap --with-pam \ + --enable-ftp --enable-ftpd \ + --enable-telnet --enable-telnetd \ + --enable-talk --enable-talkd \ + --enable-rlogind \ + --enable-rshd \ + --enable-hostname --enable-dnsdomainname \ + --disable-rexec --disable-rexecd \ + --disable-tftp --disable-tftpd \ + --disable-ping --disable-ping6 \ + --disable-logger --disable-syslogd \ + --disable-inetd --disable-whois --disable-rcp --disable-rlogin \ + --disable-rsh \ + --disable-uucpd --disable-ifconfig --disable-traceroute --host=i586 + make +} + +check() { + cd ${pkgname}-${pkgver} + make check +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + install -D -m644 "${srcdir}/telnet.xinetd" "${pkgdir}/etc/xinetd.d/telnet" + install -D -m644 "${srcdir}/talk.xinetd" "${pkgdir}/etc/xinetd.d/talk" + install -D -m644 "${srcdir}/rlogin.xinetd" "${pkgdir}/etc/xinetd.d/rlogin" + install -D -m644 "${srcdir}/rsh.xinetd" "${pkgdir}/etc/xinetd.d/rsh" + + install -D -m644 "${srcdir}/rlogin.pam" "${pkgdir}/etc/pam.d/rlogin" + install -D -m644 "${srcdir}/rsh.pam" "${pkgdir}/etc/pam.d/rsh" + + rm -r ${pkgdir}/usr/lib + +} ADDED PKGBUILDs/inetutils/inetutils.install Index: PKGBUILDs/inetutils/inetutils.install ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/inetutils.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(inetutils.info.gz) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/inetutils/rlogin.pam Index: PKGBUILDs/inetutils/rlogin.pam ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/rlogin.pam @@ -0,0 +1,13 @@ +#%PAM-1.0 +# For root login to succeed here with pam_securetty, "rlogin" must be +# listed in /etc/securetty. +auth required pam_nologin.so +auth required pam_securetty.so +auth required pam_env.so +auth sufficient pam_rhosts.so +auth include system-auth +account include system-auth +password include system-auth +session optional pam_keyinit.so force revoke +session required pam_loginuid.so +session include system-auth ADDED PKGBUILDs/inetutils/rlogin.xinetd Index: PKGBUILDs/inetutils/rlogin.xinetd ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/rlogin.xinetd @@ -0,0 +1,10 @@ +service login +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/bin/rlogind + log_on_failure += USERID + disable = yes +} ADDED PKGBUILDs/inetutils/rsh.pam Index: PKGBUILDs/inetutils/rsh.pam ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/rsh.pam @@ -0,0 +1,11 @@ +#%PAM-1.0 +# For root login to succeed here with pam_securetty, "rsh" must be +# listed in /etc/securetty. +auth required pam_nologin.so +auth required pam_securetty.so +auth required pam_env.so +auth required pam_rhosts.so +account include system-auth +session optional pam_keyinit.so force revoke +session required pam_loginuid.so +session include system-auth ADDED PKGBUILDs/inetutils/rsh.xinetd Index: PKGBUILDs/inetutils/rsh.xinetd ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/rsh.xinetd @@ -0,0 +1,10 @@ +service shell +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/bin/rshd + log_on_failure += USERID + disable = yes +} ADDED PKGBUILDs/inetutils/talk.xinetd Index: PKGBUILDs/inetutils/talk.xinetd ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/talk.xinetd @@ -0,0 +1,10 @@ +service ntalk +{ + flags = REUSE + socket_type = dgram + wait = yes + user = root + server = /usr/bin/talkd + log_on_failure += USERID + disable = yes +} ADDED PKGBUILDs/inetutils/telnet.xinetd Index: PKGBUILDs/inetutils/telnet.xinetd ================================================================== --- /dev/null +++ PKGBUILDs/inetutils/telnet.xinetd @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/bin/telnetd + log_on_failure += USERID + disable = yes +} ADDED PKGBUILDs/intltool/PKGBUILD Index: PKGBUILDs/intltool/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/intltool/PKGBUILD @@ -0,0 +1,32 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=intltool +pkgver=0.50.2 +pkgrel=1 +pkgdesc="The internationalization tool collection" +arch=('any') +url="https://edge.launchpad.net/intltool" +license=('GPL') +depends=('perl-xml-parser') +source=(http://edge.launchpad.net/intltool/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz{,.asc}) +sha1sums=('7fddbd8e1bf94adbf1bc947cbf3b8ddc2453f8ad' + '85c71e9651df41fc330c5f171fdfe1bf11e44f65') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m644 doc/I18N-HOWTO "${pkgdir}/usr/share/doc/${pkgname}/I18N-HOWTO" +} ADDED PKGBUILDs/iproute2/PKGBUILD Index: PKGBUILDs/iproute2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/iproute2/PKGBUILD @@ -0,0 +1,71 @@ +# Taken from Arch Linux with patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Ronald van Haren +# (Arch Linux) Contributor: Judd Vinet + +pkgname=iproute2 +pkgver=3.14.0 +pkgrel=1 +pkgdesc="IP Routing Utilities" +arch=('i586') +license=('GPL2') +url="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" +depends=('musl' 'iptables') +groups=('base') +provides=('iproute') +conflicts=('iproute') +replaces=('iproute') +options=('staticlibs' '!makeflags') +backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_protos' \ + 'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables') +source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz + iproute2-fhs.patch + unwanted-link-help.patch + fix-includes.patch) +sha1sums=('0b7d9db9e17da77a5bd8c2c75f6ddd607449ba3e' + '35b8cf2dc94b73eccad427235c07596146cd6f6c' + '3b1335f4025f657f388fbf4e5a740871e3129c2a' + '6598a01f154d59b676510a391b59ff3361d66e2f') + +prepare() { + cd $srcdir/$pkgname-$pkgver + + # set correct fhs structure + patch -Np1 -i "$srcdir/iproute2-fhs.patch" + + # allow operations on links called "h", "he", "hel", "help" + patch -Np1 -i "$srcdir/unwanted-link-help.patch" + patch -p1 -i ../fix-includes.patch + + # do not treat warnings as errors + sed -i 's/-Werror//' Makefile + + sed -i '/^TARGETS=/s: arpd : :' misc/Makefile + sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h || return 1 + sed -i -e 's:=/share:=/usr/share:' -e 's:-Werror::' Makefile || return 1 + sed -i -e '24i #include ' tc/f_bpf.c + + +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure + make CCOPTS="-D_GNU_SOURCE $CFLAGS" +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + + # libnetlink isn't installed, install it FS#19385 + install -Dm644 include/libnetlink.h "$pkgdir/usr/include/libnetlink.h" + install -Dm644 lib/libnetlink.a "$pkgdir/usr/lib/libnetlink.a" + + # usrmove + cd "$pkgdir" + mv usr/sbin usr/bin +} ADDED PKGBUILDs/iproute2/fix-includes.patch Index: PKGBUILDs/iproute2/fix-includes.patch ================================================================== --- /dev/null +++ PKGBUILDs/iproute2/fix-includes.patch @@ -0,0 +1,40 @@ +--- iproute2-3.10.0.orig/bridge/fdb.c ++++ iproute2-3.10.0/bridge/fdb.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- iproute2-3.10.0.orig/misc/lnstat.h ++++ iproute2-3.10.0/misc/lnstat.h +@@ -2,6 +2,7 @@ + #define _LNSTAT_H + + #include ++#include + + #define LNSTAT_VERSION "0.02 041002" + +--- iproute2-3.10.0.orig/tc/tc_stab.c ++++ iproute2-3.10.0/tc/tc_stab.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- iproute2-3.10.0.orig/tc/tc_util.c ++++ iproute2-3.10.0/tc/tc_util.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + ADDED PKGBUILDs/iproute2/iproute2-fhs.patch Index: PKGBUILDs/iproute2/iproute2-fhs.patch ================================================================== --- /dev/null +++ PKGBUILDs/iproute2/iproute2-fhs.patch @@ -0,0 +1,75 @@ +diff -Naur iproute2-3.4.0/Makefile iproute2-3.4.0.new/Makefile +--- iproute2-3.4.0/Makefile 2012-05-21 23:12:19.000000000 +0200 ++++ iproute2-3.4.0.new/Makefile 2012-06-18 10:23:53.896760158 +0200 +@@ -1,7 +1,8 @@ + ROOTDIR=$(DESTDIR) + PREFIX=/usr + LIBDIR=$(PREFIX)/lib +-SBINDIR=/sbin ++SBINDIR=/usr/sbin ++SHAREDIR=/usr/share + CONFDIR=/etc/iproute2 + DATADIR=$(PREFIX)/share + DOCDIR=$(DATADIR)/doc/iproute2 +diff -Naur iproute2-3.4.0/netem/Makefile iproute2-3.4.0.new/netem/Makefile +--- iproute2-3.4.0/netem/Makefile 2012-05-21 23:12:19.000000000 +0200 ++++ iproute2-3.4.0.new/netem/Makefile 2012-06-18 10:23:53.896760158 +0200 +@@ -20,9 +20,9 @@ + $(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm + + install: all +- mkdir -p $(DESTDIR)$(LIBDIR)/tc ++ mkdir -p $(DESTDIR)$(SHAREDIR)/tc + for i in $(DISTDATA); \ +- do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \ ++ do install -m 644 $$i $(DESTDIR)$(SHAREDIR)/tc; \ + done + + clean: +diff -Naur iproute2-3.4.0/tc/Makefile iproute2-3.4.0.new/tc/Makefile +--- iproute2-3.4.0/tc/Makefile 2012-05-21 23:12:19.000000000 +0200 ++++ iproute2-3.4.0.new/tc/Makefile 2012-06-18 10:23:53.893426840 +0200 +@@ -105,18 +105,11 @@ + $(AR) rcs $@ $(TCLIB) + + install: all +- mkdir -p $(MODDESTDIR) ++ mkdir -p $(DESTDIR)$(LIBDIR)/tc + install -m 0755 tc $(DESTDIR)$(SBINDIR) + for i in $(TCSO); \ +- do install -m 755 $$i $(MODDESTDIR); \ ++ do install -m 755 $$i $(DESTDIR)$(LIBDIR)/tc; \ + done +- if [ ! -f $(MODDESTDIR)/m_ipt.so ]; then \ +- if [ -f $(MODDESTDIR)/m_xt.so ]; \ +- then ln -s m_xt.so $(MODDESTDIR)/m_ipt.so ; \ +- elif [ -f $(MODDESTDIR)/m_xt_old.so ]; \ +- then ln -s m_xt_old.so $(MODDESTDIR)/m_ipt.so ; \ +- fi; \ +- fi + + clean: + rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.yacc.h; \ +diff -Naur iproute2-3.4.0/tc/tc_util.c iproute2-3.4.0.new/tc/tc_util.c +--- iproute2-3.4.0/tc/tc_util.c 2012-05-21 23:12:19.000000000 +0200 ++++ iproute2-3.4.0.new/tc/tc_util.c 2012-06-18 10:23:53.893426840 +0200 +@@ -24,8 +24,8 @@ + #include "utils.h" + #include "tc_util.h" + +-#ifndef LIBDIR +-#define LIBDIR "/usr/lib" ++#ifndef SHAREDIR ++#define SHAREDIR "/usr/share" + #endif + + const char *get_tc_lib(void) +@@ -34,7 +34,7 @@ + + lib_dir = getenv("TC_LIB_DIR"); + if (!lib_dir) +- lib_dir = LIBDIR "/tc/"; ++ lib_dir = SHAREDIR "/tc/"; + + return lib_dir; + } ADDED PKGBUILDs/iproute2/unwanted-link-help.patch Index: PKGBUILDs/iproute2/unwanted-link-help.patch ================================================================== --- /dev/null +++ PKGBUILDs/iproute2/unwanted-link-help.patch @@ -0,0 +1,17 @@ +diff -ru iproute2-3.10.0.orig/ip/iplink.c iproute2-3.10.0/ip/iplink.c +--- iproute2-3.10.0.orig/ip/iplink.c 2013-08-08 13:53:33.000000000 -0700 ++++ iproute2-3.10.0/ip/iplink.c 2013-08-08 13:55:03.179865309 -0700 +@@ -467,11 +467,11 @@ + addattr_l(&req->n, sizeof(*req), IFLA_NUM_RX_QUEUES, + &numrxqueues, 4); + } else { ++ if (matches(*argv, "help") == 0) ++ usage(); + if (strcmp(*argv, "dev") == 0) { + NEXT_ARG(); + } +- if (matches(*argv, "help") == 0) +- usage(); + if (*dev) + duparg2("dev", *argv); + *dev = *argv; ADDED PKGBUILDs/iptables/PKGBUILD Index: PKGBUILDs/iptables/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/iptables/PKGBUILD @@ -0,0 +1,69 @@ +# Taken from Arch Linux with patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Ronald van Haren +# (Arch Linux) Contributor: Thomas Baechler + +pkgname=iptables +pkgver=1.4.21 +pkgrel=1 +pkgdesc='Linux kernel packet control tool' +arch=('i586') +license=('GPL2') +url='http://www.netfilter.org/projects/iptables/index.html' +depends=('musl' 'bash') +makedepends=('linux-api-headers') +backup=('etc/xtables/connlabel.conf') +source=(http://www.netfilter.org/projects/iptables/files/${pkgname}-${pkgver}.tar.bz2{,.sig} + empty.rules + simple_firewall.rules + empty-filter.rules + empty-mangle.rules + empty-nat.rules + empty-raw.rules + empty-security.rules + iptables-1.4.14-musl-fixes.patch) +sha1sums=('85d4160537546a23a7e42bc26dd7ee62a0ede4c8' + 'SKIP' + '83b3363878e3660ce23b2ad325b53cbd6c796ecf' + 'f085a71f467e4d7cb2cf094d9369b0bcc4bab6ec' + 'd9f9f06b46b4187648e860afa0552335aafe3ce4' + 'c45b738b5ec4cfb11611b984c21a83b91a2d58f3' + '1694d79b3e6e9d9d543f6a6e75fed06066c9a6c6' + '7db53bb882f62f6c677cc8559cff83d8bae2ef73' + 'ebbd1424a1564fd45f455a81c61ce348f0a14c2e' + '5fa1b2c5482d66c10bb1212ff16be2806898a588') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p1 -i ../iptables-1.4.14-musl-fixes.patch + # use system one + rm include/linux/types.h +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr \ + --libexecdir=/usr/lib/iptables --sysconfdir=/etc \ + --with-xtlibdir=/usr/lib/iptables \ + --enable-devel --enable-shared \ + --sbindir=/usr/bin + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install + + cd "${srcdir}" + install -D -m644 empty.rules "${pkgdir}"/etc/iptables/empty.rules + install -D -m644 simple_firewall.rules "${pkgdir}"/etc/iptables/simple_firewall.rules + + mkdir -p "${pkgdir}"/var/lib/{iptables,ip6tables} + install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/iptables + install -m644 empty-{filter,mangle,nat,raw,security}.rules "${pkgdir}"/var/lib/ip6tables + +} ADDED PKGBUILDs/iptables/empty-filter.rules Index: PKGBUILDs/iptables/empty-filter.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/empty-filter.rules @@ -0,0 +1,6 @@ +# Empty iptables filter table rule file +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT ADDED PKGBUILDs/iptables/empty-mangle.rules Index: PKGBUILDs/iptables/empty-mangle.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/empty-mangle.rules @@ -0,0 +1,8 @@ +# Empty iptables mangle table rules file +*mangle +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +COMMIT ADDED PKGBUILDs/iptables/empty-nat.rules Index: PKGBUILDs/iptables/empty-nat.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/empty-nat.rules @@ -0,0 +1,7 @@ +# Empty iptables nat table rules file +*nat +:PREROUTING ACCEPT [0:0] +:INPUT ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:POSTROUTING ACCEPT [0:0] +COMMIT ADDED PKGBUILDs/iptables/empty-raw.rules Index: PKGBUILDs/iptables/empty-raw.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/empty-raw.rules @@ -0,0 +1,5 @@ +# Empty iptables raw table rules file +*raw +:PREROUTING ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT ADDED PKGBUILDs/iptables/empty-security.rules Index: PKGBUILDs/iptables/empty-security.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/empty-security.rules @@ -0,0 +1,6 @@ +# Empty iptables security table rules file +*security +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT ADDED PKGBUILDs/iptables/empty.rules Index: PKGBUILDs/iptables/empty.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/empty.rules @@ -0,0 +1,6 @@ +# Empty iptables rule file +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +COMMIT ADDED PKGBUILDs/iptables/iptables-1.4.12-fixresore.patch Index: PKGBUILDs/iptables/iptables-1.4.12-fixresore.patch ================================================================== --- /dev/null +++ PKGBUILDs/iptables/iptables-1.4.12-fixresore.patch @@ -0,0 +1,28 @@ +diff -Nur iptables-1.4.12.2/iptables/ip6tables-restore.c iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c +--- iptables-1.4.12.2/iptables/ip6tables-restore.c 2012-01-03 02:19:09.000000000 +0900 ++++ iptables-1.4.12.2-fixrestore/iptables/ip6tables-restore.c 2012-03-01 10:56:10.000000000 +0900 +@@ -380,9 +380,9 @@ + quote_open = 0; + escaped = 0; + param_len = 0; ++ char param_buffer[1024]; + + for (curchar = parsestart; *curchar; curchar++) { +- char param_buffer[1024]; + + if (quote_open) { + if (escaped) { +diff -Nur iptables-1.4.12.2/iptables/iptables-restore.c iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c +--- iptables-1.4.12.2/iptables/iptables-restore.c 2012-01-03 02:19:09.000000000 +0900 ++++ iptables-1.4.12.2-fixrestore/iptables/iptables-restore.c 2012-03-01 10:56:00.000000000 +0900 +@@ -377,9 +377,9 @@ + quote_open = 0; + escaped = 0; + param_len = 0; ++ char param_buffer[1024]; + + for (curchar = parsestart; *curchar; curchar++) { +- char param_buffer[1024]; + + if (quote_open) { + if (escaped) { ADDED PKGBUILDs/iptables/iptables-1.4.14-musl-fixes.patch Index: PKGBUILDs/iptables/iptables-1.4.14-musl-fixes.patch ================================================================== --- /dev/null +++ PKGBUILDs/iptables/iptables-1.4.14-musl-fixes.patch @@ -0,0 +1,127 @@ +--- iptables-1.4.12.1.o/extensions/libip6t_ipv6header.c ++++ iptables-1.4.12.1/extensions/libip6t_ipv6header.c +@@ -10,6 +10,9 @@ + #include + #include + #include ++#ifndef IPPROTO_HOPOPTS ++# define IPPROTO_HOPOPTS 0 ++#endif + + enum { + O_HEADER = 0, +--- iptables-1.4.12.1.o/extensions/libxt_TCPOPTSTRIP.c ++++ iptables-1.4.12.1/extensions/libxt_TCPOPTSTRIP.c +@@ -12,6 +12,21 @@ + #ifndef TCPOPT_MD5SIG + # define TCPOPT_MD5SIG 19 + #endif ++#ifndef TCPOPT_MAXSEG ++# define TCPOPT_MAXSEG 2 ++#endif ++#ifndef TCPOPT_WINDOW ++# define TCPOPT_WINDOW 3 ++#endif ++#ifndef TCPOPT_SACK_PERMITTED ++# define TCPOPT_SACK_PERMITTED 4 ++#endif ++#ifndef TCPOPT_SACK ++# define TCPOPT_SACK 5 ++#endif ++#ifndef TCPOPT_TIMESTAMP ++# define TCPOPT_TIMESTAMP 8 ++#endif + + enum { + O_STRIP_OPTION = 0, +--- iptables-1.4.12.1.o/include/libiptc/ipt_kernel_headers.h ++++ iptables-1.4.12.1/include/libiptc/ipt_kernel_headers.h +@@ -5,7 +5,6 @@ + + #include + +-#if defined(__GLIBC__) && __GLIBC__ == 2 + #include + #include + #include +@@ -13,15 +12,4 @@ + #include + #include + #include +-#else /* libc5 */ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#endif + #endif +--- iptables-1.4.12.1.o/include/linux/netfilter_ipv4/ip_tables.h ++++ iptables-1.4.12.1/include/linux/netfilter_ipv4/ip_tables.h +@@ -16,6 +16,7 @@ + #define _IPTABLES_H + + #include ++#include + + #include + +--- iptables-1.4.12.1.o/iptables/ip6tables-restore.c ++++ iptables-1.4.12.1/iptables/ip6tables-restore.c +@@ -9,7 +9,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include +--- iptables-1.4.12.1.o/iptables/ip6tables-save.c ++++ iptables-1.4.12.1/iptables/ip6tables-save.c +@@ -6,7 +6,7 @@ + * This code is distributed under the terms of GNU GPL v2 + */ + #include +-#include ++#include + #include + #include + #include +--- iptables-1.4.12.1.o/iptables/iptables-restore.c ++++ iptables-1.4.12.1/iptables/iptables-restore.c +@@ -6,7 +6,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include +--- iptables-1.4.12.1.o/iptables/iptables-save.c ++++ iptables-1.4.12.1/iptables/iptables-save.c +@@ -6,7 +6,7 @@ + * + */ + #include +-#include ++#include + #include + #include + #include +--- iptables-1.4.12.1.o/iptables/iptables-xml.c ++++ iptables-1.4.12.1/iptables/iptables-xml.c +@@ -7,7 +7,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include ADDED PKGBUILDs/iptables/simple_firewall.rules Index: PKGBUILDs/iptables/simple_firewall.rules ================================================================== --- /dev/null +++ PKGBUILDs/iptables/simple_firewall.rules @@ -0,0 +1,11 @@ +*filter +:INPUT DROP [0:0] +:FORWARD DROP [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -p icmp -j ACCEPT +-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -p tcp -j REJECT --reject-with tcp-reset +-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable +-A INPUT -j REJECT --reject-with icmp-proto-unreachable +COMMIT ADDED PKGBUILDs/isl/PKGBUILD Index: PKGBUILDs/isl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/isl/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae + +pkgname=isl +pkgver=0.12.2 +pkgrel=1 +pkgdesc="Library for manipulating sets and relations of integer points bounded by linear constraints" +arch=('i586') +url="http://freecode.com/projects/isl" +depends=('gmp') +license=('MIT') +source=(http://isl.gforge.inria.fr/$pkgname-$pkgver.tar.bz2) +md5sums=('e039bfcfb6c2ab039b8ee69bf883e824') + + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + make check +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + + install -dm755 $pkgdir/usr/share/gdb/auto-load/usr/lib/ + mv $pkgdir/{,/usr/share/gdb/auto-load/}usr/lib/libisl.so.10.2.2-gdb.py + + install -Dm644 LICENSE $pkgdir/usr/share/licenses/isl/LICENSE +} ADDED PKGBUILDs/itstool/PKGBUILD Index: PKGBUILDs/itstool/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/itstool/PKGBUILD @@ -0,0 +1,38 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan Alexander Steffens (heftig) +# (Arch Linux) Contributor: Michael Pusterhofer + +pkgname=itstool +pkgver=2.0.2 +pkgrel=1 +pkgdesc="XML to PO and back again" +arch=('any') +url="http://itstool.org/" +license=(GPL3) +depends=('python2' 'libxml2') +source=(http://files.itstool.org/itstool/$pkgname-$pkgver.tar.bz2) +sha256sums=('bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a') + +prepare() { + cd $pkgname-$pkgver + sed -i 's/| python/&2/' configure.ac + autoreconf -fi +} + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr PYTHON=/usr/bin/python2 + make +} + +check() { + cd $pkgname-$pkgver + make -k check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install +} ADDED PKGBUILDs/keyutils/PKGBUILD Index: PKGBUILDs/keyutils/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/keyutils/PKGBUILD @@ -0,0 +1,38 @@ +# Taken from Arch Linux with path from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Stéphane Gaudreault +# (Arch Linux) Contributor: Tobias Powalowski + +pkgname=keyutils +pkgver=1.5.9 +pkgrel=1 +pkgdesc="Linux Key Management Utilities" +arch=('i586') +url="http://www.kernel.org" +license=('GPL2' 'LGPL2.1') +depends=('musl' 'sh') +backup=('etc/request-key.conf') +source=(http://people.redhat.com/~dhowells/${pkgname}/${pkgname}-${pkgver}.tar.bz2 + request-key.conf.patch + fix-includes.patch) +md5sums=('7f8ac985c45086b5fbcd12cecd23cf07' + '89a819a7e4e90936b210c9d5020d296d' + '4002a2e97e6c165f4ee1f1d54c299b7a') + +prepare() { + cd ${pkgname}-${pkgver} + # fix paths of binaries in /etc/request-key.conf + patch -Np0 -i ../request-key.conf.patch + patch -p1 -i ../fix-includes.patch +} + +build() { + cd ${pkgname}-${pkgver} + make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" SBINDIR='/usr/bin' BINDIR='/usr/bin' NO_ARLIB="1" LIBDIR='/lib' USRLIBDIR='/usr/lib' NO_GLIBC_KEYERR="1" +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" SBINDIR='/usr/bin' BINDIR='/usr/bin' LIBDIR='/usr/lib' USRLIBDIR='/usr/lib' install +} ADDED PKGBUILDs/keyutils/fix-includes.patch Index: PKGBUILDs/keyutils/fix-includes.patch ================================================================== --- /dev/null +++ PKGBUILDs/keyutils/fix-includes.patch @@ -0,0 +1,10 @@ +--- keyutils-1.5.8.orig/key.dns_resolver.c ++++ keyutils-1.5.8/key.dns_resolver.c +@@ -56,6 +56,7 @@ + #include + #include + #include ++#include + + static const char *DNS_PARSE_VERSION = "1.0"; + static const char prog[] = "key.dns_resolver"; ADDED PKGBUILDs/keyutils/request-key.conf.patch Index: PKGBUILDs/keyutils/request-key.conf.patch ================================================================== --- /dev/null +++ PKGBUILDs/keyutils/request-key.conf.patch @@ -0,0 +1,21 @@ +--- request-key.conf.old 2013-05-28 15:34:10.966001242 +0200 ++++ request-key.conf 2013-05-28 15:35:34.857969598 +0200 +@@ -31,11 +31,11 @@ + + #OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... + #====== ======= =============== =============== =============================== +-create dns_resolver * * /sbin/key.dns_resolver %k +-create user debug:* negate /bin/keyctl negate %k 30 %S +-create user debug:* rejected /bin/keyctl reject %k 30 %c %S +-create user debug:* expired /bin/keyctl reject %k 30 %c %S +-create user debug:* revoked /bin/keyctl reject %k 30 %c %S +-create user debug:loop:* * |/bin/cat ++create dns_resolver * * /usr/bin/key.dns_resolver %k ++create user debug:* negate /usr/bin/keyctl negate %k 30 %S ++create user debug:* rejected /usr/bin/keyctl reject %k 30 %c %S ++create user debug:* expired /usr/bin/keyctl reject %k 30 %c %S ++create user debug:* revoked /usr/bin/keyctl reject %k 30 %c %S ++create user debug:loop:* * |/usr/bin/cat + create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S +-negate * * * /bin/keyctl negate %k 30 %S ++negate * * * /usr/bin/keyctl negate %k 30 %S ADDED PKGBUILDs/kmod/PKGBUILD Index: PKGBUILDs/kmod/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/kmod/PKGBUILD @@ -0,0 +1,59 @@ +# Taken from Arch Linux with patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Dave Reisner + +pkgname=kmod +pkgver=17 +pkgrel=1 +pkgdesc="Linux kernel module handling" +arch=('i586') +url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary' +license=('GPL2') +depends=('musl' 'zlib') +makedepends=('gtk-doc') +options=('strip' 'debug') +provides=('module-init-tools=3.16' 'libkmod.so') +conflicts=('module-init-tools') +replaces=('module-init-tools') +source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz" + "depmod-search.conf" + "strndupa.patch") +md5sums=('bc36d28b12dcb2b664a35411560c5610' + 'dd62cbf62bd8f212f51ef8c43bec9a77' + '350ef5291e72a563f3452309ba8f56d5') + +prepare() { + cd "$pkgname-$pkgver" + patch -p1 -i ../strndupa.patch + +} + +build() { + cd "$pkgname-$pkgver" + + ./configure \ + --sysconfdir=/etc \ + --enable-gtk-doc \ + --with-zlib + + make +} + +#check() { +# make -C "$pkgname-$pkgver" check +#} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + + # extra directories + install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d + + for tool in {ins,ls,rm,dep}mod mod{probe,info}; do + ln -s kmod "$pkgdir/usr/bin/$tool" + done + + # install depmod.d file for search/ dir + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" +} ADDED PKGBUILDs/kmod/depmod-search.conf Index: PKGBUILDs/kmod/depmod-search.conf ================================================================== --- /dev/null +++ PKGBUILDs/kmod/depmod-search.conf @@ -0,0 +1,5 @@ +# +# /usr/lib/depmod.d/search.conf +# + +search updates extramodules built-in ADDED PKGBUILDs/kmod/strndupa.patch Index: PKGBUILDs/kmod/strndupa.patch ================================================================== --- /dev/null +++ PKGBUILDs/kmod/strndupa.patch @@ -0,0 +1,15 @@ +diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c +index df12433..142e767 100644 +--- a/libkmod/libkmod-util.c ++++ b/libkmod/libkmod-util.c +@@ -334,7 +334,9 @@ int mkdir_p(const char *path, int len, mode_t mode) + { + char *start, *end; + +- start = strndupa(path, len); ++ start = alloca(len+1); ++ strncpy(start, path, len); ++ start[len] = '\0'; + end = start + len; + + /* ADDED PKGBUILDs/ldns/PKGBUILD Index: PKGBUILDs/ldns/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/ldns/PKGBUILD @@ -0,0 +1,41 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Gaetan Bisson +# (Arch Linux) Contributor: mathieui +# (Arch Linux) Contributor: jiribb + +pkgname=ldns +pkgver=1.6.17 +pkgrel=1 +pkgdesc='Fast DNS library supporting recent RFCs' +url='http://www.nlnetlabs.nl/projects/ldns/' +license=('custom:BSD') +arch=('i586') +depends=('openssl' 'dnssec-anchors') +optdepends=('libpcap: ldns-dpa tool') +makedepends=('libpcap') +source=("http://www.nlnetlabs.nl/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz") +sha1sums=('4218897b3c002aadfc7280b3f40cda829e05c9a4') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-rpath \ + --with-drill \ + --with-examples \ + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install + + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} ADDED PKGBUILDs/less/PKGBUILD Index: PKGBUILDs/less/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/less/PKGBUILD @@ -0,0 +1,29 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=less +pkgver=458 +pkgrel=1 +pkgdesc="A terminal based program for viewing text files" +license=('GPL3') +arch=('i586') +url="http://www.greenwoodsoftware.com/less" +groups=('base') +depends=('ncurses' 'pcre') +source=(http://www.greenwoodsoftware.com/$pkgname/$pkgname-$pkgver.tar.gz{,.sig}) +md5sums=('935b38aa2e73c888c210dedf8fd94f49' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr --sysconfdir=/etc --with-regex=pcre + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/libaio/PKGBUILD Index: PKGBUILDs/libaio/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libaio/PKGBUILD @@ -0,0 +1,26 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Bartłomiej Piotrowski +# (Arch Linux) Contributor: Thomas S Hatch + +pkgname=libaio +pkgver=0.3.109 +pkgrel=7 +pkgdesc="The Linux-native asynchronous I/O facility (aio) library" +arch=('i586') +url="http://lse.sourceforge.net/io/aio.html" +license=('LGPL') +source=(http://ftp.de.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver}.orig.tar.gz) +md5sums=('435a5b16ca6198eaf01155263d855756') + +build() { + cd "$srcdir/$pkgname-$pkgver" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make prefix="$pkgdir/usr" install +} + ADDED PKGBUILDs/libarchive/0001-Limit-write-requests-to-at-most-INT_MAX.patch Index: PKGBUILDs/libarchive/0001-Limit-write-requests-to-at-most-INT_MAX.patch ================================================================== --- /dev/null +++ PKGBUILDs/libarchive/0001-Limit-write-requests-to-at-most-INT_MAX.patch @@ -0,0 +1,32 @@ +From 22531545514043e04633e1c015c7540b9de9dbe4 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Fri, 22 Mar 2013 23:48:41 -0700 +Subject: [PATCH] Limit write requests to at most INT_MAX. This prevents a + certain common programming error (passing -1 to write) from leading to other + problems deeper in the library. + +--- + libarchive/archive_write.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c +index eede5e0..be85621 100644 +--- a/libarchive/archive_write.c ++++ b/libarchive/archive_write.c +@@ -673,8 +673,13 @@ static ssize_t + _archive_write_data(struct archive *_a, const void *buff, size_t s) + { + struct archive_write *a = (struct archive_write *)_a; ++ const size_t max_write = INT_MAX; ++ + archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, + ARCHIVE_STATE_DATA, "archive_write_data"); ++ /* In particular, this catches attempts to pass negative values. */ ++ if (s > max_write) ++ s = max_write; + archive_clear_error(&a->archive); + return ((a->format_write_data)(a, buff, s)); + } +-- +1.9.0 + ADDED PKGBUILDs/libarchive/0001-mtree-fix-line-filename-length-calculation.patch Index: PKGBUILDs/libarchive/0001-mtree-fix-line-filename-length-calculation.patch ================================================================== --- /dev/null +++ PKGBUILDs/libarchive/0001-mtree-fix-line-filename-length-calculation.patch @@ -0,0 +1,29 @@ +From e65bf287f0133426b26611fe3e80b51267987106 Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Thu, 21 Feb 2013 19:01:06 -0500 +Subject: [PATCH] mtree: fix line filename length calculation. Fixes #301. + Signed-off-by: Andres Mejia + +--- + libarchive/archive_write_set_format_mtree.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libarchive/archive_write_set_format_mtree.c b/libarchive/archive_write_set_format_mtree.c +index 9c0613c..f37f723 100644 +--- a/libarchive/archive_write_set_format_mtree.c ++++ b/libarchive/archive_write_set_format_mtree.c +@@ -1855,9 +1855,9 @@ mtree_entry_setup_filenames(struct archive_write *a, struct mtree_entry *file, + return (ret); + } + +- /* Make a basename from dirname and slash */ ++ /* Make a basename from file->parentdir.s and slash */ + *slash = '\0'; +- file->parentdir.length = slash - dirname; ++ file->parentdir.length = slash - file->parentdir.s; + archive_strcpy(&(file->basename), slash + 1); + return (ret); + } +-- +1.8.1.4 + ADDED PKGBUILDs/libarchive/PKGBUILD Index: PKGBUILDs/libarchive/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libarchive/PKGBUILD @@ -0,0 +1,61 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Dan McGee + +pkgname=libarchive +pkgver=3.1.2 +pkgrel=6 +pkgdesc="library that can create and read several streaming archive formats" +arch=('i586') +url="http://libarchive.org/" +license=('BSD') +depends=('acl' 'attr' 'bzip2' 'expat' 'lzo2' 'openssl' 'xz' 'zlib') +options=('strip' 'debug' 'libtool') +provides=('libarchive.so') +source=("http://libarchive.org/downloads/$pkgname-$pkgver.tar.gz" + '0001-mtree-fix-line-filename-length-calculation.patch' + '0001-Limit-write-requests-to-at-most-INT_MAX.patch' + 'libarchive-3.1.2-acl.patch' + 'libarchive-3.1.2-sparce-mtree.patch') +md5sums=('efad5a503f66329bb9d2f4308b5de98a' + 'fda89c145bbcd793a96b06b463ef6a72' + '9bf80940bd3ce861137a0a8dcacf5705' + 'a5c995661c62429ceff2c23ea322393b' + 'cb344a879b3c4550fe3faf86c3826f23') + +prepare() { + cd "$pkgname-$pkgver" + + # https://code.google.com/p/libarchive/issues/detail?id=301 + # upstream commit e65bf287f0133426b26611fe3e80b51267987106 + patch -Np1 -i "$srcdir/0001-mtree-fix-line-filename-length-calculation.patch" + + # https://code.google.com/p/libarchive/issues/detail?id=329 + patch -Np1 -i "$srcdir/libarchive-3.1.2-acl.patch" + + # CVE-2013-0211 + patch -Np1 -i "$srcdir/0001-Limit-write-requests-to-at-most-INT_MAX.patch" + + # upstream commit 977bf2a4 - improved mtree support + patch -p1 -i $srcdir/libarchive-3.1.2-sparce-mtree.patch +} + +build() { + cd "$pkgname-$pkgver" + ./configure --prefix=/usr --without-xml2 + make +} + +check() { + cd "$pkgname-$pkgver" + + make check +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + install -D -m644 COPYING "$pkgdir"/usr/share/licenses/libarchive/COPYING +} ADDED PKGBUILDs/libarchive/libarchive-3.1.2-acl.patch Index: PKGBUILDs/libarchive/libarchive-3.1.2-acl.patch ================================================================== --- /dev/null +++ PKGBUILDs/libarchive/libarchive-3.1.2-acl.patch @@ -0,0 +1,219 @@ +diff -ruN libarchive-3.1.2/libarchive/archive_read_disk_entry_from_file.c libarchive-3.1.2.fixed/libarchive/archive_read_disk_entry_from_file.c +--- libarchive-3.1.2/libarchive/archive_read_disk_entry_from_file.c 2013-02-08 01:52:07.000000000 +0100 ++++ libarchive-3.1.2.fixed/libarchive/archive_read_disk_entry_from_file.c 2013-08-08 10:47:41.000000000 +0200 +@@ -399,7 +399,7 @@ + #endif + + +-#if defined(HAVE_POSIX_ACL) && defined(ACL_TYPE_NFS4) ++#ifdef HAVE_POSIX_ACL + static int translate_acl(struct archive_read_disk *a, + struct archive_entry *entry, acl_t acl, int archive_entry_acl_type); + +@@ -419,6 +419,7 @@ + + archive_entry_acl_clear(entry); + ++#ifdef ACL_TYPE_NFS4 + /* Try NFS4 ACL first. */ + if (*fd >= 0) + acl = acl_get_fd(*fd); +@@ -447,6 +448,7 @@ + acl_free(acl); + return (ARCHIVE_OK); + } ++#endif + + /* Retrieve access ACL from file. */ + if (*fd >= 0) +@@ -492,6 +494,7 @@ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, ++#ifdef ACL_TYPE_NFS4 + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, +@@ -508,8 +511,10 @@ + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} ++#endif + }; + ++#ifdef ACL_TYPE_NFS4 + static struct { + int archive_inherit; + int platform_inherit; +@@ -519,21 +524,25 @@ + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} + }; +- ++#endif + static int + translate_acl(struct archive_read_disk *a, + struct archive_entry *entry, acl_t acl, int default_entry_acl_type) + { + acl_tag_t acl_tag; ++#ifdef ACL_TYPE_NFS4 + acl_entry_type_t acl_type; + acl_flagset_t acl_flagset; ++ int brand, r; ++#endif + acl_entry_t acl_entry; + acl_permset_t acl_permset; +- int brand, i, r, entry_acl_type; ++ int i, entry_acl_type; + int s, ae_id, ae_tag, ae_perm; + const char *ae_name; + + ++#ifdef ACL_TYPE_NFS4 + // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 + // Make sure the "brand" on this ACL is consistent + // with the default_entry_acl_type bits provided. +@@ -560,6 +569,7 @@ + return ARCHIVE_FAILED; + break; + } ++#endif + + + s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); +@@ -592,9 +602,11 @@ + case ACL_OTHER: + ae_tag = ARCHIVE_ENTRY_ACL_OTHER; + break; ++#ifdef ACL_TYPE_NFS4 + case ACL_EVERYONE: + ae_tag = ARCHIVE_ENTRY_ACL_EVERYONE; + break; ++#endif + default: + /* Skip types that libarchive can't support. */ + s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); +@@ -605,6 +617,7 @@ + // XXX acl_get_entry_type_np on FreeBSD returns EINVAL for + // non-NFSv4 ACLs + entry_acl_type = default_entry_acl_type; ++#ifdef ACL_TYPE_NFS4 + r = acl_get_entry_type_np(acl_entry, &acl_type); + if (r == 0) { + switch (acl_type) { +@@ -634,9 +647,10 @@ + ae_perm |= acl_inherit_map[i].archive_inherit; + + } ++#endif + + acl_get_permset(acl_entry, &acl_permset); +- for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { ++ for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { + /* + * acl_get_perm() is spelled differently on different + * platforms; see above. +diff -ruN libarchive-3.1.2/libarchive/archive_write_disk_acl.c libarchive-3.1.2.fixed/libarchive/archive_write_disk_acl.c +--- libarchive-3.1.2/libarchive/archive_write_disk_acl.c 2013-01-14 02:43:45.000000000 +0100 ++++ libarchive-3.1.2.fixed/libarchive/archive_write_disk_acl.c 2013-08-08 10:31:35.000000000 +0200 +@@ -43,7 +43,7 @@ + #include "archive_acl_private.h" + #include "archive_write_disk_private.h" + +-#if !defined(HAVE_POSIX_ACL) || !defined(ACL_TYPE_NFS4) ++#ifndef HAVE_POSIX_ACL + /* Default empty function body to satisfy mainline code. */ + int + archive_write_disk_set_acls(struct archive *a, int fd, const char *name, +@@ -79,10 +79,12 @@ + ret = set_acl(a, fd, name, abstract_acl, ACL_TYPE_DEFAULT, + ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default"); + return (ret); ++#ifdef ACL_TYPE_NFS4 + } else if (archive_acl_count(abstract_acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4) > 0) { + ret = set_acl(a, fd, name, abstract_acl, ACL_TYPE_NFS4, + ARCHIVE_ENTRY_ACL_TYPE_NFS4, "nfs4"); + return (ret); ++#endif + } else + return ARCHIVE_OK; + } +@@ -94,6 +96,7 @@ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, ++#ifdef ACL_TYPE_NFS4 + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, +@@ -110,8 +113,10 @@ + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} ++#endif + }; + ++#ifdef ACL_TYPE_NFS4 + static struct { + int archive_inherit; + int platform_inherit; +@@ -121,6 +126,7 @@ + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} + }; ++#endif + + static int + set_acl(struct archive *a, int fd, const char *name, +@@ -130,7 +136,9 @@ + acl_t acl; + acl_entry_t acl_entry; + acl_permset_t acl_permset; ++#ifdef ACL_TYPE_NFS4 + acl_flagset_t acl_flagset; ++#endif + int ret; + int ae_type, ae_permset, ae_tag, ae_id; + uid_t ae_uid; +@@ -171,14 +179,17 @@ + case ARCHIVE_ENTRY_ACL_OTHER: + acl_set_tag_type(acl_entry, ACL_OTHER); + break; ++#ifdef ACL_TYPE_NFS4 + case ARCHIVE_ENTRY_ACL_EVERYONE: + acl_set_tag_type(acl_entry, ACL_EVERYONE); + break; ++#endif + default: + /* XXX */ + break; + } + ++#ifdef ACL_TYPE_NFS4 + switch (ae_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); +@@ -200,6 +211,7 @@ + // XXX error handling here. + break; + } ++#endif + + acl_get_permset(acl_entry, &acl_permset); + acl_clear_perms(acl_permset); +@@ -210,6 +222,7 @@ + acl_perm_map[i].platform_perm); + } + ++#ifdef ACL_TYPE_NFS4 + acl_get_flagset_np(acl_entry, &acl_flagset); + acl_clear_flags_np(acl_flagset); + for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { +@@ -217,6 +230,7 @@ + acl_add_flag_np(acl_flagset, + acl_inherit_map[i].platform_inherit); + } ++#endif + } + + /* Try restoring the ACL through 'fd' if we can. */ ADDED PKGBUILDs/libarchive/libarchive-3.1.2-sparce-mtree.patch Index: PKGBUILDs/libarchive/libarchive-3.1.2-sparce-mtree.patch ================================================================== --- /dev/null +++ PKGBUILDs/libarchive/libarchive-3.1.2-sparce-mtree.patch @@ -0,0 +1,478 @@ +From 977bf2a49484239f7a7b6ce08bfa9da413a27ead Mon Sep 17 00:00:00 2001 +From: Florian Pritz +Date: Sat, 1 Mar 2014 17:21:47 +0100 +Subject: [PATCH] mtree: Make reading additional information from the fs + optional + +This feature is not needed if users just want to read in the content of +an mtree file and do validation against the file system themselves. + +It is needed for `bsdtar cvf out.tar @input.mtree` which is why the +option is enabled in bsdtar. + +Since the mtree tests rely on this feature, this patch also enables it +there. + +Signed-off-by: Florian Pritz +--- + libarchive/archive_read_support_format_mtree.c | 290 ++++++++++++++----------- + libarchive/test/test_read_format_mtree.c | 20 ++ + tar/write.c | 1 + + 3 files changed, 179 insertions(+), 132 deletions(-) + +diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c +index 44799df..d82d4c1 100644 +--- a/libarchive/archive_read_support_format_mtree.c ++++ b/libarchive/archive_read_support_format_mtree.c +@@ -104,6 +104,7 @@ struct mtree { + struct archive_entry_linkresolver *resolver; + + int64_t cur_size; ++ char checkfs; + }; + + static int bid_keycmp(const char *, const char *, ssize_t); +@@ -174,6 +175,29 @@ static int read_header(struct archive_read *, + #endif + } + ++static int ++archive_read_format_mtree_options(struct archive_read *a, ++ const char *key, const char *val) ++{ ++ struct mtree *mtree; ++ ++ mtree = (struct mtree *)(a->format->data); ++ if (strcmp(key, "checkfs") == 0) { ++ /* Allows to read information missing from the mtree from the file system */ ++ if (val == NULL || val[0] == 0) { ++ mtree->checkfs = 0; ++ } else { ++ mtree->checkfs = 1; ++ } ++ return (ARCHIVE_OK); ++ } ++ ++ /* Note: The "warn" return is just to inform the options ++ * supervisor that we didn't handle it. It will generate ++ * a suitable error if no one used this option. */ ++ return (ARCHIVE_WARN); ++} ++ + static void + free_options(struct mtree_option *head) + { +@@ -206,7 +230,7 @@ static int read_header(struct archive_read *, + mtree->fd = -1; + + r = __archive_read_register_format(a, mtree, "mtree", +- mtree_bid, NULL, read_header, read_data, skip, NULL, cleanup); ++ mtree_bid, archive_read_format_mtree_options, read_header, read_data, skip, NULL, cleanup); + + if (r != ARCHIVE_OK) + free(mtree); +@@ -1104,162 +1128,164 @@ static int read_header(struct archive_read *, + mtree->current_dir.length = n; + } + +- /* +- * Try to open and stat the file to get the real size +- * and other file info. It would be nice to avoid +- * this here so that getting a listing of an mtree +- * wouldn't require opening every referenced contents +- * file. But then we wouldn't know the actual +- * contents size, so I don't see a really viable way +- * around this. (Also, we may want to someday pull +- * other unspecified info from the contents file on +- * disk.) +- */ +- mtree->fd = -1; +- if (archive_strlen(&mtree->contents_name) > 0) +- path = mtree->contents_name.s; +- else +- path = archive_entry_pathname(entry); +- +- if (archive_entry_filetype(entry) == AE_IFREG || +- archive_entry_filetype(entry) == AE_IFDIR) { +- mtree->fd = open(path, O_RDONLY | O_BINARY | O_CLOEXEC); +- __archive_ensure_cloexec_flag(mtree->fd); +- if (mtree->fd == -1 && +- (errno != ENOENT || +- archive_strlen(&mtree->contents_name) > 0)) { +- archive_set_error(&a->archive, errno, +- "Can't open %s", path); +- r = ARCHIVE_WARN; ++ if (mtree->checkfs) { ++ /* ++ * Try to open and stat the file to get the real size ++ * and other file info. It would be nice to avoid ++ * this here so that getting a listing of an mtree ++ * wouldn't require opening every referenced contents ++ * file. But then we wouldn't know the actual ++ * contents size, so I don't see a really viable way ++ * around this. (Also, we may want to someday pull ++ * other unspecified info from the contents file on ++ * disk.) ++ */ ++ mtree->fd = -1; ++ if (archive_strlen(&mtree->contents_name) > 0) ++ path = mtree->contents_name.s; ++ else ++ path = archive_entry_pathname(entry); ++ ++ if (archive_entry_filetype(entry) == AE_IFREG || ++ archive_entry_filetype(entry) == AE_IFDIR) { ++ mtree->fd = open(path, O_RDONLY | O_BINARY | O_CLOEXEC); ++ __archive_ensure_cloexec_flag(mtree->fd); ++ if (mtree->fd == -1 && ++ (errno != ENOENT || ++ archive_strlen(&mtree->contents_name) > 0)) { ++ archive_set_error(&a->archive, errno, ++ "Can't open %s", path); ++ r = ARCHIVE_WARN; ++ } + } +- } + +- st = &st_storage; +- if (mtree->fd >= 0) { +- if (fstat(mtree->fd, st) == -1) { +- archive_set_error(&a->archive, errno, +- "Could not fstat %s", path); +- r = ARCHIVE_WARN; +- /* If we can't stat it, don't keep it open. */ +- close(mtree->fd); +- mtree->fd = -1; ++ st = &st_storage; ++ if (mtree->fd >= 0) { ++ if (fstat(mtree->fd, st) == -1) { ++ archive_set_error(&a->archive, errno, ++ "Could not fstat %s", path); ++ r = ARCHIVE_WARN; ++ /* If we can't stat it, don't keep it open. */ ++ close(mtree->fd); ++ mtree->fd = -1; ++ st = NULL; ++ } ++ } else if (lstat(path, st) == -1) { + st = NULL; + } +- } else if (lstat(path, st) == -1) { +- st = NULL; +- } + +- /* +- * Check for a mismatch between the type in the specification and +- * the type of the contents object on disk. +- */ +- if (st != NULL) { +- if ( +- ((st->st_mode & S_IFMT) == S_IFREG && +- archive_entry_filetype(entry) == AE_IFREG) ++ /* ++ * Check for a mismatch between the type in the specification and ++ * the type of the contents object on disk. ++ */ ++ if (st != NULL) { ++ if ( ++ ((st->st_mode & S_IFMT) == S_IFREG && ++ archive_entry_filetype(entry) == AE_IFREG) + #ifdef S_IFLNK +- || ((st->st_mode & S_IFMT) == S_IFLNK && +- archive_entry_filetype(entry) == AE_IFLNK) ++ || ((st->st_mode & S_IFMT) == S_IFLNK && ++ archive_entry_filetype(entry) == AE_IFLNK) + #endif + #ifdef S_IFSOCK +- || ((st->st_mode & S_IFSOCK) == S_IFSOCK && +- archive_entry_filetype(entry) == AE_IFSOCK) ++ || ((st->st_mode & S_IFSOCK) == S_IFSOCK && ++ archive_entry_filetype(entry) == AE_IFSOCK) + #endif + #ifdef S_IFCHR +- || ((st->st_mode & S_IFMT) == S_IFCHR && +- archive_entry_filetype(entry) == AE_IFCHR) ++ || ((st->st_mode & S_IFMT) == S_IFCHR && ++ archive_entry_filetype(entry) == AE_IFCHR) + #endif + #ifdef S_IFBLK +- || ((st->st_mode & S_IFMT) == S_IFBLK && +- archive_entry_filetype(entry) == AE_IFBLK) ++ || ((st->st_mode & S_IFMT) == S_IFBLK && ++ archive_entry_filetype(entry) == AE_IFBLK) + #endif +- || ((st->st_mode & S_IFMT) == S_IFDIR && +- archive_entry_filetype(entry) == AE_IFDIR) ++ || ((st->st_mode & S_IFMT) == S_IFDIR && ++ archive_entry_filetype(entry) == AE_IFDIR) + #ifdef S_IFIFO +- || ((st->st_mode & S_IFMT) == S_IFIFO && +- archive_entry_filetype(entry) == AE_IFIFO) ++ || ((st->st_mode & S_IFMT) == S_IFIFO && ++ archive_entry_filetype(entry) == AE_IFIFO) + #endif +- ) { +- /* Types match. */ +- } else { +- /* Types don't match; bail out gracefully. */ +- if (mtree->fd >= 0) +- close(mtree->fd); +- mtree->fd = -1; +- if (parsed_kws & MTREE_HAS_OPTIONAL) { +- /* It's not an error for an optional entry +- to not match disk. */ +- *use_next = 1; +- } else if (r == ARCHIVE_OK) { +- archive_set_error(&a->archive, +- ARCHIVE_ERRNO_MISC, +- "mtree specification has different type for %s", +- archive_entry_pathname(entry)); +- r = ARCHIVE_WARN; +- } +- return r; ++ ) { ++ /* Types match. */ ++ } else { ++ /* Types don't match; bail out gracefully. */ ++ if (mtree->fd >= 0) ++ close(mtree->fd); ++ mtree->fd = -1; ++ if (parsed_kws & MTREE_HAS_OPTIONAL) { ++ /* It's not an error for an optional entry ++ to not match disk. */ ++ *use_next = 1; ++ } else if (r == ARCHIVE_OK) { ++ archive_set_error(&a->archive, ++ ARCHIVE_ERRNO_MISC, ++ "mtree specification has different type for %s", ++ archive_entry_pathname(entry)); ++ r = ARCHIVE_WARN; ++ } ++ return r; ++ } + } +- } + +- /* +- * If there is a contents file on disk, pick some of the metadata +- * from that file. For most of these, we only set it from the contents +- * if it wasn't already parsed from the specification. +- */ +- if (st != NULL) { +- if (((parsed_kws & MTREE_HAS_DEVICE) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) && +- (archive_entry_filetype(entry) == AE_IFCHR || +- archive_entry_filetype(entry) == AE_IFBLK)) +- archive_entry_set_rdev(entry, st->st_rdev); +- if ((parsed_kws & (MTREE_HAS_GID | MTREE_HAS_GNAME)) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) +- archive_entry_set_gid(entry, st->st_gid); +- if ((parsed_kws & (MTREE_HAS_UID | MTREE_HAS_UNAME)) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) +- archive_entry_set_uid(entry, st->st_uid); +- if ((parsed_kws & MTREE_HAS_MTIME) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) { ++ /* ++ * If there is a contents file on disk, pick some of the metadata ++ * from that file. For most of these, we only set it from the contents ++ * if it wasn't already parsed from the specification. ++ */ ++ if (st != NULL) { ++ if (((parsed_kws & MTREE_HAS_DEVICE) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) && ++ (archive_entry_filetype(entry) == AE_IFCHR || ++ archive_entry_filetype(entry) == AE_IFBLK)) ++ archive_entry_set_rdev(entry, st->st_rdev); ++ if ((parsed_kws & (MTREE_HAS_GID | MTREE_HAS_GNAME)) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) ++ archive_entry_set_gid(entry, st->st_gid); ++ if ((parsed_kws & (MTREE_HAS_UID | MTREE_HAS_UNAME)) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) ++ archive_entry_set_uid(entry, st->st_uid); ++ if ((parsed_kws & MTREE_HAS_MTIME) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) { + #if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC +- archive_entry_set_mtime(entry, st->st_mtime, +- st->st_mtimespec.tv_nsec); ++ archive_entry_set_mtime(entry, st->st_mtime, ++ st->st_mtimespec.tv_nsec); + #elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC +- archive_entry_set_mtime(entry, st->st_mtime, +- st->st_mtim.tv_nsec); ++ archive_entry_set_mtime(entry, st->st_mtime, ++ st->st_mtim.tv_nsec); + #elif HAVE_STRUCT_STAT_ST_MTIME_N +- archive_entry_set_mtime(entry, st->st_mtime, +- st->st_mtime_n); ++ archive_entry_set_mtime(entry, st->st_mtime, ++ st->st_mtime_n); + #elif HAVE_STRUCT_STAT_ST_UMTIME +- archive_entry_set_mtime(entry, st->st_mtime, +- st->st_umtime*1000); ++ archive_entry_set_mtime(entry, st->st_mtime, ++ st->st_umtime*1000); + #elif HAVE_STRUCT_STAT_ST_MTIME_USEC +- archive_entry_set_mtime(entry, st->st_mtime, +- st->st_mtime_usec*1000); ++ archive_entry_set_mtime(entry, st->st_mtime, ++ st->st_mtime_usec*1000); + #else +- archive_entry_set_mtime(entry, st->st_mtime, 0); ++ archive_entry_set_mtime(entry, st->st_mtime, 0); + #endif ++ } ++ if ((parsed_kws & MTREE_HAS_NLINK) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) ++ archive_entry_set_nlink(entry, st->st_nlink); ++ if ((parsed_kws & MTREE_HAS_PERM) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) ++ archive_entry_set_perm(entry, st->st_mode); ++ if ((parsed_kws & MTREE_HAS_SIZE) == 0 || ++ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) ++ archive_entry_set_size(entry, st->st_size); ++ archive_entry_set_ino(entry, st->st_ino); ++ archive_entry_set_dev(entry, st->st_dev); ++ ++ archive_entry_linkify(mtree->resolver, &entry, &sparse_entry); ++ } else if (parsed_kws & MTREE_HAS_OPTIONAL) { ++ /* ++ * Couldn't open the entry, stat it or the on-disk type ++ * didn't match. If this entry is optional, just ignore it ++ * and read the next header entry. ++ */ ++ *use_next = 1; ++ return ARCHIVE_OK; + } +- if ((parsed_kws & MTREE_HAS_NLINK) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) +- archive_entry_set_nlink(entry, st->st_nlink); +- if ((parsed_kws & MTREE_HAS_PERM) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) +- archive_entry_set_perm(entry, st->st_mode); +- if ((parsed_kws & MTREE_HAS_SIZE) == 0 || +- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) +- archive_entry_set_size(entry, st->st_size); +- archive_entry_set_ino(entry, st->st_ino); +- archive_entry_set_dev(entry, st->st_dev); +- +- archive_entry_linkify(mtree->resolver, &entry, &sparse_entry); +- } else if (parsed_kws & MTREE_HAS_OPTIONAL) { +- /* +- * Couldn't open the entry, stat it or the on-disk type +- * didn't match. If this entry is optional, just ignore it +- * and read the next header entry. +- */ +- *use_next = 1; +- return ARCHIVE_OK; + } + + mtree->cur_size = archive_entry_size(entry); +diff --git a/libarchive/test/test_read_format_mtree.c b/libarchive/test/test_read_format_mtree.c +index 830fa0a..f96529d 100644 +--- a/libarchive/test/test_read_format_mtree.c ++++ b/libarchive/test/test_read_format_mtree.c +@@ -58,6 +58,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, reffile, 11)); + + /* +@@ -209,6 +211,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_memory(a, archive, sizeof(archive))); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualInt(archive_format(a), ARCHIVE_FORMAT_MTREE); +@@ -246,6 +250,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_memory(a, archive, sizeof(archive))); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(archive_entry_pathname(ae), "a"); +@@ -299,6 +305,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_memory(a, archive, sizeof(archive))); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(archive_entry_pathname(ae), "./a"); +@@ -365,6 +373,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_memory(a, archive, sizeof(archive))); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(archive_entry_pathname(ae), "./a"); +@@ -402,6 +412,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_memory(a, archive2, sizeof(archive2))); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(archive_entry_pathname(ae), "./a"); +@@ -449,6 +461,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, reffile, 11)); + + /* +@@ -552,6 +566,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, reffile, 11)); + + /* +@@ -617,6 +633,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, reffile, 11)); + + /* +@@ -680,6 +698,8 @@ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, ++ archive_read_set_options(a, "mtree:checkfs")); ++ assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_memory(a, archive, sizeof(archive))); + assertEqualIntA(a, ARCHIVE_WARN, archive_read_next_header(a, &ae)); + assert(strlen(archive_error_string(a)) > 0); +diff --git a/tar/write.c b/tar/write.c +index 40d2fb0..7e8cb13 100644 +--- a/tar/write.c ++++ b/tar/write.c +@@ -648,6 +648,7 @@ static void write_hierarchy(struct bsdtar *, struct archive *, + archive_read_support_format_all(ina); + archive_read_support_filter_all(ina); + set_reader_options(bsdtar, a); ++ archive_read_set_options(ina, "mtree:checkfs"); + if (archive_read_open_filename(ina, filename, + bsdtar->bytes_per_block)) { + lafe_warnc(0, "%s", archive_error_string(ina)); +-- +1.8.5.5 + ADDED PKGBUILDs/libassuan/PKGBUILD Index: PKGBUILDs/libassuan/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libassuan/PKGBUILD @@ -0,0 +1,32 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tobias Powalowski + +pkgname=libassuan +pkgver=2.1.1 +pkgrel=1 +pkgdesc="A IPC library used by some GnuPG related software" +arch=('i586') +license=('GPL') +url="http://www.gnupg.org/related_software/libassuan" +depends=('libgpg-error') +source=(ftp://ftp.gnupg.org/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2) +install=libassuan.install +md5sums=('757243cc4a71b30ed8d8dbe784035d36') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/libassuan/libassuan.install Index: PKGBUILDs/libassuan/libassuan.install ================================================================== --- /dev/null +++ PKGBUILDs/libassuan/libassuan.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(assuan.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/libatomic_ops/PKGBUILD Index: PKGBUILDs/libatomic_ops/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libatomic_ops/PKGBUILD @@ -0,0 +1,46 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot +# (Arch Linux) Contributor: Adam Walters +# (Arch Linux) Contributor: William Rea +# (Arch Linux) Contributor: Rémy Oudompheng + +pkgname=libatomic_ops +pkgver=7.2.e +pkgrel=1 +pkgdesc="Provides semi-portable access to hardware provided atomic memory operations" +arch=('i586') +url="https://github.com/ivmai/libatomic_ops" +depends=('musl') +license=('GPL2' 'MIT') +source=(http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-7.2e.tar.gz) +md5sums=('7035692fec4db2659b06485040829e43') + +prepare(){ + cd libatomic_ops-7.2 + + sed -i 's#AM_CONFIG_HEADER#AC_CONFIG_HEADERS#' configure.ac + sed -i 's#AC_PROG_RANLIB#AC_LIBTOOL_DLOPEN\nAC_PROG_LIBTOOL#' configure.ac + sed -i 's#b_L#b_LTL#;s#\.a#.la#g;s#_a_#_la_#' src/Makefile.am + sed -i 's#\.a#.so#g;s#\.\./src/#../src/.libs/#g' tests/Makefile.am + sed -i 's#pkgdata#doc#' doc/Makefile.am +} + +build() { + cd libatomic_ops-7.2 + autoreconf -fi + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd libatomic_ops-7.2 + LD_LIBRARY_PATH="${srcdir}/libatomic_ops-7.2/src/.libs" make check +} + +package() { + cd libatomic_ops-7.2 + make DESTDIR="${pkgdir}" install + install -D -m644 doc/LICENSING.txt "${pkgdir}/usr/share/licenses/$pkgname/LICENSE" +} ADDED PKGBUILDs/libcap/PKGBUILD Index: PKGBUILDs/libcap/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libcap/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Hugo Doria + +pkgname=libcap +pkgver=2.24 +pkgrel=1 +pkgdesc="POSIX 1003.1e capabilities" +arch=('i586') +url="http://sites.google.com/site/fullycapable/" +license=('GPL2') +depends=('musl' 'attr') +options=('!staticlibs') +source=(https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-${pkgver}.tar.xz) +md5sums=('d43ab9f680435a7fff35b4ace8d45b80') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + + # install into /usr/bin + sed -i "/SBINDIR/s#sbin#bin#" Make.Rules +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make prefix=/usr lib=/lib DESTDIR=${pkgdir} RAISE_SETFCAP=no install + + install -Dm644 pam_cap/capability.conf \ + $pkgdir/usr/share/doc/$pkgname/capability.conf.example +} ADDED PKGBUILDs/libffi/PKGBUILD Index: PKGBUILDs/libffi/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libffi/PKGBUILD @@ -0,0 +1,35 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Contributor: Stéphane Gaudreault +# .Contributor: Jan de Groot + +pkgname=libffi +pkgver=3.0.13 +pkgrel=4 +pkgdesc="Portable, high level programming interface to various calling conventions" +arch=('i586') +url="http://sourceware.org/libffi/" +license=('MIT') +depends=('musl') +checkdepends=('dejagnu') +install=libffi.install +source=(ftp://sourceware.org/pub/libffi/libffi-${pkgver}.tar.gz) +sha1sums=('f5230890dc0be42fb5c58fbf793da253155de106') + +build() { + cd $pkgname-$pkgver + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd $pkgname-$pkgver + make check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} ADDED PKGBUILDs/libffi/libffi.install Index: PKGBUILDs/libffi/libffi.install ================================================================== --- /dev/null +++ PKGBUILDs/libffi/libffi.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(libffi.info.gz) + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/libgcrypt/PKGBUILD Index: PKGBUILDs/libgcrypt/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libgcrypt/PKGBUILD @@ -0,0 +1,43 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Andreas Radke + +# after a .so bump first rebuild dirmngr +# with sudo testing-x86_64-build -- -I libgcrypt-1.6.0-1-x86_64.pkg.tar.xz +# then cp /usr/lib/libgcrypt.so.11 /var/lib/archbuild/staging-x86_64/root/usr/lib/ and do staging-x86_64-build + +pkgname=libgcrypt +pkgver=1.6.1 +pkgrel=1 +pkgdesc="General purpose cryptographic library based on the code from GnuPG" +arch=('i586') +url="http://www.gnupg.org" +license=('LGPL') +depends=('libgpg-error>=1.10-2') +options=('!emptydirs') +install=$pkgname.install +source=(ftp://ftp.gnupg.org/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2) +sha1sums=('f03d9b63ac3b17a6972fc11150d136925b702f02') + +#prepare() { +# cd ${pkgname}-${pkgver} +#} + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --disable-static \ + --disable-padlock-support + make +} + +check() { + cd ${pkgname}-${pkgver} + make check +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/libgcrypt/libgcrypt.install Index: PKGBUILDs/libgcrypt/libgcrypt.install ================================================================== --- /dev/null +++ PKGBUILDs/libgcrypt/libgcrypt.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(gcrypt.info.gz gcrypt.info-1.gz) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/libgpg-error/PKGBUILD Index: PKGBUILDs/libgpg-error/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libgpg-error/PKGBUILD @@ -0,0 +1,33 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: judd + +pkgname=libgpg-error +pkgver=1.12 +pkgrel=1 +pkgdesc="Support library for libgcrypt" +arch=('i586') +url="http://www.gnupg.org" +license=('LGPL') +depends=('musl' 'sh') +source=(ftp://ftp.gnupg.org/gcrypt/libgpg-error/${pkgname}-${pkgver}.tar.bz2{,.sig}) + #ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/libgpg-error/${pkgname}-${pkgver}.tar.bz2) +sha1sums=('259f359cd1440b21840c3a78e852afd549c709b8' + 'SKIP') + +build() { + cd "${srcdir}"/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver} + make DESTDIR="${pkgdir}/" install +} ADDED PKGBUILDs/libidn/PKGBUILD Index: PKGBUILDs/libidn/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libidn/PKGBUILD @@ -0,0 +1,30 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Ronald van Haren +# (Arch Linux) Contributor: Jan de Groot +# (Arch Linux) Contributor: Eric Johnson + +pkgname=libidn +pkgver=1.28 +pkgrel=2 +pkgdesc="Implementation of the Stringprep, Punycode and IDNA specifications" +url="http://www.gnu.org/software/libidn/" +arch=('i586') +license=('GPL3' 'LGPL') +depends=('musl' 'texinfo') +makedepends=('pkg-config') +source=(http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz) +install=libidn.install +sha1sums=('725587211b229c156e29fa2ad116b0ef71a7ca17') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr --host=i586-pc-linux-musl + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/libidn/libidn.install Index: PKGBUILDs/libidn/libidn.install ================================================================== --- /dev/null +++ PKGBUILDs/libidn/libidn.install @@ -0,0 +1,19 @@ +info_dir=/usr/share/info +info_files=(libidn.info) + +post_install() { + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install +} + +pre_remove() { + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + ADDED PKGBUILDs/libksba/PKGBUILD Index: PKGBUILDs/libksba/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libksba/PKGBUILD @@ -0,0 +1,33 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: +# (Arch Linux) Contributor: Damir Perisa + +pkgname=libksba +pkgver=1.3.0 +pkgrel=1 +pkgdesc="A CMS and X.509 access library" +arch=('i586') +license=('GPL') +url="ftp://ftp.gnupg.org/gcrypt/alpha/libksba" +depends=('bash' 'libgpg-error' 'musl') +source=(ftp://ftp.gnupg.org/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2) +install=libksba.install + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make +} + +check() { + cd $srcdir/$pkgname-$pkgver + make check +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install +} +md5sums=('cd86fad9c9d360b2cf80449f8a4a4075') ADDED PKGBUILDs/libksba/libksba.install Index: PKGBUILDs/libksba/libksba.install ================================================================== --- /dev/null +++ PKGBUILDs/libksba/libksba.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(ksba.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/libmpc/PKGBUILD Index: PKGBUILDs/libmpc/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libmpc/PKGBUILD @@ -0,0 +1,34 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae + +pkgname=libmpc +pkgver=1.0.2 +pkgrel=2 +pkgdesc="Library for the arithmetic of complex numbers with arbitrarily high precision" +arch=('i586') +url="http://www.multiprecision.org/" +license=('LGPL') +depends=('mpfr') +install=libmpc.install +source=(http://www.multiprecision.org/mpc/download/mpc-${pkgver/_/-}.tar.gz{,.sig}) +md5sums=('68fadff3358fb3e7976c7a398a0af4c3' + 'SKIP') + +build() { + cd "${srcdir}/mpc-${pkgver}" + ./configure --prefix=/usr + make +} + +check() { + cd "${srcdir}/mpc-${pkgver}" + make check +} + +package() { + cd "${srcdir}/mpc-${pkgver}" + make DESTDIR="${pkgdir}" install + mv ${pkgdir}/usr/share/info/{mpc,libmpc}.info +} ADDED PKGBUILDs/libmpc/libmpc.install Index: PKGBUILDs/libmpc/libmpc.install ================================================================== --- /dev/null +++ PKGBUILDs/libmpc/libmpc.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(libmpc.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/libpcap/PKGBUILD Index: PKGBUILDs/libpcap/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libpcap/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Thomas Bächler + +pkgname=libpcap +pkgver=1.5.3 +pkgrel=1 +pkgdesc="A system-independent interface for user-level packet capture" +arch=('i586') +url="http://www.tcpdump.org/" +license=('BSD') +depends=('musl' 'libnl' 'sh' 'libusbx') +makedepends=('flex') # 'bluez-libs') +source=(http://www.tcpdump.org/release/libpcap-${pkgver}.tar.gz{,.sig}) +sha256sums=('9ae92159c1060f15e6a90f2c4ad227268b6aaa382c316fa49a31c496b9979e93' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --enable-ipv6 \ + --disable-bluetooth \ + --with-libnl + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + install -d -m755 ${pkgdir}/usr/bin + make DESTDIR=${pkgdir} install + + # backwards compatibility, programs often look for net/bpf.h + mkdir -p ${pkgdir}/usr/include/net + cd ${pkgdir}/usr/include/net + ln -s ../pcap-bpf.h bpf.h + + # install the license + install -D -m644 ${srcdir}/$pkgname-$pkgver/LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE +} ADDED PKGBUILDs/libsasl/0010_maintainer_mode.patch Index: PKGBUILDs/libsasl/0010_maintainer_mode.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/0010_maintainer_mode.patch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 0010_maintainer_mode.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Enable maintainer mode to avoid auto* problems. + +@DPATCH@ +diff -urNad trunk~/configure.in trunk/configure.in +--- trunk~/configure.in 2006-05-29 22:52:46.000000000 +0300 ++++ trunk/configure.in 2006-11-01 23:24:55.000000000 +0200 +@@ -62,6 +62,8 @@ + AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.22) + CMU_INIT_AUTOMAKE + ++AM_MAINTAINER_MODE ++ + # and include our config dir scripts + ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config" + ADDED PKGBUILDs/libsasl/0011_saslauthd_ac_prog_libtool.patch Index: PKGBUILDs/libsasl/0011_saslauthd_ac_prog_libtool.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/0011_saslauthd_ac_prog_libtool.patch @@ -0,0 +1,15 @@ +0011_saslauthd_ac_prog_libtool.dpatch by + +Enable libtool use. + +diff -urNad trunk~/saslauthd/configure.in trunk/saslauthd/configure.in +--- trunk~/saslauthd/configure.in 2006-05-29 22:52:42.000000000 +0300 ++++ trunk/saslauthd/configure.in 2006-11-01 23:41:51.000000000 +0200 +@@ -25,6 +25,7 @@ + AC_PROG_MAKE_SET + AC_PROG_LN_S + AC_PROG_INSTALL ++AC_PROG_LIBTOOL + + dnl Checks for build foo + CMU_C___ATTRIBUTE__ ADDED PKGBUILDs/libsasl/0025_ld_as_needed.patch Index: PKGBUILDs/libsasl/0025_ld_as_needed.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/0025_ld_as_needed.patch @@ -0,0 +1,27 @@ +Author: Matthias Klose +Desription: Fix FTBFS, add $(SASL_DB_LIB) as dependency to libsasldb, and use +it. +--- a/saslauthd/Makefile.am ++++ b/saslauthd/Makefile.am +@@ -16,7 +16,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c + saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@ + saslauthd_LDADD = @SASL_KRB_LIB@ \ + @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \ +- @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ ++ @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ + + testsaslauthd_SOURCES = testsaslauthd.c utils.c + testsaslauthd_LDADD = @LIB_SOCKET@ +--- a/sasldb/Makefile.am ++++ b/sasldb/Makefile.am +@@ -55,8 +55,8 @@ noinst_LIBRARIES = libsasldb.a + + libsasldb_la_SOURCES = allockey.c sasldb.h + EXTRA_libsasldb_la_SOURCES = $(extra_common_sources) +-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) +-libsasldb_la_LIBADD = $(SASL_DB_BACKEND) ++libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) $(SASL_DB_LIB) ++libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB) + + # Prevent make dist stupidity + libsasldb_a_SOURCES = ADDED PKGBUILDs/libsasl/0026_drop_krb5support_dependency.patch Index: PKGBUILDs/libsasl/0026_drop_krb5support_dependency.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/0026_drop_krb5support_dependency.patch @@ -0,0 +1,14 @@ +Author: Roberto C. Sanchez +Description: Drop gratuitous dependency on krb5support +--- a/cmulocal/sasl2.m4 ++++ b/cmulocal/sasl2.m4 +@@ -112,9 +112,6 @@ if test "$gssapi" != no; then + fi + + if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then +- # check for libkrb5support first +- AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) +- + gss_failed=0 + AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, + ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) ADDED PKGBUILDs/libsasl/0030-dont_use_la_files_for_opening_plugins.patch Index: PKGBUILDs/libsasl/0030-dont_use_la_files_for_opening_plugins.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/0030-dont_use_la_files_for_opening_plugins.patch @@ -0,0 +1,134 @@ +--- a/lib/dlopen.c ++++ b/lib/dlopen.c +@@ -247,105 +247,6 @@ static int _sasl_plugin_load(char *plugi + return result; + } + +-/* this returns the file to actually open. +- * out should be a buffer of size PATH_MAX +- * and may be the same as in. */ +- +-/* We'll use a static buffer for speed unless someone complains */ +-#define MAX_LINE 2048 +- +-static int _parse_la(const char *prefix, const char *in, char *out) +-{ +- FILE *file; +- size_t length; +- char line[MAX_LINE]; +- char *ntmp = NULL; +- +- if(!in || !out || !prefix || out == in) return SASL_BADPARAM; +- +- /* Set this so we can detect failure */ +- *out = '\0'; +- +- length = strlen(in); +- +- if (strcmp(in + (length - strlen(LA_SUFFIX)), LA_SUFFIX)) { +- if(!strcmp(in + (length - strlen(SO_SUFFIX)),SO_SUFFIX)) { +- /* check for a .la file */ +- strcpy(line, prefix); +- strcat(line, in); +- length = strlen(line); +- *(line + (length - strlen(SO_SUFFIX))) = '\0'; +- strcat(line, LA_SUFFIX); +- file = fopen(line, "r"); +- if(file) { +- /* We'll get it on the .la open */ +- fclose(file); +- return SASL_FAIL; +- } +- } +- strcpy(out, prefix); +- strcat(out, in); +- return SASL_OK; +- } +- +- strcpy(line, prefix); +- strcat(line, in); +- +- file = fopen(line, "r"); +- if(!file) { +- _sasl_log(NULL, SASL_LOG_WARN, +- "unable to open LA file: %s", line); +- return SASL_FAIL; +- } +- +- while(!feof(file)) { +- if(!fgets(line, MAX_LINE, file)) break; +- if(line[strlen(line) - 1] != '\n') { +- _sasl_log(NULL, SASL_LOG_WARN, +- "LA file has too long of a line: %s", in); +- return SASL_BUFOVER; +- } +- if(line[0] == '\n' || line[0] == '#') continue; +- if(!strncmp(line, "dlname=", sizeof("dlname=") - 1)) { +- /* We found the line with the name in it */ +- char *end; +- char *start; +- size_t len; +- end = strrchr(line, '\''); +- if(!end) continue; +- start = &line[sizeof("dlname=")-1]; +- len = strlen(start); +- if(len > 3 && start[0] == '\'') { +- ntmp=&start[1]; +- *end='\0'; +- /* Do we have dlname="" ? */ +- if(ntmp == end) { +- _sasl_log(NULL, SASL_LOG_DEBUG, +- "dlname is empty in .la file: %s", in); +- return SASL_FAIL; +- } +- strcpy(out, prefix); +- strcat(out, ntmp); +- } +- break; +- } +- } +- if(ferror(file) || feof(file)) { +- _sasl_log(NULL, SASL_LOG_WARN, +- "Error reading .la: %s\n", in); +- fclose(file); +- return SASL_FAIL; +- } +- fclose(file); +- +- if(!(*out)) { +- _sasl_log(NULL, SASL_LOG_WARN, +- "Could not find a dlname line in .la file: %s", in); +- return SASL_FAIL; +- } +- +- return SASL_OK; +-} + #endif /* DO_DLOPEN */ + + /* loads a plugin library */ +@@ -499,18 +400,18 @@ int _sasl_load_plugins(const add_plugin_ + if (length + pos>=PATH_MAX) continue; /* too big */ + + if (strcmp(dir->d_name + (length - strlen(SO_SUFFIX)), +- SO_SUFFIX) +- && strcmp(dir->d_name + (length - strlen(LA_SUFFIX)), +- LA_SUFFIX)) ++ SO_SUFFIX)) + continue; + ++ /* We only use .so files for loading plugins */ ++ + memcpy(name,dir->d_name,length); + name[length]='\0'; + +- result = _parse_la(prefix, name, tmp); +- if(result != SASL_OK) +- continue; +- ++ /* Create full name with path */ ++ strncpy(tmp, prefix, PATH_MAX); ++ strncat(tmp, name, PATH_MAX); ++ + /* skip "lib" and cut off suffix -- + this only need be approximate */ + strcpy(plugname, name + 3); ADDED PKGBUILDs/libsasl/CVE-2013-4122.patch Index: PKGBUILDs/libsasl/CVE-2013-4122.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/CVE-2013-4122.patch @@ -0,0 +1,116 @@ +From dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d Mon Sep 17 00:00:00 2001 +From: mancha +Date: Thu, 11 Jul 2013 09:08:07 +0000 +Subject: Handle NULL returns from glibc 2.17+ crypt() + +Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL +(w/ NULL return) if the salt violates specifications. Additionally, +on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords +passed to crypt() fail with EPERM (w/ NULL return). + +When using glibc's crypt(), check return value to avoid a possible +NULL pointer dereference. + +Patch by mancha1@hush.com. +--- +diff --git a/pwcheck/pwcheck_getpwnam.c b/pwcheck/pwcheck_getpwnam.c +index 4b34222..400289c 100644 +--- a/pwcheck/pwcheck_getpwnam.c ++++ b/pwcheck/pwcheck_getpwnam.c +@@ -32,6 +32,7 @@ char *userid; + char *password; + { + char* r; ++ char* crpt_passwd; + struct passwd *pwd; + + pwd = getpwnam(userid); +@@ -41,7 +42,7 @@ char *password; + else if (pwd->pw_passwd[0] == '*') { + r = "Account disabled"; + } +- else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) != 0) { ++ else if (!(crpt_passwd = crypt(password, pwd->pw_passwd)) || strcmp(pwd->pw_passwd, (const char *)crpt_passwd) != 0) { + r = "Incorrect password"; + } + else { +diff --git a/pwcheck/pwcheck_getspnam.c b/pwcheck/pwcheck_getspnam.c +index 2b11286..6d607bb 100644 +--- a/pwcheck/pwcheck_getspnam.c ++++ b/pwcheck/pwcheck_getspnam.c +@@ -32,13 +32,15 @@ char *userid; + char *password; + { + struct spwd *pwd; ++ char *crpt_passwd; + + pwd = getspnam(userid); + if (!pwd) { + return "Userid not found"; + } + +- if (strcmp(pwd->sp_pwdp, crypt(password, pwd->sp_pwdp)) != 0) { ++ crpt_passwd = crypt(password, pwd->sp_pwdp); ++ if (!crpt_passwd || strcmp(pwd->sp_pwdp, (const char *)crpt_passwd) != 0) { + return "Incorrect password"; + } + else { +diff --git a/saslauthd/auth_getpwent.c b/saslauthd/auth_getpwent.c +index fc8029d..d4ebe54 100644 +--- a/saslauthd/auth_getpwent.c ++++ b/saslauthd/auth_getpwent.c +@@ -77,6 +77,7 @@ auth_getpwent ( + { + /* VARIABLES */ + struct passwd *pw; /* pointer to passwd file entry */ ++ char *crpt_passwd; /* encrypted password */ + int errnum; + /* END VARIABLES */ + +@@ -105,7 +106,8 @@ auth_getpwent ( + } + } + +- if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) { ++ crpt_passwd = crypt(password, pw->pw_passwd); ++ if (!crpt_passwd || strcmp(pw->pw_passwd, (const char *)crpt_passwd)) { + if (flags & VERBOSE) { + syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login); + } +diff --git a/saslauthd/auth_shadow.c b/saslauthd/auth_shadow.c +index 677131b..1988afd 100644 +--- a/saslauthd/auth_shadow.c ++++ b/saslauthd/auth_shadow.c +@@ -210,8 +210,8 @@ auth_shadow ( + RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)"); + } + +- cpw = strdup((const char *)crypt(password, sp->sp_pwdp)); +- if (strcmp(sp->sp_pwdp, cpw)) { ++ cpw = crypt(password, sp->sp_pwdp); ++ if (!cpw || strcmp(sp->sp_pwdp, (const char *)cpw)) { + if (flags & VERBOSE) { + /* + * This _should_ reveal the SHADOW_PW_LOCKED prefix to an +@@ -221,10 +221,8 @@ auth_shadow ( + syslog(LOG_DEBUG, "DEBUG: auth_shadow: pw mismatch: '%s' != '%s'", + sp->sp_pwdp, cpw); + } +- free(cpw); + RETURN("NO Incorrect password"); + } +- free(cpw); + + /* + * The following fields will be set to -1 if: +@@ -286,7 +284,7 @@ auth_shadow ( + RETURN("NO Invalid username"); + } + +- if (strcmp(upw->upw_passwd, crypt(password, upw->upw_passwd)) != 0) { ++ if (!(cpw = crypt(password, upw->upw_passwd)) || (strcmp(upw->upw_passwd, (const char *)cpw) != 0)) { + if (flags & VERBOSE) { + syslog(LOG_DEBUG, "auth_shadow: pw mismatch: %s != %s", + password, upw->upw_passwd); +-- +cgit v0.9.2 ADDED PKGBUILDs/libsasl/PKGBUILD Index: PKGBUILDs/libsasl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/PKGBUILD @@ -0,0 +1,193 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +# This package spans multiple repositories. +# Always build from cyrus-sasl/trunk and merge changes to libsasl/trunk. + +#pkgbase=('cyrus-sasl') +#pkgname=('cyrus-sasl' 'cyrus-sasl-gssapi' 'cyrus-sasl-ldap' 'cyrus-sasl-sql') +pkgname=libsasl +pkgver=2.1.26 +pkgrel=7 +pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library" +arch=('i586') +url="http://cyrusimap.web.cmu.edu/" +license=('custom') +options=('!makeflags') +makedepends=('postgresql-libs' 'libldap' 'krb5' 'openssl' 'sqlite') +source=(ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${pkgver}.tar.gz + cyrus-sasl-2.1.22-qa.patch + cyrus-sasl-2.1.26-size_t.patch + 0010_maintainer_mode.patch + 0011_saslauthd_ac_prog_libtool.patch + 0025_ld_as_needed.patch + 0026_drop_krb5support_dependency.patch + 0030-dont_use_la_files_for_opening_plugins.patch + saslauthd.conf.d + tmpfiles.conf + CVE-2013-4122.patch + cyrus-sasl-sql.patch) +md5sums=('a7f4e5e559a0e37b3ffc438c9456e425' + '79b8a5e8689989e2afd4b7bda595a7b1' + 'f45aa8c42b32e0569ab3d14a83485b37' + 'f45d8b60e8f74dd7f7c2ec1665fa602a' + '9d93880514cb5ff5da969f1ceb64a661' + '62bf892fe4d1df41ff748e91a1afaf67' + 'b7848957357e7c02d6490102be496bf9' + '8e7106f32e495e9ade69014fd1b3352a' + '49219af5641150edec288a3fdb65e7c1' + '45bb0192d2f188066240b9a66ee6365f' + 'c5f0ec88c584a75c14d7f402eaeed7ef' + '82c0f66fdc5c1145eb48ea9116c27931') + +prepare() { + cd cyrus-sasl-$pkgver + patch -Np1 -i ../cyrus-sasl-2.1.22-qa.patch + patch -Np1 -i ../cyrus-sasl-2.1.26-size_t.patch + patch -Np1 -i ../0010_maintainer_mode.patch + patch -Np1 -i ../0011_saslauthd_ac_prog_libtool.patch + patch -Np1 -i ../0025_ld_as_needed.patch + patch -Np1 -i ../0026_drop_krb5support_dependency.patch + patch -Np1 -i ../0030-dont_use_la_files_for_opening_plugins.patch + patch -Np1 -i ../CVE-2013-4122.patch + patch -Np0 -i ../cyrus-sasl-sql.patch + + sed 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' -i configure.in +} + +build() { + export CFLAGS="$CFLAGS -fPIC" + cd cyrus-sasl-$pkgver + + rm -f config/config.guess config/config.sub + rm -f config/ltconfig config/ltmain.sh config/libtool.m4 + rm -fr autom4te.cache + libtoolize -c + aclocal -I config -I cmulocal + automake -a -c + autoheader + autoconf + + pushd saslauthd + rm -f config/config.guess config/config.sub + rm -f config/ltconfig config/ltmain.sh config/libtool.m4 + rm -fr autom4te.cache + libtoolize -c + aclocal -I config -I ../cmulocal -I ../config + automake -a -c + autoheader + autoconf + popd + + ./configure --prefix=/usr \ + --sbin=/usr/bin \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-static \ + --enable-shared \ + --enable-alwaystrue \ + --enable-checkapop \ + --enable-cram \ + --enable-digest \ + --disable-otp \ + --disable-srp \ + --disable-srp-setpass \ + --disable-krb4 \ + --enable-gssapi \ + --enable-auth-sasldb \ + --enable-plain \ + --enable-anon \ + --enable-login \ + --enable-ntlm \ + --disable-passdss \ + --enable-sql \ + --with-mysql \ + --with-pgsql=/usr/lib \ + --with-sqlite3=/usr/lib \ + --enable-ldapdb \ + --disable-macos-framework \ + --with-pam \ + --with-saslauthd=/var/run/saslauthd \ + --with-ldap \ + --with-dblib=gdbm \ + --with-configdir=/etc/sasl2:/etc/sasl:/usr/lib/sasl2 \ + --sysconfdir=/etc \ + --with-devrandom=/dev/urandom + make +} + +package_libsasl() { + pkgdesc="Cyrus Simple Authentication Service Layer (SASL) Library" + depends=('openssl') + conflicts=('cyrus-sasl-plugins') + + cd cyrus-sasl-$pkgver + for dir in include lib sasldb plugins utils; do + pushd ${dir} + make DESTDIR="${pkgdir}" install + popd + done + rm -f "${pkgdir}"/usr/lib/sasl2/libsql.so* + rm -f "${pkgdir}"/usr/lib/sasl2/libgssapiv2.so* + rm -f "${pkgdir}"/usr/lib/sasl2/libldapdb.so* + rm -f "${pkgdir}"/usr/lib/sasl2/libgs2.so* + install -m755 -d "${pkgdir}/usr/share/licenses/libsasl" + install -m644 COPYING "${pkgdir}/usr/share/licenses/libsasl/" +} + +package_cyrus-sasl() { + depends=("libsasl=${pkgver}" 'krb5') + pkgdesc="Cyrus saslauthd SASL authentication daemon" + backup=('etc/conf.d/saslauthd') + + cd cyrus-sasl-$pkgver/saslauthd + make DESTDIR="${pkgdir}" install + install -Dm644 "${srcdir}/saslauthd.conf.d" "${pkgdir}/etc/conf.d/saslauthd" + install -Dm644 "${srcdir}/saslauthd.service" "${pkgdir}/usr/lib/systemd/system/saslauthd.service" + install -Dm644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/saslauthd.conf" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl/" +} + +package_cyrus-sasl-gssapi() { + pkgdesc="GSSAPI authentication mechanism for Cyrus SASL" + depends=("libsasl=${pkgver}" 'krb5') + replaces=('cyrus-sasl-plugins') + + cd cyrus-sasl-$pkgver/plugins + install -m755 -d "${pkgdir}/usr/lib/sasl2" + cp -a .libs/libgssapiv2.so* "${pkgdir}/usr/lib/sasl2/" + cp -a .libs/libgs2.so* "${pkgdir}/usr/lib/sasl2/" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi/" +} + +package_cyrus-sasl-ldap() { + pkgdesc="ldapdb auxprop module for Cyrus SASL" + depends=("libsasl=${pkgver}" 'libldap') + replaces=('cyrus-sasl-plugins') + + cd cyrus-sasl-$pkgver/plugins + install -m755 -d "${pkgdir}/usr/lib/sasl2" + cp -a .libs/libldapdb.so* "${pkgdir}/usr/lib/sasl2/" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap/" +} + +package_cyrus-sasl-sql() { + pkgdesc="SQL auxprop module for Cyrus SASL" + depends=("libsasl=${pkgver}" 'postgresql-libs' 'libmariadbclient' 'sqlite') + replaces=('cyrus-sasl-plugins') + + cd cyrus-sasl-$pkgver/plugins + install -m755 -d "${pkgdir}/usr/lib/sasl2" + cp -a .libs/libsql.so* "${pkgdir}/usr/lib/sasl2/" + + install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-sql" + ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-sql/" +} ADDED PKGBUILDs/libsasl/cyrus-sasl-2.1.22-as-needed.patch Index: PKGBUILDs/libsasl/cyrus-sasl-2.1.22-as-needed.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/cyrus-sasl-2.1.22-as-needed.patch @@ -0,0 +1,11 @@ +--- saslauthd/configure.in.orig 2006-05-23 15:53:17.000000000 -0700 ++++ saslauthd/configure.in 2006-05-23 15:53:33.000000000 -0700 +@@ -77,7 +77,7 @@ + AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) + SASL_DB_PATH_CHECK() + SASL_DB_CHECK() +- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al" ++ SASL_DB_LIB="../sasldb/.libs/libsasldb.a $SASL_DB_LIB" + fi + + AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ], ADDED PKGBUILDs/libsasl/cyrus-sasl-2.1.22-qa.patch Index: PKGBUILDs/libsasl/cyrus-sasl-2.1.22-qa.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/cyrus-sasl-2.1.22-qa.patch @@ -0,0 +1,22 @@ +fix missing prototype warnings + +--- cyrus-sasl-2.1.22/lib/auxprop.c ++++ cyrus-sasl-2.1.22/lib/auxprop.c +@@ -43,6 +43,7 @@ + */ + + #include ++#include + #include + #include + #include +--- cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c ++++ cyrus-sasl-2.1.22/pwcheck/pwcheck_getspnam.c +@@ -24,6 +24,7 @@ OF OR IN CONNECTION WITH THE USE OR PERF + ******************************************************************/ + + #include ++#include + + extern char *crypt(); + ADDED PKGBUILDs/libsasl/cyrus-sasl-2.1.26-size_t.patch Index: PKGBUILDs/libsasl/cyrus-sasl-2.1.26-size_t.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/cyrus-sasl-2.1.26-size_t.patch @@ -0,0 +1,11 @@ +--- cyrus-sasl-2.1.26/include/sasl.h 2012-10-12 09:05:48.000000000 -0500 ++++ cyrus-sasl-2.1.26/include/sasl.h 2013-01-31 13:21:04.007739327 -0600 +@@ -223,6 +223,8 @@ extern "C" { + * they must be called before all other SASL functions: + */ + ++#include ++ + /* memory allocation functions which may optionally be replaced: + */ + typedef void *sasl_malloc_t(size_t); ADDED PKGBUILDs/libsasl/cyrus-sasl-sql.patch Index: PKGBUILDs/libsasl/cyrus-sasl-sql.patch ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/cyrus-sasl-sql.patch @@ -0,0 +1,39 @@ +--- configure.in 2012-10-12 16:05:48.000000000 +0200 ++++ configure.in 2013-05-11 18:48:59.021848013 +0200 +@@ -861,9 +860,9 @@ + notfound) AC_WARN([SQLite Library not found]); true;; + *) + if test -d ${with_sqlite}/lib; then +- LIB_SQLITE="-L${with_sqlite}/lib -R${with_sqlite}/lib" ++ LIB_SQLITE="-L${with_sqlite}/lib" + else +- LIB_SQLITE="-L${with_sqlite} -R${with_sqlite}" ++ LIB_SQLITE="-L${with_sqlite}" + fi + + LIB_SQLITE_DIR=$LIB_SQLITE +@@ -913,9 +912,9 @@ + notfound) AC_WARN([SQLite3 Library not found]); true;; + *) + if test -d ${with_sqlite3}/lib; then +- LIB_SQLITE3="-L${with_sqlite3}/lib -R${with_sqlite3}/lib" ++ LIB_SQLITE3="-L${with_sqlite3}/lib" + else +- LIB_SQLITE3="-L${with_sqlite3} -R${with_sqlite3}" ++ LIB_SQLITE3="-L${with_sqlite3}" + fi + + LIB_SQLITE3_DIR=$LIB_SQLITE3 +--- configure.in ++++ configure.in +@@ -674,7 +674,9 @@ + LIB_PGSQL_DIR=$LIB_PGSQL + LIB_PGSQL="$LIB_PGSQL -lpq" + +- if test -d ${with_pgsql}/include/pgsql; then ++ if test -d ${with_pgsql}/include/postgresql/pgsql; then ++ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/postgresql/pgsql" ++ elif test -d ${with_pgsql}/include/pgsql; then + CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql" + elif test -d ${with_pgsql}/pgsql/include; then + CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include" ADDED PKGBUILDs/libsasl/saslauthd.conf.d Index: PKGBUILDs/libsasl/saslauthd.conf.d ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/saslauthd.conf.d @@ -0,0 +1,1 @@ +SASLAUTHD_OPTS="-a pam" ADDED PKGBUILDs/libsasl/tmpfiles.conf Index: PKGBUILDs/libsasl/tmpfiles.conf ================================================================== --- /dev/null +++ PKGBUILDs/libsasl/tmpfiles.conf @@ -0,0 +1,1 @@ +d /run/saslauthd 0755 root root - - ADDED PKGBUILDs/libssh2/PKGBUILD Index: PKGBUILDs/libssh2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libssh2/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Dave Reisner +# (Arch Linux) Contributor: Angel Velasquez +# (Arch Linux) Contributor: Sergej Pupykin +# (Arch Linux) Contributor: Andrea Scarpino +# (Arch Linux) Contributor: ice-man + +pkgname=libssh2 +pkgver=1.4.3 +pkgrel=2 +pkgdesc="A library implementing the SSH2 protocol as defined by Internet Drafts" +url="http://www.libssh2.org/" +arch=('i586') +license=('BSD') +depends=('openssl') +makedepends=('zlib') +provides=('libssh2.so') +source=("http://www.libssh2.org/download/$pkgname-$pkgver.tar.gz"{,.asc}) +md5sums=('071004c60c5d6f90354ad1b701013a0b' + 'bd01eca1e58c15233d69dae411dd2656') + +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/usr + make +} + +package() { + cd "$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} ADDED PKGBUILDs/libtool/PKGBUILD Index: PKGBUILDs/libtool/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libtool/PKGBUILD @@ -0,0 +1,52 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +# NOTE: requires rebuilt with each new gcc version + +pkgname=('libtool' 'libltdl') +pkgver=2.4.2 +_gccver=4.8.2 +pkgrel=12 +pkgdesc="A generic library support script" +arch=('i586') +url="http://www.gnu.org/software/libtool" +license=('GPL') +makedepends=("gcc=${_gccver}") +source=(ftp://ftp.gnu.org/pub/gnu/libtool/${pkgname}-${pkgver}.tar.xz{,.sig}) +md5sums=('2ec8997e0c07249eb4cbd072417d70fe' + '1e6ba57420c82c663c85e745d11c7eed') + +build() { + cd ${srcdir}/${pkgbase}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgbase}-${pkgver} + make check +} + +package_libtool() { + depends=('sh' "libltdl=$pkgver" 'tar' "gcc=${_gccver}") + groups=('base-devel') + install=libtool.install + + cd ${srcdir}/${pkgbase}-${pkgver} + + make DESTDIR=${pkgdir} install-binSCRIPTS install-man install-info \ + install-data-local + rm -r ${pkgdir}/usr/share/libtool/libltdl/ +} + +package_libltdl() { + pkgdesc="A system independent dlopen wrapper for GNU libtool" + + cd ${srcdir}/${pkgbase}-${pkgver} + make DESTDIR=${pkgdir} install-libLTLIBRARIES install-includeHEADERS \ + install-ltdlincludeHEADERS install-data-local + rm -r ${pkgdir}/usr/share/{aclocal,libtool/config} +} ADDED PKGBUILDs/libtool/libtool.install Index: PKGBUILDs/libtool/libtool.install ================================================================== --- /dev/null +++ PKGBUILDs/libtool/libtool.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(libtool.info libtool.info-1 libtool.info-2) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/libunistring/PKGBUILD Index: PKGBUILDs/libunistring/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libunistring/PKGBUILD @@ -0,0 +1,69 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +pkgbase=glib2 +pkgname=(glib2 glib2-docs) +pkgver=2.40.0 +pkgrel=1 +pkgdesc="Common C routines used by GTK+ and other libs" +url="http://www.gtk.org/" +arch=('i586') +makedepends=('pkg-config' 'python2' 'libxslt' 'docbook-xml' 'pcre' 'libffi' 'elfutils') +source=(http://ftp.gnome.org/pub/GNOME/sources/glib/${pkgver:0:4}/glib-$pkgver.tar.xz + revert-warn-glib-compile-schemas.patch) +sha256sums=('0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5' + '049240975cd2f1c88fbe7deb28af14d4ec7d2640495f7ca8980d873bb710cc97') + +prepare() { + cd glib-$pkgver + patch -Rp1 -i ../revert-warn-glib-compile-schemas.patch +} + +build() { + cd glib-$pkgver + PYTHON=/usr/bin/python2 ./configure --prefix=/usr --libdir=/usr/lib \ + --sysconfdir=/etc \ + --with-pcre=system \ + --disable-fam --disable-gtk-doc + make +} + +check() { + cd glib-$pkgver + #make -k check || : +} + +package_glib2() { + depends=('pcre' 'libffi') + optdepends=('python2: for gdbus-codegen and gtester-report' + 'elfutils: gresource inspection tool') + options=('!docs' '!emptydirs') + license=('LGPL') + + cd glib-$pkgver + make completiondir=/usr/share/bash-completion/completions DESTDIR="$pkgdir" install + + for _i in "$pkgdir/usr/share/bash-completion/completions/"*; do + chmod -x "$_i" + done + + # Our gdb does not ship the required python modules, so remove it + rm -rf "$pkgdir/usr/share/gdb/" +} + +package_glib2-docs() { + pkgdesc="Documentation for glib2" + conflicts=('gobject2-docs') + replaces=('gobject2-docs') + license=('custom') + options=('docs' '!emptydirs') + + cd glib-$pkgver/docs + make DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/licenses/glib2-docs" + install -m644 reference/COPYING "${pkgdir}/usr/share/licenses/glib2-docs/" + + rm -rf "${pkgdir}/usr/share/man" +} ADDED PKGBUILDs/libunistring/libunistring.install Index: PKGBUILDs/libunistring/libunistring.install ================================================================== --- /dev/null +++ PKGBUILDs/libunistring/libunistring.install @@ -0,0 +1,22 @@ +infodir=usr/share/info +filelist=(libunistring.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/libusb-compat/PKGBUILD Index: PKGBUILDs/libusb-compat/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libusb-compat/PKGBUILD @@ -0,0 +1,29 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tom Gundersen +# (Arch Linux) Contributor: Tobias Powalowski +# (Arch Linux) Contributor: arjan + +pkgname=libusb-compat +pkgver=0.1.5 +pkgrel=1 +pkgdesc="Library to enable user space application programs to communicate with USB devices" +arch=('i586') +url="http://libusb.sourceforge.net/" +license=('LGPL') +depends=('libusb' 'sh') +source=("http://downloads.sourceforge.net/${pkgname%-*}/${pkgname}-${pkgver%.*}/$pkgname-$pkgver/${pkgname}-${pkgver}.tar.bz2") + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --disable-static + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} + +md5sums=('2780b6a758a1e2c2943bdbf7faf740e4') ADDED PKGBUILDs/libusb/PKGBUILD Index: PKGBUILDs/libusb/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libusb/PKGBUILD @@ -0,0 +1,34 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tobias Powalowski + +pkgname=libusb +pkgver=1.0.18 +pkgrel=1 +depends=('musl') +pkgdesc="Library that provides generic access to USB device" +arch=('i586') +url="http://libusb.info/" +license=('LGPL') +source=(http://downloads.sourceforge.net/${pkgname}/releases/${pkgver}/${pkgname}-${pkgver}.tar.bz2) +replaces=('libusb1' 'libusbx') +provides=("libusbx=$pkgver") +conflicts=("libusbx") +md5sums=('4a6d049923efc6496f1d383054dac1a6') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --disable-static + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package () { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/libxml2/PKGBUILD Index: PKGBUILDs/libxml2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libxml2/PKGBUILD @@ -0,0 +1,47 @@ +# Taken from Arch Linux with patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot +# (Arch Linux) Maintainer: Tom Gundersen +# (Arch Linux) Contributor: John Proctor + +pkgname=libxml2 +pkgver=2.9.1 +pkgrel=5 +pkgdesc="XML parsing library, version 2" +arch=('i586') +license=('MIT') +depends=('zlib' 'readline' 'ncurses' 'xz') +makedepends=('python2') +url="http://www.xmlsoft.org/" +source=(ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz + http://www.w3.org/XML/Test/xmlts20080827.tar.gz + libxml2-pthread.patch) +md5sums=('9c0cfef285d5c4a5c80d00904ddab380' + 'ae3d1ebe000a3972afa104ca7f0e1b4a' + 'cc0da520c5296e87407d24166480da73') + +prepare() { + cd ${pkgname}-${pkgver} + + patch -p1 -i ../libxml2-pthread.patch + sed -e 's|/usr/bin/python -u|/usr/bin/python2 -u|g' -e 's|/usr/bin/python$|/usr/bin/python2|g' -i python/tests/*.py + mv ../xmlconf . +} + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr --with-threads --with-history --with-python=/usr/bin/python2 + make +} + +check() { + cd ${pkgname}-${pkgver} + make check +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} ADDED PKGBUILDs/libxml2/libxml2-pthread.patch Index: PKGBUILDs/libxml2/libxml2-pthread.patch ================================================================== --- /dev/null +++ PKGBUILDs/libxml2/libxml2-pthread.patch @@ -0,0 +1,11 @@ +--- libxml2-2.9.1/threads.c.orig ++++ libxml2-2.9.1/threads.c +@@ -47,7 +47,7 @@ + #ifdef HAVE_PTHREAD_H + + static int libxml_is_threaded = -1; +-#ifdef __GNUC__ ++#if defined(__GNUC__) && defined(__GLIBC__) + #ifdef linux + #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3) + extern int pthread_once (pthread_once_t *__once_control, ADDED PKGBUILDs/libxslt/CVE-2011-1202.patch Index: PKGBUILDs/libxslt/CVE-2011-1202.patch ================================================================== --- /dev/null +++ PKGBUILDs/libxslt/CVE-2011-1202.patch @@ -0,0 +1,56 @@ +From ecb6bcb8d1b7e44842edde3929f412d46b40c89f Mon Sep 17 00:00:00 2001 +From: Daniel Veillard +Date: Tue, 22 Feb 2011 02:14:23 +0000 +Subject: Fix generate-id() to not expose object addresses + +As pointed out by Chris Evans it's better +security wise to not expose object addresses directly, use a diff +w.r.t. the document root own address to avoid this +* libxslt/functions.c: fix IDs generation code +--- +diff --git a/libxslt/functions.c b/libxslt/functions.c +index 4720c7a..de962f4 100644 +--- a/libxslt/functions.c ++++ b/libxslt/functions.c +@@ -654,8 +654,9 @@ xsltFormatNumberFunction(xmlXPathParserContextPtr ctxt, int nargs) + void + xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){ + xmlNodePtr cur = NULL; +- unsigned long val; +- xmlChar str[20]; ++ long val; ++ xmlChar str[30]; ++ xmlDocPtr doc; + + if (nargs == 0) { + cur = ctxt->context->node; +@@ -694,9 +695,24 @@ xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){ + * Okay this is ugly but should work, use the NodePtr address + * to forge the ID + */ +- val = (unsigned long)((char *)cur - (char *)0); +- val /= sizeof(xmlNode); +- sprintf((char *)str, "id%ld", val); ++ if (cur->type != XML_NAMESPACE_DECL) ++ doc = cur->doc; ++ else { ++ xmlNsPtr ns = (xmlNsPtr) cur; ++ ++ if (ns->context != NULL) ++ doc = ns->context; ++ else ++ doc = ctxt->context->doc; ++ ++ } ++ ++ val = (long)((char *)cur - (char *)doc); ++ if (val >= 0) { ++ sprintf((char *)str, "idp%ld", val); ++ } else { ++ sprintf((char *)str, "idm%ld", -val); ++ } + valuePush(ctxt, xmlXPathNewString(str)); + } + +-- +cgit v0.9.0.2 ADDED PKGBUILDs/libxslt/PKGBUILD Index: PKGBUILDs/libxslt/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/libxslt/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Belanger +# (Arch Linux) Contributor: John Proctor + +pkgname=libxslt +pkgver=1.1.28 +pkgrel=3 +pkgdesc="XML stylesheet transformation library" +arch=('i586') +url="http://xmlsoft.org/XSLT/" +license=('custom') +depends=('libxml2' 'libgcrypt') +makedepends=('python2') +checkdepends=('docbook-xml') +source=(ftp://xmlsoft.org/libxslt/${pkgname}-${pkgver}.tar.gz) +md5sums=('9667bf6f9310b957254fdcf6596600b7') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + sed -e 's|/usr/bin/python -u|/usr/bin/python2 -u|g' -e 's|/usr/bin/python$|/usr/bin/python2|g' -i python/tests/*.py + ./configure --prefix=/usr --with-python=/usr/bin/python2 + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + install -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" + + rm -f "${pkgdir}"/usr/lib/python*/site-packages/*.a +} ADDED PKGBUILDs/links/PKGBUILD Index: PKGBUILDs/links/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/links/PKGBUILD @@ -0,0 +1,55 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric B?langer + +pkgname=links +pkgver=2.8 +pkgrel=1 +pkgdesc="A text WWW browser, similar to Lynx" +arch=('i586') +url="http://links.twibright.com/" +license=('GPL') +depends=('bzip2' 'xz' 'openssl') # 'gpm') +#makedepends=('libtiff' 'libpng' 'libxt') +#optdepends=('libx11: for using xlinks' 'libtiff: for using xlinks' 'libpng: for using xlinks') +provides=('links-g') +conflicts=('links-g') +replaces=('links-g') +source=(http://links.twibright.com/download/${pkgname}-${pkgver}.tar.bz2) # links.desktop) +sha1sums=('a808d80d910b7d3ad86f4c5089e64f35113b69f2' + 'f600e27c2a71184444f7dd07a10230aa44463a02') + +prepare() { + cd ${pkgname}-${pkgver} + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" configure +} + +build() { + cd ${pkgname}-${pkgver} +# (cd intl; ./gen-intl; ./synclang) +# ./configure --prefix=/usr --mandir=/usr/share/man --enable-javascript \ +# --enable-graphics --with-x --with-fb +# make +# mv links xlinks + + ./configure --prefix=/usr --mandir=/usr/share/man --enable-javascript \ + --disable-graphics --without-x --without-fb --without-gpm + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + +# install -m755 xlinks "${pkgdir}/usr/bin/xlinks" +# ln -s links.1.gz "${pkgdir}/usr/share/man/man1/xlinks.1.gz" + +# install -D -m644 "${srcdir}/links.desktop" "${pkgdir}/usr/share/applications/links.desktop" +# install -d "${pkgdir}/usr/share/pixmaps" +# install -m644 links_16x16_1.xpm links_16x16_2.xpm links_32x32.xpm "${pkgdir}/usr/share/pixmaps/" + + install -d "${pkgdir}/usr/share/doc/links/calibration" + install -m644 doc/links_cal/* "${pkgdir}/usr/share/doc/links/calibration/" +} +sha1sums=('a808d80d910b7d3ad86f4c5089e64f35113b69f2') ADDED PKGBUILDs/linux-libre-api-headers/PKGBUILD Index: PKGBUILDs/linux-libre-api-headers/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/linux-libre-api-headers/PKGBUILD @@ -0,0 +1,52 @@ +# Taken from ParabolaGNU/Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Parabola GNU/Linux) Maintainer : André Silva + +# toolchain build order: linux-libre-api-headers->glibc->binutils->gcc->binutils->glibc + +pkgname=linux-libre-api-headers +_basekernel=3.13 +_sublevel=2 +pkgver=${_basekernel}.${_sublevel} +pkgrel=1 +pkgdesc="Kernel headers sanitized for use in userspace" +arch=('i586') +url="http://www.gnu.org/software/libc" +license=('GPL2') +provides=("linux-api-headers=${pkgver}") +conflicts=('linux-api-headers') +replaces=('linux-api-headers') +noextract=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" + "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz") + +prepare() { + cd ${srcdir} + + tar xvJf ../linux-libre-${_basekernel}-gnu.tar.xz + xz -d --keep ../patch-${_basekernel}-gnu-${pkgver}-gnu.xz + + cd linux-${_basekernel} + if [ "${_basekernel}" != "${pkgver}" ]; then + patch -p1 -i "${srcdir}/../patch-${_basekernel}-gnu-${pkgver}-gnu" + fi +} + +build() { + cd ${srcdir}/linux-${_basekernel} + + make mrproper + make headers_check +} + +package() { + cd ${srcdir}/linux-${_basekernel} + make INSTALL_HDR_PATH=${pkgdir}/usr headers_install + + # use headers from libdrm + rm -r ${pkgdir}/usr/include/drm + + # clean-up unnecessary files generated during install + find ${pkgdir} \( -name .install -o -name ..install.cmd \) -delete +} ADDED PKGBUILDs/lua/LICENSE Index: PKGBUILDs/lua/LICENSE ================================================================== --- /dev/null +++ PKGBUILDs/lua/LICENSE @@ -0,0 +1,30 @@ +License + +Lua is free software distributed under the terms of the MIT license +reproduced below; it may be used for any purpose, including commercial +purposes, at absolutely no cost without having to ask us. The only +requirement is that if you do use Lua, then you should give us credit +by including the appropriate copyright notice somewhere in your +product or its documentation. + + Copyright © 1994–2012 Lua.org, PUC-Rio. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. ADDED PKGBUILDs/lua/PKGBUILD Index: PKGBUILDs/lua/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/lua/PKGBUILD @@ -0,0 +1,55 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Sébastien Luttringer +# (Arch Linux) Contributor: Juergen Hoetzel +# (Arch Linux) Contributor: Damir Perisa + +pkgname=lua +pkgver=5.2.3 +pkgrel=1 +pkgdesc='Powerful light-weight programming language designed for extending applications' +arch=('i586') +url='http://www.lua.org/' +depends=('readline') +license=('MIT') +options=('!makeflags' '!emptydirs') +source=(http://www.lua.org/ftp/$pkgname-$pkgver.tar.gz + liblua.so.patch + lua.pc + LICENSE) +md5sums=('dc7f94ec6ff15c985d2d6ad0f1b35654' + 'bdc663c7b82ffc0b5df67611621fb625' + 'e7ba6c2b695b0b84a5ea0cbff5fc9067' + '0e2bd67b909b9ff673da844ca3480df2') + +prepare() { + cd $pkgname-$pkgver + patch -p1 -i ../liblua.so.patch +} + +build() { + cd $pkgname-$pkgver + + export CFLAGS="$CFLAGS -fPIC" + make MYCFLAGS="$CFLAGS" MYLDFLAGS="$LDFLAGS" linux + + sed "s/%VER%/${pkgver%.*}/g;s/%REL%/$pkgver/g" ../lua.pc > lua.pc +} + +package() { + cd $pkgname-$pkgver + + make \ + TO_LIB='liblua.a liblua.so liblua.so.5.2 liblua.so.5.2.3' \ + INSTALL_DATA='cp -d' \ + INSTALL_TOP="$pkgdir"/usr \ + INSTALL_MAN="$pkgdir"/usr/share/man/man1 \ + install + install -Dm644 lua.pc "$pkgdir"/usr/lib/pkgconfig/lua.pc + + # Install the documentation + install -d "$pkgdir"/usr/share/doc/lua + install -m644 doc/*.{gif,png,css,html} "$pkgdir"/usr/share/doc/lua + install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} ADDED PKGBUILDs/lua/liblua.so.patch Index: PKGBUILDs/lua/liblua.so.patch ================================================================== --- /dev/null +++ PKGBUILDs/lua/liblua.so.patch @@ -0,0 +1,57 @@ +diff -ru lua-5.2.1/Makefile lua-5.2.1.new/Makefile +--- lua-5.2.1/Makefile 2012-05-17 16:05:54.000000000 +0200 ++++ lua-5.2.1.new/Makefile 2012-09-12 22:39:07.162748096 +0200 +@@ -52,7 +52,7 @@ + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ V=$(V) R=$(R) + + test: dummy + src/lua -v +diff -ru lua-5.2.1/src/luaconf.h lua-5.2.1.new/src/luaconf.h +--- lua-5.2.1/src/luaconf.h 2012-05-11 16:14:42.000000000 +0200 ++++ lua-5.2.1.new/src/luaconf.h 2012-09-12 22:40:27.986622772 +0200 +@@ -100,7 +100,7 @@ + #else /* }{ */ + + #define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/" +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR + #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR + #define LUA_PATH_DEFAULT \ +diff -ru lua-5.2.1/src/Makefile lua-5.2.1.new/src/Makefile +--- lua-5.2.1/src/Makefile 2012-03-09 17:32:16.000000000 +0100 ++++ lua-5.2.1.new/src/Makefile 2012-09-12 22:38:08.591386896 +0200 +@@ -29,6 +29,7 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ + lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ + ltm.o lundump.o lvm.o lzio.o +@@ -43,7 +44,7 @@ + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -59,6 +60,12 @@ + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + ADDED PKGBUILDs/lua/lua.pc Index: PKGBUILDs/lua/lua.pc ================================================================== --- /dev/null +++ PKGBUILDs/lua/lua.pc @@ -0,0 +1,20 @@ +V=%VER% +R=%REL% + +prefix=/usr +INSTALL_BIN=${prefix}/bin +INSTALL_INC=${prefix}/include +INSTALL_LIB=${prefix}/lib +INSTALL_MAN=${prefix}/man/man1 +INSTALL_LMOD=${prefix}/share/lua/${V} +INSTALL_CMOD=${prefix}/lib/lua/${V} +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Lua +Description: An Extensible Extension Language +Version: ${R} +Requires: +Libs: -L${libdir} -llua -lm +Cflags: -I${includedir} ADDED PKGBUILDs/lzo2/PKGBUILD Index: PKGBUILDs/lzo2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/lzo2/PKGBUILD @@ -0,0 +1,44 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Contributor: Low Kian Seong +# (Arch Linux) Maintainer: dorphell + +pkgname=lzo2 +pkgver=2.06 +pkgrel=3 +pkgdesc="Portable lossless data compression library" +arch=('i586') +url="http://www.oberhumer.com/opensource/lzo" +license=('GPL') +depends=('musl') +source=(http://www.oberhumer.com/opensource/lzo/download/lzo-${pkgver}.tar.gz) +md5sums=('95380bd4081f85ef08c5209f4107e9f8') + +build() { + cd "${srcdir}/lzo-${pkgver}" + + ./configure --prefix=/usr --enable-shared + make + + # build minilzo + gcc $CFLAGS -fpic -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c + gcc $LDFLAGS -shared -o libminilzo.so.0 -Wl,-soname,libminilzo.so.0 minilzo/minilzo.o +} + +check() { + cd "${srcdir}/lzo-${pkgver}" + make test # Larger test + make check +} + +package() { + cd "${srcdir}/lzo-${pkgver}" + make DESTDIR=${pkgdir} install + + # install minilzo + install -m 755 libminilzo.so.0 ${pkgdir}/usr/lib + install -p -m 644 minilzo/minilzo.h ${pkgdir}/usr/include/lzo + cd ${pkgdir}/usr/lib + ln -s libminilzo.so.0 libminilzo.so +} ADDED PKGBUILDs/m4/PKGBUILD Index: PKGBUILDs/m4/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/m4/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=m4 +pkgver=1.4.17 +pkgrel=1 +pkgdesc="The GNU macro processor" +arch=('i586') +url="http://www.gnu.org/software/m4" +license=('GPL3') +groups=('base-devel') +depends=('musl' 'bash') +install=m4.install +source=(ftp://ftp.gnu.org/gnu/m4/$pkgname-$pkgver.tar.xz{,.sig}) +md5sums=('12a3c829301a4fd6586a57d3fcf196dc' + 'SKIP') + +build() { + cd ${srcdir}/$pkgname-$pkgver + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/$pkgname-$pkgver + make check +} + +package() { + cd ${srcdir}/$pkgname-$pkgver + make prefix=${pkgdir}/usr install + rm -r "${pkgdir}"/usr/lib +} ADDED PKGBUILDs/m4/m4-1.4.16-readlink-einval.patch Index: PKGBUILDs/m4/m4-1.4.16-readlink-einval.patch ================================================================== --- /dev/null +++ PKGBUILDs/m4/m4-1.4.16-readlink-einval.patch @@ -0,0 +1,12 @@ +diff -up m4-1.4.16/tests/test-readlink.h.orig m4-1.4.16/tests/test-readlink.h +--- m4-1.4.16/tests/test-readlink.h.orig 2011-09-19 12:44:58.745546826 +0200 ++++ m4-1.4.16/tests/test-readlink.h 2011-09-19 12:46:00.079548410 +0200 +@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char con + ASSERT (errno == ENOENT); + errno = 0; + ASSERT (func ("", buf, sizeof buf) == -1); +- ASSERT (errno == ENOENT); ++ ASSERT (errno == ENOENT || errno == EINVAL); + errno = 0; + ASSERT (func (".", buf, sizeof buf) == -1); + ASSERT (errno == EINVAL); ADDED PKGBUILDs/m4/m4.install Index: PKGBUILDs/m4/m4.install ================================================================== --- /dev/null +++ PKGBUILDs/m4/m4.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=('m4.info' 'm4.info-1' 'm4.info-2') + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/make/PKGBUILD Index: PKGBUILDs/make/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/make/PKGBUILD @@ -0,0 +1,44 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=make +pkgver=4.0 +pkgrel=2 +pkgdesc="GNU make utility to maintain groups of programs" +arch=('i586') +url="http://www.gnu.org/software/make" +license=('GPL3') +groups=('base-devel') +depends=('musl' 'sh') # 'guile') +install=$pkgname.install +source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig} + make-4.0-char-cast.patch) +md5sums=('571d470a7647b455e3af3f92d79f1c18' + 'SKIP' + '1840aae18e1c0d1c52563020ef3ff5f3') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + + # http://git.savannah.gnu.org/cgit/make.git/commit/?id=9d58570c + patch -p1 -i ${srcdir}/make-4.0-char-cast.patch +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/make/make-3.82-bug30612.patch Index: PKGBUILDs/make/make-3.82-bug30612.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-3.82-bug30612.patch @@ -0,0 +1,91 @@ +--- make-3.82-orig/main.c 2010-07-19 17:10:53.000000000 +1000 ++++ make-3.82-fix30612//main.c 2010-09-23 23:33:37.908855839 +1000 +@@ -1,3 +1,4 @@ ++ + /* Argument parsing and main program of GNU Make. + Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +@@ -1138,7 +1139,7 @@ + a macro and some compilers (MSVC) don't like conditionals in macros. */ + { + const char *features = "target-specific order-only second-expansion" +- " else-if shortest-stem undefine" ++ " else-if shortest-stem undefine oneshell" + #ifndef NO_ARCHIVES + " archives" + #endif +diff -Naur make-3.82-orig/read.c make-3.82-fix30612//read.c +--- make-3.82-orig/read.c 2010-07-13 11:20:42.000000000 +1000 ++++ make-3.82-fix30612//read.c 2010-09-23 23:30:58.018855839 +1000 +@@ -3028,7 +3028,7 @@ + { + /* This looks like the first element in an open archive group. + A valid group MUST have ')' as the last character. */ +- const char *e = p + nlen; ++ const char *e = p; + do + { + e = next_token (e); +@@ -3084,19 +3084,19 @@ + Go to the next item in the string. */ + if (flags & PARSEFS_NOGLOB) + { +- NEWELT (concat (2, prefix, tp)); ++ NEWELT (concat (2, prefix, tmpbuf)); + continue; + } + + /* If we get here we know we're doing glob expansion. + TP is a string in tmpbuf. NLEN is no longer used. + We may need to do more work: after this NAME will be set. */ +- name = tp; ++ name = tmpbuf; + + /* Expand tilde if applicable. */ +- if (tp[0] == '~') ++ if (tmpbuf[0] == '~') + { +- tildep = tilde_expand (tp); ++ tildep = tilde_expand (tmpbuf); + if (tildep != 0) + name = tildep; + } +@@ -3152,7 +3152,11 @@ + else + { + /* We got a chain of items. Attach them. */ +- (*newp)->next = found; ++ if (*newp) ++ (*newp)->next = found; ++ else ++ *newp = found; ++ + + /* Find and set the new end. Massage names if necessary. */ + while (1) +diff --git make-3.82-orig/read.c make-3.82-fix30612/read.c +index c87d4a7..b012094 100644 +--- make-3.82-orig/read.c ++++ make-3.82-fix30612/read.c +@@ -3044,16 +3044,16 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar, + nlen -= (n + 1) - tp; + tp = n + 1; + +- /* If we have just "lib(", part of something like +- "lib( a b)", go to the next item. */ +- if (! nlen) +- continue; +- + /* We can stop looking now. */ + break; + } + } + while (*e != '\0'); ++ ++ /* If we have just "lib(", part of something like "lib( a b)", ++ go to the next item. */ ++ if (! nlen) ++ continue; + } + } + ADDED PKGBUILDs/make/make-3.82-bug30723.patch Index: PKGBUILDs/make/make-3.82-bug30723.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-3.82-bug30723.patch @@ -0,0 +1,12 @@ +diff -Naur make-3.82-orig/main.c make-3.82-fix30723//main.c +--- make-3.82-orig/main.c 2010-07-19 17:10:53.000000000 +1000 ++++ make-3.82-fix30723//main.c 2010-09-23 23:34:10.932188592 +1000 +@@ -2093,7 +2093,7 @@ + const char *pv = define_makeflags (1, 1); + char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1); + sprintf (p, "MAKEFLAGS=%s", pv); +- putenv (p); ++ putenv (allocated_variable_expand (p)); + } + + if (ISDB (DB_BASIC)) ADDED PKGBUILDs/make/make-3.82-dont-prune-intermediate.patch Index: PKGBUILDs/make/make-3.82-dont-prune-intermediate.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-3.82-dont-prune-intermediate.patch @@ -0,0 +1,57 @@ +2012-09-09 Paul Smith + + * remake.c (update_file_1): Force intermediate files to be + considered, not pruned, if their non-intermediate parent needs to + be remade. Fixes Savannah bug #30653. + +Index: remake.c +=================================================================== +RCS file: /sources/make/make/remake.c,v +retrieving revision 1.153 +retrieving revision 1.154 +diff -u -r1.153 -r1.154 +--- remake.c 5 Mar 2012 14:10:45 -0000 1.153 ++++ remake.c 10 Sep 2012 02:36:05 -0000 1.154 +@@ -612,6 +612,10 @@ + d->file->dontcare = file->dontcare; + } + ++ /* We may have already considered this file, when we didn't know ++ we'd need to update it. Force update_file() to consider it and ++ not prune it. */ ++ d->file->considered = !considered; + + dep_status |= update_file (d->file, depth); + +Index: tests/scripts/features/parallelism +=================================================================== +RCS file: /sources/make/make/tests/scripts/features/parallelism,v +retrieving revision 1.19 +retrieving revision 1.20 +diff -u -r1.19 -r1.20 +--- tests/scripts/features/parallelism 4 Mar 2012 00:24:32 -0000 1.19 ++++ tests/scripts/features/parallelism 10 Sep 2012 02:36:05 -0000 1.20 +@@ -214,6 +214,23 @@ + rmfiles(qw(foo.y foo.y.in main.bar)); + } + ++# Ensure intermediate/secondary files are not pruned incorrectly. ++# See Savannah bug #30653 ++ ++utouch(-15, 'file2'); ++utouch(-10, 'file4'); ++utouch(-5, 'file1'); ++ ++run_make_test(q! ++.INTERMEDIATE: file3 ++file4: file3 ; @mv -f $< $@ ++file3: file2 ; touch $@ ++file2: file1 ; @touch $@ ++!, ++ '--no-print-directory -j2', "touch file3"); ++ ++#rmfiles('file1', 'file2', 'file3', 'file4'); ++ + if ($all_tests) { + # Jobserver FD handling is messed up in some way. + # Savannah bug #28189 ADDED PKGBUILDs/make/make-3.82-expensive_glob.patch Index: PKGBUILDs/make/make-3.82-expensive_glob.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-3.82-expensive_glob.patch @@ -0,0 +1,116 @@ +Index: read.c +=================================================================== +RCS file: /sources/make/make/read.c,v +retrieving revision 1.198 +retrieving revision 1.200 +diff -u -r1.198 -r1.200 +--- read.c 29 Apr 2011 15:27:39 -0000 1.198 ++++ read.c 7 May 2011 14:36:12 -0000 1.200 +@@ -2901,6 +2901,7 @@ + const char *name; + const char **nlist = 0; + char *tildep = 0; ++ int globme = 1; + #ifndef NO_ARCHIVES + char *arname = 0; + char *memname = 0; +@@ -3109,32 +3110,40 @@ + } + #endif /* !NO_ARCHIVES */ + +- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) +- { +- case GLOB_NOSPACE: +- fatal (NILF, _("virtual memory exhausted")); +- +- case 0: +- /* Success. */ +- i = gl.gl_pathc; +- nlist = (const char **)gl.gl_pathv; +- break; +- +- case GLOB_NOMATCH: +- /* If we want only existing items, skip this one. */ +- if (flags & PARSEFS_EXISTS) +- { +- i = 0; +- break; +- } +- /* FALLTHROUGH */ +- +- default: +- /* By default keep this name. */ ++ /* glob() is expensive: don't call it unless we need to. */ ++ if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL) ++ { ++ globme = 0; + i = 1; + nlist = &name; +- break; +- } ++ } ++ else ++ switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl)) ++ { ++ case GLOB_NOSPACE: ++ fatal (NILF, _("virtual memory exhausted")); ++ ++ case 0: ++ /* Success. */ ++ i = gl.gl_pathc; ++ nlist = (const char **)gl.gl_pathv; ++ break; ++ ++ case GLOB_NOMATCH: ++ /* If we want only existing items, skip this one. */ ++ if (flags & PARSEFS_EXISTS) ++ { ++ i = 0; ++ break; ++ } ++ /* FALLTHROUGH */ ++ ++ default: ++ /* By default keep this name. */ ++ i = 1; ++ nlist = &name; ++ break; ++ } + + /* For each matched element, add it to the list. */ + while (i-- > 0) +@@ -3174,7 +3183,8 @@ + #endif /* !NO_ARCHIVES */ + NEWELT (concat (2, prefix, nlist[i])); + +- globfree (&gl); ++ if (globme) ++ globfree (&gl); + + #ifndef NO_ARCHIVES + if (arname) +Index: tests/scripts/functions/wildcard +=================================================================== +RCS file: /sources/make/make/tests/scripts/functions/wildcard,v +retrieving revision 1.6 +retrieving revision 1.7 +diff -u -r1.6 -r1.7 +--- tests/scripts/functions/wildcard 13 Jun 2009 21:21:49 -0000 1.6 ++++ tests/scripts/functions/wildcard 7 May 2011 14:36:11 -0000 1.7 +@@ -88,4 +88,16 @@ + !, + '', "\n"); + ++# TEST #5: wildcard used to verify file existence ++ ++touch('xxx.yyy'); ++ ++run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!, ++ '', "file=xxx.yyy\n"); ++ ++unlink('xxx.yyy'); ++ ++run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!, ++ '', "file=\n"); ++ + 1; ADDED PKGBUILDs/make/make-3.82-makeflags.patch Index: PKGBUILDs/make/make-3.82-makeflags.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-3.82-makeflags.patch @@ -0,0 +1,36 @@ +Index: main.c +=================================================================== +RCS file: /sources/make/make/main.c,v +retrieving revision 1.246 +diff -u -r1.246 main.c +--- main.c 29 Aug 2010 23:05:27 -0000 1.246 ++++ main.c 27 Jul 2011 22:03:12 -0000 +@@ -2091,10 +2095,16 @@ + + /* Reset makeflags in case they were changed. */ + { ++ if (master_job_slots) ++ { ++ assert (job_slots == default_job_slots); ++ job_slots = master_job_slots; ++ } + const char *pv = define_makeflags (1, 1); + char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1); + sprintf (p, "MAKEFLAGS=%s", pv); + putenv (allocated_variable_expand (p)); ++ job_slots = default_job_slots; + } + + if (ISDB (DB_BASIC)) +@@ -2825,9 +2852,11 @@ + && (*(unsigned int *) cs->value_ptr == + *(unsigned int *) cs->noarg_value)) + ADD_FLAG ("", 0); /* Optional value omitted; see below. */ ++#if 0 + else if (cs->c == 'j') + /* Special case for `-j'. */ + ADD_FLAG ("1", 1); ++#endif + else + { + char *buf = alloca (30); ADDED PKGBUILDs/make/make-3.82-sort-blank.patch Index: PKGBUILDs/make/make-3.82-sort-blank.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-3.82-sort-blank.patch @@ -0,0 +1,17 @@ +diff -urp make-3.82/function.c make-3.82-pm/function.c +--- make-3.82/function.c 2010-07-13 03:20:39.000000000 +0200 ++++ make-3.82-pm/function.c 2010-10-27 01:43:27.000000000 +0200 +@@ -1138,12 +1138,12 @@ func_sort (char *o, char **argv, const c + { + char c = *(t++); + +- if (! isspace ((unsigned char)c)) ++ if (! isblank ((unsigned char)c)) + continue; + + ++wordi; + +- while (isspace ((unsigned char)*t)) ++ while (isblank ((unsigned char)*t)) + ++t; + } ADDED PKGBUILDs/make/make-4.0-char-cast.patch Index: PKGBUILDs/make/make-4.0-char-cast.patch ================================================================== --- /dev/null +++ PKGBUILDs/make/make-4.0-char-cast.patch @@ -0,0 +1,43 @@ +From 9d58570c77240fed53d1f88217877f8e778f4bb2 Mon Sep 17 00:00:00 2001 +From: Paul Smith +Date: Sat, 26 Oct 2013 04:10:17 +0000 +Subject: * makeint.h (STOP_SET): [SV 40371] Cast to unsigned char. + +* tests/scripts/misc/utf8: Test variable names with characters >127. +Fix suggested by Robert Bogomip +--- +diff --git a/makeint.h b/makeint.h +index 77f51e0..c591427 100644 +--- a/makeint.h ++++ b/makeint.h +@@ -415,7 +415,7 @@ extern int unixy_shell; + # define MAP_VMSCOMMA 0x0000 + #endif + +-#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(int)(_v)],(_m)) ++#define STOP_SET(_v,_m) ANY_SET (stopchar_map[(unsigned char)(_v)],(_m)) + + #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) + # define SET_STACK_SIZE +diff --git a/tests/scripts/misc/utf8 b/tests/scripts/misc/utf8 +new file mode 100644 +index 0000000..2adcd07 +--- a/dev/null ++++ b/tests/scripts/misc/utf8 +@@ -0,0 +1,14 @@ ++# -*-perl-*- ++$description = "Test utf8 handling."; ++ ++$details = ""; ++ ++# Variable names containing UTF8 characters ++run_make_test(" ++\xe2\x96\xaa := hello ++\$(info \$(\xe2\x96\xaa)) ++all: ++", ++ '', "hello\n#MAKE#: Nothing to be done for 'all'."); ++ ++1; +-- +cgit v0.9.0.2 ADDED PKGBUILDs/make/make.install Index: PKGBUILDs/make/make.install ================================================================== --- /dev/null +++ PKGBUILDs/make/make.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(make.info make.info-1 make.info-2) + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/mpdecimal/PKGBUILD Index: PKGBUILDs/mpdecimal/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/mpdecimal/PKGBUILD @@ -0,0 +1,30 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Felix Yan + +pkgname=mpdecimal +pkgver=2.4.0 +pkgrel=1 +pkgdesc="Package for correctly-rounded arbitrary precision decimal floating point arithmetic" +arch=('i586') +url="http://www.bytereef.org/mpdecimal/index.html" +license=('custom') +depends=('musl') +source=(http://www.bytereef.org/software/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz) + +build() { + cd ${pkgname}-${pkgver} + + ./configure --prefix=/usr + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/$pkgname/LICENSE.txt" +} + +sha512sums=('9528274c77f874ea75652f08e64bb76ecdaa6c2111900809bc3ce58b4740d8b313bf41283cfb41b525a7d2df7d86cb7d9415b0abb2ce58a209df9d54e2ab0f75') ADDED PKGBUILDs/mpfr/PKGBUILD Index: PKGBUILDs/mpfr/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/mpfr/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: damir + +pkgname=mpfr +_pkgver=3.1.2 +_patchlevel=p5 +pkgver=${_pkgver}.${_patchlevel} +#pkgver=${_pkgver} +pkgrel=1 +pkgdesc="Multiple-precision floating-point library" +arch=('i586') +url="http://www.mpfr.org/" +license=('LGPL') +depends=('gmp>=5.0') +install=mpfr.install +source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz{,.asc} + mpfr-${_pkgver}-${_patchlevel}.patch) +md5sums=('e3d203d188b8fe60bb6578dd3152e05c' + 'SKIP' + 'e19c1d8db2cde4991ab52c8c20d16185') + +build() { + cd "${srcdir}/${pkgname}-${_pkgver}" + patch -p1 -i $srcdir/mpfr-${_pkgver}-${_patchlevel}.patch + ./configure --prefix=/usr --enable-thread-safe --enable-shared + make +} + +check() { + cd "${srcdir}/${pkgname}-${_pkgver}" + make check +} + +package() { + cd "${srcdir}/${pkgname}-${_pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/mpfr/mpfr-3.1.2-p5.patch Index: PKGBUILDs/mpfr/mpfr-3.1.2-p5.patch ================================================================== --- /dev/null +++ PKGBUILDs/mpfr/mpfr-3.1.2-p5.patch @@ -0,0 +1,905 @@ +diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES +--- mpfr-3.1.2-a/PATCHES 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:52:52.000000000 +0000 +@@ -0,0 +1 @@ ++exp_2 +diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION +--- mpfr-3.1.2-a/VERSION 2013-03-13 15:37:28.000000000 +0000 ++++ mpfr-3.1.2-b/VERSION 2013-09-26 10:52:52.000000000 +0000 +@@ -1 +1 @@ +-3.1.2 ++3.1.2-p1 +diff -Naurd mpfr-3.1.2-a/src/exp_2.c mpfr-3.1.2-b/src/exp_2.c +--- mpfr-3.1.2-a/src/exp_2.c 2013-03-13 15:37:28.000000000 +0000 ++++ mpfr-3.1.2-b/src/exp_2.c 2013-09-26 10:52:52.000000000 +0000 +@@ -204,7 +204,7 @@ + for (k = 0; k < K; k++) + { + mpz_mul (ss, ss, ss); +- exps <<= 1; ++ exps *= 2; + exps += mpz_normalize (ss, ss, q); + } + mpfr_set_z (s, ss, MPFR_RNDN); +diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h +--- mpfr-3.1.2-a/src/mpfr.h 2013-03-13 15:37:37.000000000 +0000 ++++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "3.1.2" ++#define MPFR_VERSION_STRING "3.1.2-p1" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c +--- mpfr-3.1.2-a/src/version.c 2013-03-13 15:37:34.000000000 +0000 ++++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:52:52.000000000 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.2"; ++ return "3.1.2-p1"; + } +diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES +--- mpfr-3.1.2-a/PATCHES 2013-09-26 10:56:55.000000000 +0000 ++++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:56:55.000000000 +0000 +@@ -0,0 +1 @@ ++fits-smallneg +diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION +--- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/VERSION 2013-09-26 10:56:55.000000000 +0000 +@@ -1 +1 @@ +-3.1.2-p1 ++3.1.2-p2 +diff -Naurd mpfr-3.1.2-a/src/fits_u.h mpfr-3.1.2-b/src/fits_u.h +--- mpfr-3.1.2-a/src/fits_u.h 2013-03-13 15:37:35.000000000 +0000 ++++ mpfr-3.1.2-b/src/fits_u.h 2013-09-26 10:56:55.000000000 +0000 +@@ -32,17 +32,20 @@ + int res; + + if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) +- /* Zero always fit */ +- return MPFR_IS_ZERO (f) ? 1 : 0; +- else if (MPFR_IS_NEG (f)) +- /* Negative numbers don't fit */ +- return 0; +- /* now it fits if +- (a) f <= MAXIMUM +- (b) round(f, prec(slong), rnd) <= MAXIMUM */ ++ return MPFR_IS_ZERO (f) ? 1 : 0; /* Zero always fits */ + + e = MPFR_GET_EXP (f); + ++ if (MPFR_IS_NEG (f)) ++ return e >= 1 ? 0 /* f <= -1 does not fit */ ++ : rnd != MPFR_RNDN ? MPFR_IS_LIKE_RNDU (rnd, -1) /* directed mode */ ++ : e < 0 ? 1 /* f > -1/2 fits in MPFR_RNDN */ ++ : mpfr_powerof2_raw(f); /* -1/2 fits, -1 < f < -1/2 don't */ ++ ++ /* Now it fits if ++ (a) f <= MAXIMUM ++ (b) round(f, prec(slong), rnd) <= MAXIMUM */ ++ + /* first compute prec(MAXIMUM); fits in an int */ + for (s = MAXIMUM, prec = 0; s != 0; s /= 2, prec ++); + +diff -Naurd mpfr-3.1.2-a/src/fits_uintmax.c mpfr-3.1.2-b/src/fits_uintmax.c +--- mpfr-3.1.2-a/src/fits_uintmax.c 2013-03-13 15:37:33.000000000 +0000 ++++ mpfr-3.1.2-b/src/fits_uintmax.c 2013-09-26 10:56:55.000000000 +0000 +@@ -27,51 +27,19 @@ + #include "mpfr-intmax.h" + #include "mpfr-impl.h" + +-#ifdef _MPFR_H_HAVE_INTMAX_T +- +-/* We can't use fits_u.h <= mpfr_cmp_ui */ +-int +-mpfr_fits_uintmax_p (mpfr_srcptr f, mpfr_rnd_t rnd) +-{ +- mpfr_exp_t e; +- int prec; +- uintmax_t s; +- mpfr_t x; +- int res; +- +- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) +- /* Zero always fit */ +- return MPFR_IS_ZERO (f) ? 1 : 0; +- else if (MPFR_IS_NEG (f)) +- /* Negative numbers don't fit */ +- return 0; +- /* now it fits if +- (a) f <= MAXIMUM +- (b) round(f, prec(slong), rnd) <= MAXIMUM */ +- +- e = MPFR_GET_EXP (f); +- +- /* first compute prec(MAXIMUM); fits in an int */ +- for (s = MPFR_UINTMAX_MAX, prec = 0; s != 0; s /= 2, prec ++); +- +- /* MAXIMUM needs prec bits, i.e. MAXIMUM = 2^prec - 1 */ +- +- /* if e <= prec - 1, then f < 2^(prec-1) < MAXIMUM */ +- if (e <= prec - 1) +- return 1; ++/* Note: though mpfr-impl.h is included in fits_u.h, we also include it ++ above so that it gets included even when _MPFR_H_HAVE_INTMAX_T is not ++ defined; this is necessary to avoid an empty translation unit, which ++ is forbidden by ISO C. Without this, a failing test can be reproduced ++ by creating an invalid stdint.h somewhere in the default include path ++ and by compiling MPFR with "gcc -ansi -pedantic-errors". */ + +- /* if e >= prec + 1, then f >= 2^prec > MAXIMUM */ +- if (e >= prec + 1) +- return 0; ++#ifdef _MPFR_H_HAVE_INTMAX_T + +- MPFR_ASSERTD (e == prec); ++#define FUNCTION mpfr_fits_uintmax_p ++#define MAXIMUM MPFR_UINTMAX_MAX ++#define TYPE uintmax_t + +- /* hard case: first round to prec bits, then check */ +- mpfr_init2 (x, prec); +- mpfr_set (x, f, rnd); +- res = MPFR_GET_EXP (x) == e; +- mpfr_clear (x); +- return res; +-} ++#include "fits_u.h" + + #endif +diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h +--- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:56:55.000000000 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "3.1.2-p1" ++#define MPFR_VERSION_STRING "3.1.2-p2" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c +--- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:56:55.000000000 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.2-p1"; ++ return "3.1.2-p2"; + } +diff -Naurd mpfr-3.1.2-a/tests/tfits.c mpfr-3.1.2-b/tests/tfits.c +--- mpfr-3.1.2-a/tests/tfits.c 2013-03-13 15:37:45.000000000 +0000 ++++ mpfr-3.1.2-b/tests/tfits.c 2013-09-26 10:56:55.000000000 +0000 +@@ -33,155 +33,176 @@ + #include "mpfr-intmax.h" + #include "mpfr-test.h" + +-#define ERROR1 { printf("Initial error for x="); mpfr_dump(x); exit(1); } +-#define ERROR2 { printf("Error for x="); mpfr_dump(x); exit(1); } ++#define ERROR1(N) \ ++ do \ ++ { \ ++ printf("Error %d for rnd = %s and x = ", N, \ ++ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \ ++ mpfr_dump(x); \ ++ exit(1); \ ++ } \ ++ while (0) + + static void check_intmax (void); + + int + main (void) + { +- mpfr_t x; ++ mpfr_t x, y; ++ int i, r; + + tests_start_mpfr (); + + mpfr_init2 (x, 256); ++ mpfr_init2 (y, 8); + +- /* Check NAN */ +- mpfr_set_nan (x); +- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR1; ++ RND_LOOP (r) ++ { + +- /* Check INF */ +- mpfr_set_inf (x, 1); +- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR1; ++ /* Check NAN */ ++ mpfr_set_nan (x); ++ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (1); ++ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (2); ++ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (3); ++ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (4); ++ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (5); ++ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (6); + +- /* Check Zero */ +- MPFR_SET_ZERO (x); +- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check INF */ ++ mpfr_set_inf (x, 1); ++ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (7); ++ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (8); ++ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (9); ++ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (10); ++ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (11); ++ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (12); + +- /* Check small op */ +- mpfr_set_str1 (x, "1@-1"); +- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check Zero */ ++ MPFR_SET_ZERO (x); ++ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (13); ++ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (14); ++ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (15); ++ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (16); ++ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (17); ++ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (18); + +- /* Check 17 */ +- mpfr_set_ui (x, 17, MPFR_RNDN); +- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check small positive op */ ++ mpfr_set_str1 (x, "1@-1"); ++ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (19); ++ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (20); ++ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (21); ++ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (22); ++ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (23); ++ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (24); + +- /* Check all other values */ +- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); +- mpfr_mul_2exp (x, x, 1, MPFR_RNDN); +- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR1; +- mpfr_mul_2exp (x, x, 40, MPFR_RNDN); +- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR1; ++ /* Check 17 */ ++ mpfr_set_ui (x, 17, MPFR_RNDN); ++ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (25); ++ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (26); ++ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (27); ++ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (28); ++ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (29); ++ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (30); + +- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); +- if (!mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_ui (x, LONG_MAX, MPFR_RNDN); +- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_ui (x, UINT_MAX, MPFR_RNDN); +- if (!mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_ui (x, INT_MAX, MPFR_RNDN); +- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN); +- if (!mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN); +- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check all other values */ ++ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); ++ mpfr_mul_2exp (x, x, 1, MPFR_RNDN); ++ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (31); ++ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (32); ++ mpfr_mul_2exp (x, x, 40, MPFR_RNDN); ++ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (33); ++ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (34); ++ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (35); ++ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (36); ++ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (37); + +- mpfr_set_si (x, 1, MPFR_RNDN); +- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR2; ++ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN); ++ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (38); ++ mpfr_set_ui (x, LONG_MAX, MPFR_RNDN); ++ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (39); ++ mpfr_set_ui (x, UINT_MAX, MPFR_RNDN); ++ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (40); ++ mpfr_set_ui (x, INT_MAX, MPFR_RNDN); ++ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (41); ++ mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN); ++ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (42); ++ mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN); ++ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (43); + +- /* Check negative value */ +- mpfr_set_si (x, -1, MPFR_RNDN); +- if (!mpfr_fits_sint_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_sshort_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_slong_p (x, MPFR_RNDN)) +- ERROR2; +- if (mpfr_fits_uint_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_ushort_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_ulong_p (x, MPFR_RNDN)) +- ERROR1; ++ mpfr_set_si (x, 1, MPFR_RNDN); ++ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (44); ++ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (45); ++ ++ /* Check negative op */ ++ for (i = 1; i <= 4; i++) ++ { ++ int inv; ++ ++ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); ++ mpfr_rint (y, x, (mpfr_rnd_t) r); ++ inv = MPFR_NOTZERO (y); ++ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r) ^ inv) ++ ERROR1 (46); ++ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (47); ++ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r) ^ inv) ++ ERROR1 (48); ++ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (49); ++ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r) ^ inv) ++ ERROR1 (50); ++ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (51); ++ } ++ } + + mpfr_clear (x); ++ mpfr_clear (y); + + check_intmax (); + +@@ -189,85 +210,98 @@ + return 0; + } + +-static void check_intmax (void) ++static void ++check_intmax (void) + { + #ifdef _MPFR_H_HAVE_INTMAX_T +- mpfr_t x; ++ mpfr_t x, y; ++ int i, r; + +- mpfr_init2 (x, sizeof (uintmax_t)*CHAR_BIT); ++ mpfr_init2 (x, sizeof (uintmax_t) * CHAR_BIT); ++ mpfr_init2 (y, 8); + +- /* Check NAN */ +- mpfr_set_nan (x); +- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR1; ++ RND_LOOP (r) ++ { ++ /* Check NAN */ ++ mpfr_set_nan (x); ++ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (52); ++ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (53); + +- /* Check INF */ +- mpfr_set_inf (x, 1); +- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR1; ++ /* Check INF */ ++ mpfr_set_inf (x, 1); ++ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (54); ++ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (55); + +- /* Check Zero */ +- MPFR_SET_ZERO (x); +- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check Zero */ ++ MPFR_SET_ZERO (x); ++ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (56); ++ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (57); + +- /* Check small op */ +- mpfr_set_str1 (x, "1@-1"); +- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check positive small op */ ++ mpfr_set_str1 (x, "1@-1"); ++ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (58); ++ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (59); + +- /* Check 17 */ +- mpfr_set_ui (x, 17, MPFR_RNDN); +- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR2; +- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR2; ++ /* Check 17 */ ++ mpfr_set_ui (x, 17, MPFR_RNDN); ++ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (60); ++ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (61); + +- /* Check hugest */ +- mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN); +- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR1; +- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR1; ++ /* Check hugest */ ++ mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN); ++ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (62); ++ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (63); + +- /* Check all other values */ +- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); +- mpfr_add_ui (x, x, 1, MPFR_RNDN); +- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR1; +- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); +- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); +- mpfr_add_ui (x, x, 1, MPFR_RNDN); +- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR1; +- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); +- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN); +- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR2; +- mpfr_sub_ui (x, x, 1, MPFR_RNDN); +- if (mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR1; ++ /* Check all other values */ ++ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); ++ mpfr_add_ui (x, x, 1, MPFR_RNDN); ++ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (64); ++ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN); ++ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (65); ++ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); ++ mpfr_add_ui (x, x, 1, MPFR_RNDN); ++ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (66); ++ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN); ++ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (67); ++ mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN); ++ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (68); ++ mpfr_sub_ui (x, x, 1, MPFR_RNDN); ++ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (69); + +- /* Check negative value */ +- mpfr_set_si (x, -1, MPFR_RNDN); +- if (!mpfr_fits_intmax_p (x, MPFR_RNDN)) +- ERROR2; +- if (mpfr_fits_uintmax_p (x, MPFR_RNDN)) +- ERROR1; ++ /* Check negative op */ ++ for (i = 1; i <= 4; i++) ++ { ++ int inv; ++ ++ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN); ++ mpfr_rint (y, x, (mpfr_rnd_t) r); ++ inv = MPFR_NOTZERO (y); ++ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r) ^ inv) ++ ERROR1 (70); ++ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r)) ++ ERROR1 (71); ++ } ++ } + + mpfr_clear (x); ++ mpfr_clear (y); + #endif + } +- +diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES +--- mpfr-3.1.2-a/PATCHES 2013-10-09 13:34:21.000000000 +0000 ++++ mpfr-3.1.2-b/PATCHES 2013-10-09 13:34:21.000000000 +0000 +@@ -0,0 +1 @@ ++clang-divby0 +diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION +--- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/VERSION 2013-10-09 13:34:21.000000000 +0000 +@@ -1 +1 @@ +-3.1.2-p2 ++3.1.2-p3 +diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h +--- mpfr-3.1.2-a/src/mpfr-impl.h 2013-03-13 15:37:36.000000000 +0000 ++++ mpfr-3.1.2-b/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000 +@@ -468,8 +468,16 @@ + #define MPFR_LIMBS_PER_FLT ((IEEE_FLT_MANT_DIG-1)/GMP_NUMB_BITS+1) + + /* Visual C++ doesn't support +1.0/0.0, -1.0/0.0 and 0.0/0.0 +- at compile time. */ +-#if defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200) ++ at compile time. ++ Clang with -fsanitize=undefined is a bit similar due to a bug: ++ http://llvm.org/bugs/show_bug.cgi?id=17381 ++ but even without its sanitizer, it may be better to use the ++ double_zero version until IEEE 754 division by zero is properly ++ supported: ++ http://llvm.org/bugs/show_bug.cgi?id=17000 ++*/ ++#if (defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)) || \ ++ defined(__clang__) + static double double_zero = 0.0; + # define DBL_NAN (double_zero/double_zero) + # define DBL_POS_INF ((double) 1.0/double_zero) +@@ -501,6 +509,8 @@ + (with Xcode 2.4.1, i.e. the latest one). */ + #define LVALUE(x) (&(x) == &(x) || &(x) != &(x)) + #define DOUBLE_ISINF(x) (LVALUE(x) && ((x) > DBL_MAX || (x) < -DBL_MAX)) ++/* The DOUBLE_ISNAN(x) macro is also valid on long double x ++ (assuming that the compiler isn't too broken). */ + #ifdef MPFR_NANISNAN + /* Avoid MIPSpro / IRIX64 / gcc -ffast-math (incorrect) optimizations. + The + must not be replaced by a ||. With gcc -ffast-math, NaN is +diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h +--- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/src/mpfr.h 2013-10-09 13:34:21.000000000 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "3.1.2-p2" ++#define MPFR_VERSION_STRING "3.1.2-p3" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c +--- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000 ++++ mpfr-3.1.2-b/src/version.c 2013-10-09 13:34:21.000000000 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.2-p2"; ++ return "3.1.2-p3"; + } +diff -Naurd mpfr-3.1.2-a/tests/tget_flt.c mpfr-3.1.2-b/tests/tget_flt.c +--- mpfr-3.1.2-a/tests/tget_flt.c 2013-03-13 15:37:44.000000000 +0000 ++++ mpfr-3.1.2-b/tests/tget_flt.c 2013-10-09 13:34:21.000000000 +0000 +@@ -28,9 +28,17 @@ + main (void) + { + mpfr_t x, y; +- float f, g, infp; ++ float f, g; + int i; ++#if !defined(MPFR_ERRDIVZERO) ++ float infp; ++#endif ++ ++ tests_start_mpfr (); + ++#if !defined(MPFR_ERRDIVZERO) ++ /* The definition of DBL_POS_INF involves a division by 0. This makes ++ "clang -O2 -fsanitize=undefined -fno-sanitize-recover" fail. */ + infp = (float) DBL_POS_INF; + if (infp * 0.5 != infp) + { +@@ -38,8 +46,7 @@ + fprintf (stderr, "(this is probably a compiler bug, please report)\n"); + exit (1); + } +- +- tests_start_mpfr (); ++#endif + + mpfr_init2 (x, 24); + mpfr_init2 (y, 24); +@@ -353,6 +360,7 @@ + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } ++#if !defined(MPFR_ERRDIVZERO) + f = mpfr_get_flt (x, MPFR_RNDN); /* first round to 2^128 (even rule), + thus we should get +Inf */ + g = infp; +@@ -376,6 +384,7 @@ + printf ("expected %.8e, got %.8e\n", g, f); + exit (1); + } ++#endif + + mpfr_clear (x); + mpfr_clear (y); +diff -Naurd mpfr-3.1.2-a/tests/tset_ld.c mpfr-3.1.2-b/tests/tset_ld.c +--- mpfr-3.1.2-a/tests/tset_ld.c 2013-03-13 15:37:44.000000000 +0000 ++++ mpfr-3.1.2-b/tests/tset_ld.c 2013-10-09 13:34:21.000000000 +0000 +@@ -47,8 +47,11 @@ + static int + Isnan_ld (long double d) + { +- double e = (double) d; +- if (DOUBLE_ISNAN (e)) ++ /* Do not convert d to double as this can give an overflow, which ++ may confuse compilers without IEEE 754 support (such as clang ++ -fsanitize=undefined), or trigger a trap if enabled. ++ The DOUBLE_ISNAN macro should work fine on long double. */ ++ if (DOUBLE_ISNAN (d)) + return 1; + LONGDOUBLE_NAN_ACTION (d, goto yes); + return 0; +diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES +--- mpfr-3.1.2-a/PATCHES 2013-11-15 00:51:49.211333830 +0000 ++++ mpfr-3.1.2-b/PATCHES 2013-11-15 00:51:49.323334999 +0000 +@@ -0,0 +1 @@ ++printf-alt0 +diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION +--- mpfr-3.1.2-a/VERSION 2013-11-15 00:51:49.211333830 +0000 ++++ mpfr-3.1.2-b/VERSION 2013-11-15 00:51:49.323334999 +0000 +@@ -1 +1 @@ +-3.1.2-p3 ++3.1.2-p4 +diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h +--- mpfr-3.1.2-a/src/mpfr.h 2013-11-15 00:51:49.211333830 +0000 ++++ mpfr-3.1.2-b/src/mpfr.h 2013-11-15 00:51:49.323334999 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "3.1.2-p3" ++#define MPFR_VERSION_STRING "3.1.2-p4" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c +--- mpfr-3.1.2-a/src/vasprintf.c 2013-03-13 15:37:37.000000000 +0000 ++++ mpfr-3.1.2-b/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 +@@ -1040,7 +1040,7 @@ + } + + /* Determine the different parts of the string representation of the regular +- number P when SPEC.SPEC is 'e', 'E', 'g', or 'G'. ++ number P when spec.spec is 'e', 'E', 'g', or 'G'. + DEC_INFO contains the previously computed exponent and string or is NULL. + + return -1 if some field > INT_MAX */ +@@ -1167,7 +1167,7 @@ + } + + /* Determine the different parts of the string representation of the regular +- number P when SPEC.SPEC is 'f', 'F', 'g', or 'G'. ++ number P when spec.spec is 'f', 'F', 'g', or 'G'. + DEC_INFO contains the previously computed exponent and string or is NULL. + + return -1 if some field of number_parts is greater than INT_MAX */ +@@ -1559,7 +1559,7 @@ + /* fractional part */ + { + np->point = MPFR_DECIMAL_POINT; +- np->fp_trailing_zeros = (spec.spec == 'g' && spec.spec == 'G') ? ++ np->fp_trailing_zeros = (spec.spec == 'g' || spec.spec == 'G') ? + spec.prec - 1 : spec.prec; + } + else if (spec.alt) +diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c +--- mpfr-3.1.2-a/src/version.c 2013-11-15 00:51:49.211333830 +0000 ++++ mpfr-3.1.2-b/src/version.c 2013-11-15 00:51:49.323334999 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.2-p3"; ++ return "3.1.2-p4"; + } +diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c +--- mpfr-3.1.2-a/tests/tsprintf.c 2013-03-13 15:37:44.000000000 +0000 ++++ mpfr-3.1.2-b/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 +@@ -456,10 +456,16 @@ + check_sprintf ("1.999900 ", "%-#10.7RG", x); + check_sprintf ("1.9999 ", "%-10.7RG", x); + mpfr_set_ui (x, 1, MPFR_RNDN); ++ check_sprintf ("1.", "%#.1Rg", x); ++ check_sprintf ("1. ", "%-#5.1Rg", x); ++ check_sprintf (" 1.0", "%#5.2Rg", x); + check_sprintf ("1.00000000000000000000000000000", "%#.30Rg", x); + check_sprintf ("1", "%.30Rg", x); + mpfr_set_ui (x, 0, MPFR_RNDN); +- check_sprintf ("0.000000000000000000000000000000", "%#.30Rg", x); ++ check_sprintf ("0.", "%#.1Rg", x); ++ check_sprintf ("0. ", "%-#5.1Rg", x); ++ check_sprintf (" 0.0", "%#5.2Rg", x); ++ check_sprintf ("0.00000000000000000000000000000", "%#.30Rg", x); + check_sprintf ("0", "%.30Rg", x); + + /* following tests with precision 53 bits */ +diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES +--- mpfr-3.1.2-a/PATCHES 2013-12-01 11:07:49.575329762 +0000 ++++ mpfr-3.1.2-b/PATCHES 2013-12-01 11:07:49.751331625 +0000 +@@ -0,0 +1 @@ ++custom_init_set +diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION +--- mpfr-3.1.2-a/VERSION 2013-12-01 11:07:49.571329714 +0000 ++++ mpfr-3.1.2-b/VERSION 2013-12-01 11:07:49.747331585 +0000 +@@ -1 +1 @@ +-3.1.2-p4 ++3.1.2-p5 +diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h +--- mpfr-3.1.2-a/src/mpfr.h 2013-12-01 11:07:49.571329714 +0000 ++++ mpfr-3.1.2-b/src/mpfr.h 2013-12-01 11:07:49.747331585 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 2 +-#define MPFR_VERSION_STRING "3.1.2-p4" ++#define MPFR_VERSION_STRING "3.1.2-p5" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +@@ -861,7 +861,7 @@ + _t = (mpfr_kind_t) _k; \ + _s = 1; \ + } else { \ +- _t = (mpfr_kind_t) -k; \ ++ _t = (mpfr_kind_t) - _k; \ + _s = -1; \ + } \ + _e = _t == MPFR_REGULAR_KIND ? (e) : \ +diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c +--- mpfr-3.1.2-a/src/version.c 2013-12-01 11:07:49.575329762 +0000 ++++ mpfr-3.1.2-b/src/version.c 2013-12-01 11:07:49.747331585 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.2-p4"; ++ return "3.1.2-p5"; + } ADDED PKGBUILDs/mpfr/mpfr.install Index: PKGBUILDs/mpfr/mpfr.install ================================================================== --- /dev/null +++ PKGBUILDs/mpfr/mpfr.install @@ -0,0 +1,20 @@ +info_dir=usr/share/info +info_files=(mpfr.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for f in ${info_files[@]}; do + install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null + done +} ADDED PKGBUILDs/musl/1001-add-basic-dns-record-parsing-functions.patch Index: PKGBUILDs/musl/1001-add-basic-dns-record-parsing-functions.patch ================================================================== --- /dev/null +++ PKGBUILDs/musl/1001-add-basic-dns-record-parsing-functions.patch @@ -0,0 +1,272 @@ +From 33ea72845ca2f4244358a67940a5daedeced14ff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Mon, 14 Oct 2013 10:01:01 +0300 +Subject: [PATCH] add basic dns record parsing functions + +--- + include/arpa/nameser.h | 89 ++++++++++++++++++------------- + src/network/ns_parse.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 192 insertions(+), 37 deletions(-) + create mode 100644 src/network/ns_parse.c + +diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h +index b9ee665..1fc7339 100644 +--- a/include/arpa/nameser.h ++++ b/include/arpa/nameser.h +@@ -1,6 +1,11 @@ + #ifndef _ARPA_NAMESER_H + #define _ARPA_NAMESER_H + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include + #include + + #define __NAMESER 19991006 +@@ -296,43 +301,49 @@ typedef enum __ns_cert_types { + #define NS_OPT_DNSSEC_OK 0x8000U + #define NS_OPT_NSID 3 + +-#define NS_GET16(s, cp) do { \ +- register const unsigned char *t_cp = (const unsigned char *)(cp); \ +- (s) = ((uint16_t)t_cp[0] << 8) \ +- | ((uint16_t)t_cp[1]) \ +- ; \ +- (cp) += NS_INT16SZ; \ +-} while (0) +- +-#define NS_GET32(l, cp) do { \ +- register const unsigned char *t_cp = (const unsigned char *)(cp); \ +- (l) = ((uint32_t)t_cp[0] << 24) \ +- | ((uint32_t)t_cp[1] << 16) \ +- | ((uint32_t)t_cp[2] << 8) \ +- | ((uint32_t)t_cp[3]) \ +- ; \ +- (cp) += NS_INT32SZ; \ +-} while (0) +- +-#define NS_PUT16(s, cp) do { \ +- register uint16_t t_s = (uint16_t)(s); \ +- register unsigned char *t_cp = (unsigned char *)(cp); \ +- *t_cp++ = t_s >> 8; \ +- *t_cp = t_s; \ +- (cp) += NS_INT16SZ; \ +-} while (0) +- +-#define NS_PUT32(l, cp) do { \ +- register uint32_t t_l = (uint32_t)(l); \ +- register unsigned char *t_cp = (unsigned char *)(cp); \ +- *t_cp++ = t_l >> 24; \ +- *t_cp++ = t_l >> 16; \ +- *t_cp++ = t_l >> 8; \ +- *t_cp = t_l; \ +- (cp) += NS_INT32SZ; \ +-} while (0) +- +- ++static __inline uint16_t ns_get16(const unsigned char *cp) ++{ ++ return ((uint16_t)cp[0] << 8) ++ | ((uint16_t)cp[1]); ++} ++ ++#define NS_GET16(s, cp) do { (s) = ns_get16(cp); (cp) += NS_INT16SZ; } while (0) ++ ++static __inline uint32_t ns_get32(const unsigned char *cp) ++{ ++ return ((uint32_t)cp[0] << 24) ++ | ((uint32_t)cp[1] << 16) ++ | ((uint32_t)cp[2] << 8) ++ | ((uint32_t)cp[3]); ++} ++ ++#define NS_GET32(s, cp) do { (s) = ns_get32(cp); (cp) += NS_INT32SZ; } while (0) ++ ++static __inline void ns_put16(uint16_t s, unsigned char *cp) ++{ ++ cp[0] = s >> 8; ++ cp[1] = s; ++} ++ ++#define NS_PUT16(s, cp) do { ns_put16(s, cp); (cp) += NS_INT16SZ; } while (0) ++ ++static __inline void ns_put32(uint32_t l, unsigned char *cp) ++{ ++ cp[0] = l >> 24; ++ cp[1] = l >> 16; ++ cp[2] = l >> 8; ++ cp[3] = l; ++} ++ ++#define NS_PUT32(s, cp) do { ns_put32(s, cp); (cp) += NS_INT32SZ; } while (0) ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++int ns_initparse(const u_char *msg, int msglen, ns_msg *handle); ++int ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr); ++int ns_skiprr(const u_char *msg, const u_char *eom, ns_sect section, int count); ++int ns_name_uncompress(const u_char *msg, const u_char *eom, ++ const u_char *comp_dn, char *exp_dn, size_t length); ++#endif + + + #define __BIND 19950621 +@@ -464,4 +475,8 @@ typedef struct { + #define PUTSHORT NS_PUT16 + #define PUTLONG NS_PUT32 + ++#ifdef __cplusplus ++} ++#endif ++ + #endif +diff --git a/src/network/ns_parse.c b/src/network/ns_parse.c +new file mode 100644 +index 0000000..5ef0d90 +--- /dev/null ++++ b/src/network/ns_parse.c +@@ -0,0 +1,140 @@ ++#define _BSD_SOURCE ++#include ++#include ++#include ++#include ++ ++int ns_initparse(const unsigned char *msg, int msglen, ns_msg *handle) ++{ ++ int i, r; ++ ++ handle->_msg = msg; ++ handle->_eom = msg + msglen; ++ if (msglen < (2 + ns_s_max) * NS_INT16SZ) ++ goto bad; ++ ++ NS_GET16(handle->_id, msg); ++ NS_GET16(handle->_flags, msg); ++ for (i = 0; i < ns_s_max; i++) ++ NS_GET16(handle->_counts[i], msg); ++ for (i = 0; i < ns_s_max; i++) { ++ if (handle->_counts[i]) { ++ handle->_sections[i] = msg; ++ r = ns_skiprr(msg, handle->_eom, i, handle->_counts[i]); ++ if (r < 0) return -1; ++ msg += r; ++ } else { ++ handle->_sections[i] = NULL; ++ } ++ } ++ if (msg != handle->_eom) ++ goto bad; ++ ++ handle->_sect = ns_s_max; ++ handle->_rrnum = -1; ++ handle->_msg_ptr = NULL; ++ return 0; ++bad: ++ errno = EMSGSIZE; ++ return -1; ++} ++ ++int ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) ++{ ++ const u_char *p = ptr; ++ int r; ++ ++ while (count--) { ++ r = dn_skipname(p, eom); ++ if (r < 0) goto bad; ++ p += r + 2 * NS_INT16SZ; ++ if (section != ns_s_qd) { ++ if (p + NS_INT32SZ + NS_INT16SZ > eom) goto bad; ++ p += NS_INT32SZ; ++ NS_GET16(r, p); ++ p += r; ++ } ++ } ++ if (p > eom) goto bad; ++ return ptr - p; ++bad: ++ errno = EMSGSIZE; ++ return -1; ++} ++ ++int ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) ++{ ++ int r; ++ ++ if (section < 0 || section >= ns_s_max) ++ goto bad; ++ if (section != handle->_sect) { ++ handle->_sect = section; ++ handle->_rrnum = 0; ++ handle->_msg_ptr = handle->_sections[section]; ++ } ++ if (rrnum == -1) ++ rrnum = handle->_rrnum; ++ if (rrnum < 0 || rrnum >= handle->_counts[section]) ++ goto bad; ++ if (rrnum < handle->_rrnum) { ++ handle->_rrnum = 0; ++ handle->_msg_ptr = handle->_sections[section]; ++ } ++ if (rrnum > handle->_rrnum) { ++ r = ns_skiprr(handle->_msg_ptr, handle->_eom, section, rrnum - handle->_rrnum); ++ if (r < 0) return -1; ++ handle->_msg_ptr += r; ++ handle->_rrnum = rrnum; ++ } ++ r = dn_expand(handle->_msg, handle->_eom, handle->_msg_ptr, rr->name, NS_MAXDNAME); ++ if (r < 0) return -1; ++ handle->_msg_ptr += r; ++ if (handle->_msg_ptr + 2 * NS_INT16SZ > handle->_eom) ++ goto size; ++ NS_GET16(rr->type, handle->_msg_ptr); ++ NS_GET16(rr->rr_class, handle->_msg_ptr); ++ if (section != ns_s_qd) { ++ if (handle->_msg_ptr + NS_INT32SZ + NS_INT16SZ > handle->_eom) ++ goto size; ++ NS_GET32(rr->ttl, handle->_msg_ptr); ++ NS_GET16(rr->rdlength, handle->_msg_ptr); ++ if (handle->_msg_ptr + rr->rdlength > handle->_eom) ++ goto size; ++ rr->rdata = handle->_msg_ptr; ++ handle->_msg_ptr += rr->rdlength; ++ } else { ++ rr->ttl = 0; ++ rr->rdlength = 0; ++ rr->rdata = NULL; ++ } ++ handle->_rrnum++; ++ if (handle->_rrnum > handle->_counts[section]) { ++ handle->_sect = section + 1; ++ if (handle->_sect == ns_s_max) { ++ handle->_rrnum = -1; ++ handle->_msg_ptr = NULL; ++ } else { ++ handle->_rrnum = 0; ++ } ++ } ++ return 0; ++bad: ++ errno = ENODEV; ++ return -1; ++size: ++ errno = EMSGSIZE; ++ return -1; ++} ++ ++int __dn_expand(const unsigned char *, const unsigned char *, const unsigned char *, char *, int); ++ ++int ns_name_uncompress(const u_char *msg, const u_char *eom, ++ const u_char *src, char *dst, size_t dstsiz) ++{ ++ int r; ++ r = __dn_expand(msg, eom, src, dst, dstsiz); ++ if (r < 0) errno = EMSGSIZE; ++ return r; ++} ++ +-- +1.8.5.1 + ADDED PKGBUILDs/musl/1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch Index: PKGBUILDs/musl/1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch ================================================================== --- /dev/null +++ PKGBUILDs/musl/1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch @@ -0,0 +1,657 @@ +From c3d5cce5c550896fd8e9cf856f66f5f264b49ef7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Tue, 8 Apr 2014 14:03:16 +0000 +Subject: [PATCH] reimplement if_nameindex and getifaddrs using netlink + +--- + src/network/__netlink.c | 38 ++++++ + src/network/__netlink.h | 99 ++++++++++++++ + src/network/getifaddrs.c | 325 +++++++++++++++++++++++++-------------------- + src/network/if_nameindex.c | 107 +++++++++------ + 4 files changed, 382 insertions(+), 187 deletions(-) + create mode 100644 src/network/__netlink.c + create mode 100644 src/network/__netlink.h + +diff --git a/src/network/__netlink.c b/src/network/__netlink.c +new file mode 100644 +index 0000000..e75f374 +--- /dev/null ++++ b/src/network/__netlink.c +@@ -0,0 +1,38 @@ ++#include ++#include ++#include ++#include "__netlink.h" ++ ++int __netlink_enumerate(int fd, unsigned int seq, int type, int af, ++ int (*cb)(void *ctx, struct nlmsghdr *h), void *ctx) ++{ ++ struct nlmsghdr *h; ++ union { ++ uint8_t buf[8192]; ++ struct { ++ struct nlmsghdr nlh; ++ struct rtgenmsg g; ++ } req; ++ struct nlmsghdr reply; ++ } u; ++ int r, ret = 0; ++ ++ memset(&u.req, 0, sizeof(u.req)); ++ u.req.nlh.nlmsg_len = sizeof(u.req); ++ u.req.nlh.nlmsg_type = type; ++ u.req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; ++ u.req.nlh.nlmsg_seq = seq; ++ u.req.g.rtgen_family = af; ++ r = send(fd, &u.req, sizeof(u.req), 0); ++ if (r < 0) return r; ++ ++ while (1) { ++ r = recv(fd, u.buf, sizeof(u.buf), MSG_DONTWAIT); ++ if (r <= 0) return -1; ++ for (h = &u.reply; NLMSG_OK(h, (void*)&u.buf[r]); h = NLMSG_NEXT(h)) { ++ if (h->nlmsg_type == NLMSG_DONE) return ret; ++ if (h->nlmsg_type == NLMSG_ERROR) return -1; ++ if (!ret) ret = cb(ctx, h); ++ } ++ } ++} +diff --git a/src/network/__netlink.h b/src/network/__netlink.h +new file mode 100644 +index 0000000..40b12a2 +--- /dev/null ++++ b/src/network/__netlink.h +@@ -0,0 +1,99 @@ ++#include ++ ++/* linux/netlink.h */ ++ ++#define NETLINK_ROUTE 0 ++ ++struct nlmsghdr { ++ uint32_t nlmsg_len; ++ uint16_t nlmsg_type; ++ uint16_t nlmsg_flags; ++ uint32_t nlmsg_seq; ++ uint32_t nlmsg_pid; ++}; ++ ++#define NLM_F_REQUEST 1 ++#define NLM_F_MULTI 2 ++#define NLM_F_ACK 4 ++#define NLM_F_ECHO 8 ++#define NLM_F_DUMP_INTR 16 ++ ++#define NLM_F_ROOT 0x100 ++#define NLM_F_MATCH 0x200 ++#define NLM_F_ATOMIC 0x400 ++#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH) ++ ++#define NLMSG_NOOP 0x1 ++#define NLMSG_ERROR 0x2 ++#define NLMSG_DONE 0x3 ++#define NLMSG_OVERRUN 0x4 ++ ++/* linux/rtnetlink.h */ ++ ++#define RTM_GETLINK 18 ++#define RTM_GETADDR 22 ++ ++struct rtattr { ++ unsigned short rta_len; ++ unsigned short rta_type; ++}; ++ ++struct rtgenmsg { ++ unsigned char rtgen_family; ++}; ++ ++struct ifinfomsg { ++ unsigned char ifi_family; ++ unsigned char __ifi_pad; ++ unsigned short ifi_type; ++ int ifi_index; ++ unsigned ifi_flags; ++ unsigned ifi_change; ++}; ++ ++/* linux/if_link.h */ ++ ++#define IFLA_ADDRESS 1 ++#define IFLA_BROADCAST 2 ++#define IFLA_IFNAME 3 ++#define IFLA_STATS 7 ++ ++/* linux/if_addr.h */ ++ ++struct ifaddrmsg { ++ uint8_t ifa_family; ++ uint8_t ifa_prefixlen; ++ uint8_t ifa_flags; ++ uint8_t ifa_scope; ++ uint32_t ifa_index; ++}; ++ ++#define IFA_ADDRESS 1 ++#define IFA_LOCAL 2 ++#define IFA_LABEL 3 ++#define IFA_BROADCAST 4 ++ ++/* musl */ ++ ++#define NETLINK_ALIGN(len) (((len)+3) & ~3) ++#define NLMSG_DATA(nlh) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr))) ++#define NLMSG_DATALEN(nlh) ((nlh)->nlmsg_len-sizeof(struct nlmsghdr)) ++#define NLMSG_DATAEND(nlh) ((char*)(nlh)+(nlh)->nlmsg_len) ++#define NLMSG_NEXT(nlh) (struct nlmsghdr*)((char*)(nlh)+NETLINK_ALIGN((nlh)->nlmsg_len)) ++#define NLMSG_OK(nlh,end) (NLMSG_DATA(nlh) <= (end) && \ ++ (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ ++ (void*)NLMSG_NEXT(nlh) <= (end)) ++ ++#define RTA_DATA(rta) ((void*)((char*)(rta)+sizeof(struct rtattr))) ++#define RTA_DATALEN(rta) ((rta)->rta_len-sizeof(struct rtattr)) ++#define RTA_DATAEND(rta) ((char*)(rta)+(rta)->rta_len) ++#define RTA_NEXT(rta) (struct rtattr*)((char*)(rta)+NETLINK_ALIGN((rta)->rta_len)) ++#define RTA_OK(rta,end) (RTA_DATA(rta) <= (void*)(end) && \ ++ (rta)->rta_len >= sizeof(struct rtattr) && \ ++ (void*)RTA_NEXT(rta) <= (void*)(end)) ++ ++#define NLMSG_RTA(nlh,len) ((void*)((char*)(nlh)+sizeof(struct nlmsghdr)+NETLINK_ALIGN(len))) ++#define NLMSG_RTAOK(rta,nlh) RTA_OK(rta,NLMSG_DATAEND(nlh)) ++ ++int __netlink_enumerate(int fd, unsigned int seq, int type, int af, ++ int (*cb)(void *ctx, struct nlmsghdr *h), void *ctx); +diff --git a/src/network/getifaddrs.c b/src/network/getifaddrs.c +index 5a94cc7..9d4bd5b 100644 +--- a/src/network/getifaddrs.c ++++ b/src/network/getifaddrs.c +@@ -1,181 +1,212 @@ +-/* (C) 2013 John Spencer. released under musl's standard MIT license. */ +-#undef _GNU_SOURCE + #define _GNU_SOURCE +-#include +-#include +-#include /* IFNAMSIZ, ifreq, ifconf */ +-#include +-#include +-#include + #include +-#include /* inet_pton */ ++#include ++#include + #include +-#include +-#include ++#include ++#include ++#include ++#include "__netlink.h" + +-typedef union { +- struct sockaddr_in6 v6; ++/* getifaddrs() reports hardware addresses with PF_PACKET that implies ++ * struct sockaddr_ll. But e.g. Infiniband socket address length is ++ * longer than sockaddr_ll.ssl_addr[8] can hold. Use this hack struct ++ * to extend ssl_addr - callers should be able to still use it. */ ++struct sockaddr_ll_hack { ++ unsigned short sll_family, sll_protocol; ++ int sll_ifindex; ++ unsigned short sll_hatype; ++ unsigned char sll_pkttype, sll_halen; ++ unsigned char sll_addr[24]; ++}; ++ ++union sockany { ++ struct sockaddr sa; ++ struct sockaddr_ll_hack ll; + struct sockaddr_in v4; +-} soa; ++ struct sockaddr_in6 v6; ++}; + +-typedef struct ifaddrs_storage { ++struct ifaddrs_storage { + struct ifaddrs ifa; +- soa addr; +- soa netmask; +- soa dst; ++ struct ifaddrs_storage *hash_next; ++ union sockany addr, netmask, ifu; ++ unsigned int index; + char name[IFNAMSIZ+1]; +-} stor; +-#define next ifa.ifa_next ++}; + +-static stor* list_add(stor** list, stor** head, char* ifname) ++#define IFADDRS_HASH_SIZE 64 ++struct ifaddrs_ctx { ++ struct ifaddrs_storage *first; ++ struct ifaddrs_storage *last; ++ struct ifaddrs_storage *hash[IFADDRS_HASH_SIZE]; ++}; ++ ++void freeifaddrs(struct ifaddrs *ifp) + { +- stor* curr = calloc(1, sizeof(stor)); +- if(curr) { +- strcpy(curr->name, ifname); +- curr->ifa.ifa_name = curr->name; +- if(*head) (*head)->next = (struct ifaddrs*) curr; +- *head = curr; +- if(!*list) *list = curr; ++ struct ifaddrs *n; ++ while (ifp) { ++ n = ifp->ifa_next; ++ free(ifp); ++ ifp = n; + } +- return curr; + } + +-void freeifaddrs(struct ifaddrs *ifp) ++static void addifaddrs(struct ifaddrs_ctx *ctx, struct ifaddrs_storage *add) + { +- stor *head = (stor *) ifp; +- while(head) { +- void *p = head; +- head = (stor *) head->next; +- free(p); ++ if (!add->ifa.ifa_name) { ++ free(add); ++ return; + } ++ if (!ctx->first) ctx->first = add; ++ if (ctx->last) ctx->last->ifa.ifa_next = &add->ifa; ++ ctx->last = add; ++} ++ ++static struct sockaddr* copy_lladdr(union sockany *sa, struct rtattr *rta, struct ifinfomsg *ifi) ++{ ++ if (RTA_DATALEN(rta) > sizeof(sa->ll.sll_addr)) return 0; ++ sa->ll.sll_family = AF_PACKET; ++ sa->ll.sll_ifindex = ifi->ifi_index; ++ sa->ll.sll_hatype = ifi->ifi_type; ++ sa->ll.sll_halen = RTA_DATALEN(rta); ++ memcpy(sa->ll.sll_addr, RTA_DATA(rta), RTA_DATALEN(rta)); ++ return &sa->sa; + } + +-static void ipv6netmask(unsigned prefix_length, struct sockaddr_in6 *sa) ++static uint8_t *sockany_addr(int af, union sockany *sa, int *len) + { +- unsigned char* hb = sa->sin6_addr.s6_addr; +- unsigned onebytes = prefix_length / 8; +- unsigned bits = prefix_length % 8; +- unsigned nullbytes = 16 - onebytes; +- memset(hb, -1, onebytes); +- memset(hb+onebytes, 0, nullbytes); +- if(bits) { +- unsigned char x = -1; +- x <<= 8 - bits; +- hb[onebytes] = x; ++ switch (af) { ++ case AF_INET: *len = 4; return (uint8_t*) &sa->v4.sin_addr; ++ case AF_INET6: *len = 16; return (uint8_t*) &sa->v6.sin6_addr; + } ++ return 0; + } + +-static void dealwithipv6(stor **list, stor** head) ++static struct sockaddr* copy_addr(int af, union sockany *sa, struct rtattr *rta) + { +- FILE* f = fopen("/proc/net/if_inet6", "rbe"); +- /* 00000000000000000000000000000001 01 80 10 80 lo +- A B C D E F +- all numbers in hex +- A = addr B=netlink device#, C=prefix length, +- D = scope value (ipv6.h) E = interface flags (rnetlink.h, addrconf.c) +- F = if name */ +- char v6conv[32 + 7 + 1], *v6; +- char *line, linebuf[512]; +- if(!f) return; +- while((line = fgets(linebuf, sizeof linebuf, f))) { +- v6 = v6conv; +- size_t i = 0; +- for(; i < 8; i++) { +- memcpy(v6, line, 4); +- v6+=4; +- *v6++=':'; +- line+=4; +- } +- --v6; *v6 = 0; +- line++; +- unsigned b, c, d, e; +- char name[IFNAMSIZ+1]; +- if(5 == sscanf(line, "%x %x %x %x %s", &b, &c, &d, &e, name)) { +- struct sockaddr_in6 sa = {0}; +- if(1 == inet_pton(AF_INET6, v6conv, &sa.sin6_addr)) { +- sa.sin6_family = AF_INET6; +- stor* curr = list_add(list, head, name); +- if(!curr) goto out; +- curr->addr.v6 = sa; +- curr->ifa.ifa_addr = (struct sockaddr*) &curr->addr; +- ipv6netmask(c, &sa); +- curr->netmask.v6 = sa; +- curr->ifa.ifa_netmask = (struct sockaddr*) &curr->netmask; +- /* find ipv4 struct with the same interface name to copy flags */ +- stor* scan = *list; +- for(;scan && strcmp(name, scan->name);scan=(stor*)scan->next); +- if(scan) curr->ifa.ifa_flags = scan->ifa.ifa_flags; +- else curr->ifa.ifa_flags = 0; +- } else errno = 0; +- } ++ int len; ++ uint8_t *dst = sockany_addr(af, sa, &len); ++ if (!dst || RTA_DATALEN(rta) != len) return 0; ++ sa->sa.sa_family = af; ++ memcpy(dst, RTA_DATA(rta), len); ++ return &sa->sa; ++} ++ ++static struct sockaddr *gen_netmask(int af, union sockany *sa, int prefixlen) ++{ ++ int maxlen, i; ++ uint8_t *dst = sockany_addr(af, sa, &maxlen); ++ if (!dst) return 0; ++ sa->sa.sa_family = af; ++ if (prefixlen > 8*maxlen) prefixlen = 8*maxlen; ++ i = prefixlen / 8; ++ memset(dst, 0xff, i); ++ if (isa; + } + +-int getifaddrs(struct ifaddrs **ifap) ++static int __handle_link(void *pctx, struct nlmsghdr *h) + { +- stor *list = 0, *head = 0; +- struct if_nameindex* ii = if_nameindex(); +- if(!ii) return -1; +- size_t i; +- for(i = 0; ii[i].if_index || ii[i].if_name; i++) { +- stor* curr = list_add(&list, &head, ii[i].if_name); +- if(!curr) { +- if_freenameindex(ii); +- goto err2; +- } ++ struct ifaddrs_ctx *ctx = pctx; ++ struct ifaddrs_storage *ifs; ++ struct ifinfomsg *ifi = NLMSG_DATA(h); ++ struct rtattr *rta; ++ int stats_len = 0; ++ ++ for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { ++ if (rta->rta_type != IFLA_STATS) continue; ++ stats_len = RTA_DATALEN(rta); ++ break; + } +- if_freenameindex(ii); +- +- int sock = socket(PF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP); +- if(sock == -1) goto err2; +- struct ifreq reqs[32]; /* arbitrary chosen boundary */ +- struct ifconf conf = {.ifc_len = sizeof reqs, .ifc_req = reqs}; +- if(-1 == ioctl(sock, SIOCGIFCONF, &conf)) goto err; +- size_t reqitems = conf.ifc_len / sizeof(struct ifreq); +- for(head = list; head; head = (stor*)head->next) { +- for(i = 0; i < reqitems; i++) { +- // get SIOCGIFADDR of active interfaces. +- if(!strcmp(reqs[i].ifr_name, head->name)) { +- head->addr.v4 = *(struct sockaddr_in*)&reqs[i].ifr_addr; +- head->ifa.ifa_addr = (struct sockaddr*) &head->addr; +- break; ++ ++ ifs = calloc(1, sizeof(struct ifaddrs_storage) + stats_len); ++ if (ifs == 0) return -1; ++ ++ ifs->index = ifi->ifi_index; ++ ifs->ifa.ifa_flags = ifi->ifi_flags; ++ ++ for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { ++ switch (rta->rta_type) { ++ case IFLA_IFNAME: ++ if (RTA_DATALEN(rta) <= IFNAMSIZ) { ++ strncpy(ifs->name, RTA_DATA(rta), RTA_DATALEN(rta)); ++ ifs->ifa.ifa_name = ifs->name; + } ++ break; ++ case IFLA_ADDRESS: ++ ifs->ifa.ifa_addr = copy_lladdr(&ifs->addr, rta, ifi); ++ break; ++ case IFLA_BROADCAST: ++ ifs->ifa.ifa_broadaddr = copy_lladdr(&ifs->ifu, rta, ifi); ++ break; ++ case IFLA_STATS: ++ ifs->ifa.ifa_data = (void*)(ifs+1); ++ memcpy(ifs->ifa.ifa_data, RTA_DATA(rta), RTA_DATALEN(rta)); ++ break; + } +- struct ifreq req; +- snprintf(req.ifr_name, sizeof req.ifr_name, "%s", head->name); +- if(-1 == ioctl(sock, SIOCGIFFLAGS, &req)) goto err; +- +- head->ifa.ifa_flags = req.ifr_flags; +- if(head->ifa.ifa_addr) { +- /* or'ing flags with IFF_LOWER_UP on active interfaces to mimic glibc */ +- head->ifa.ifa_flags |= IFF_LOWER_UP; +- if(-1 == ioctl(sock, SIOCGIFNETMASK, &req)) goto err; +- head->netmask.v4 = *(struct sockaddr_in*)&req.ifr_netmask; +- head->ifa.ifa_netmask = (struct sockaddr*) &head->netmask; +- +- if(head->ifa.ifa_flags & IFF_POINTOPOINT) { +- if(-1 == ioctl(sock, SIOCGIFDSTADDR, &req)) goto err; +- head->dst.v4 = *(struct sockaddr_in*)&req.ifr_dstaddr; +- } else { +- if(-1 == ioctl(sock, SIOCGIFBRDADDR, &req)) goto err; +- head->dst.v4 = *(struct sockaddr_in*)&req.ifr_broadaddr; +- } +- head->ifa.ifa_ifu.ifu_dstaddr = (struct sockaddr*) &head->dst; ++ } ++ if (ifs->ifa.ifa_name) { ++ ifs->hash_next = ctx->hash[ifs->index%IFADDRS_HASH_SIZE]; ++ ctx->hash[ifs->index%IFADDRS_HASH_SIZE] = ifs; ++ } ++ addifaddrs(ctx, ifs); ++ return 0; ++} ++ ++static int __handle_addr(void *pctx, struct nlmsghdr *h) ++{ ++ struct ifaddrs_ctx *ctx = pctx; ++ struct ifaddrs_storage *ifs, *ifs0; ++ struct ifaddrmsg *ifa = NLMSG_DATA(h); ++ struct rtattr *rta; ++ ++ ifs = calloc(1, sizeof(struct ifaddrs_storage)); ++ if (ifs == 0) return -1; ++ ++ for (ifs0 = ctx->hash[ifa->ifa_index%IFADDRS_HASH_SIZE]; ifs0; ifs0 = ifs0->hash_next) ++ if (ifs0->index == ifa->ifa_index) ++ break; ++ if (!ifs0) return 0; ++ ++ ifs->ifa.ifa_name = ifs0->ifa.ifa_name; ++ ifs->ifa.ifa_flags = ifs0->ifa.ifa_flags; ++ for (rta = NLMSG_RTA(h, sizeof(*ifa)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { ++ switch (rta->rta_type) { ++ case IFA_ADDRESS: ++ ifs->ifa.ifa_addr = copy_addr(ifa->ifa_family, &ifs->addr, rta); ++ if (ifs->ifa.ifa_addr) ++ ifs->ifa.ifa_netmask = gen_netmask(ifa->ifa_family, &ifs->netmask, ifa->ifa_prefixlen); ++ break; ++ case IFA_BROADCAST: ++ /* For point-to-point links this is peer, but ifa_broadaddr ++ * and ifa_dstaddr are union, so this works for both. */ ++ ifs->ifa.ifa_broadaddr = copy_addr(ifa->ifa_family, &ifs->ifu, rta); ++ break; + } + } +- close(sock); +- void* last = 0; +- for(head = list; head; head=(stor*)head->next) last=head; +- head = last; +- dealwithipv6(&list, &head); +- *ifap = (struct ifaddrs*) list; ++ ++ addifaddrs(ctx, ifs); + return 0; +- err: +- close(sock); +- err2: +- freeifaddrs((struct ifaddrs*) list); +- return -1; + } + ++int getifaddrs(struct ifaddrs **ifap) ++{ ++ struct ifaddrs_ctx _ctx, *ctx = &_ctx; ++ int r = 0, fd; ++ ++ fd = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE); ++ if (fd < 0) return -1; ++ ++ memset(ctx, 0, sizeof(*ctx)); ++ if (__netlink_enumerate(fd, 1, RTM_GETLINK, AF_UNSPEC, __handle_link, ctx)) r = -1; ++ if (__netlink_enumerate(fd, 1, RTM_GETADDR, AF_UNSPEC, __handle_addr, ctx)) r = -1; ++ __syscall(SYS_close,fd); ++ ++ if (r == 0) *ifap = &ctx->first->ifa; ++ else freeifaddrs(&ctx->first->ifa); ++ return r; ++} +diff --git a/src/network/if_nameindex.c b/src/network/if_nameindex.c +index 53b80b2..cb5587c 100644 +--- a/src/network/if_nameindex.c ++++ b/src/network/if_nameindex.c +@@ -1,55 +1,82 @@ + #define _GNU_SOURCE + #include +-#include + #include +-#include + #include +-#include "syscall.h" ++#include ++#include ++#include ++#include ++#include "__netlink.h" ++ ++struct ifnamemap { ++ unsigned int index; ++ unsigned char namelen; ++ char name[IFNAMSIZ]; ++}; ++ ++struct ifnameindexctx { ++ unsigned int num; ++ unsigned int str_bytes; ++ struct ifnamemap *list; ++}; + +-static void *do_nameindex(int s, size_t n) ++static int __handle_link(void *pctx, struct nlmsghdr *h) + { +- size_t i, len, k; +- struct ifconf conf; +- struct if_nameindex *idx; +- +- idx = malloc(n * (sizeof(struct if_nameindex)+sizeof(struct ifreq))); +- if (!idx) return 0; +- +- conf.ifc_buf = (void *)&idx[n]; +- conf.ifc_len = len = n * sizeof(struct ifreq); +- if (ioctl(s, SIOCGIFCONF, &conf) < 0) { +- free(idx); +- return 0; +- } +- if (conf.ifc_len == len) { +- free(idx); +- return (void *)-1; +- } ++ struct ifnameindexctx *ctx = pctx; ++ struct ifinfomsg *ifim = NLMSG_DATA(h); ++ struct rtattr *rta; ++ struct ifnamemap *e; ++ ++ for (rta = NLMSG_RTA(h, sizeof(*ifim)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { ++ if (rta->rta_type != IFLA_IFNAME) continue; ++ if (RTA_DATALEN(rta) > IFNAMSIZ) return -ENOBUFS; + +- n = conf.ifc_len / sizeof(struct ifreq); +- for (i=k=0; inum++; ++ ctx->str_bytes += RTA_DATALEN(rta) + 1; ++ e = realloc(ctx->list, sizeof(struct ifnamemap[ctx->num])); ++ if (e == 0) return -ENOMEM; ++ ctx->list = e; ++ ++ e = &ctx->list[ctx->num-1]; ++ e->index = ifim->ifi_index; ++ e->namelen = RTA_DATALEN(rta); ++ memcpy(e->name, RTA_DATA(rta), IFNAMSIZ); + } +- idx[i-k].if_name = 0; +- idx[i-k].if_index = 0; + +- return idx; ++ return 0; + } + + struct if_nameindex *if_nameindex() + { +- size_t n; +- void *p = 0; +- int s = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); +- if (s>=0) { +- for (n=0; (p=do_nameindex(s, n)) == (void *)-1; n++); +- __syscall(SYS_close, s); ++ struct ifnameindexctx _ctx, *ctx = &_ctx; ++ struct if_nameindex *ifs = NULL; ++ int fd, r, i; ++ char *p; ++ ++ fd = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_ROUTE); ++ if (fd < 0) goto err; ++ ++ memset(ctx, 0, sizeof(*ctx)); ++ r = __netlink_enumerate(fd, 1, RTM_GETLINK, AF_UNSPEC, __handle_link, ctx); ++ __syscall(SYS_close,fd); ++ ++ if (r < 0) goto err; ++ ++ ifs = malloc(sizeof(struct if_nameindex[ctx->num+1]) + ctx->str_bytes); ++ if (ifs == 0) goto err; ++ ++ p = (char*)ifs + sizeof(struct if_nameindex[ctx->num+1]); ++ for (i = 0; i < ctx->num; i++) { ++ ifs[i].if_index = ctx->list[i].index; ++ ifs[i].if_name = p; ++ memcpy(p, ctx->list[i].name, ctx->list[i].namelen); ++ p += ctx->list[i].namelen; ++ *p++ = 0; + } +- errno = ENOBUFS; +- return p; ++ ifs[i].if_index = 0; ++ ifs[i].if_name = 0; ++err: ++ free(ctx->list); ++ if (ifs == NULL) errno = ENOBUFS; ++ return ifs; + } +-- +1.9.2 + ADDED PKGBUILDs/musl/PKGBUILD Index: PKGBUILDs/musl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/musl/PKGBUILD @@ -0,0 +1,100 @@ +# Mostly copied from Alpine Linux because they've added a fair share of +# additional functionality. Thanks guys! You rock. +# Modifications needed for pacman by kraileth +############################################################################### +# (Alpine Linux) Contributor: William Pitcock +# (Alpine Linux) Maintainer: Timo Teräs + +pkgname=musl +pkgver=1.1.3 +pkgrel=0 +pkgdesc="the musl c library (libc) implementation" +url="http://www.musl-libc.org/" +arch=('i586') +license=('MIT') +options=('staticlibs') +source=("http://www.musl-libc.org/releases/musl-$pkgver.tar.gz" + "1001-add-basic-dns-record-parsing-functions.patch" + "1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch" + "ldconfig" + "getopt_long.c" + "__stack_chk_fail_local.c" + "getconf.c" + "getent.c" + "iconv.c") +md5sums=('1628bd4c86b14b90447e1dcf8421aed7' + 'a3810683ef61ac27e2f6ec9801280c81' + '83c3bd2a50b1de5ef948704d3f4e0583' + '013be8897f27c3909ada59c62020502f' + '61c6c1e84ed1df82abbe6d75e90cf21c' + '0df687757221bbb0fc1aa67f1bd646f9' + 'cb82d21fed17a116b44b830adba71c5a' + '2b941c4251cac44988a4abfc50e21267' + '45f92f8d59cf84d765de698a9578dbf4') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p1 -i ../1001-add-basic-dns-record-parsing-functions.patch + patch -p1 -i ../1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch + + # use GNU compatible getopt() from BSD + rm -f src/misc/getopt*.c + cp "$srcdir"/getopt_long.c src/misc/ + + # remove libintl wrappers to avoid conflict with gettext + rm src/locale/intl.c include/libintl.h +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # provide minimal libssp_nonshared.a so we don't need libssp from gcc + ${CROSS_COMPILE}gcc $CPPFLAGS $CFLAGS -c "$srcdir"/__stack_chk_fail_local.c -o __stack_chk_fail_local.o || return 1 + ${CROSS_COMPILE}ar r libssp_nonshared.a __stack_chk_fail_local.o || return 1 + + # getconf/getent/iconv + local i + for i in getconf getent iconv ; do + ${CROSS_COMPILE}gcc $CPPFLAGS $CFLAGS "$srcdir"/$i.c -o $i || return 1 + done + + # note: not autotools + LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \ + ./configure \ + --host=i586 \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + || return 1 + make || return 1 +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la + + cp libssp_nonshared.a "$pkgdir"/usr/lib || return 1 + + # make LDSO the be the real file, and libc the symlink (will be upstream change) + local LDSO=$(make -f Makefile --eval "$(echo -e 'print-ldso:\n\t@echo $$(basename $(LDSO_PATHNAME))')" print-ldso) + mv -f "$pkgdir"/usr/lib/libc.so "$pkgdir"/lib/"$LDSO" || return 1 + ln -sf "$LDSO" "$pkgdir"/lib/libc.musl-${CARCH}.so.1 || return 1 + ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/lib/libc.so || return 1 + mkdir -p "$pkgdir"/usr/bin + ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/bin/ldd || return 1 + mv "${pkgdir}"/lib/* "${pkgdir}/usr/lib" + rmdir "${pkgdir}"/lib + install -D \ + "${srcdir}/${pkgname}-${pkgver}"/getent \ + "${srcdir}/${pkgname}-${pkgver}"/getconf \ + "${srcdir}/${pkgname}-${pkgver}"/iconv \ + "$pkgdir"/usr/bin + cat < "$pkgdir"/usr/bin/ldconfig +#!/bin/sh +exit 0 +EOF +} ADDED PKGBUILDs/musl/__stack_chk_fail_local.c Index: PKGBUILDs/musl/__stack_chk_fail_local.c ================================================================== --- /dev/null +++ PKGBUILDs/musl/__stack_chk_fail_local.c @@ -0,0 +1,2 @@ +extern void __stack_chk_fail(void); +void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { __stack_chk_fail(); } ADDED PKGBUILDs/musl/getconf.c Index: PKGBUILDs/musl/getconf.c ================================================================== --- /dev/null +++ PKGBUILDs/musl/getconf.c @@ -0,0 +1,338 @@ +/*- + * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by J.T. Conklin. + * + * Mostly rewritten to be used in Alpine Linux (with musl c-library) + * by Timo Teräs. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct conf_variable { + const char *name; + enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, UCONSTANT, NUM_TYPES } type; + long value; +}; + +static const struct conf_variable conf_table[] = { +{ "PATH", CONFSTR, _CS_PATH }, + +/* Utility Limit Minimum Values */ +{ "POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX }, +{ "POSIX2_BC_DIM_MAX", CONSTANT, _POSIX2_BC_DIM_MAX }, +{ "POSIX2_BC_SCALE_MAX", CONSTANT, _POSIX2_BC_SCALE_MAX }, +{ "POSIX2_BC_STRING_MAX", CONSTANT, _POSIX2_BC_STRING_MAX }, +{ "POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX }, +{ "POSIX2_EXPR_NEST_MAX", CONSTANT, _POSIX2_EXPR_NEST_MAX }, +{ "POSIX2_LINE_MAX", CONSTANT, _POSIX2_LINE_MAX }, +{ "POSIX2_RE_DUP_MAX", CONSTANT, _POSIX2_RE_DUP_MAX }, +{ "POSIX2_VERSION", CONSTANT, _POSIX2_VERSION }, + +/* POSIX.1 Minimum Values */ +{ "_POSIX_AIO_LISTIO_MAX", CONSTANT, _POSIX_AIO_LISTIO_MAX }, +{ "_POSIX_AIO_MAX", CONSTANT, _POSIX_AIO_MAX }, +{ "_POSIX_ARG_MAX", CONSTANT, _POSIX_ARG_MAX }, +{ "_POSIX_CHILD_MAX", CONSTANT, _POSIX_CHILD_MAX }, +{ "_POSIX_LINK_MAX", CONSTANT, _POSIX_LINK_MAX }, +{ "_POSIX_MAX_CANON", CONSTANT, _POSIX_MAX_CANON }, +{ "_POSIX_MAX_INPUT", CONSTANT, _POSIX_MAX_INPUT }, +{ "_POSIX_MQ_OPEN_MAX", CONSTANT, _POSIX_MQ_OPEN_MAX }, +{ "_POSIX_MQ_PRIO_MAX", CONSTANT, _POSIX_MQ_PRIO_MAX }, +{ "_POSIX_NAME_MAX", CONSTANT, _POSIX_NAME_MAX }, +{ "_POSIX_NGROUPS_MAX", CONSTANT, _POSIX_NGROUPS_MAX }, +{ "_POSIX_OPEN_MAX", CONSTANT, _POSIX_OPEN_MAX }, +{ "_POSIX_PATH_MAX", CONSTANT, _POSIX_PATH_MAX }, +{ "_POSIX_PIPE_BUF", CONSTANT, _POSIX_PIPE_BUF }, +{ "_POSIX_SSIZE_MAX", CONSTANT, _POSIX_SSIZE_MAX }, +{ "_POSIX_STREAM_MAX", CONSTANT, _POSIX_STREAM_MAX }, +{ "_POSIX_TZNAME_MAX", CONSTANT, _POSIX_TZNAME_MAX }, + +/* Symbolic Utility Limits */ +{ "BC_BASE_MAX", SYSCONF, _SC_BC_BASE_MAX }, +{ "BC_DIM_MAX", SYSCONF, _SC_BC_DIM_MAX }, +{ "BC_SCALE_MAX", SYSCONF, _SC_BC_SCALE_MAX }, +{ "BC_STRING_MAX", SYSCONF, _SC_BC_STRING_MAX }, +{ "COLL_WEIGHTS_MAX", SYSCONF, _SC_COLL_WEIGHTS_MAX }, +{ "EXPR_NEST_MAX", SYSCONF, _SC_EXPR_NEST_MAX }, +{ "LINE_MAX", SYSCONF, _SC_LINE_MAX }, +{ "RE_DUP_MAX", SYSCONF, _SC_RE_DUP_MAX }, + +/* Optional Facility Configuration Values */ +{ "_POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND }, +{ "POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV }, +{ "POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM }, +{ "POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV }, +{ "POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN }, +{ "POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF }, +{ "POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV }, +{ "POSIX2_UPE", SYSCONF, _SC_2_UPE }, + +/* POSIX.1 Configurable System Variables */ +{ "AIO_LISTIO_MAX", SYSCONF, _SC_AIO_LISTIO_MAX }, +{ "AIO_MAX", SYSCONF, _SC_AIO_MAX }, +{ "ARG_MAX", SYSCONF, _SC_ARG_MAX }, +{ "CHILD_MAX", SYSCONF, _SC_CHILD_MAX }, +{ "CLK_TCK", SYSCONF, _SC_CLK_TCK }, +{ "MQ_OPEN_MAX", SYSCONF, _SC_MQ_OPEN_MAX }, +{ "MQ_PRIO_MAX", SYSCONF, _SC_MQ_PRIO_MAX }, +{ "NGROUPS_MAX", SYSCONF, _SC_NGROUPS_MAX }, +{ "OPEN_MAX", SYSCONF, _SC_OPEN_MAX }, +{ "STREAM_MAX", SYSCONF, _SC_STREAM_MAX }, +{ "TZNAME_MAX", SYSCONF, _SC_TZNAME_MAX }, +{ "_POSIX_JOB_CONTROL", SYSCONF, _SC_JOB_CONTROL }, +{ "_POSIX_SAVED_IDS", SYSCONF, _SC_SAVED_IDS }, +{ "_POSIX_VERSION", SYSCONF, _SC_VERSION }, + +{ "LINK_MAX", PATHCONF, _PC_LINK_MAX }, +{ "MAX_CANON", PATHCONF, _PC_MAX_CANON }, +{ "MAX_INPUT", PATHCONF, _PC_MAX_INPUT }, +{ "NAME_MAX", PATHCONF, _PC_NAME_MAX }, +{ "PATH_MAX", PATHCONF, _PC_PATH_MAX }, +{ "PIPE_BUF", PATHCONF, _PC_PIPE_BUF }, +{ "_POSIX_CHOWN_RESTRICTED", PATHCONF, _PC_CHOWN_RESTRICTED }, +{ "_POSIX_NO_TRUNC", PATHCONF, _PC_NO_TRUNC }, +{ "_POSIX_VDISABLE", PATHCONF, _PC_VDISABLE }, + +/* POSIX.1b Configurable System Variables */ +{ "PAGESIZE", SYSCONF, _SC_PAGESIZE }, +{ "_POSIX_ASYNCHRONOUS_IO", SYSCONF, _SC_ASYNCHRONOUS_IO }, +{ "_POSIX_FSYNC", SYSCONF, _SC_FSYNC }, +{ "_POSIX_MAPPED_FILES", SYSCONF, _SC_MAPPED_FILES }, +{ "_POSIX_MEMLOCK", SYSCONF, _SC_MEMLOCK }, +{ "_POSIX_MEMLOCK_RANGE", SYSCONF, _SC_MEMLOCK_RANGE }, +{ "_POSIX_MEMORY_PROTECTION", SYSCONF, _SC_MEMORY_PROTECTION }, +{ "_POSIX_MESSAGE_PASSING", SYSCONF, _SC_MESSAGE_PASSING }, +{ "_POSIX_MONOTONIC_CLOCK", SYSCONF, _SC_MONOTONIC_CLOCK }, +{ "_POSIX_PRIORITY_SCHEDULING", SYSCONF, _SC_PRIORITY_SCHEDULING }, +{ "_POSIX_SEMAPHORES", SYSCONF, _SC_SEMAPHORES }, +{ "_POSIX_SHARED_MEMORY_OBJECTS", SYSCONF, _SC_SHARED_MEMORY_OBJECTS }, +{ "_POSIX_SYNCHRONIZED_IO", SYSCONF, _SC_SYNCHRONIZED_IO }, +{ "_POSIX_TIMERS", SYSCONF, _SC_TIMERS }, + +{ "_POSIX_SYNC_IO", PATHCONF, _PC_SYNC_IO }, + +/* POSIX.1c Configurable System Variables */ +{ "LOGIN_NAME_MAX", SYSCONF, _SC_LOGIN_NAME_MAX }, +{ "_POSIX_THREADS", SYSCONF, _SC_THREADS }, + +/* POSIX.1j Configurable System Variables */ +{ "_POSIX_BARRIERS", SYSCONF, _SC_BARRIERS }, +{ "_POSIX_READER_WRITER_LOCKS", SYSCONF, _SC_READER_WRITER_LOCKS }, +{ "_POSIX_SPIN_LOCKS", SYSCONF, _SC_SPIN_LOCKS }, + +/* XPG4.2 Configurable System Variables */ +{ "IOV_MAX", SYSCONF, _SC_IOV_MAX }, +{ "PAGE_SIZE", SYSCONF, _SC_PAGE_SIZE }, +{ "_XOPEN_SHM", SYSCONF, _SC_XOPEN_SHM }, + +/* X/Open CAE Spec. Issue 5 Version 2 Configurable System Variables */ +{ "FILESIZEBITS", PATHCONF, _PC_FILESIZEBITS }, + +/* POSIX.1-2001 XSI Option Group Configurable System Variables */ +{ "ATEXIT_MAX", SYSCONF, _SC_ATEXIT_MAX }, + +/* POSIX.1-2001 TSF Configurable System Variables */ +{ "GETGR_R_SIZE_MAX", SYSCONF, _SC_GETGR_R_SIZE_MAX }, +{ "GETPW_R_SIZE_MAX", SYSCONF, _SC_GETPW_R_SIZE_MAX }, + +/* Commonly provided extensions */ +{ "_PHYS_PAGES", SYSCONF, _SC_PHYS_PAGES }, +{ "_AVPHYS_PAGES", SYSCONF, _SC_AVPHYS_PAGES }, +{ "_NPROCESSORS_CONF", SYSCONF, _SC_NPROCESSORS_CONF }, +{ "_NPROCESSORS_ONLN", SYSCONF, _SC_NPROCESSORS_ONLN }, + +/* Data type related extensions */ +{ "CHAR_BIT", CONSTANT, CHAR_BIT }, +{ "CHAR_MAX", CONSTANT, CHAR_MAX }, +{ "CHAR_MIN", CONSTANT, CHAR_MIN }, +{ "INT_MAX", CONSTANT, INT_MAX }, +{ "INT_MIN", CONSTANT, INT_MIN }, +{ "LONG_BIT", CONSTANT, LONG_BIT }, +{ "LONG_MAX", CONSTANT, LONG_MAX }, +{ "LONG_MIN", CONSTANT, LONG_MIN }, +{ "SCHAR_MAX", CONSTANT, SCHAR_MAX }, +{ "SCHAR_MIN", CONSTANT, SCHAR_MIN }, +{ "SHRT_MAX", CONSTANT, SHRT_MAX }, +{ "SHRT_MIN", CONSTANT, SHRT_MIN }, +{ "SSIZE_MAX", CONSTANT, SSIZE_MAX }, +{ "UCHAR_MAX", UCONSTANT, (long) UCHAR_MAX }, +{ "UINT_MAX", UCONSTANT, (long) UINT_MAX }, +{ "ULONG_MAX", UCONSTANT, (long) ULONG_MAX }, +{ "USHRT_MAX", UCONSTANT, (long) USHRT_MAX }, +{ "WORD_BIT", CONSTANT, WORD_BIT }, + +{ NULL, CONSTANT, 0L } +}; + +static int all = 0; + +static void usage(const char *p) +{ + (void)fprintf(stderr, "Usage: %s system_var\n\t%s -a\n" + "\t%s path_var pathname\n\t%s -a pathname\n", p, p, p, p); + exit(EXIT_FAILURE); +} + +static void print_long(const char *name, long val) +{ + static const char * const fmtstr[] = { "%2$ld\n", "%s = %ld\n" }; + printf(fmtstr[all], name, val); +} + +static void print_ulong(const char *name, unsigned long val) +{ + static const char * const fmtstr[] = { "%2$lu\n", "%s = %lu\n" }; + printf(fmtstr[all], name, val); +} + +static void print_string(const char *name, const char *val) +{ + static const char * const fmtstr[] = { "%2$s\n", "%s = %s\n" }; + printf(fmtstr[all], name, val); +} + +static int print_constant(const struct conf_variable *cp, const char *pathname) +{ + print_long(cp->name, cp->value); + return 0; +} + +static int print_uconstant(const struct conf_variable *cp, const char *pathname) +{ + print_ulong(cp->name, (unsigned long) cp->value); + return 0; +} + +static int print_sysconf(const struct conf_variable *cp, const char *pathname) +{ + long val; + + errno = 0; + if ((val = sysconf((int)cp->value)) == -1) { + if (errno != 0) err(EXIT_FAILURE, "sysconf(%ld)", cp->value); + return -1; + } + print_long(cp->name, val); + return 0; +} + +static int print_confstr(const struct conf_variable *cp, const char *pathname) +{ + size_t len; + char *val; + + errno = 0; + if ((len = confstr((int)cp->value, NULL, 0)) == 0) goto error; + if ((val = malloc(len)) == NULL) err(EXIT_FAILURE, "Can't allocate %zu bytes", len); + errno = 0; + if (confstr((int)cp->value, val, len) == 0) goto error; + print_string(cp->name, val); + free(val); + return 0; +error: + if (errno != EINVAL) err(EXIT_FAILURE, "confstr(%ld)", cp->value); + return -1; +} + +static int print_pathconf(const struct conf_variable *cp, const char *pathname) +{ + long val; + + errno = 0; + if ((val = pathconf(pathname, (int)cp->value)) == -1) { + if (all && errno == EINVAL) return 0; + if (errno != 0) err(EXIT_FAILURE, "pathconf(%s, %ld)", pathname, cp->value); + return -1; + } + print_long(cp->name, val); + return 0; +} + +typedef int (*handler_t)(const struct conf_variable *cp, const char *pathname); +static const handler_t type_handlers[NUM_TYPES] = { + [SYSCONF] = print_sysconf, + [CONFSTR] = print_confstr, + [PATHCONF] = print_pathconf, + [CONSTANT] = print_constant, + [UCONSTANT] = print_uconstant, +}; + +int main(int argc, char **argv) +{ + const char *progname = argv[0]; + const struct conf_variable *cp; + const char *varname, *pathname; + int ch, found = 0; + + (void)setlocale(LC_ALL, ""); + while ((ch = getopt(argc, argv, "a")) != -1) { + switch (ch) { + case 'a': + all = 1; + break; + case '?': + default: + usage(progname); + } + } + argc -= optind; + argv += optind; + + if (!all) { + if (argc == 0) + usage(progname); + varname = argv[0]; + argc--; + argv++; + } else + varname = NULL; + + if (argc > 1) + usage(progname); + pathname = argv[0]; /* may be NULL */ + + for (cp = conf_table; cp->name != NULL; cp++) { + if (!all && strcmp(varname, cp->name) != 0) continue; + if ((cp->type == PATHCONF) == (pathname != NULL)) { + if (type_handlers[cp->type](cp, pathname) < 0) + print_string(cp->name, "undefined"); + found = 1; + } else if (!all) + errx(EXIT_FAILURE, "%s: invalid variable type", cp->name); + } + if (!all && !found) errx(EXIT_FAILURE, "%s: unknown variable", varname); + (void)fflush(stdout); + return ferror(stdout) ? EXIT_FAILURE : EXIT_SUCCESS; +} ADDED PKGBUILDs/musl/getent.c Index: PKGBUILDs/musl/getent.c ================================================================== --- /dev/null +++ PKGBUILDs/musl/getent.c @@ -0,0 +1,437 @@ +/*- + * Copyright (c) 2004-2006 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Luke Mewburn. + * Timo Teräs cleaned up the code for use in Alpine Linux with musl libc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +enum { + RV_OK = 0, + RV_USAGE = 1, + RV_NOTFOUND = 2, + RV_NOENUM = 3 +}; + +static int usage(const char *); + +static int parsenum(const char *word, unsigned long *result) +{ + unsigned long num; + char *ep; + + if (!isdigit((unsigned char)word[0])) + return 0; + errno = 0; + num = strtoul(word, &ep, 10); + if (num == ULONG_MAX && errno == ERANGE) + return 0; + if (*ep != '\0') + return 0; + *result = num; + return 1; +} + +/* + * printfmtstrings -- + * vprintf(format, ...), + * then the aliases (beginning with prefix, separated by sep), + * then a newline + */ +__attribute__ ((format (printf, 4, 5))) +static void printfmtstrings(char *strings[], const char *prefix, const char *sep, + const char *fmt, ...) +{ + va_list ap; + const char *curpref; + size_t i; + + va_start(ap, fmt); + (void)vprintf(fmt, ap); + va_end(ap); + + curpref = prefix; + for (i = 0; strings[i] != NULL; i++) { + (void)printf("%s%s", curpref, strings[i]); + curpref = sep; + } + (void)printf("\n"); +} + +static int ethers(int argc, char *argv[]) +{ + char hostname[MAXHOSTNAMELEN + 1], *hp; + struct ether_addr ea, *eap; + int i, rv; + + if (argc == 2) { + warnx("Enumeration not supported on ethers"); + return RV_NOENUM; + } + + rv = RV_OK; + for (i = 2; i < argc; i++) { + if ((eap = ether_aton(argv[i])) == NULL) { + eap = &ea; + hp = argv[i]; + if (ether_hostton(hp, eap) != 0) { + rv = RV_NOTFOUND; + break; + } + } else { + hp = hostname; + if (ether_ntohost(hp, eap) != 0) { + rv = RV_NOTFOUND; + break; + } + } + (void)printf("%-17s %s\n", ether_ntoa(eap), hp); + } + return rv; +} + +static void groupprint(const struct group *gr) +{ + printfmtstrings(gr->gr_mem, ":", ",", "%s:%s:%u", + gr->gr_name, gr->gr_passwd, gr->gr_gid); +} + +static int group(int argc, char *argv[]) +{ + struct group *gr; + unsigned long id; + int i, rv; + + rv = RV_OK; + if (argc == 2) { + while ((gr = getgrent()) != NULL) + groupprint(gr); + } else { + for (i = 2; i < argc; i++) { + if (parsenum(argv[i], &id)) + gr = getgrgid((gid_t)id); + else + gr = getgrnam(argv[i]); + if (gr == NULL) { + rv = RV_NOTFOUND; + break; + } + groupprint(gr); + } + } + endgrent(); + return rv; +} + +static void hostsprint(const struct hostent *he) +{ + char buf[INET6_ADDRSTRLEN]; + + if (inet_ntop(he->h_addrtype, he->h_addr, buf, sizeof(buf)) == NULL) + (void)strlcpy(buf, "# unknown", sizeof(buf)); + printfmtstrings(he->h_aliases, " ", " ", "%-16s %s", buf, he->h_name); +} + +static int hosts(int argc, char *argv[]) +{ + struct hostent *he; + char addr[IN6ADDRSZ]; + int i, rv; + + sethostent(1); + rv = RV_OK; + if (argc == 2) { + while ((he = gethostent()) != NULL) + hostsprint(he); + } else { + for (i = 2; i < argc; i++) { + if (inet_pton(AF_INET6, argv[i], (void *)addr) > 0) + he = gethostbyaddr(addr, IN6ADDRSZ, AF_INET6); + else if (inet_pton(AF_INET, argv[i], (void *)addr) > 0) + he = gethostbyaddr(addr, INADDRSZ, AF_INET); + else + he = gethostbyname(argv[i]); + if (he == NULL) { + rv = RV_NOTFOUND; + break; + } + hostsprint(he); + } + } + endhostent(); + return rv; +} + +static void networksprint(const struct netent *ne) +{ + char buf[INET6_ADDRSTRLEN]; + struct in_addr ianet; + + ianet = inet_makeaddr(ne->n_net, 0); + if (inet_ntop(ne->n_addrtype, &ianet, buf, sizeof(buf)) == NULL) + (void)strlcpy(buf, "# unknown", sizeof(buf)); + printfmtstrings(ne->n_aliases, " ", " ", "%-16s %s", ne->n_name, buf); +} + +static int networks(int argc, char *argv[]) +{ + struct netent *ne; + in_addr_t net; + int i, rv; + + setnetent(1); + rv = RV_OK; + if (argc == 2) { + while ((ne = getnetent()) != NULL) + networksprint(ne); + } else { + for (i = 2; i < argc; i++) { + net = inet_network(argv[i]); + if (net != INADDR_NONE) + ne = getnetbyaddr(net, AF_INET); + else + ne = getnetbyname(argv[i]); + if (ne != NULL) { + rv = RV_NOTFOUND; + break; + } + networksprint(ne); + } + } + endnetent(); + return rv; +} + +static void passwdprint(struct passwd *pw) +{ + (void)printf("%s:%s:%u:%u:%s:%s:%s\n", + pw->pw_name, pw->pw_passwd, pw->pw_uid, + pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell); +} + +static int passwd(int argc, char *argv[]) +{ + struct passwd *pw; + unsigned long id; + int i, rv; + + rv = RV_OK; + if (argc == 2) { + while ((pw = getpwent()) != NULL) + passwdprint(pw); + } else { + for (i = 2; i < argc; i++) { + if (parsenum(argv[i], &id)) + pw = getpwuid((uid_t)id); + else + pw = getpwnam(argv[i]); + if (pw == NULL) { + rv = RV_NOTFOUND; + break; + } + passwdprint(pw); + } + } + endpwent(); + return rv; +} + +static void protocolsprint(struct protoent *pe) +{ + printfmtstrings(pe->p_aliases, " ", " ", + "%-16s %5d", pe->p_name, pe->p_proto); +} + +static int protocols(int argc, char *argv[]) +{ + struct protoent *pe; + unsigned long id; + int i, rv; + + setprotoent(1); + rv = RV_OK; + if (argc == 2) { + while ((pe = getprotoent()) != NULL) + protocolsprint(pe); + } else { + for (i = 2; i < argc; i++) { + if (parsenum(argv[i], &id)) + pe = getprotobynumber((int)id); + else + pe = getprotobyname(argv[i]); + if (pe == NULL) { + rv = RV_NOTFOUND; + break; + } + protocolsprint(pe); + } + } + endprotoent(); + return rv; +} + +static void servicesprint(struct servent *se) +{ + printfmtstrings(se->s_aliases, " ", " ", + "%-16s %5d/%s", + se->s_name, ntohs(se->s_port), se->s_proto); + +} + +static int services(int argc, char *argv[]) +{ + struct servent *se; + unsigned long id; + char *proto; + int i, rv; + + setservent(1); + rv = RV_OK; + if (argc == 2) { + while ((se = getservent()) != NULL) + servicesprint(se); + } else { + for (i = 2; i < argc; i++) { + proto = strchr(argv[i], '/'); + if (proto != NULL) + *proto++ = '\0'; + if (parsenum(argv[i], &id)) + se = getservbyport(htons(id), proto); + else + se = getservbyname(argv[i], proto); + if (se == NULL) { + rv = RV_NOTFOUND; + break; + } + servicesprint(se); + } + } + endservent(); + return rv; +} + +static int shells(int argc, char *argv[]) +{ + const char *sh; + int i, rv; + + setusershell(); + rv = RV_OK; + if (argc == 2) { + while ((sh = getusershell()) != NULL) + (void)printf("%s\n", sh); + } else { + for (i = 2; i < argc; i++) { + setusershell(); + while ((sh = getusershell()) != NULL) { + if (strcmp(sh, argv[i]) == 0) { + (void)printf("%s\n", sh); + break; + } + } + if (sh == NULL) { + rv = RV_NOTFOUND; + break; + } + } + } + endusershell(); + return rv; +} + +static struct getentdb { + const char *name; + int (*callback)(int, char *[]); +} databases[] = { + { "ethers", ethers, }, + { "group", group, }, + { "hosts", hosts, }, + { "networks", networks, }, + { "passwd", passwd, }, + { "protocols", protocols, }, + { "services", services, }, + { "shells", shells, }, + + { NULL, NULL, }, +}; + +static int usage(const char *arg0) +{ + struct getentdb *curdb; + size_t i; + + (void)fprintf(stderr, "Usage: %s database [key ...]\n", arg0); + (void)fprintf(stderr, "\tdatabase may be one of:"); + for (i = 0, curdb = databases; curdb->name != NULL; curdb++, i++) { + if (i % 7 == 0) + (void)fputs("\n\t\t", stderr); + (void)fprintf(stderr, "%s%s", i % 7 == 0 ? "" : " ", + curdb->name); + } + (void)fprintf(stderr, "\n"); + exit(RV_USAGE); + /* NOTREACHED */ +} + +int +main(int argc, char *argv[]) +{ + struct getentdb *curdb; + + if (argc < 2) + usage(argv[0]); + for (curdb = databases; curdb->name != NULL; curdb++) + if (strcmp(curdb->name, argv[1]) == 0) + return (*curdb->callback)(argc, argv); + + warn("Unknown database `%s'", argv[1]); + usage(argv[0]); + /* NOTREACHED */ +} ADDED PKGBUILDs/musl/getopt_long.c Index: PKGBUILDs/musl/getopt_long.c ================================================================== --- /dev/null +++ PKGBUILDs/musl/getopt_long.c @@ -0,0 +1,618 @@ +/* + * Copyright (c) 2002 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ +/*- + * Copyright (c) 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Dieter Baron and Thomas Klausner. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include + +#define GNU_COMPATIBLE /* Be more compatible, configure's use us! */ + +int opterr = 1; /* if error message should be printed */ +int optind = 1; /* index into parent argv vector */ +int optopt = '?'; /* character checked for validity */ +int optreset; /* reset getopt */ +char *optarg; /* argument associated with option */ + +#define PRINT_ERROR ((opterr) && (*options != ':')) + +#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ +#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ +#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */ + +/* return values */ +#define BADCH (int)'?' +#define BADARG ((*options == ':') ? (int)':' : (int)'?') +#define INORDER (int)1 + +#define EMSG "" + +#ifdef GNU_COMPATIBLE +#define NO_PREFIX (-1) +#define D_PREFIX 0 +#define DD_PREFIX 1 +#define W_PREFIX 2 +#endif + +static int getopt_internal(int, char * const *, const char *, + const struct option *, int *, int); +static int parse_long_options(char * const *, const char *, + const struct option *, int *, int, int); +static int gcd(int, int); +static void permute_args(int, int, int, char * const *); + +static char *place = EMSG; /* option letter processing */ + +/* XXX: set optreset to 1 rather than these two */ +static int nonopt_start = -1; /* first non option argument (for permute) */ +static int nonopt_end = -1; /* first option after non options (for permute) */ + +/* Error messages */ +static const char recargchar[] = "option requires an argument -- %c\n"; +static const char illoptchar[] = "illegal option -- %c\n"; /* From P1003.2 */ +#ifdef GNU_COMPATIBLE +static int dash_prefix = NO_PREFIX; +static const char gnuoptchar[] = "invalid option -- %c\n"; + +static const char recargstring[] = "option `%s%s' requires an argument\n"; +static const char ambig[] = "option `%s%.*s' is ambiguous\n"; +static const char noarg[] = "option `%s%.*s' doesn't allow an argument\n"; +static const char illoptstring[] = "unrecognized option `%s%s'\n"; +#else +static const char recargstring[] = "option requires an argument -- %s\n"; +static const char ambig[] = "ambiguous option -- %.*s\n"; +static const char noarg[] = "option doesn't take an argument -- %.*s\n"; +static const char illoptstring[] = "unknown option -- %s\n"; +#endif + +/* + * Compute the greatest common divisor of a and b. + */ +static int +gcd(int a, int b) +{ + int c; + + c = a % b; + while (c != 0) { + a = b; + b = c; + c = a % b; + } + + return (b); +} + +/* + * Exchange the block from nonopt_start to nonopt_end with the block + * from nonopt_end to opt_end (keeping the same order of arguments + * in each block). + */ +static void +permute_args(int panonopt_start, int panonopt_end, int opt_end, + char * const *nargv) +{ + int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; + char *swap; + + /* + * compute lengths of blocks and number and size of cycles + */ + nnonopts = panonopt_end - panonopt_start; + nopts = opt_end - panonopt_end; + ncycle = gcd(nnonopts, nopts); + cyclelen = (opt_end - panonopt_start) / ncycle; + + for (i = 0; i < ncycle; i++) { + cstart = panonopt_end+i; + pos = cstart; + for (j = 0; j < cyclelen; j++) { + if (pos >= panonopt_end) + pos -= nnonopts; + else + pos += nopts; + swap = nargv[pos]; + /* LINTED const cast */ + ((char **) nargv)[pos] = nargv[cstart]; + /* LINTED const cast */ + ((char **)nargv)[cstart] = swap; + } + } +} + +/* + * parse_long_options -- + * Parse long options in argc/argv argument vector. + * Returns -1 if short_too is set and the option does not match long_options. + */ +static int +parse_long_options(char * const *nargv, const char *options, + const struct option *long_options, int *idx, int short_too, int flags) +{ + char *current_argv, *has_equal; +#ifdef GNU_COMPATIBLE + char *current_dash; +#endif + size_t current_argv_len; + int i, match, exact_match, second_partial_match; + + current_argv = place; +#ifdef GNU_COMPATIBLE + switch (dash_prefix) { + case D_PREFIX: + current_dash = "-"; + break; + case DD_PREFIX: + current_dash = "--"; + break; + case W_PREFIX: + current_dash = "-W "; + break; + default: + current_dash = ""; + break; + } +#endif + match = -1; + exact_match = 0; + second_partial_match = 0; + + optind++; + + if ((has_equal = strchr(current_argv, '=')) != NULL) { + /* argument found (--option=arg) */ + current_argv_len = has_equal - current_argv; + has_equal++; + } else + current_argv_len = strlen(current_argv); + + for (i = 0; long_options[i].name; i++) { + /* find matching long option */ + if (strncmp(current_argv, long_options[i].name, + current_argv_len)) + continue; + + if (strlen(long_options[i].name) == current_argv_len) { + /* exact match */ + match = i; + exact_match = 1; + break; + } + /* + * If this is a known short option, don't allow + * a partial match of a single character. + */ + if (short_too && current_argv_len == 1) + continue; + + if (match == -1) /* first partial match */ + match = i; + else if ((flags & FLAG_LONGONLY) || + long_options[i].has_arg != + long_options[match].has_arg || + long_options[i].flag != long_options[match].flag || + long_options[i].val != long_options[match].val) + second_partial_match = 1; + } + if (!exact_match && second_partial_match) { + /* ambiguous abbreviation */ + if (PRINT_ERROR) { + fprintf(stderr, ambig, +#ifdef GNU_COMPATIBLE + current_dash, +#endif + (int)current_argv_len, + current_argv); + } + optopt = 0; + return (BADCH); + } + if (match != -1) { /* option found */ + if (long_options[match].has_arg == no_argument + && has_equal) { + if (PRINT_ERROR) { + fprintf(stderr, noarg, +#ifdef GNU_COMPATIBLE + current_dash, +#endif + (int)current_argv_len, + current_argv); + } + /* + * XXX: GNU sets optopt to val regardless of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; +#ifdef GNU_COMPATIBLE + return (BADCH); +#else + return (BADARG); +#endif + } + if (long_options[match].has_arg == required_argument || + long_options[match].has_arg == optional_argument) { + if (has_equal) + optarg = has_equal; + else if (long_options[match].has_arg == + required_argument) { + /* + * optional argument doesn't use next nargv + */ + optarg = nargv[optind++]; + } + } + if ((long_options[match].has_arg == required_argument) + && (optarg == NULL)) { + /* + * Missing argument; leading ':' indicates no error + * should be generated. + */ + if (PRINT_ERROR) { + fprintf(stderr, recargstring, +#ifdef GNU_COMPATIBLE + current_dash, +#endif + current_argv); + } + /* + * XXX: GNU sets optopt to val regardless of flag + */ + if (long_options[match].flag == NULL) + optopt = long_options[match].val; + else + optopt = 0; + --optind; + return (BADARG); + } + } else { /* unknown option */ + if (short_too) { + --optind; + return (-1); + } + if (PRINT_ERROR) { + fprintf(stderr, illoptstring, +#ifdef GNU_COMPATIBLE + current_dash, +#endif + current_argv); + } + optopt = 0; + return (BADCH); + } + if (idx) + *idx = match; + if (long_options[match].flag) { + *long_options[match].flag = long_options[match].val; + return (0); + } else + return (long_options[match].val); +} + +/* + * getopt_internal -- + * Parse argc/argv argument vector. Called by user level routines. + */ +static int +getopt_internal(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx, int flags) +{ + char *oli; /* option letter list index */ + int optchar, short_too; + int posixly_correct; /* no static, can be changed on the fly */ + + if (options == NULL) + return (-1); + + /* + * Disable GNU extensions if POSIXLY_CORRECT is set or options + * string begins with a '+'. + */ + posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); +#ifdef GNU_COMPATIBLE + if (*options == '-') + flags |= FLAG_ALLARGS; + else if (posixly_correct || *options == '+') + flags &= ~FLAG_PERMUTE; +#else + if (posixly_correct || *options == '+') + flags &= ~FLAG_PERMUTE; + else if (*options == '-') + flags |= FLAG_ALLARGS; +#endif +#if HAVE_STRICT_MODE >= 1 + flags &= ~FLAG_PERMUTE; +#endif + if (*options == '+' || *options == '-') + options++; + + /* + * XXX Some GNU programs (like cvs) set optind to 0 instead of + * XXX using optreset. Work around this braindamage. + */ + if (optind == 0) + optind = optreset = 1; + + optarg = NULL; + if (optreset) + nonopt_start = nonopt_end = -1; +start: + if (optreset || !*place) { /* update scanning pointer */ + optreset = 0; + if (optind >= nargc) { /* end of argument vector */ + place = EMSG; + if (nonopt_end != -1) { + /* do permutation, if we have to */ + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + else if (nonopt_start != -1) { + /* + * If we skipped non-options, set optind + * to the first of them. + */ + optind = nonopt_start; + } + nonopt_start = nonopt_end = -1; + return (-1); + } + if (*(place = nargv[optind]) != '-' || +#ifdef GNU_COMPATIBLE + place[1] == '\0') { +#else + (place[1] == '\0' && strchr(options, '-') == NULL)) { +#endif + place = EMSG; /* found non-option */ + if (flags & FLAG_ALLARGS) { + /* + * GNU extension: + * return non-option as argument to option 1 + */ + optarg = nargv[optind++]; + return (INORDER); + } + if (!(flags & FLAG_PERMUTE)) { + /* + * If no permutation wanted, stop parsing + * at first non-option. + */ + return (-1); + } + /* do permutation */ + if (nonopt_start == -1) + nonopt_start = optind; + else if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + nonopt_start = optind - + (nonopt_end - nonopt_start); + nonopt_end = -1; + } + optind++; + /* process next argument */ + goto start; + } + if (nonopt_start != -1 && nonopt_end == -1) + nonopt_end = optind; + + /* + * If we have "-" do nothing, if "--" we are done. + */ + if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { + optind++; + place = EMSG; + /* + * We found an option (--), so if we skipped + * non-options, we have to permute. + */ + if (nonopt_end != -1) { + permute_args(nonopt_start, nonopt_end, + optind, nargv); + optind -= nonopt_end - nonopt_start; + } + nonopt_start = nonopt_end = -1; + return (-1); + } + } + + /* + * Check long options if: + * 1) we were passed some + * 2) the arg is not just "-" + * 3) either the arg starts with -- we are getopt_long_only() + */ + if (long_options != NULL && place != nargv[optind] && + (*place == '-' || (flags & FLAG_LONGONLY))) { + short_too = 0; +#ifdef GNU_COMPATIBLE + dash_prefix = D_PREFIX; +#endif + if (*place == '-') { + place++; /* --foo long option */ +#ifdef GNU_COMPATIBLE + dash_prefix = DD_PREFIX; +#endif + } else if (*place != ':' && strchr(options, *place) != NULL) + short_too = 1; /* could be short option too */ + + optchar = parse_long_options(nargv, options, long_options, + idx, short_too, flags); + if (optchar != -1) { + place = EMSG; + return (optchar); + } + } + + if ((optchar = (int)*place++) == (int)':' || + (optchar == (int)'-' && *place != '\0') || + (oli = strchr(options, optchar)) == NULL) { + /* + * If the user specified "-" and '-' isn't listed in + * options, return -1 (non-option) as per POSIX. + * Otherwise, it is an unknown option character (or ':'). + */ + if (optchar == (int)'-' && *place == '\0') + return (-1); + if (!*place) + ++optind; +#ifdef GNU_COMPATIBLE + if (PRINT_ERROR) { + fprintf(stderr, posixly_correct ? illoptchar : gnuoptchar, + optchar); + } +#else + if (PRINT_ERROR) { + fprintf(stderr, illoptchar, optchar); + } +#endif + optopt = optchar; + return (BADCH); + } + if (long_options != NULL && optchar == 'W' && oli[1] == ';') { + /* -W long-option */ + if (*place) /* no space */ + /* NOTHING */; + else if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) { + fprintf(stderr, recargchar, optchar); + } + optopt = optchar; + return (BADARG); + } else /* white space */ + place = nargv[optind]; +#ifdef GNU_COMPATIBLE + dash_prefix = W_PREFIX; +#endif + optchar = parse_long_options(nargv, options, long_options, + idx, 0, flags); + place = EMSG; + return (optchar); + } + if (*++oli != ':') { /* doesn't take argument */ + if (!*place) + ++optind; + } else { /* takes (optional) argument */ + optarg = NULL; + if (*place) /* no white space */ + optarg = place; + else if (oli[1] != ':') { /* arg not optional */ + if (++optind >= nargc) { /* no arg */ + place = EMSG; + if (PRINT_ERROR) { + fprintf(stderr, recargchar, optchar); + } + optopt = optchar; + return (BADARG); + } else + optarg = nargv[optind]; + } + place = EMSG; + ++optind; + } + /* dump back option letter */ + return (optchar); +} + +/* + * getopt -- + * Parse argc/argv argument vector. + * + * [eventually this will replace the BSD getopt] + */ +int +getopt(int nargc, char * const *nargv, const char *options) +{ + + /* + * We don't pass FLAG_PERMUTE to getopt_internal() since + * the BSD getopt(3) (unlike GNU) has never done this. + * + * Furthermore, since many privileged programs call getopt() + * before dropping privileges it makes sense to keep things + * as simple (and bug-free) as possible. + */ + return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); +} + +/* + * getopt_long -- + * Parse argc/argv argument vector. + */ +int +getopt_long(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) +{ + + return (getopt_internal(nargc, nargv, options, long_options, idx, + FLAG_PERMUTE)); +} + +/* + * getopt_long_only -- + * Parse argc/argv argument vector. + */ +int +getopt_long_only(int nargc, char * const *nargv, const char *options, + const struct option *long_options, int *idx) +{ + + return (getopt_internal(nargc, nargv, options, long_options, idx, + FLAG_PERMUTE|FLAG_LONGONLY)); +} ADDED PKGBUILDs/musl/iconv.c Index: PKGBUILDs/musl/iconv.c ================================================================== --- /dev/null +++ PKGBUILDs/musl/iconv.c @@ -0,0 +1,110 @@ +/* + * iconv.c + * Implementation of SUSv4 XCU iconv utility + * Copyright © 2011 Rich Felker + * Licensed under the terms of the GNU General Public License, v2 or later + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + const char *from=0, *to=0; + int b; + iconv_t cd; + char buf[BUFSIZ]; + char outbuf[BUFSIZ*4]; + char *in, *out; + size_t inb; + size_t l; + size_t unitsize=0; + int err=0; + FILE *f; + + while ((b = getopt(argc, argv, "f:t:csl")) != EOF) switch(b) { + case 'l': + puts("UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF32-LE, UCS-2BE, UCS-2LE, WCHAR_T,\n" + "US_ASCII, ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5,\n" + "ISO8859-6, ISO8859-7, ..."); + exit(0); + case 'c': case 's': break; + case 'f': from=optarg; break; + case 't': to=optarg; break; + default: exit(1); + } + + if (!from || !to) { + setlocale(LC_CTYPE, ""); + if (!to) to = nl_langinfo(CODESET); + if (!from) from = nl_langinfo(CODESET); + } + cd = iconv_open(to, from); + if (cd == (iconv_t)-1) { + if (iconv_open(to, "WCHAR_T") == (iconv_t)-1) + fprintf(stderr, "iconv: destination charset %s: ", to); + else + fprintf(stderr, "iconv: source charset %s: ", from); + perror(""); + exit(1); + } + if (optind == argc) argv[argc++] = "-"; + + for (; optind < argc; optind++) { + if (argv[optind][0]=='-' && !argv[optind][1]) { + f = stdin; + argv[optind] = "(stdin)"; + } else if (!(f = fopen(argv[optind], "rb"))) { + fprintf(stderr, "iconv: %s: ", argv[optind]); + perror(""); + err = 1; + continue; + } + inb = 0; + for (;;) { + in = buf; + out = outbuf; + l = fread(buf+inb, 1, sizeof(buf)-inb, f); + inb += l; + if (!inb) break; + if (iconv(cd, &in, &inb, &out, (size_t [1]){sizeof outbuf})==-1 + && errno == EILSEQ) { + if (!unitsize) { + wchar_t wc='0'; + char dummy[4], *dummyp=dummy; + iconv_t cd2 = iconv_open(from, "WCHAR_T"); + if (cd == (iconv_t)-1) { + unitsize = 1; + } else { + iconv(cd2, + (char *[1]){(char *)&wc}, + (size_t[1]){1}, + &dummyp, (size_t[1]){4}); + unitsize = dummyp-dummy; + if (!unitsize) unitsize=1; + } + } + inb-=unitsize; + in+=unitsize; + } + if (inb && !l && errno==EINVAL) break; + if (out>outbuf && !fwrite(outbuf, out-outbuf, 1, stdout)) { + perror("iconv: write error"); + exit(1); + } + if (inb) memmove(buf, in, inb); + } + if (ferror(f)) { + fprintf(stderr, "iconv: %s: ", argv[optind]); + perror(""); + err = 1; + } + } + return err; +} ADDED PKGBUILDs/musl/ldconfig Index: PKGBUILDs/musl/ldconfig ================================================================== --- /dev/null +++ PKGBUILDs/musl/ldconfig @@ -0,0 +1,17 @@ +#!/bin/sh +scan_dirs() { + scanelf -qS "$@" | while read SONAME FILE; do + TARGET="${FILE##*/}" + LINK="${FILE%/*}/$SONAME" + case "$FILE" in + /lib/*|/usr/lib/*|/usr/local/lib/*) ;; + *) [ -h "$LINK" -o ! -e "$LINK" ] && ln -sf "$TARGET" "$LINK" + esac + done +} +# eat ldconfig options +while getopts "nNvXvf:C:r:" opt; do + : +done +shift $(( $OPTIND - 1 )) +[ $# -gt 0 ] && scan_dirs "$@" ADDED PKGBUILDs/musl/musl.post-upgrade Index: PKGBUILDs/musl/musl.post-upgrade ================================================================== --- /dev/null +++ PKGBUILDs/musl/musl.post-upgrade @@ -0,0 +1,6 @@ +#!/bin/sh + +if ! [ -e /etc/localtime ] && [ -e /etc/zoneinfo/localtime ]; then + mv /etc/zoneinfo/localtime /etc/localtime +fi + ADDED PKGBUILDs/ncurses/PKGBUILD Index: PKGBUILDs/ncurses/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/ncurses/PKGBUILD @@ -0,0 +1,66 @@ +# Taken from Arch Linux +# Modifications by kraileth +############################################################################### +# Arch Linux Maintainer: Allan McRae +# Arch Linux Contributor: judd + +pkgname=ncurses +pkgver=5.9 +pkgrel=6 +pkgdesc="System V Release 4.0 curses emulation library" +arch=('i586') +url="http://www.gnu.org/software/ncurses/" +license=('MIT') +depends=('musl') +source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig}) +md5sums=('8cb9c412e5f2d96bc6f459aa8c6282a1' + '014ffdbbfec6d41a9a89d6cbe6434638') + +build() { + cd ${srcdir}/ + mkdir ncurses{,w}-build + + cd ${srcdir}/ncursesw-build + ../${pkgname}-${pkgver}/configure --prefix=/usr --mandir=/usr/share/man \ + --with-shared --with-normal --without-debug --without-ada \ + --enable-widec --enable-pc-files + # add --enable-ext-colors and --enable-ext-mouse with next soname bump + make + + # libraries for external binary support + cd ${srcdir}/ncurses-build + [ $CARCH = "x86_64" ] && CONFIGFLAG="--with-chtype=long" + ../${pkgname}-${pkgver}/configure --prefix=/usr \ + --with-shared --with-normal --without-debug --without-ada $CONFIGFLAG + make +} + +package() { + cd ${srcdir}/ncursesw-build + make DESTDIR=${pkgdir} install + + # fool packages looking to link to non-wide-character ncurses libraries + for lib in ncurses form panel menu; do + echo "INPUT(-l${lib}w)" >${pkgdir}/usr/lib/lib${lib}.so + done + + for lib in ncurses ncurses++ form panel menu; do + ln -s ${lib}w.pc ${pkgdir}/usr/lib/pkgconfig/${lib}.pc + done + + # some packages look for -lcurses during build + echo "INPUT(-lncursesw)" >${pkgdir}/usr/lib/libcursesw.so + ln -s libncurses.so ${pkgdir}/usr/lib/libcurses.so + + # non-widec compatibility libraries + cd ${srcdir}/ncurses-build + for lib in ncurses form panel menu; do + install -Dm755 lib/lib${lib}.so.${pkgver} ${pkgdir}/usr/lib/lib${lib}.so.${pkgver} + ln -s lib${lib}.so.${pkgver} ${pkgdir}/usr/lib/lib${lib}.so.5 + done + + # install license, rip it from the readme + cd ${srcdir}/${pkgname}-${pkgver} + install -dm755 ${pkgdir}/usr/share/licenses/$pkgname + grep -B 100 '$Id' README > ${pkgdir}/usr/share/licenses/${pkgname}/license.txt +} ADDED PKGBUILDs/openssl/PKGBUILD Index: PKGBUILDs/openssl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/openssl/PKGBUILD @@ -0,0 +1,81 @@ +# Taken from Arch Linux with patch from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Pierre Schmitz + +pkgname=openssl +_ver=1.0.1g +# use a pacman compatible version scheme +pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} +#pkgver=$_ver +pkgrel=1 +pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security' +arch=('i586') +url='https://www.openssl.org' +license=('custom:BSD') +depends=('zlib' 'perl') +optdepends=('ca-certificates') +options=('!makeflags') +backup=('etc/ssl/openssl.cnf') +noextract=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz" + "https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz.asc" + 'no-rpath.patch' + 'ca-dir.patch' + 'openssl-1.0.1f-perl-5.18.patch' + 'openssl-use-termios.patch') +md5sums=('de62b43dfcd858e66a74bee1c834e959' + 'SKIP' + 'dc78d3d06baffc16217519242ce92478' + '3bf51be3a1bbd262be46dc619f92aa90' + 'ea2a61c8bd43788d81d98f1ac36c98ac') + +prepare() { + cd $srcdir + tar xvzf ../${pkgname}-${_ver}.tar.gz + + cd $pkgname-$_ver + + # remove rpath: http://bugs.archlinux.org/task/14367 + patch -p0 -i $srcdir/../no-rpath.patch + # set ca dir to /etc/ssl by default + patch -p0 -i $srcdir/../ca-dir.patch + + patch -p1 -i $srcdir/../openssl-1.0.1f-perl-5.18.patch + patch -p1 -i ${srcdir}/../openssl-use-termios.patch +} + +build() { + cd $srcdir/$pkgname-$_ver + + if [ "${CARCH}" == 'x86_64' ]; then + openssltarget='linux-x86_64' + optflags='enable-ec_nistp_64_gcc_128' + elif [ "${CARCH}" == 'i686' ]; then + openssltarget='linux-elf' + optflags='' + fi + + # mark stack as non-executable: http://bugs.archlinux.org/task/12434 + ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib \ + shared zlib ${optflags} \ + "${openssltarget}" \ + "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" + + make depend + make +} + +check() { + cd $srcdir/$pkgname-$_ver + # the test fails due to missing write permissions in /etc/ssl + # revert this patch for make test + patch -p0 -R -i $srcdir/../ca-dir.patch + make test + patch -p0 -i $srcdir/../ca-dir.patch +} + +package() { + cd $srcdir/$pkgname-$_ver + make INSTALL_PREFIX=$pkgdir MANDIR=/usr/share/man MANSUFFIX=ssl install + install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} ADDED PKGBUILDs/openssl/ca-dir.patch Index: PKGBUILDs/openssl/ca-dir.patch ================================================================== --- /dev/null +++ PKGBUILDs/openssl/ca-dir.patch @@ -0,0 +1,33 @@ +--- apps/CA.pl.in 2006-04-28 02:30:49.000000000 +0200 ++++ apps/CA.pl.in 2010-04-01 00:35:02.600553509 +0200 +@@ -53,7 +53,7 @@ + $X509="$openssl x509"; + $PKCS12="$openssl pkcs12"; + +-$CATOP="./demoCA"; ++$CATOP="/etc/ssl"; + $CAKEY="cakey.pem"; + $CAREQ="careq.pem"; + $CACERT="cacert.pem"; +--- apps/CA.sh 2009-10-15 19:27:47.000000000 +0200 ++++ apps/CA.sh 2010-04-01 00:35:02.600553509 +0200 +@@ -68,7 +68,7 @@ + X509="$OPENSSL x509" + PKCS12="openssl pkcs12" + +-if [ -z "$CATOP" ] ; then CATOP=./demoCA ; fi ++if [ -z "$CATOP" ] ; then CATOP=/etc/ssl ; fi + CAKEY=./cakey.pem + CAREQ=./careq.pem + CACERT=./cacert.pem +--- apps/openssl.cnf 2009-04-04 20:09:43.000000000 +0200 ++++ apps/openssl.cnf 2010-04-01 00:35:02.607220681 +0200 +@@ -39,7 +39,7 @@ + #################################################################### + [ CA_default ] + +-dir = ./demoCA # Where everything is kept ++dir = /etc/ssl # Where everything is kept + certs = $dir/certs # Where the issued certs are kept + crl_dir = $dir/crl # Where the issued crl are kept + database = $dir/index.txt # database index file. ADDED PKGBUILDs/openssl/no-rpath.patch Index: PKGBUILDs/openssl/no-rpath.patch ================================================================== --- /dev/null +++ PKGBUILDs/openssl/no-rpath.patch @@ -0,0 +1,11 @@ +--- Makefile.shared.no-rpath 2005-06-23 22:47:54.000000000 +0200 ++++ Makefile.shared 2005-11-16 22:35:37.000000000 +0100 +@@ -153,7 +153,7 @@ + NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" + +-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" ++DO_GNU_APP=LDFLAGS="$(CFLAGS)" + + #This is rather special. It's a special target with which one can link + #applications without bothering with any features that have anything to ADDED PKGBUILDs/openssl/openssl-1.0.1f-perl-5.18.patch Index: PKGBUILDs/openssl/openssl-1.0.1f-perl-5.18.patch ================================================================== --- /dev/null +++ PKGBUILDs/openssl/openssl-1.0.1f-perl-5.18.patch @@ -0,0 +1,356 @@ +Forward-ported from openssl-1.0.1e-perl-5.18.patch +Fixes install with perl-5.18. + +https://bugs.gentoo.org/show_bug.cgi?id=497286 + +Signed-off-by: Lars Wendler + +--- openssl-1.0.1f/doc/apps/cms.pod ++++ openssl-1.0.1f/doc/apps/cms.pod +@@ -450,28 +450,28 @@ + + =over 4 + +-=item 0 ++=item C<0> + + the operation was completely successfully. + +-=item 1 ++=item C<1> + + an error occurred parsing the command options. + +-=item 2 ++=item C<2> + + one of the input files could not be read. + +-=item 3 ++=item C<3> + + an error occurred creating the CMS file or when reading the MIME + message. + +-=item 4 ++=item C<4> + + an error occurred decrypting or verifying the message. + +-=item 5 ++=item C<5> + + the message was verified correctly but an error occurred writing out + the signers certificates. +--- openssl-1.0.1f/doc/apps/smime.pod ++++ openssl-1.0.1f/doc/apps/smime.pod +@@ -308,28 +308,28 @@ + + =over 4 + +-=item 0 ++=item C<0> + + the operation was completely successfully. + +-=item 1 ++=item C<1> + + an error occurred parsing the command options. + +-=item 2 ++=item C<2> + + one of the input files could not be read. + +-=item 3 ++=item C<3> + + an error occurred creating the PKCS#7 file or when reading the MIME + message. + +-=item 4 ++=item C<4> + + an error occurred decrypting or verifying the message. + +-=item 5 ++=item C<5> + + the message was verified correctly but an error occurred writing out + the signers certificates. +--- openssl-1.0.1f/doc/ssl/SSL_accept.pod ++++ openssl-1.0.1f/doc/ssl/SSL_accept.pod +@@ -44,13 +44,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The TLS/SSL handshake was not successful but was shut down controlled and + by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the + return value B to find out the reason. + +-=item 1 ++=item C<1> + + The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been + established. +--- openssl-1.0.1f/doc/ssl/SSL_clear.pod ++++ openssl-1.0.1f/doc/ssl/SSL_clear.pod +@@ -56,12 +56,12 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The SSL_clear() operation could not be performed. Check the error stack to + find out the reason. + +-=item 1 ++=item C<1> + + The SSL_clear() operation was successful. + +--- openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod ++++ openssl-1.0.1f/doc/ssl/SSL_COMP_add_compression_method.pod +@@ -53,11 +53,11 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The operation succeeded. + +-=item 1 ++=item C<1> + + The operation failed. Check the error queue to find out the reason. + +--- openssl-1.0.1f/doc/ssl/SSL_connect.pod ++++ openssl-1.0.1f/doc/ssl/SSL_connect.pod +@@ -41,13 +41,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The TLS/SSL handshake was not successful but was shut down controlled and + by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the + return value B to find out the reason. + +-=item 1 ++=item C<1> + + The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been + established. +--- openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_add_session.pod +@@ -52,13 +52,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The operation failed. In case of the add operation, it was tried to add + the same (identical) session twice. In case of the remove operation, the + session was not found in the cache. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_load_verify_locations.pod +@@ -100,13 +100,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The operation failed because B and B are NULL or the + processing at one of the locations specified failed. Check the error + stack to find out the reason. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_client_CA_list.pod +@@ -66,13 +66,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + A failure while manipulating the STACK_OF(X509_NAME) object occurred or + the X509_NAME could not be extracted from B. Check the error stack + to find out the reason. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_session_id_context.pod +@@ -64,13 +64,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The length B of the session id context B exceeded + the maximum allowed length of B. The error + is logged to the error stack. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_set_ssl_version.pod +@@ -42,11 +42,11 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The new choice failed, check the error stack to find out the reason. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod ++++ openssl-1.0.1f/doc/ssl/SSL_CTX_use_psk_identity_hint.pod +@@ -96,7 +96,7 @@ + connection will fail with decryption_error before it will be finished + completely. + +-=item 0 ++=item C<0> + + PSK identity was not found. An "unknown_psk_identity" alert message + will be sent and the connection setup fails. +--- openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod ++++ openssl-1.0.1f/doc/ssl/SSL_do_handshake.pod +@@ -45,13 +45,13 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The TLS/SSL handshake was not successful but was shut down controlled and + by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the + return value B to find out the reason. + +-=item 1 ++=item C<1> + + The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been + established. +--- openssl-1.0.1f/doc/ssl/SSL_read.pod ++++ openssl-1.0.1f/doc/ssl/SSL_read.pod +@@ -86,7 +86,7 @@ + The read operation was successful; the return value is the number of + bytes actually read from the TLS/SSL connection. + +-=item 0 ++=item C<0> + + The read operation was not successful. The reason may either be a clean + shutdown due to a "close notify" alert sent by the peer (in which case +--- openssl-1.0.1f/doc/ssl/SSL_session_reused.pod ++++ openssl-1.0.1f/doc/ssl/SSL_session_reused.pod +@@ -27,11 +27,11 @@ + + =over 4 + +-=item 0 ++=item C<0> + + A new session was negotiated. + +-=item 1 ++=item C<1> + + A session was reused. + +--- openssl-1.0.1f/doc/ssl/SSL_set_fd.pod ++++ openssl-1.0.1f/doc/ssl/SSL_set_fd.pod +@@ -35,11 +35,11 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The operation failed. Check the error stack to find out why. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_set_session.pod ++++ openssl-1.0.1f/doc/ssl/SSL_set_session.pod +@@ -37,11 +37,11 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The operation failed; check the error stack to find out the reason. + +-=item 1 ++=item C<1> + + The operation succeeded. + +--- openssl-1.0.1f/doc/ssl/SSL_shutdown.pod ++++ openssl-1.0.1f/doc/ssl/SSL_shutdown.pod +@@ -92,14 +92,14 @@ + + =over 4 + +-=item 0 ++=item C<0> + + The shutdown is not yet finished. Call SSL_shutdown() for a second time, + if a bidirectional shutdown shall be performed. + The output of L may be misleading, as an + erroneous SSL_ERROR_SYSCALL may be flagged even though no error occurred. + +-=item 1 ++=item C<1> + + The shutdown was successfully completed. The "close notify" alert was sent + and the peer's "close notify" alert was received. +--- openssl-1.0.1f/doc/ssl/SSL_write.pod ++++ openssl-1.0.1f/doc/ssl/SSL_write.pod +@@ -79,7 +79,7 @@ + The write operation was successful, the return value is the number of + bytes actually written to the TLS/SSL connection. + +-=item 0 ++=item C<0> + + The write operation was not successful. Probably the underlying connection + was closed. Call SSL_get_error() with the return value B to find out, ADDED PKGBUILDs/openssl/openssl-use-termios.patch Index: PKGBUILDs/openssl/openssl-use-termios.patch ================================================================== --- /dev/null +++ PKGBUILDs/openssl/openssl-use-termios.patch @@ -0,0 +1,12 @@ +--- a/crypto/ui/ui_openssl.c Fri Sep 21 09:57:09 2012 ++++ b/crypto/ui/ui_openssl.c Fri Sep 21 09:57:30 2012 +@@ -212,6 +212,9 @@ + #undef SGTTY + #endif + ++#define TERMIOS ++#undef TERMIO ++ + #ifdef TERMIOS + # include + # define TTY_STRUCT struct termios ADDED PKGBUILDs/pacman/PKGBUILD Index: PKGBUILDs/pacman/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/pacman/PKGBUILD @@ -0,0 +1,73 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Dan McGee +# (Arch Linux) Maintainer: Dave Reisner + +pkgname=pacman +pkgver=4.1.2 +pkgrel=5 +pkgdesc="A library-based package manager with dependency support" +arch=('i586') +url="http://www.archlinux.org/pacman/" +license=('GPL') +groups=('base' 'base-devel') +depends=('bash>=4.2.042-2' 'musl' 'libarchive>=3.1.2' 'curl>=7.19.4' + 'gpgme') +checkdepends=('python2' 'fakechroot') +optdepends=('fakeroot: for makepkg usage as normal user') +provides=('pacman-contrib') +conflicts=('pacman-contrib') +replaces=('pacman-contrib') +backup=(etc/pacman.conf etc/makepkg.conf) +options=('strip' 'debug') +source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig} + pacman.conf + makepkg.conf) +md5sums=('063c8b0ff6bdf903dc235445525627cd' + 'SKIP' + '89757cb025b7bf5e31e5d57fcf01615a' + '09ff1f7a1eed2a17eafe609cf2278aaf') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + sed -e '20a #include ' -i lib/libalpm/be_sync.c + +} + +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-doc \ + --with-scriptlet-shell=/usr/bin/bash \ + --with-ldconfig=/usr/bin/ldconfig + make + make -C contrib +} + +check() { + make -C "$pkgname-$pkgver" check +} + +package() { + cd "$pkgname-$pkgver" + + make DESTDIR="$pkgdir" install + make DESTDIR="$pkgdir" -C contrib install + + # install Arch specific stuff + install -dm755 "$pkgdir/etc" + install -m644 "$srcdir/pacman.conf" "$pkgdir/etc/pacman.conf" + + # set things correctly in the default conf file + install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc" + + # put bash_completion in the right location + install -dm755 "$pkgdir/usr/share/bash-completion/completions" + mv "$pkgdir/etc/bash_completion.d/pacman" "$pkgdir/usr/share/bash-completion/completions" + rmdir "$pkgdir/etc/bash_completion.d" + + install -Dm644 contrib/PKGBUILD.vim "$pkgdir/usr/share/vim/vimfiles/syntax/PKGBUILD.vim" +} ADDED PKGBUILDs/pacman/makepkg.conf Index: PKGBUILDs/pacman/makepkg.conf ================================================================== --- /dev/null +++ PKGBUILDs/pacman/makepkg.conf @@ -0,0 +1,140 @@ +# +# /etc/makepkg.conf +# + +######################################################################### +# SOURCE ACQUISITION +######################################################################### +# +#-- The download utilities that makepkg should use to acquire sources +# Format: 'protocol::agent' +DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' + 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'rsync::/usr/bin/rsync --no-motd -z %u %o' + 'scp::/usr/bin/scp -C %u %o') + +# Other common tools: +# /usr/bin/snarf +# /usr/bin/lftpget -c +# /usr/bin/wget + +######################################################################### +# ARCHITECTURE, COMPILE FLAGS +######################################################################### +# +CARCH="i586" +CHOST="i586-pc-linux-musl" + +#-- Compiler and Linker Flags +# -march (or -mcpu) builds exclusively for an architecture +# -mtune optimizes for an architecture, but builds for whole processor family +CPPFLAGS="-D_FORTIFY_SOURCE=2" +CFLAGS="-march=i586 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4" +CXXFLAGS="-march=i586 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4" +LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" +#-- Make Flags: change this for DistCC/SMP systems +#MAKEFLAGS="-j2" +#-- Debugging flags +DEBUG_CFLAGS="-g -fvar-tracking-assignments" +DEBUG_CXXFLAGS="-g -fvar-tracking-assignments" + +######################################################################### +# BUILD ENVIRONMENT +######################################################################### +# +# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) +# A negated environment option will do the opposite of the comments below. +# +#-- fakeroot: Allow building packages as a non-root user +#-- distcc: Use the Distributed C/C++/ObjC compiler +#-- color: Colorize output messages +#-- ccache: Use ccache to cache compilation +#-- check: Run the check() function if present in the PKGBUILD +#-- sign: Generate PGP signature file +# +BUILDENV=(fakeroot !distcc color !ccache check !sign) +# +#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, +#-- specify a space-delimited list of hosts running in the DistCC cluster. +#DISTCC_HOSTS="" +# +#-- Specify a directory for package building. +#BUILDDIR=/tmp/makepkg + +######################################################################### +# GLOBAL PACKAGE OPTIONS +# These are default values for the options=() settings +######################################################################### +# +# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug) +# A negated option will do the opposite of the comments below. +# +#-- strip: Strip symbols from binaries/libraries +#-- docs: Save doc directories specified by DOC_DIRS +#-- libtool: Leave libtool (.la) files in packages +#-- staticlibs: Leave static library (.a) files in packages +#-- emptydirs: Leave empty directories in packages +#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip +#-- purge: Remove files specified by PURGE_TARGETS +#-- upx: Compress binary executable files using UPX +#-- debug: Add debugging flags as specified in DEBUG_* variables +# +OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !upx !debug) + +#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 +INTEGRITY_CHECK=(md5) +#-- Options to be used when stripping binaries. See `man strip' for details. +STRIP_BINARIES="--strip-all" +#-- Options to be used when stripping shared libraries. See `man strip' for details. +STRIP_SHARED="--strip-unneeded" +#-- Options to be used when stripping static libraries. See `man strip' for details. +STRIP_STATIC="--strip-debug" +#-- Manual (man and info) directories to compress (if zipman is specified) +MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) +#-- Doc directories to remove (if !docs is specified) +DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) +#-- Files to be removed from all packages (if purge is specified) +PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) + +######################################################################### +# PACKAGE OUTPUT +######################################################################### +# +# Default: put built package and cached source in build directory +# +#-- Destination: specify a fixed directory where all packages will be placed +#PKGDEST=/home/packages +#-- Source cache: specify a fixed directory where source files will be cached +#SRCDEST=/home/sources +#-- Source packages: specify a fixed directory where all src packages will be placed +#SRCPKGDEST=/home/srcpackages +#-- Log files: specify a fixed directory where all log files will be placed +#LOGDEST=/home/makepkglogs +#-- Packager: name/email of the person or organization building packages +#PACKAGER="John Doe " +#-- Specify a key to use for package signing +#GPGKEY="" + +######################################################################### +# COMPRESSION DEFAULTS +######################################################################### +# +COMPRESSGZ=(gzip -c -f -n) +COMPRESSBZ2=(bzip2 -c -f) +COMPRESSXZ=(xz -c -z -) +COMPRESSLRZ=(lrzip -q) +COMPRESSLZO=(lzop -q) +COMPRESSZ=(compress -c -f) + +######################################################################### +# EXTENSION DEFAULTS +######################################################################### +# +# WARNING: Do NOT modify these variables unless you know what you are +# doing. +# +PKGEXT='.pkg.tar.xz' +SRCEXT='.src.tar.gz' + +# vim: set ft=sh ts=2 sw=2 et: ADDED PKGBUILDs/pacman/pacman.conf Index: PKGBUILDs/pacman/pacman.conf ================================================================== --- /dev/null +++ PKGBUILDs/pacman/pacman.conf @@ -0,0 +1,91 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +#UseDelta = 0.7 +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +#Color +#TotalDownload +CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +[skel] +SigLevel = Never +Server = http://www.elderlinux.org/repos/eerie/skel + +[default] +SigLevel = Never +Server = http://www.elderlinux.org/repos/eerie/default + +[devel] +SigLevel = Never +Server = http://www.elderlinux.org/repos/eerie/devel + +[extra] +SigLevel = Never +Server = http://www.elderlinux.org/repos/eerie/extra + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs ADDED PKGBUILDs/pambase/PKGBUILD Index: PKGBUILDs/pambase/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/pambase/PKGBUILD @@ -0,0 +1,36 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Maintainer: Dave Reisner + +pkgname=pambase +pkgver=20130928 +pkgrel=1 +pkgdesc="Base PAM configuration for services" +arch=('any') +url="http://www.archlinux.org" +license=('GPL') +source=('system-auth' + 'system-local-login' + 'system-login' + 'system-remote-login' + 'system-services' + 'other') +backup=('etc/pam.d/system-auth' + 'etc/pam.d/system-local-login' + 'etc/pam.d/system-login' + 'etc/pam.d/system-remote-login' + 'etc/pam.d/system-services' + 'etc/pam.d/other') +md5sums=('6116b8e199a3dfd26a085a67a718435d' + '477237985820117a0e6e1b13a86eb599' + '7464f86d346b22dd07b433c341a33aab' + '477237985820117a0e6e1b13a86eb599' + '6969307eef026979703a6eba33c2e3eb' + '6e6c8719e5989d976a14610f340bd33a') + +package() { + install -dm755 "$pkgdir/etc/pam.d" + install -m644 -t "$pkgdir/etc/pam.d" "${source[@]}" +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/pambase/other Index: PKGBUILDs/pambase/other ================================================================== --- /dev/null +++ PKGBUILDs/pambase/other @@ -0,0 +1,5 @@ +#%PAM-1.0 +auth required pam_unix.so +account required pam_unix.so +password required pam_unix.so +session required pam_unix.so ADDED PKGBUILDs/pambase/system-auth Index: PKGBUILDs/pambase/system-auth ================================================================== --- /dev/null +++ PKGBUILDs/pambase/system-auth @@ -0,0 +1,16 @@ +#%PAM-1.0 + +auth required pam_unix.so try_first_pass nullok +auth optional pam_permit.so +auth required pam_env.so + +account required pam_unix.so +account optional pam_permit.so +account required pam_time.so + +password required pam_unix.so try_first_pass nullok sha512 shadow +password optional pam_permit.so + +session required pam_limits.so +session required pam_unix.so +session optional pam_permit.so ADDED PKGBUILDs/pambase/system-local-login Index: PKGBUILDs/pambase/system-local-login ================================================================== --- /dev/null +++ PKGBUILDs/pambase/system-local-login @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth include system-login +account include system-login +password include system-login +session include system-login ADDED PKGBUILDs/pambase/system-login Index: PKGBUILDs/pambase/system-login ================================================================== --- /dev/null +++ PKGBUILDs/pambase/system-login @@ -0,0 +1,19 @@ +#%PAM-1.0 + +auth required pam_tally.so onerr=succeed file=/var/log/faillog +auth required pam_shells.so +auth requisite pam_nologin.so +auth include system-auth + +account required pam_access.so +account required pam_nologin.so +account include system-auth + +password include system-auth + +session optional pam_loginuid.so +session include system-auth +session optional pam_motd.so motd=/etc/motd +session optional pam_mail.so dir=/var/spool/mail standard quiet +-session optional pam_systemd.so +session required pam_env.so ADDED PKGBUILDs/pambase/system-remote-login Index: PKGBUILDs/pambase/system-remote-login ================================================================== --- /dev/null +++ PKGBUILDs/pambase/system-remote-login @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth include system-login +account include system-login +password include system-login +session include system-login ADDED PKGBUILDs/pambase/system-services Index: PKGBUILDs/pambase/system-services ================================================================== --- /dev/null +++ PKGBUILDs/pambase/system-services @@ -0,0 +1,11 @@ +#%PAM-1.0 + +auth sufficient pam_permit.so + +account include system-auth + +session optional pam_loginuid.so +session required pam_limits.so +session required pam_unix.so +session optional pam_permit.so +session required pam_env.so ADDED PKGBUILDs/patch/PKGBUILD Index: PKGBUILDs/patch/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/patch/PKGBUILD @@ -0,0 +1,46 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=patch +pkgver=2.7.1 +pkgrel=2 +pkgdesc="A utility to apply patch files to original sources" +arch=('i586') +url="http://www.gnu.org/software/patch/patch.html" +license=('GPL') +groups=('base-devel') +depends=('musl') +makedepends=('ed') +optdepends=('ed: for patch -e functionality') +source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig} + patch-2.7.1-initialize-data-structures-early-enough.patch) +md5sums=('e9ae5393426d3ad783a300a338c09b72' + 'b12189e0de3cb2af25268441647ec517' + 'dc6367a7cd49933d4006c246789e98da') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + # Fix segfault on non-numeric strip-count + # (also segfaults on nonexistent directory passed to -d) + # http://savannah.gnu.org/bugs/?37500 + patch -Np1 -i \ + $srcdir/patch-2.7.1-initialize-data-structures-early-enough.patch + + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=$pkgdir install + rm -r ${pkgdir}/usr/lib +} ADDED PKGBUILDs/patch/patch-2.7.1-initialize-data-structures-early-enough.patch Index: PKGBUILDs/patch/patch-2.7.1-initialize-data-structures-early-enough.patch ================================================================== --- /dev/null +++ PKGBUILDs/patch/patch-2.7.1-initialize-data-structures-early-enough.patch @@ -0,0 +1,81 @@ +From 291ec175812b7ba291d124e4cf2fbf9efec590c8 Mon Sep 17 00:00:00 2001 +From: Andreas Gruenbacher +Date: Thu, 4 Oct 2012 12:33:09 +0200 +Subject: [PATCH] Initialize data structures early enough + +* src/patch.c (main): Initialize data structures early enough, before error +paths can access them. +* tests/bad-usage: Test bad command line usage. +* tests/Makefile.am (TESTS): Add bad-usage here. +--- + src/patch.c | 8 ++++---- + tests/Makefile.am | 1 + + tests/bad-usage | 18 ++++++++++++++++++ + 3 files changed, 23 insertions(+), 4 deletions(-) + create mode 100644 tests/bad-usage + +diff --git a/src/patch.c b/src/patch.c +index 828943b..0255fbb 100644 +--- a/src/patch.c ++++ b/src/patch.c +@@ -150,6 +150,10 @@ main (int argc, char **argv) + else if ((version_control = getenv ("VERSION_CONTROL"))) + version_control_context = "$VERSION_CONTROL"; + ++ init_backup_hash_table (); ++ init_files_to_delete (); ++ init_files_to_output (); ++ + /* parse switches */ + Argc = argc; + Argv = argv; +@@ -162,10 +166,6 @@ main (int argc, char **argv) + if (make_backups | backup_if_mismatch) + backup_type = get_version (version_control_context, version_control); + +- init_backup_hash_table (); +- init_files_to_delete (); +- init_files_to_output (); +- + init_output (&outstate); + if (outfile) + outstate.ofp = open_outfile (outfile); +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 02fc6de..5cea52d 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -20,6 +20,7 @@ TESTS = \ + asymmetric-hunks \ + backup-prefix-suffix \ + bad-filenames \ ++ bad-usage \ + concat-git-diff \ + copy-rename \ + corrupt-reject-files \ +diff --git a/tests/bad-usage b/tests/bad-usage +new file mode 100644 +index 0000000..022eeda +--- /dev/null ++++ b/tests/bad-usage +@@ -0,0 +1,18 @@ ++# Copyright (C) 2009, 2011-2012 Free Software Foundation, Inc. ++# ++# Copying and distribution of this file, with or without modification, ++# in any medium, are permitted without royalty provided the copyright ++# notice and this notice are preserved. ++ ++. $srcdir/test-lib.sh ++ ++require_cat ++use_local_patch ++use_tmpdir ++ ++# ============================================================== ++ ++check 'patch -px || echo "status: $?"' < +# (Arch Linux) Contributor: Eric Belanger +# (Arch Linux) Contributor: John Proctor + +pkgname=pcre +pkgver=8.35 +pkgrel=1 +pkgdesc='A library that implements Perl 5-style regular expressions' +arch=('i586') +url='http://www.pcre.org/' +license=('BSD') +depends=('gcc-libs' 'readline' 'zlib' 'bzip2' 'bash') +source=("ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$pkgname-$pkgver.tar.bz2"{,.sig}) +options=('libtool' 'staticlibs') +md5sums=('6aacb23986adccd9b3bc626c00979958' + 'SKIP') + +build() { + cd $pkgname-$pkgver + ./configure \ + --prefix=/usr \ + --enable-unicode-properties \ + --enable-pcre16 \ + --enable-pcre32 \ + --enable-jit \ + --enable-pcregrep-libz \ + --enable-pcregrep-libbz2 \ + --enable-pcretest-libreadline + make +} + +check() { + cd $pkgname-$pkgver + make -j1 check +} + +package() { + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + + install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/perl-error/PKGBUILD Index: PKGBUILDs/perl-error/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/perl-error/PKGBUILD @@ -0,0 +1,34 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: + +pkgname=perl-error +pkgver=0.17022 +pkgrel=1 +pkgdesc="Perl/CPAN Error module - Error/exception handling in an OO-ish way" +url="http://search.cpan.org/dist/Error/" +arch=('any') +license=('PerlArtistic' 'GPL') +depends=('perl') +#checkdepends=('perl-test-pod' 'perl-test-pod-coverage') +options=('!emptydirs') +source=(http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/Error-${pkgver}.tar.gz) +sha1sums=('2e638bd8e9f9e241733a6f199287154a039d3700') + +build() { + cd Error-${pkgver} + perl Makefile.PL INSTALLDIRS=vendor + make +} + +check() { + cd Error-${pkgver} + make test +} + +package() { + cd Error-${pkgver} + make DESTDIR="${pkgdir}" install +} + ADDED PKGBUILDs/perl-locale-gettext/PKGBUILD Index: PKGBUILDs/perl-locale-gettext/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/perl-locale-gettext/PKGBUILD @@ -0,0 +1,45 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Giovanni Scafora +# (Arch Linux) Contributor: Mark Rosenstand +# (Arch Linux) Contributor: Paul Mattal + +pkgname=perl-locale-gettext +_realname=gettext +pkgver=1.05 +pkgrel=10 +pkgdesc="Permits access from Perl to the gettext() family of functions" +arch=('i586') +license=('GPL' 'PerlArtistic') +url="http://search.cpan.org/dist/${_realname}/" +depends=('gettext' 'perl') +options=(!emptydirs) +source=("http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/${_realname}-${pkgver}.tar.gz" + 'compatibility-with-POSIX-module.patch') +md5sums=('f3d3f474a1458f37174c410dfef61a46' + '854302f34d01a2f8ae739187788973dd') + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + + patch -Np1 -i ${srcdir}/compatibility-with-POSIX-module.patch + # install module in vendor directories. + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} + +check() { + cd "${srcdir}/${_realname}-${pkgver}" + + make test +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" + make install DESTDIR="${pkgdir}" + + # remove perllocal.pod and .packlist + find "${pkgdir}" -name perllocal.pod -delete + find "${pkgdir}" -name .packlist -delete +} ADDED PKGBUILDs/perl-locale-gettext/compatibility-with-POSIX-module.patch Index: PKGBUILDs/perl-locale-gettext/compatibility-with-POSIX-module.patch ================================================================== --- /dev/null +++ PKGBUILDs/perl-locale-gettext/compatibility-with-POSIX-module.patch @@ -0,0 +1,10 @@ +--- a/gettext.pm 2005-05-31 20:11:16.000000000 -0700 ++++ b/gettext.pm 2009-10-07 12:39:42.000000000 -0700 +@@ -32,6 +32,7 @@ + =cut + + use Carp; ++use POSIX qw(:locale_h); + + require Exporter; + require DynaLoader; ADDED PKGBUILDs/perl-xml-parser/PKGBUILD Index: PKGBUILDs/perl-xml-parser/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/perl-xml-parser/PKGBUILD @@ -0,0 +1,34 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=perl-xml-parser +pkgver=2.41 +pkgrel=4 +pkgdesc="Expat-based XML parser module for perl" +arch=('i586') +license=('GPL' 'PerlArtistic') +url="http://search.cpan.org/dist/XML-Parser/" +depends=('perl' 'expat') +replaces=('perlxml') +provides=("perlxml=${pkgver}") +options=('!emptydirs') +source=("http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/XML-Parser-${pkgver}.tar.gz") +md5sums=('c320d2ffa459e6cdc6f9f59c1185855e') + +build() { + cd XML-Parser-${pkgver} + perl Makefile.PL INSTALLDIRS=vendor + make +} + +check() { + cd XML-Parser-${pkgver} + make test +} + +package() { + cd XML-Parser-${pkgver} + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/perl/PKGBUILD Index: PKGBUILDs/perl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/perl/PKGBUILD @@ -0,0 +1,131 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Florian Pritz +# (Arch Linux) Contributor: Angel Velasquez +# (Arch Linux) Contributor: kevin +# (Arch Linux) Contributor: judd +# (Arch Linux) Contributor: francois + +pkgname=perl +pkgver=5.18.2 +pkgrel=2 +pkgdesc="A highly capable, feature-rich programming language" +arch=('i586') +license=('GPL' 'PerlArtistic') +url="http://www.perl.org" +groups=('base') +depends=('gdbm' 'db' 'musl') +source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 + perlbin.sh + perlbin.csh + provides.pl) +options=('makeflags' '!purge') +md5sums=('d549b16ee4e9210988da39193a9389c1' + '5ed2542fdb9a60682f215bd33701e61a' + '1f0cbbee783e8a6d32f01be5118e0d5e' + '999c3eea6464860704abbb055a0f0896') + +# workaround to let the integrity check find the correct provides array +if [[ ${0##*/} = "parse_pkgbuilds.sh" ]]; then + true && provides=($(bsdtar -q -O -xf "/srv/ftp/pool/packages/$pkgname-$pkgver-$pkgrel-$CARCH.pkg.tar.xz" .PKGINFO | sed -rn 's#^provides = (.*)#\1#p')) +fi + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + +_privlib=/usr/share/perl5/core_perl +_archlib=/usr/lib/perl5/core_perl +_vendorlib=/usr/share/perl5/vendor_perl +_vendorarch=/usr/lib/perl5/vendor_perl + + LDFLAGS="${LDFLAGS} -L/usr/lib" \ + ./Configure -des \ + -Dcccdlflags='-fPIC' \ + -Dcccdlflags='-fPIC' \ + -Dccdlflags='-rdynamic' \ + -Dprefix=/usr \ + -Dprivlib=$_privlib \ + -Darchlib=$_archlib \ + -Dvendorprefix=/usr \ + -Dvendorlib=$_vendorlib \ + -Dvendorarch=$_vendorarch \ + -Dsiteprefix=/usr/local \ + -Dsitelib=/usr/local/share/perl5/site_perl \ + -Dsitearch=/usr/local/lib/perl5/site_perl \ + -Dlocincpth=' ' \ + -Doptimize="${CFLAGS}" \ + -Duselargefiles \ + -Dusethreads \ + -Duseshrplib \ + -Dd_semctl_semun \ + -Dman1dir=/usr/share/man/man1 \ + -Dman3dir=/usr/share/man/man3 \ + -Dinstallman1dir=/usr/share/man/man1 \ + -Dinstallman3dir=/usr/share/man/man3 \ + -Dman1ext='1' \ + -Dman3ext='3pm' \ + -Dinc_version_list="$inclist" \ + -Dcf_by='Elder' \ + -Ud_csh \ + -Dusenm \ + || return 1 + make libperl.so && make || return 1 +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness || true +} + +package() { + # hack to work around makepkg running the subshell in check_sanity() + new_provides=($(cd "$srcdir/perl-$pkgver"; LD_PRELOAD=./libperl.so ./perl -Ilib "$srcdir/provides.pl" .)) + provides=(${new_provides[@]}) + + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR="$pkgdir" install + + ### Perl Settings ### + # Change man page extensions for site and vendor module builds. + # Set no mail address since bug reports should go to the bug tracker + # and not someone's email. + sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \ + -e "/^cf_email=/ s/'.*'/''/" \ + -e "/^perladmin=/ s/'.*'/''/" \ + -i ${pkgdir}/usr/lib/perl5/core_perl/Config_heavy.pl + + ### CPAN Settings ### + # Set CPAN default config to use the site directories. + sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \ + -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \ + -i ${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm + + ### CPANPLUS Settings ### + # Set CPANPLUS default config to use the site directories. + sed -e "/{'makemakerflags'}/ s/'';/'INSTALLDIRS=site';/" \ + -e "/{'buildflags'}/ s/'';/'installdirs=site';/" \ + -i ${pkgdir}/usr/share/perl5/core_perl/CPANPLUS/Config.pm + + # Profile script to set paths to perl scripts. + install -D -m755 ${srcdir}/perlbin.sh \ + ${pkgdir}/etc/profile.d/perlbin.sh + # Profile script to set paths to perl scripts on csh. (FS#22441) + install -D -m755 ${srcdir}/perlbin.csh \ + ${pkgdir}/etc/profile.d/perlbin.csh + + (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl) + mkdir -p ${pkgdir}/usr/bin/core_perl + (cd ${pkgdir}/usr/bin/core_perl; ln -sf c2ph pstruct; ln -sf s2p psed) + + # Remove all pod files *except* those under /usr/share/perl5/core_perl/pod/ + # (FS#16488) + rm -f $pkgdir/usr/share/perl5/core_perl/*.pod + for d in $pkgdir/usr/share/perl5/core_perl/*; do + if [ -d $d -a $(basename $d) != "pod" ]; then + find $d -name *.pod -delete + fi + done + find $pkgdir/usr/lib -name *.pod -delete + find $pkgdir -name .packlist -delete +} ADDED PKGBUILDs/perl/perlbin.csh Index: PKGBUILDs/perl/perlbin.csh ================================================================== --- /dev/null +++ PKGBUILDs/perl/perlbin.csh @@ -0,0 +1,15 @@ +# Set path to perl scriptdirs if they exist +# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts +# Added /usr/bin/*_perl dirs for scripts +# Remove /usr/lib/perl5/*_perl/bin in next release + +[ -d /usr/bin/site_perl ] && setenv PATH ${PATH}:/usr/bin/site_perl +[ -d /usr/lib/perl5/site_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/site_perl/bin + +[ -d /usr/bin/vendor_perl ] && setenv PATH ${PATH}:/usr/bin/vendor_perl +[ -d /usr/lib/perl5/vendor_perl/bin ] && setenv PATH ${PATH}:/usr/lib/perl5/vendor_perl/bin + +[ -d /usr/bin/core_perl ] && setenv PATH ${PATH}:/usr/bin/core_perl + +# If you have modules in non-standard directories you can add them here. +#export PERLLIB=dir1:dir2 ADDED PKGBUILDs/perl/perlbin.sh Index: PKGBUILDs/perl/perlbin.sh ================================================================== --- /dev/null +++ PKGBUILDs/perl/perlbin.sh @@ -0,0 +1,18 @@ +# Set path to perl scriptdirs if they exist +# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts +# Added /usr/bin/*_perl dirs for scripts +# Remove /usr/lib/perl5/*_perl/bin in next release + +[ -d /usr/bin/site_perl ] && PATH=$PATH:/usr/bin/site_perl +[ -d /usr/lib/perl5/site_perl/bin ] && PATH=$PATH:/usr/lib/perl5/site_perl/bin + +[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl +[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin + +[ -d /usr/bin/core_perl ] && PATH=$PATH:/usr/bin/core_perl + +export PATH + +# If you have modules in non-standard directories you can add them here. +#export PERLLIB=dir1:dir2 + ADDED PKGBUILDs/perl/provides.pl Index: PKGBUILDs/perl/provides.pl ================================================================== --- /dev/null +++ PKGBUILDs/perl/provides.pl @@ -0,0 +1,299 @@ +# provides.pl +## +# Script for printing out a provides list of every CPAN distribution +# that is bundled with perl. You can run it before building perl +# or you can run it after building perl. Required modules are in core +# for perl 5.13 and above. It might be nice if this didn't require +# HTTP::Tiny and maybe just used wget or curl. +# +# This script uses HTTP::Tiny to query Tatsuhiko Miyagawa's webapp at +# cpanmetadb.plackperl.org to cross-reference module files to their +# providing CPAN distribution. Thank you Miyagawa! +# +# - Justin "juster" Davis + +use warnings 'FATAL' => 'all'; +use strict; + +package Common; + +sub evalver +{ + my ($path, $mod) = @_; + + open my $fh, '<', $path or die "open $path: $!"; + + my $m = ($mod + ? qr/(?:\$${mod}::VERSION|\$VERSION)/ + : qr/\$VERSION/); + + while (my $ln = <$fh>) { + next unless $ln =~ /\s*$m\s*=\s*.+/; + chomp $ln; + my $ver = do { no strict; eval $ln }; + return $ver unless $@; + die qq{$path:$. bad version string in "$ln"\n}; + } + + close $fh; + return undef; +} + + +#----------------------------------------------------------------------------- + +package Dists; + +sub maindistfile +{ + my ($dist, $dir) = @_; + + # libpath is the modern style, installing modules under lib/ + # with dirs matching the name components. + my $libpath = join q{/}, 'lib', split /-/, "${dist}.pm"; + + # dumbpath is an old style where there's no subdirs and just + # a .pm file. + my $dumbpath = $dist; + $dumbpath =~ s/\A.+-//; + $dumbpath .= ".pm"; + + my @paths = ($libpath, $dumbpath); + # Some modules (with simple names like XSLoader, lib, etc) are + # generated by Makefile.PL. Search through their generating code. + push @paths, "${dist}_pm.PL" if $dist =~ tr/-/-/ == 0; + + for my $path (map { "$dir/$_" } @paths) { return $path if -f $path; } + return undef; +} + +sub module_ver +{ + my ($dist, $dir) = @_; + + my $path = maindistfile($dist, $dir) or return undef; + + my $mod = $dist; + $mod =~ s/-/::/g; + my $ver = Common::evalver($path, $mod); + unless ($ver) { + warn "failed to find version in module file for $dist\n"; + return undef; + } + + return $ver; +} + +sub changelog_ver +{ + my ($dist, $dir) = @_; + + my $path; + for my $tmp (glob "$dir/{Changes,ChangeLog}") { + if (-f $tmp) { $path = $tmp; last; } + } + return undef unless $path; + + open my $fh, '<', $path or die "open: $!"; + while (<$fh>) { + return $1 if /\A\s*(?:$dist[ \t]*)?([0-9._]+)/; + return $1 if /\A\s*version\s+([0-9._]+)/i; + } + close $fh; + + return undef; +} + +# for some reason podlators has a VERSION file with perl code in it +sub verfile_ver +{ + my ($dist, $dir) = @_; + + my $path = "$dir/VERSION"; + return undef unless -f $path; # no warning, only podlaters has it + + return Common::evalver($path); +} + +# scans a directory full of nicely separated dist. directories. +sub scan_distroot +{ + my ($distroot) = @_; + opendir my $cpand, "$distroot" or die "failed to open $distroot"; + my @dists = grep { !/^\./ && -d "$distroot/$_" } readdir $cpand; + closedir $cpand; + + my @found; + for my $dist (@dists) { + my $distdir = "$distroot/$dist"; + my $ver = (module_ver($dist, $distdir) + || changelog_ver($dist, $distdir) + || verfile_ver($dist, $distdir)); + + if ($ver) { push @found, [ $dist, $ver ]; } + else { warn "failed to find version for $dist\n"; } + } + return @found; +} + +sub find +{ + my ($srcdir) = @_; + return map { scan_distroot($_) } glob "$srcdir/{cpan,dist}"; +} + +#----------------------------------------------------------------------------- + +package Modules; + +use HTTP::Tiny qw(); +use File::Find qw(); +use File::stat; + +*findfile = *File::Find::find; + +sub cpan_provider +{ + my ($module) = @_; + my $url = "http://cpanmetadb.plackperl.org/v1.0/package/$module"; + my $http = HTTP::Tiny->new; + my $resp = $http->get($url); + return undef unless $resp->{'success'}; + + my ($cpanpath) = $resp->{'content'} =~ /^distfile: (.*)$/m + or return undef; + + my $dist = $cpanpath; + $dist =~ s{\A.+/}{}; # remove author directory + $dist =~ s{-[^-]+\z}{}; # remove version and extension + return ($dist eq 'perl' ? undef : $dist); +} + +sub find +{ + my ($srcdir) = @_; + my $libdir = "$srcdir/lib/"; + die "failed to find $libdir directory" unless -d $libdir; + + # Find only the module files that have not changed since perl + # was extracted. We don't want the files perl just recently + # installed into lib/. We processed those already. + my @modfiles; + my $finder = sub { + return unless /[.]pm\z/; + return if m{\Q$libdir\E[^/]+/t/}; # ignore testing modules + push @modfiles, $_; + }; + findfile({ 'no_chdir' => 1, 'wanted' => $finder }, $libdir); + + # First we have to find what the oldest ctime actually is. + my $oldest = time; + @modfiles = map { + my $modfile = $_; + my $ctime = (stat $modfile)->ctime; + $oldest = $ctime if $ctime < $oldest; + [ $modfile, $ctime ]; # save ctime for later + } @modfiles; + + # Then we filter out any file that was created more than a + # few seconds after that. Process the rest. + my @mods; + for my $modfile (@modfiles) { + my ($mod, $ctime) = @$modfile; + next if $ctime - $oldest > 5; # ignore newer files + + my $path = $mod; + $mod =~ s{[.]pm\z}{}; + $mod =~ s{\A$libdir}{}; + $mod =~ s{/}{::}g; + + my $ver = Common::evalver($path, $mod) || q{}; + push @mods, [ $mod, $ver ]; + } + + # Convert modules names to the dist names who provide them. + my %seen; + my @dists; + for my $modref (@mods) { + my ($mod, $ver) = @$modref; + my $dist = cpan_provider($mod) or next; # filter out core modules + next if $seen{$dist}++; # avoid duplicate dists + push @dists, [ $dist, $ver ]; + } + return @dists; +} + +#----------------------------------------------------------------------------- + +package Dist2Pkg; + +sub name +{ + my ($name) = @_; + my $orig = $name; + + # Package names should be lowercase and consist of alphanumeric + # characters only (and hyphens!)... + $name =~ tr/A-Z/a-z/; + $name =~ tr/_+/-/; # _ and +'s converted to - (ie Tabbed-Text+Wrap) + $name =~ tr/-a-z0-9+//cd; # Delete all other chars. + $name =~ tr/-/-/s; + + # Delete leading or trailing hyphens... + $name =~ s/\A-|-\z//g; + + die qq{Dist. name '$orig' completely violates packaging standards} + unless $name; + + return "perl-$name"; +} + +sub version +{ + my ($version) = @_; + + # Package versions should be numbers and decimal points only... + $version =~ tr/-/./; + $version =~ tr/_0-9.-//cd; + + # Remove developer versions because pacman has no special logic + # to compare them to regular versions like perl does. + $version =~ s/_[^_]+\z//; + + $version =~ tr/_//d; # delete other underscores + $version =~ tr/././s; # only one period at a time + $version =~ s/\A[.]|[.]\z//g; # shouldn't start or stop with a period + + return $version; +} + +#----------------------------------------------------------------------------- + +package main; + +my %CPANNAME = ('List-Util' => 'Scalar-List-Utils', + 'Text-Tabs' => 'Text-Tabs+Wrap', + 'Cwd' => 'PathTools'); + +my $perldir = shift or die "Usage: $0 [path to perl source directory]\n"; +die "$perldir is not a valid directory." unless -d $perldir; + +my @dists = (Dists::find($perldir), Modules::find($perldir)); +for my $dist (@dists) { + my $name = $dist->[0]; + $dist->[0] = $CPANNAME{$name} if exists $CPANNAME{$name}; +} + +my @pkgs = map { + my ($name, $ver) = @$_; + $name = Dist2Pkg::name($name); + $ver = Dist2Pkg::version($ver); + [ $name, $ver ]; +} @dists; + +@pkgs = sort { $a->[0] cmp $b->[0] } @pkgs; + +for my $pkg (@pkgs) { + my ($name, $ver) = @$pkg; + print "$name=$ver\n"; +} ADDED PKGBUILDs/pinentry/PKGBUILD Index: PKGBUILDs/pinentry/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/pinentry/PKGBUILD @@ -0,0 +1,43 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tobias Powalowski + +pkgname=pinentry +pkgver=0.8.3 +pkgrel=1 +pkgdesc="a collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol" +arch=('i586') +license=('GPL') +url="http://gnupg.org/related_software/pinentry/" +depends=('ncurses' 'libcap>=2.16') +#makedepends=('gtk2' 'qt4') +#optdepends=('gtk2: for gtk2 backend' +# 'qt4: for qt4 backend') +source=(ftp://ftp.gnupg.org/gcrypt/$pkgname/$pkgname-$pkgver.tar.bz2 + qt4-pinentry-window.patch) +install=pinentry.install +md5sums=('2ae681cbca0d9fb774b2c90b11ebf56c' + '450b8713fe42f1bd93311ef84767c3d8') + +build() { + cd $srcdir/$pkgname-$pkgver + #fix: https://bugs.archlinux.org/task/29998 + patch -Np1 -i ../qt4-pinentry-window.patch +# for file in qt4/*.moc; do +# moc-qt4 ${file/.moc/.h} > ${file} +# done + ./configure --prefix=/usr \ + --enable-pinentry-curses \ + --disable-pinentry-gtk \ + --disable-pinentry-qt \ + --disable-pinentry-gtk2 \ + --disable-pinentry-qt4 \ + --enable-fallback-curses + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=${pkgdir} install +} ADDED PKGBUILDs/pinentry/pinentry.install Index: PKGBUILDs/pinentry/pinentry.install ================================================================== --- /dev/null +++ PKGBUILDs/pinentry/pinentry.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(pinentry.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/pinentry/qt4-pinentry-window.patch Index: PKGBUILDs/pinentry/qt4-pinentry-window.patch ================================================================== --- /dev/null +++ PKGBUILDs/pinentry/qt4-pinentry-window.patch @@ -0,0 +1,28 @@ +From c2ab12b3742c929a225c3753439438edc27bfa81 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Tue, 1 Feb 2011 14:42:27 +0100 +Subject: [PATCH] Fix qt4 pinentry window created in the background + +This is probably just a workaround. Proper fix is being investigated. +See: +https://bugzilla.redhat.com/show_bug.cgi?id=589532 +http://stackoverflow.com/questions/2788518/calling-activatewindow-on-qdialog-sends-window-to-background +--- + qt4/pinentrydialog.cpp | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp +index 541baf4..d634eb6 100644 +--- a/qt4/pinentrydialog.cpp ++++ b/qt4/pinentrydialog.cpp +@@ -69,7 +69,6 @@ void raiseWindow( QWidget* w ) + SetForegroundWindow( w->winId() ); + #endif + w->raise(); +- w->activateWindow(); + } + + QPixmap icon( QStyle::StandardPixmap which ) +-- +1.7.3.5 + ADDED PKGBUILDs/pkgconf/PKGBUILD Index: PKGBUILDs/pkgconf/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/pkgconf/PKGBUILD @@ -0,0 +1,34 @@ +# Taken from the AUR +# Updated and modified by kraileth +############################################################################### +# Maintainer: Bartlomiej Piotrowski + +pkgname=pkgconf +pkgver=0.9.5 +pkgrel=1 +pkgdesc='pkg-config compatible utility which does not depend on glib' +url='https://github.com/pkgconf/pkgconf' +arch=('i586') +license=('ISC') +makedepends=('popt') +conflicts=('pkg-config') +provides=('pkg-config') +source=(http://github.com/pkgconf/pkgconf/archive//$pkgname-$pkgver.tar.gz) +sha256sums=('ed416602df9a30e0013e35746b1146d3c0decc52e2821dfa9509022e4a55826d') + +build() { + cd $pkgname-${pkgname}-$pkgver + ./autogen.sh + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var + make +} + +package() { + cd $pkgname-${pkgname}-$pkgver + make DESTDIR="$pkgdir" install + ln -s /usr/bin/pkgconf "$pkgdir"/usr/bin/pkg-config +} ADDED PKGBUILDs/popt/PKGBUILD Index: PKGBUILDs/popt/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/popt/PKGBUILD @@ -0,0 +1,27 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=popt +pkgver=1.16 +pkgrel=7 +pkgdesc="A commandline option parser" +arch=('i586') +url="http://rpm5.org" +license=('custom') +depends=('musl') +source=(http://rpm5.org/files/${pkgname}/${pkgname}-${pkgver}.tar.gz) +sha1sums=('cfe94a15a2404db85858a81ff8de27c8ff3e235e') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --disable-static --build=i586-pc-linux-gnu + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} ADDED PKGBUILDs/postgresql/PKGBUILD Index: PKGBUILDs/postgresql/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/PKGBUILD @@ -0,0 +1,160 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Dan McGee + +pkgbase=postgresql +pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql') +pkgver=9.3.4 +_majorver=${pkgver%.*} +pkgrel=1 +arch=('i586') +url="http://www.postgresql.org/" +license=('custom:PostgreSQL') +makedepends=('krb5' 'libxml2' 'python2' 'perl' 'tcl>=8.6.0' 'openssl>=1.0.0') +source=(http://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 + postgresql-run-socket.patch + postgresql.pam postgresql.logrotate + postgresql.tmpfiles.conf postgresql-check-db-dir) +md5sums=('d0a41f54c377b2d2fab4a003b0dac762' + '75c579eed03ffb2312631f0b649175b4' + '96f82c38f3f540b53f3e5144900acf17' + 'd28e443f9f65a5712c52018b84e27137' + '1c5a1f99e8e93776c593c468e2612985' + 'ea7f9f914900e60835d20cb95010e63c') +sha256sums=('9ee819574dfc8798a448dc23a99510d2d8924c2f8b49f8228cd77e4efc8a6621' + '8538619cb8bea51078b605ad64fe22abd6050373c7ae3ad6595178da52f6a7d9' + '57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5' + '6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e' + '7e086d70e0dcaa6ce45693b4e826ce92d770192b3aff5642319b1ef279d88dc4' + 'b3ed31e5882e5bdf4515d488d3f2db874ff5561be3091eab29810f831038a888') + +build() { + cd "${srcdir}/postgresql-${pkgver}" + + patch -Np1 < ../postgresql-run-socket.patch + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --datadir=/usr/share/postgresql \ + --sysconfdir=/etc \ + --with-krb5 \ + --with-libxml \ + --with-openssl \ + --with-perl \ + --with-python PYTHON=/usr/bin/python2 \ + --with-tcl \ + --with-pam \ + --with-system-tzdata=/usr/share/zoneinfo \ + --disable-nls \ + --enable-thread-safety + + make world +} + +package_postgresql-libs() { + pkgdesc="Libraries for use with PostgreSQL" + depends=('krb5' 'openssl>=1.0.0' 'readline>=6.0') + provides=('postgresql-client') + conflicts=('postgresql-client') + + cd "${srcdir}/postgresql-${pkgver}" + + # install license + install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-libs/LICENSE" + + # install libs + for dir in src/interfaces src/bin/pg_config src/bin/psql src/bin/pg_dump; do + make -C ${dir} DESTDIR="${pkgdir}" install + done + + install -D -m644 doc/src/sgml/man1/pg_config.1 "${pkgdir}/usr/share/man/man1/pg_config.1" + install -D -m644 doc/src/sgml/man1/pg_dump.1 "${pkgdir}/usr/share/man/man1/pg_dump.1" + install -D -m644 doc/src/sgml/man1/pg_dumpall.1 "${pkgdir}/usr/share/man/man1/pg_dumpall.1" + install -D -m644 doc/src/sgml/man1/pg_restore.1 "${pkgdir}/usr/share/man/man1/pg_restore.1" + install -D -m644 doc/src/sgml/man1/psql.1 "${pkgdir}/usr/share/man/man1/psql.1" + + cd src/include + + mkdir -p "${pkgdir}"/usr/include/{libpq,postgresql/internal/libpq} + + # these headers are needed by the public headers of the interfaces + install -m644 pg_config.h "${pkgdir}/usr/include/" + install -m644 pg_config_os.h "${pkgdir}/usr/include/" + install -m644 pg_config_ext.h "${pkgdir}/usr/include/" + install -m644 postgres_ext.h "${pkgdir}/usr/include/" + install -m644 libpq/libpq-fs.h "${pkgdir}/usr/include/libpq/" + install -m644 pg_config_manual.h "${pkgdir}/usr/include/" + + # these headers are needed by the not-so-public headers of the interfaces + install -m644 c.h "${pkgdir}/usr/include/postgresql/internal/" + install -m644 port.h "${pkgdir}/usr/include/postgresql/internal/" + install -m644 postgres_fe.h "${pkgdir}/usr/include/postgresql/internal/" + install -m644 libpq/pqcomm.h "${pkgdir}/usr/include/postgresql/internal/libpq/" +} + +package_postgresql-docs() { + pkgdesc="HTML documentation for PostgreSQL" + options=('docs') + + cd "${srcdir}/postgresql-${pkgver}" + + # install license + install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-docs/LICENSE" + + make -C doc/src/sgml DESTDIR="${pkgdir}" install-html + chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html/" + + # clean up + rmdir "${pkgdir}"/usr/share/man/man{1,3,7} + rmdir "${pkgdir}"/usr/share/man +} + +package_postgresql() { + pkgdesc="A sophisticated object-relational DBMS" + backup=('etc/pam.d/postgresql' 'etc/logrotate.d/postgresql') + depends=("postgresql-libs>=${pkgver}" 'krb5' 'libxml2' 'readline>=6.0' 'openssl>=1.0.0') + optdepends=('python2: for PL/Python support' + 'perl: for PL/Perl support' + 'tcl: for PL/Tcl support' + 'postgresql-old-upgrade: upgrade from previous major version using pg_upgrade') + options=('staticlibs') + install=postgresql.install + + cd "${srcdir}/postgresql-${pkgver}" + + # install + make DESTDIR="${pkgdir}" install + make -C contrib DESTDIR="${pkgdir}" install + make -C doc/src/sgml DESTDIR="${pkgdir}" install-man + + # we don't want these, they are in the -libs package + for dir in src/interfaces src/bin/pg_config src/bin/psql src/bin/pg_dump; do + make -C ${dir} DESTDIR="${pkgdir}" uninstall + done + rm "${pkgdir}/usr/share/man/man1/pg_config.1" + rm "${pkgdir}/usr/share/man/man1/pg_dump.1" + rm "${pkgdir}/usr/share/man/man1/pg_dumpall.1" + rm "${pkgdir}/usr/share/man/man1/pg_restore.1" + rm "${pkgdir}/usr/share/man/man1/psql.1" + + # install license + install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE" + + # clean up unneeded installed items + rm -rf "${pkgdir}/usr/include/postgresql/internal" + rm -rf "${pkgdir}/usr/include/libpq" + find "${pkgdir}/usr/include" -maxdepth 1 -type f -execdir rm {} + + rmdir "${pkgdir}/usr/share/doc/postgresql/html" + + install -D -m644 "${srcdir}/postgresql.tmpfiles.conf" \ + "${pkgdir}/usr/lib/tmpfiles.d/postgresql.conf" + install -D -m755 "${srcdir}/postgresql-check-db-dir" \ + "${pkgdir}/usr/bin/postgresql-check-db-dir" + + install -D -m644 "${srcdir}/postgresql.pam" \ + "${pkgdir}/etc/pam.d/postgresql" + + install -D -m644 "${srcdir}/postgresql.logrotate" \ + "${pkgdir}/etc/logrotate.d/postgresql" +} ADDED PKGBUILDs/postgresql/postgresql-check-db-dir Index: PKGBUILDs/postgresql/postgresql-check-db-dir ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/postgresql-check-db-dir @@ -0,0 +1,49 @@ +#!/bin/sh + +# This script verifies that the postgresql data directory has been correctly +# initialized. We do not want to automatically initdb it, because that has +# a risk of catastrophic failure (ie, overwriting a valuable database) in +# corner cases, such as a remotely mounted database on a volume that's a +# bit slow to mount. But we can at least emit a message advising newbies +# what to do. + +PGDATA="$1" + +if [ -z "$PGDATA" ] +then + echo "Usage: $0 database-path" + exit 1 +fi + +# PGMAJORVERSION is major version +PGMAJORVERSION=9.3 +# PREVMAJORVERSION is the previous major version, e.g., 8.4, for upgrades +PREVMAJORVERSION=9.2 + +# Check for the PGDATA structure +if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ] +then + # Check version of existing PGDATA + if [ x`cat "$PGDATA/PG_VERSION"` = x"$PGMAJORVERSION" ] + then + : A-OK + elif [ x`cat "$PGDATA/PG_VERSION"` = x"$PREVMAJORVERSION" ] + then + echo $"An old version of the database format was found." + echo $"See https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL" + exit 1 + else + echo $"An old version of the database format was found." + echo $"You need to dump and reload before using PostgreSQL $PGMAJORVERSION." + echo $"See http://www.postgresql.org/docs/$PGMAJORVERSION/static/upgrading.html" + exit 1 + fi +else + # No existing PGDATA! Warn the user to initdb it. + echo $"\"$PGDATA\" is missing or empty. Use a command like" + echo $" su - postgres -c \"initdb --locale en_US.UTF-8 -D '$PGDATA'\"" + echo $"with relevant options, to initialize the database cluster." + exit 1 +fi + +exit 0 ADDED PKGBUILDs/postgresql/postgresql-run-socket.patch Index: PKGBUILDs/postgresql/postgresql-run-socket.patch ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/postgresql-run-socket.patch @@ -0,0 +1,12 @@ +diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h +--- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400 ++++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400 +@@ -144,7 +144,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + + /* + * The random() function is expected to yield values between 0 and ADDED PKGBUILDs/postgresql/postgresql.install Index: PKGBUILDs/postgresql/postgresql.install ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/postgresql.install @@ -0,0 +1,39 @@ +post_install() { + if [ ! -d '/var/lib/postgres' ]; then + mkdir -p '/var/lib/postgres' + fi + if ! getent group postgres >/dev/null; then + groupadd -g 88 postgres + fi + if ! getent passwd postgres >/dev/null; then + useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres + passwd -l postgres >/dev/null + fi + systemd-tmpfiles --create postgresql.conf + if [ ! -d '/var/lib/postgres/data' ]; then + mkdir -p '/var/lib/postgres/data' + chown postgres:postgres '/var/lib/postgres/data' + fi +} + +post_upgrade() { + post_install $1 + # FS#23858, fix postgres user shell issue + postgres_shell=$(getent passwd postgres | cut -d: -f7) + if [ "$postgres_shell" = "/sbin/nologin" ]; then + chsh -s /bin/bash postgres + fi + if [ $(vercmp $2 '9.2.1-2') -lt 0 ]; then + echo "Note: The Unix domain socket location has changed; be sure to" + echo " restart any local applications using libpq.so." + fi +} + +post_remove() { + if getent passwd postgres >/dev/null; then + userdel postgres + fi + if getent group postgres >/dev/null; then + groupdel postgres + fi +} ADDED PKGBUILDs/postgresql/postgresql.logrotate Index: PKGBUILDs/postgresql/postgresql.logrotate ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/postgresql.logrotate @@ -0,0 +1,4 @@ +/var/log/postgresql.log { + copytruncate + missingok +} ADDED PKGBUILDs/postgresql/postgresql.pam Index: PKGBUILDs/postgresql/postgresql.pam ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/postgresql.pam @@ -0,0 +1,3 @@ +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so ADDED PKGBUILDs/postgresql/postgresql.tmpfiles.conf Index: PKGBUILDs/postgresql/postgresql.tmpfiles.conf ================================================================== --- /dev/null +++ PKGBUILDs/postgresql/postgresql.tmpfiles.conf @@ -0,0 +1,1 @@ +d /run/postgresql 0775 postgres postgres - ADDED PKGBUILDs/python-beaker/PKGBUILD Index: PKGBUILDs/python-beaker/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/python-beaker/PKGBUILD @@ -0,0 +1,43 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Maintainer : Ionut Biru +# (Arch Linux) Contributor: Massimiliano Torromeo < massimiliano DOT torromeo AT gmail DOT com > + +pkgname=('python-beaker' 'python2-beaker') +pkgver=1.6.4 +pkgrel=2 +arch=('any') +license=('custom') +pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications" +url="http://beaker.groovie.org/" +makedepends=('python-setuptools' 'python2-setuptools') +source=("http://cheeseshop.python.org/packages/source/B/Beaker/Beaker-${pkgver}.tar.gz") +md5sums=('c2e102870ed4c53104dec48ceadf8e9d') + +build() { + cp -r Beaker-${pkgver} python2-Beaker-${pkgver} + + cd "${srcdir}/Beaker-${pkgver}" + sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/crypto/pbkdf2.py + python3 setup.py build + + cd "${srcdir}/python2-Beaker-${pkgver}" + sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker/crypto/pbkdf2.py + python2 setup.py build +} + +package_python-beaker() { + depends=('python') + + cd "${srcdir}/Beaker-${pkgver}" + python3 setup.py install --root="${pkgdir}" --optimize=1 + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-beaker/LICENSE" +} + +package_python2-beaker() { + depends=('python2') + + cd "${srcdir}/python2-Beaker-${pkgver}" + python2 setup.py install --root="${pkgdir}" --optimize=1 + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE" +} ADDED PKGBUILDs/python-mako/PKGBUILD Index: PKGBUILDs/python-mako/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/python-mako/PKGBUILD @@ -0,0 +1,55 @@ +# Taken from Arch Linux +############################################################################### +# (Arch Linux) Maintainer : + +pkgname=('python-mako' 'python2-mako') +pkgver=0.9.1 +pkgrel=2 +pkgdesc="Hyperfast and lightweight templating for the Python2 platform" +arch=('any') +url="http://www.makotemplates.org/" +license=('MIT') +makedepends=('python-setuptools' 'python2-setuptools') +#checkdepends=('python-nose' 'python2-nose') +source=(https://pypi.python.org/packages/source/M/Mako/Mako-$pkgver.tar.gz{,.asc}) +sha1sums=('aa01bafca5a835eb92a9048be92414fa83da102b' + 'SKIP') + +prepare() { + cp -r Mako-$pkgver python2-Mako-$pkgver + mv Mako-$pkgver/scripts/mako-render Mako-$pkgver/scripts/python3-mako-render + 2to3 -nw Mako-$pkgver/scripts/python3-mako-render + sed -i 's/mako-render/python3-mako-render/' Mako-$pkgver/setup.py +} + +build() { + cd Mako-$pkgver + python3 setup.py build + + cd ../python2-Mako-$pkgver + python2 setup.py build +} + +check() { + cd Mako-$pkgver + python3 setup.py test + + cd ../python2-Mako-$pkgver + python2 setup.py test +} + +package_python-mako() { + depends=('python-markupsafe' 'python-beaker') + + cd Mako-$pkgver + python3 setup.py install --root="$pkgdir" --optimize=1 + install -D LICENSE "$pkgdir/usr/share/licenses/python-mako/COPYING" +} + +package_python2-mako() { + depends=('python2-markupsafe' 'python2-beaker') + + cd python2-Mako-$pkgver + python2 setup.py install --root="$pkgdir" --optimize=1 + install -D LICENSE "$pkgdir/usr/share/licenses/python2-mako/COPYING" +} ADDED PKGBUILDs/python-markupsafe/PKGBUILD Index: PKGBUILDs/python-markupsafe/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/python-markupsafe/PKGBUILD @@ -0,0 +1,52 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer : Felix Yan +# (Arch Linux) Contributor: Ionut Biru +# (Arch Linux) Contributor: Alex Anthony + +pkgname=('python-markupsafe' 'python2-markupsafe') +pkgver=0.21 +pkgrel=1 +pkgdesc="Implements a XML/HTML/XHTML Markup safe string for Python" +arch=('i586') +url="http://pypi.python.org/pypi/MarkupSafe" +license=('custom') +makedepends=('python-setuptools' 'python2-setuptools') +source=("http://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-${pkgver}.tar.gz") +sha512sums=('ecedf56be7ad1723c4d7bf799e1aefb8ceb0a28840a1b8ffdc2dee0f734149430cf5dfd5d335591e9934cf223255475e9c04da5ab34ed69e7845298f599d81bc') + +build() { + cp -r MarkupSafe-${pkgver} python2-MarkupSafe-${pkgver} + cd "${srcdir}/MarkupSafe-${pkgver}" + python setup.py build + + cd "${srcdir}/python2-MarkupSafe-${pkgver}" + python2 setup.py build +} + +check() { + cd "${srcdir}/MarkupSafe-${pkgver}" + python setup.py test + + cd "${srcdir}/python2-MarkupSafe-${pkgver}" + python2 setup.py test +} + +package_python-markupsafe() { + depends=('python') + + cd MarkupSafe-${pkgver} + python setup.py install --root="${pkgdir}" --optimize=1 + + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-markupsafe/LICENSE" +} + +package_python2-markupsafe() { + depends=('python2') + + cd python2-MarkupSafe-${pkgver} + python2 setup.py install --root="${pkgdir}" --optimize=1 + + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-markupsafe/LICENSE" +} ADDED PKGBUILDs/python-setuptools/PKGBUILD Index: PKGBUILDs/python-setuptools/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/python-setuptools/PKGBUILD @@ -0,0 +1,72 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Angel Velasquez +# (Arch Linux) Maintainer: Felix Yan + +pkgbase=python-setuptools +pkgname=('python-setuptools' 'python2-setuptools') +pkgver=3.4.4 +pkgrel=1 +pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages" +arch=('any') +license=('PSF') +url="http://pypi.python.org/pypi/setuptools" +makedepends=('python' 'python2') +#checkdepends=('python-pytest' 'python2-pytest') +source=("http://pypi.python.org/packages/source/s/setuptools/setuptools-${pkgver}.tar.gz") +md5sums=('6ca9e8377b65233c2ff3a1752406a22d') + +check() { + # Disabled python 3.x tests for setuptools 3.4.1: + # https://bitbucket.org/pypa/setuptools/issue/180/34-release-fails-tests + + # Check python3 module + cd "${srcdir}"/setuptools-${pkgver} + #python3 setup.py test + + # Check python2 module + cd "${srcdir}"/setuptools-${pkgver}-python2 + python2 setup.py test +} + +prepare() { + cp -a setuptools-${pkgver}{,-python2} + + cd "${srcdir}"/setuptools-${pkgver} + sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python3|" setuptools/tests/test_resources.py + sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py + + cd "${srcdir}"/setuptools-${pkgver}-python2 + sed -i -e "s|^#\!.*/usr/bin/python|#!/usr/bin/python2|" setuptools/tests/test_resources.py + sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python2|" setuptools/command/easy_install.py +} + +build() { + # Build python 3 module + cd "${srcdir}"/setuptools-${pkgver} + python3 setup.py build + + # Build python 2 module + cd "${srcdir}"/setuptools-${pkgver}-python2 + python2 setup.py build +} + +package_python-setuptools() { + depends=('python>=3.4') + provides=('python-distribute') + replaces=('python-distribute') + + cd "${srcdir}/setuptools-${pkgver}" + python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build +} + +package_python2-setuptools() { + depends=('python2>=2.7') + provides=('python2-distribute' 'setuptools') + replaces=('python2-distribute' 'setuptools') + + cd "${srcdir}/setuptools-${pkgver}-python2" + python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build + rm "${pkgdir}/usr/bin/easy_install" +} ADDED PKGBUILDs/python/PKGBUILD Index: PKGBUILDs/python/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/python/PKGBUILD @@ -0,0 +1,96 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Angel Velasquez +# (Arch Linux) Contributor: Stéphane Gaudreault +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: Jason Chu + +pkgname=python +pkgver=3.4.0 +pkgrel=2 +_pybasever=3.4 +pkgdesc="Next generation of the python high-level scripting language" +arch=('i586') +license=('custom') +url="http://www.python.org/" +depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib') +makedepends=('sqlite' 'mpdecimal') +optdepends=('python-setuptools' + 'python-pip' + 'sqlite' + 'mpdecimal: for decimal' + 'xz: for lzma' + 'tk: for tkinter') +options=('!makeflags') +provides=('python3') +replaces=('python3') +source=(http://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz + python3.4-test_sqlite.patch::http://hg.python.org/cpython/raw-rev/4d626a9df062) +sha1sums=('f54d7cf6af5dbd9bddbe31cf4772f39711381dbe' + 'b13a0b728d8e1fe1d81dea501b064cb1032f183b') + +prepare() { + cd "${srcdir}/Python-${pkgver}" + + # FS#23997 + sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py + + # http://bugs.python.org/issue20901 + patch -p1 -i "$srcdir/python3.4-test_sqlite.patch" + + # Ensure that we are using the system copy of various libraries (expat, zlib, libffi, and libmpdec), + # rather than copies shipped in the tarball + rm -r Modules/expat + rm -r Modules/zlib + rm -r Modules/_ctypes/{darwin,libffi}* + rm -r Modules/_decimal/libmpdec +} + +build() { + cd "${srcdir}/Python-${pkgver}" + + # Disable bundled pip & setuptools + ./configure --prefix=/usr \ + --enable-shared \ + --with-threads \ + --with-computed-gotos \ + --enable-ipv6 \ + --without-valgrind \ + --with-system-expat \ + --with-dbmliborder=gdbm:ndbm \ + --with-system-ffi \ + --with-system-libmpdec \ + --without-ensurepip + + make +} + +check() { + cd "${srcdir}/Python-${pkgver}" + LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \ + "${srcdir}/Python-${pkgver}/python" -m test.regrtest -x test_posixpath test_logging test_uuid +} + +package() { + cd "${srcdir}/Python-${pkgver}" + make DESTDIR="${pkgdir}" install maninstall + + # Why are these not done by default... + ln -sf python3 "${pkgdir}"/usr/bin/python + ln -sf python3-config "${pkgdir}"/usr/bin/python-config + ln -sf idle3 "${pkgdir}"/usr/bin/idle + ln -sf pydoc3 "${pkgdir}"/usr/bin/pydoc + ln -sf python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python3.1 + ln -sf python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python.1 + + # Fix FS#22552 + ln -sf ../../libpython${_pybasever}m.so \ + "${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}m/libpython${_pybasever}m.so" + + # Clean-up reference to build directory + sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}m/Makefile" + + # License + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} ADDED PKGBUILDs/python/python3.4-test_sqlite.patch Index: PKGBUILDs/python/python3.4-test_sqlite.patch ================================================================== --- /dev/null +++ PKGBUILDs/python/python3.4-test_sqlite.patch @@ -0,0 +1,21 @@ + +# HG changeset patch +# User Benjamin Peterson +# Date 1394679139 18000 +# Node ID 4d626a9df062104b61c44c8a5be8b0fd52fae953 +# Parent 6f93ab911d5dafcde364013e21723259fe2c85a8# Parent dbc9e3ed5e9f1bd11240eaa971f6c75d6a7013b5 +merge 3.3 (#20901) + +diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py +--- a/Lib/sqlite3/test/hooks.py ++++ b/Lib/sqlite3/test/hooks.py +@@ -162,7 +162,7 @@ class ProgressTests(unittest.TestCase): + create table bar (a, b) + """) + second_count = len(progress_calls) +- self.assertGreater(first_count, second_count) ++ self.assertGreaterEqual(first_count, second_count) + + def CheckCancelOperation(self): + """ + ADDED PKGBUILDs/python2/PKGBUILD Index: PKGBUILDs/python2/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/python2/PKGBUILD @@ -0,0 +1,110 @@ +# Taken from Arch Linux with patches from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Stéphane Gaudreault +# (Arch Linux) Contributer: Allan McRae +# (Arch Linux) Contributer: Jason Chu + +pkgname=python2 +pkgver=2.7.6 +pkgrel=3 +_pybasever=2.7 +pkgdesc="A high-level scripting language" +arch=('i586') +license=('PSF') +url="http://www.python.org/" +depends=('bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite' 'libffi') +#makedepends=('tk>=8.6.0' 'bluez-libs') +#optdepends=('tk: for IDLE') +conflicts=('python<3') +options=('!makeflags') +source=(http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz + CVE-2014-1912.patch::http://hg.python.org/cpython/raw-rev/87673659d8f7 + find_library.patch + fix-posix-close-clash.patch) +sha1sums=('8321636af2acbeaa68fc635d7dda7369ed446a80' + '1d0527f7b8483e1e0e12867675fdff86f22cd297' + '6c849be584aebc4fea7ef1be53846c76f7e5ecde' + '44907e5972701c5a657d814a7f992e562d42bfd1') + +prepare() { + cd "${srcdir}/Python-${pkgver}" + + # FS#39040 / CVE-2014-1912, upstream report: http://bugs.python.org/issue20246 + # Remove the NEWS file update from upstream patch which will cause a conflict + sed -i "40,51d" "$srcdir/CVE-2014-1912.patch" + patch -p1 -i "$srcdir/CVE-2014-1912.patch" + patch -p1 -i ../find_library.patch + patch -p1 -i ../fix-posix-close-clash.patch + + # Temporary workaround for FS#22322 + # See http://bugs.python.org/issue10835 for upstream report + sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c + + # Enable built-in SQLite module to load extensions (fix FS#22122) + sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py + + # FS#23997 + sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py + + sed -i "s/python2.3/python2/g" Lib/distutils/tests/test_build_scripts.py \ + Lib/distutils/tests/test_install_scripts.py Tools/scripts/gprof2html.py + + # Ensure that we are using the system copy of various libraries (expat, zlib and libffi), + # rather than copies shipped in the tarball + rm -r Modules/expat + rm -r Modules/zlib + rm -r Modules/_ctypes/{darwin,libffi}* + + # clean up #!s + find . -name '*.py' | \ + xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" + + # Workaround asdl_c.py error + touch Include/Python-ast.h Python/Python-ast.c +} + +build() { + cd "${srcdir}/Python-${pkgver}" + + export OPT="${CFLAGS}" + ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \ + --enable-unicode=ucs4 --with-system-expat --with-system-ffi \ + --with-dbmliborder=gdbm:ndbm + + make +} + +package() { + cd "${srcdir}/Python-${pkgver}" + make DESTDIR="${pkgdir}" altinstall maninstall + + rm "${pkgdir}"/usr/share/man/man1/python.1 + + ln -sf python${_pybasever} "${pkgdir}"/usr/bin/python2 + ln -sf python${_pybasever}-config "${pkgdir}"/usr/bin/python2-config + ln -sf python${_pybasever}.1 "${pkgdir}"/usr/share/man/man1/python2.1 + + # FS#33954 + ln -sf python-${_pybasever}.pc "${pkgdir}"/usr/lib/pkgconfig/python2.pc + + ln -sf ../../libpython${_pybasever}.so "${pkgdir}"/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so + + mv "${pkgdir}"/usr/bin/smtpd.py "${pkgdir}"/usr/lib/python${_pybasever}/ + + # some useful "stuff" + install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts} + install -m755 Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}"/usr/lib/python${_pybasever}/Tools/i18n/ + install -m755 Tools/scripts/{README,*py} "${pkgdir}"/usr/lib/python${_pybasever}/Tools/scripts/ + + # fix conflicts with python + mv "${pkgdir}"/usr/bin/idle{,2} + mv "${pkgdir}"/usr/bin/pydoc{,2} + mv "${pkgdir}"/usr/bin/2to3{,-2.7} + + # clean-up reference to build directory + sed -i "s#${srcdir}/Python-${pkgver}:##" "${pkgdir}"/usr/lib/python${_pybasever}/config/Makefile + + # license + install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE +} ADDED PKGBUILDs/python2/find_library.patch Index: PKGBUILDs/python2/find_library.patch ================================================================== --- /dev/null +++ PKGBUILDs/python2/find_library.patch @@ -0,0 +1,11 @@ +--- ./Lib/ctypes/util.py.orig 2013-05-27 14:59:31.253297476 +0000 ++++ ./Lib/ctypes/util.py 2013-05-27 14:59:55.730215183 +0000 +@@ -198,7 +198,7 @@ + abi_type = mach_map.get(machine, 'libc6') + + # XXX assuming GLIBC's ldconfig (with option -p) +- expr = r'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type) ++ expr = r'\s+(lib%s\.[^\s]+)\s+\(' % (re.escape(name)) + f = os.popen('/sbin/ldconfig -p 2>/dev/null') + try: + data = f.read() ADDED PKGBUILDs/python2/fix-posix-close-clash.patch Index: PKGBUILDs/python2/fix-posix-close-clash.patch ================================================================== --- /dev/null +++ PKGBUILDs/python2/fix-posix-close-clash.patch @@ -0,0 +1,20 @@ +--- Python-2.7.6/Modules/posixmodule.c.orig ++++ Python-2.7.6/Modules/posixmodule.c +@@ -6582,7 +6582,7 @@ + Close a file descriptor (for low level IO)."); + + static PyObject * +-posix_close(PyObject *self, PyObject *args) ++posix_closex(PyObject *self, PyObject *args) + { + int fd, res; + if (!PyArg_ParseTuple(args, "i:close", &fd)) +@@ -8960,7 +8960,7 @@ + {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__}, + #endif /* HAVE_TCSETPGRP */ + {"open", posix_open, METH_VARARGS, posix_open__doc__}, +- {"close", posix_close, METH_VARARGS, posix_close__doc__}, ++ {"close", posix_closex, METH_VARARGS, posix_close__doc__}, + {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, + {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, + {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__}, ADDED PKGBUILDs/rarian/PKGBUILD Index: PKGBUILDs/rarian/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/rarian/PKGBUILD @@ -0,0 +1,31 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# Maintainer: Jan de Groot + +pkgname=rarian +pkgver=0.8.1 +pkgrel=3 +pkgdesc="Documentation meta-data library, designed as a replacement for Scrollkeeper." +arch=('i586') +url="http://rarian.freedesktop.org/" +license=('GPL') +depends=('gcc-libs') +makedepends=('libxslt') +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.8/${pkgname}-${pkgver}.tar.bz2 + user-segfault.patch) +md5sums=('75091185e13da67a0ff4279de1757b94' + '457e9827197009cfa360911fe49a5ad7') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np0 -i ../user-segfault.patch + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/rarian/user-segfault.patch Index: PKGBUILDs/rarian/user-segfault.patch ================================================================== --- /dev/null +++ PKGBUILDs/rarian/user-segfault.patch @@ -0,0 +1,14 @@ +--- util/rarian-sk-get-cl.cpp~ 2008-07-28 19:23:28.000000000 +0200 ++++ util/rarian-sk-get-cl.cpp 2008-07-28 19:23:28.000000000 +0200 +@@ -160,6 +160,11 @@ + { + char *filename = NULL; + char *user = getenv ("USERNAME"); ++ ++ if (user == NULL) { ++ user = getenv ("USER"); ++ } ++ + char *basepath = NULL; + int i=0; + int last = 0; ADDED PKGBUILDs/readline/PKGBUILD Index: PKGBUILDs/readline/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/readline/PKGBUILD @@ -0,0 +1,64 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################## +# (Arch Linux) Maintainer: Bartłomiej Piotrowski +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=readline +_basever=6.3 +_patchlevel=003 +pkgver=$_basever.$_patchlevel +pkgrel=2 +pkgdesc='GNU readline library' +arch=('i586') +url='http://tiswww.case.edu/php/chet/readline/rltop.html' +license=('GPL') +depends=('musl' 'ncurses') +backup=('etc/inputrc') +options=('!emptydirs') +install=readline.install +source=(http://ftp.gnu.org/gnu/readline/readline-$_basever.tar.gz{,.sig} + inputrc) + +if [[ $_patchlevel -gt 0 ]]; then + for (( _p=1; _p <= $((10#${_patchlevel})); _p++ )); do + source=(${source[@]} http://ftp.gnu.org/gnu/readline/readline-$_basever-patches/readline${_basever//.}-$(printf "%03d" $_p){,.sig}) + done +fi + +prepare() { + cd $pkgname-$_basever + for (( _p=1; _p <= $((10#${_patchlevel})); _p++ )); do + msg "applying patch readline${_basever//.}-$(printf "%03d" $_p)" + patch -p0 -i ../readline${_basever//.}-$(printf "%03d" $_p) + done + + # remove RPATH from shared objects (FS#14366) + sed -i 's|-Wl,-rpath,$(libdir) ||g' support/shobj-conf +} + +build() { + cd $pkgname-$_basever + + # build with -fPIC for x86_64 (FS#15634) + [[ $CARCH == "x86_64" ]] && CFLAGS="$CFLAGS -fPIC" + + ./configure --prefix=/usr + make SHLIB_LIBS=-lncurses +} + +package() { + make -C $pkgname-$_basever DESTDIR="$pkgdir" install + install -Dm644 inputrc "$pkgdir"/etc/inputrc +} + +md5sums=('33c8fb279e981274f485fd91da77e94a' + 'SKIP' + '58d54966c1191db45973cb3191ac621a' + '4343f5ea9b0f42447f102fb61576b398' + 'SKIP' + '700295212f7e2978577feaee584afddb' + 'SKIP' + 'af4963862f5156fbf9111c2c6fa86ed7' + 'SKIP') ADDED PKGBUILDs/readline/inputrc Index: PKGBUILDs/readline/inputrc ================================================================== --- /dev/null +++ PKGBUILDs/readline/inputrc @@ -0,0 +1,36 @@ +# do not bell on tab-completion +#set bell-style none + +set meta-flag on +set input-meta on +set convert-meta off +set output-meta on + +$if mode=emacs + +# for linux console and RH/Debian xterm +"\e[1~": beginning-of-line +"\e[4~": end-of-line +"\e[5~": beginning-of-history +"\e[6~": end-of-history +"\e[7~": beginning-of-line +"\e[3~": delete-char +"\e[2~": quoted-insert +"\e[5C": forward-word +"\e[5D": backward-word +"\e\e[C": forward-word +"\e\e[D": backward-word +"\e[1;5C": forward-word +"\e[1;5D": backward-word + +# for rxvt +"\e[8~": end-of-line + +# for non RH/Debian xterm, can't hurt for RH/DEbian xterm +"\eOH": beginning-of-line +"\eOF": end-of-line + +# for freebsd console +"\e[H": beginning-of-line +"\e[F": end-of-line +$endif ADDED PKGBUILDs/readline/readline.install Index: PKGBUILDs/readline/readline.install ================================================================== --- /dev/null +++ PKGBUILDs/readline/readline.install @@ -0,0 +1,17 @@ +infodir=usr/share/info +filelist=(history.info readline.info rluserman.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + ADDED PKGBUILDs/run-parts/PKGBUILD Index: PKGBUILDs/run-parts/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/run-parts/PKGBUILD @@ -0,0 +1,30 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Pierre Schmitz + +pkgname=run-parts +pkgver=4.4 +pkgrel=1 +pkgdesc='run scripts or programs in a directory' +arch=('i586') +url='http://packages.qa.debian.org/d/debianutils.html' +license=('GPL') +depends=('musl') +source=("ftp://ftp.archlinux.org/other/run-parts/debianutils_${pkgver}.tar.gz") +sha256sums=('190850cdd6b5302e0a1ba1aaed1bc7074d67d3bd8d04c613f242f7145afa53a6') + +build() { + cd $srcdir/debianutils-$pkgver + ./configure --prefix=/usr + make run-parts +} + +package() { + cd $srcdir/debianutils-$pkgver + install -D -m755 run-parts $pkgdir/usr/bin/run-parts + install -D -m644 run-parts.8 $pkgdir/usr/share/man/man8/run-parts.8 + for l in po4a/*/run-parts.8; do + install -D -m644 ${l} $pkgdir/usr/share/man/${l:5:2}/man8/run-parts.8 + done +} ADDED PKGBUILDs/runit/PKGBUILD Index: PKGBUILDs/runit/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/runit/PKGBUILD @@ -0,0 +1,65 @@ +# Taken from the AUR +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Christian Neukirchen +# (Arch Linux) Contributor: TJ Vanderpoel +# (Arch Linux) Contributor: Kevin Berry +# (Arch Linux) Contributor: Andrej Gelenberg + +pkgname=runit +pkgver=2.1.1 +pkgrel=6 +pkgdesc="A service supervision scheme, compiled with musl" +url="http://smarden.org/runit/" +license=('custom') +arch=('i586') +depends=('bash' 'util-linux') +makedepends=('gcc' 'make' 'coreutils' 'sed' 'musl') + +noextract=("http://smarden.org/${pkgname}/${pkgname}-${pkgver}.tar.gz" + "_sv") + +prepare() { + + cd ${srcdir} + tar xvzf ../${pkgname}-${pkgver}.tar.gz + +} + +build() { + cd ${srcdir}/admin/${pkgname}-${pkgver}/src + + echo "gcc -D_GNU_SOURCE $CFLAGS" >conf-cc + echo "gcc -s $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld + # set default service path to /var/service + sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c + + make +} + +check() { + cd ${srcdir}/admin/${pkgname}-${pkgver}/src + + make check +} + +package() { + cd ${srcdir}/admin/${pkgname}-${pkgver}/src + + # default services + install -d -m0755 "${pkgdir}/var" + ln -s ../run/runit/runsvdir/current "${pkgdir}/var/service" || return 1 + + install -d -m0755 "${pkgdir}/usr/bin" + install -s -m0755 ${srcdir}/admin/${pkgname}-${pkgver}/src/{chpst,runit,runit-init,runsv,runsvchdir,runsvdir,sv,svlogd,utmpset} ${pkgdir}/usr/bin + + install -d -m0755 ${pkgdir}/usr/share/man/man8 + install -m0644 ${srcdir}/admin/${pkgname}-${pkgver}/man/* ${pkgdir}/usr/share/man/man8 + + install -d -m0755 ${pkgdir}/usr/share/doc/runit + install -m0644 ${srcdir}/admin/${pkgname}-${pkgver}/doc/*.html ${pkgdir}/usr/share/doc/runit + + install -D ${srcdir}/admin/${pkgname}-${pkgver}/package/COPYING ${pkgdir}/usr/share/licenses/runit-musl/COPYING + + install -D -m0644 ${srcdir}/../_sv ${pkgdir}/usr/share/zsh/site-functions/_sv +} ADDED PKGBUILDs/runit/_sv Index: PKGBUILDs/runit/_sv ================================================================== --- /dev/null +++ PKGBUILDs/runit/_sv @@ -0,0 +1,44 @@ +#compdef sv + +# completion for runit sv(1) +# Christian Neukirchen +# runit 2.1.1, services in /var/service are completed by default + +local ret=1 services + +_arguments \ + '-v[verbose]' \ + '-w[wait]:seconds' \ + '1: :->cmds' \ + '*:: :->args' && ret=0 + +case $state in +cmds) + _values "sv command" \ + status \ + up \ + down \ + once \ + pause cont hup alarm interrupt quit 1 2 term kill \ + exit + # above allow one-character shortcuts, complete these + [[ $words[CURRENT] = [sudopchaiq12tke] ]] || + _values "sv command" \ + start \ + stop \ + restart \ + shutdown \ + force-stop \ + force-reload \ + force-restart \ + force-shutdown \ + check + ret=0;; +args) + services=( /var/service/*(-/N:t) ) + (( $#services )) && _values services $services && ret=0 + [[ $words[CURRENT] = */* ]] && _directories && ret=0 + ;; +esac + +return $ret ADDED PKGBUILDs/sed/PKGBUILD Index: PKGBUILDs/sed/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/sed/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: judd + +pkgname=sed +pkgver=4.2.2 +pkgrel=3 +pkgdesc="GNU stream editor" +arch=('i586') +url="http://www.gnu.org/software/sed" +license=('GPL3') +groups=('base' 'base-devel') +depends=('acl' 'sh') +makedepends=('gettext') +install=sed.install +source=(ftp://ftp.gnu.org/pub/gnu/sed/${pkgname}-${pkgver}.tar.gz{,.sig}) +md5sums=('4111de4faa3b9848a0686b2f260c5056' + '86a5ab72f414d4cb38126e8e27cf0101') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + rm -r "${pkgdir}"/usr/lib +} ADDED PKGBUILDs/sed/sed.install Index: PKGBUILDs/sed/sed.install ================================================================== --- /dev/null +++ PKGBUILDs/sed/sed.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(sed.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/shared-mime-info/PKGBUILD Index: PKGBUILDs/shared-mime-info/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/shared-mime-info/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Jan de Groot + +pkgname=shared-mime-info +pkgver=1.2 +pkgrel=2 +pkgdesc="Freedesktop.org Shared MIME Info" +arch=('i586') +license=('GPL2') +depends=('libxml2' 'glib2') +makedepends=('intltool' 'pkg-config') +install=shared-mime-info.install +url="http://freedesktop.org/Software/shared-mime-info" +source=(http://freedesktop.org/~hadess/${pkgname}-${pkgver}.tar.xz) +md5sums=('8f90f3f2b8478fa47e70678d34013f99') +options=(!makeflags) + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + # https://bugs.archlinux.org/task/38836 + # https://bugs.freedesktop.org/show_bug.cgi?id=70366 + export ac_cv_func_fdatasync=no + ./configure --prefix=/usr --disable-update-mimedb + make +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make -k check +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} ADDED PKGBUILDs/shared-mime-info/shared-mime-info.install Index: PKGBUILDs/shared-mime-info/shared-mime-info.install ================================================================== --- /dev/null +++ PKGBUILDs/shared-mime-info/shared-mime-info.install @@ -0,0 +1,15 @@ +post_install() { + update-mime-database usr/share/mime > /dev/null 2>&1 +} + +post_upgrade() { + post_install +} + +post_remove() { + if [ -d usr/share/mime ]; then + rm -f usr/share/mime/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache} + rm -rf usr/share/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc} + rmdir --ignore-fail-on-non-empty usr/share/mime + fi +} ADDED PKGBUILDs/sqlite/PKGBUILD Index: PKGBUILDs/sqlite/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/sqlite/PKGBUILD @@ -0,0 +1,98 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Andreas Radke +# (Arch Linux) Contributor: Tom Newsom + +pkgbase="sqlite" +pkgname=('sqlite' 'sqlite-tcl' 'sqlite-doc') +_amalgamationver=3080500 +_docver=${_amalgamationver} +#_docver=3080001 +pkgver=3.8.5 +pkgrel=1 +pkgdesc="A C library that implements an SQL database engine" +arch=('i586') +license=('custom:Public Domain') +url="http://www.sqlite.org/" +makedepends=('tcl' 'readline') +source=( # tarball containing the amalgamation for SQLite >= 3.7.5 together with a configure script and makefile for building it; includes now also the Tcl Extension Architecture (TEA) + http://www.sqlite.org/2014/sqlite-autoconf-$_amalgamationver.tar.gz + http://www.sqlite.org/2014/sqlite-doc-${_docver}.zip + license.txt) +options=('!emptydirs') +sha1sums=('7f667e10ccebc26ab2086b8a30cb0a600ca0acae' + 'c5655a4004095c50dc8403661e0ed02fd4191d57' + 'f34f6daa4ab3073d74e774aad21d66878cf26853') + +build() { + export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE" + + # build sqlite + cd "$srcdir"/sqlite-autoconf-$_amalgamationver + + ./configure --prefix=/usr \ + --disable-static + make + + # build the tcl extension + cd "$srcdir"/sqlite-autoconf-$_amalgamationver/tea + ./configure --prefix=/usr \ + --with-system-sqlite + make + +} + +package_sqlite() { + + pkgdesc="A C library that implements an SQL database engine" + depends=('readline') + provides=("sqlite3=$pkgver") + replaces=("sqlite3") + + cd ${srcdir}/sqlite-autoconf-$_amalgamationver + make DESTDIR=${pkgdir} install + + # license - no linking required because pkgbase=pkgname + install -D -m644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses/${pkgbase}/license.txt +} + +package_sqlite-tcl() { + + pkgdesc="sqlite Tcl Extension Architecture (TEA)" + depends=('sqlite') + provides=("sqlite3-tcl=$pkgver") + replaces=("sqlite3-tcl") + + cd ${srcdir}/sqlite-autoconf-$_amalgamationver/tea + make DESTDIR=${pkgdir} install + + # link license + 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 ${srcdir}/sqlite-doc-${_amalgamationver} + cd ${srcdir}/sqlite-doc-${_docver} + mkdir -p ${pkgdir}/usr/share/doc/${pkgbase} + cp -R * ${pkgdir}/usr/share/doc/${pkgbase}/ + + # fix permissions and remove obsolete files; https://bugs.archlinux.org/task/24605 + find ${pkgdir} -type f -perm 755 -exec ls -lha {} \; + find ${pkgdir} -type f -perm 755 -exec chmod 644 {} \; + + find ${pkgdir} -type f -name '*~' -exec ls -lha {} \; + find ${pkgdir} -type d -name '*~' -exec ls -lha {} \; + find ${pkgdir} -name '*~' -exec rm -f {} \; + + find ${pkgdir} -type f -name '.~*' -exec ls -lha {} \; # /build/pkg/sqlite-doc/usr/share/doc/sqlite/images/fileformat/.~lock.indexpage.odg# + find ${pkgdir} -type d -name '.~*' -exec ls -lha {} \; + find ${pkgdir} -name '.~*' -exec rm -f {} \; +} ADDED PKGBUILDs/sqlite/license.txt Index: PKGBUILDs/sqlite/license.txt ================================================================== --- /dev/null +++ PKGBUILDs/sqlite/license.txt @@ -0,0 +1,33 @@ +SQLite Copyright +SQLite is in the +Public Domain + + +All of the deliverable code in SQLite has been dedicated to the public domain by the authors. All code authors, and representatives of the companies they work for, have signed affidavits dedicating their contributions to the public domain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. + +The previous paragraph applies to the deliverable code in SQLite - those parts of the SQLite library that you actually bundle and ship with a larger application. Portions of the documentation and some code used as part of the build process might fall under other licenses. The details here are unclear. We do not worry about the licensing of the documentation and build code so much because none of these things are part of the core deliverable SQLite library. + +All of the deliverable code in SQLite has been written from scratch. No code has been taken from other projects or from the open internet. Every line of code can be traced back to its original author, and all of those authors have public domain dedications on file. So the SQLite code base is clean and is uncontaminated with licensed code from other projects. +Obtaining An Explicit License To Use SQLite + +Even though SQLite is in the public domain and does not require a license, some users want to obtain a license anyway. Some reasons for obtaining a license include: +You are using SQLite in a jurisdiction that does not recognize the public domain. +You are using SQLite in a jurisdiction that does not recognize the right of an author to dedicate their work to the public domain. +You want to hold a tangible legal document as evidence that you have the legal right to use and distribute SQLite. +Your legal department tells you that you have to purchase a license. + +If you feel like you really have to purchase a license for SQLite, Hwaci, the company that employs the architect and principal developers of SQLite, will sell you one. +Contributed Code + +In order to keep SQLite completely free and unencumbered by copyright, all new contributors to the SQLite code base are asked to dedicate their contributions to the public domain. If you want to send a patch or enhancement for possible inclusion in the SQLite source tree, please accompany the patch with the following statement: +The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law. + +We are not able to accept patches or changes to SQLite that are not accompanied by a statement such as the above. In addition, if you make changes or enhancements as an employee, then a simple statement such as the above is insufficient. You must also send by surface mail a copyright release signed by a company officer. A signed original of the copyright release should be mailed to: +Hwaci +6200 Maple Cove Lane +Charlotte, NC 28269 +USA + +A template copyright release is available in PDF or HTML. You can use this release to make future changes. + +see http://www.sqlite.org/copyright.html ADDED PKGBUILDs/sudo/PKGBUILD Index: PKGBUILDs/sudo/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/sudo/PKGBUILD @@ -0,0 +1,82 @@ +# Taken from Arch Linux with patches from Alpine Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Evangelos Foutras +# (Arch Linux) Contributor: Allan McRae +# (Arch Linux) Contributor: Tom Newsom + +pkgname=sudo +_sudover=1.8.10p2 +pkgver=${_sudover/p/.p} +pkgrel=1 +pkgdesc="Give certain users the ability to run some commands as root" +arch=('i586') +url="http://www.sudo.ws/sudo/" +license=('custom') +groups=('base-devel') +depends=('musl' 'pam' 'libldap') +backup=('etc/sudoers' 'etc/pam.d/sudo') +install=$pkgname.install +source=(http://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig} + sudo.tmpfiles.conf + sudo.pam + domain.patch + fix-cross-compile.patch + libcrypt.patch) +sha256sums=('ba6cb8db6dccdb92a96e8ae63ca65c410f8b61270b603ab9af4b1154fef379f1' + 'SKIP' + '080dd97111b3149f8d140ffac68c88acd63da9eacc81fbcc7c43591be13b42fe' + 'd1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2' + '1f455dc37a88089017d580a66e805c3e2ad144f16a304ee457b6cfa8668d18dd' + 'd40eaf27f9bcc4d2151c3133fe12efcf29fe496a4d72dabe22661cf311943f59' + 'e26a4e01b275a306b13fb7a5253c342d975892b3b3d136290e28a63a1b1f418b') + +prepare() { + + cd "$srcdir/$pkgname-$_sudover" + patch -p1 -i ../domain.patch + patch -p1 -i ../fix-cross-compile.patch + patch -p1 -i ../libcrypt.patch + +} + + +build() { + cd "$srcdir/$pkgname-$_sudover" + + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib \ + --with-rundir=/run/sudo \ + --with-vardir=/var/db/sudo \ + --with-logfac=auth \ + --with-pam \ + --with-ldap \ + --with-ldap-conf-file=/etc/openldap/ldap.conf \ + --with-env-editor \ + --with-passprompt="[sudo] password for %p: " \ + --with-all-insults + make +} + +check() { + cd "$srcdir/$pkgname-$_sudover" + make check +} + +package() { + cd "$srcdir/$pkgname-$_sudover" + make DESTDIR="$pkgdir" install + + # Remove /run/sudo directory from the package; we create it using tmpfiles.d + rmdir "$pkgdir/run/sudo" + rmdir "$pkgdir/run" + + install -Dm644 "$srcdir/sudo.tmpfiles.conf" \ + "$pkgdir/usr/lib/tmpfiles.d/sudo.conf" + + install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo" + + install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/sudo/LICENSE" +} ADDED PKGBUILDs/sudo/domain.patch Index: PKGBUILDs/sudo/domain.patch ================================================================== --- /dev/null +++ PKGBUILDs/sudo/domain.patch @@ -0,0 +1,12 @@ +--- ./plugins/sudoers/match.c.orig ++++ ./plugins/sudoers/match.c +@@ -933,8 +933,8 @@ + bool + netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user) + { ++ static char *domain = NULL; + #ifdef HAVE_INNETGR +- static char *domain; + static int initialized; + #endif + bool rc = false; ADDED PKGBUILDs/sudo/fix-cross-compile.patch Index: PKGBUILDs/sudo/fix-cross-compile.patch ================================================================== --- /dev/null +++ PKGBUILDs/sudo/fix-cross-compile.patch @@ -0,0 +1,15 @@ +--- sudo-1.8.7/compat/Makefile.in.orig ++++ sudo-1.8.7/compat/Makefile.in +@@ -93,10 +93,10 @@ + ./mksigname > $@ + + mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/missing.h $(top_builddir)/config.h +- $(CC) $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@ ++ $${HOSTCC:-gcc} -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(DEFS) $(srcdir)/mksiglist.c -o $@ + + mksigname: $(srcdir)/mksigname.c $(srcdir)/mksigname.h $(incdir)/missing.h $(top_builddir)/config.h +- $(CC) $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/mksigname.c -o $@ ++ $${HOSTCC:-gcc} -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(DEFS) $(srcdir)/mksigname.c -o $@ + + fnm_test: fnm_test.o libreplace.la + $(LIBTOOL) --mode=link $(CC) -o $@ fnm_test.o libreplace.la $(PIE_LDFLAGS) $(SSP_LDFLAGS) ADDED PKGBUILDs/sudo/libcrypt.patch Index: PKGBUILDs/sudo/libcrypt.patch ================================================================== --- /dev/null +++ PKGBUILDs/sudo/libcrypt.patch @@ -0,0 +1,11 @@ +--- ./plugins/sudoers/Makefile.in.orig ++++ ./plugins/sudoers/Makefile.in +@@ -49,7 +49,7 @@ + LT_LIBS = $(top_builddir)/common/libsudo_util.la $(LIBOBJDIR)libreplace.la + LIBS = $(LT_LIBS) @LIBINTL@ + NET_LIBS = @NET_LIBS@ +-SUDOERS_LIBS = @SUDOERS_LIBS@ @AFS_LIBS@ @GETGROUPS_LIB@ $(LIBS) $(NET_LIBS) @ZLIB@ @LIBDL@ ++SUDOERS_LIBS = @SUDOERS_LIBS@ @AFS_LIBS@ @GETGROUPS_LIB@ $(LIBS) $(NET_LIBS) @ZLIB@ @LIBDL@ -lcrypt + REPLAY_LIBS = @REPLAY_LIBS@ @ZLIB@ + + # C preprocessor flags ADDED PKGBUILDs/sudo/sudo.install Index: PKGBUILDs/sudo/sudo.install ================================================================== --- /dev/null +++ PKGBUILDs/sudo/sudo.install @@ -0,0 +1,19 @@ +post_install() { + if type -P systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create sudo.conf + fi +} + +pre_upgrade() { + # Permissions of /var/db/sudo were changed from 0700 to 0711 in sudo 1.8.10 + # http://www.sudo.ws/repos/sudo/rev/5c38d77a2d0c + if (($(vercmp $2 1.8.10-1) < 0)); then + chmod 0711 var/db/sudo + fi +} + +post_upgrade() { + post_install +} + +# vim:set ts=2 sw=2 et: ADDED PKGBUILDs/sudo/sudo.pam Index: PKGBUILDs/sudo/sudo.pam ================================================================== --- /dev/null +++ PKGBUILDs/sudo/sudo.pam @@ -0,0 +1,4 @@ +#%PAM-1.0 +auth include system-auth +account include system-auth +session include system-auth ADDED PKGBUILDs/sudo/sudo.tmpfiles.conf Index: PKGBUILDs/sudo/sudo.tmpfiles.conf ================================================================== --- /dev/null +++ PKGBUILDs/sudo/sudo.tmpfiles.conf @@ -0,0 +1,1 @@ +d /run/sudo 0711 root root - ADDED PKGBUILDs/syslog-ng/PKGBUILD Index: PKGBUILDs/syslog-ng/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/syslog-ng/PKGBUILD @@ -0,0 +1,49 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=syslog-ng +pkgver=3.5.3 +pkgrel=1 +pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities" +arch=('i586') +url="http://www.balabit.com/network-security/syslog-ng/" +license=('GPL2' 'LGPL2.1') +depends=('awk' 'eventlog' 'openssl') +makedepends=('python2' 'libxslt') +optdepends=('logrotate: for rotating log files') +backup=('etc/syslog-ng/scl.conf' + 'etc/syslog-ng/syslog-ng.conf' + 'etc/logrotate.d/syslog-ng') +source=(http://www.balabit.com/downloads/files/syslog-ng/sources/$pkgver/source/${pkgname}_$pkgver.tar.gz + syslog-ng.conf syslog-ng.logrotate) +sha1sums=('7a8070f384e0dba1dfd6622c40bc6e402fa6178f' + 'cf61571ffde34ecf36be76881fce20944fd3efa4' + '949128fe3d7f77a7aab99048061f885bc758000c') + +prepare() { + cd "$pkgname-$pkgver" + sed -i -e 's,/bin/,/usr/bin/,' -e 's,/sbin/,/bin/,' contrib/systemd/syslog-ng.service +} + +build() { + cd "$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc/syslog-ng --libexecdir=/usr/lib \ + --sbindir=/usr/bin --localstatedir=/var/lib/syslog-ng --datadir=/usr/share/syslog-ng \ + --with-pidfile-dir=/run --disable-spoof-source --enable-ipv6 \ + --enable-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system + make +} + +check() { + cd "$pkgname-$pkgver" + make check +} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d" + install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf" + install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng" +} ADDED PKGBUILDs/syslog-ng/syslog-ng.conf Index: PKGBUILDs/syslog-ng/syslog-ng.conf ================================================================== --- /dev/null +++ PKGBUILDs/syslog-ng/syslog-ng.conf @@ -0,0 +1,92 @@ +@version: 3.5 +@include "scl.conf" +# +# /etc/syslog-ng/syslog-ng.conf +# + +options { + stats_freq (0); + flush_lines (0); + time_reopen (10); + log_fifo_size (10000); + chain_hostnames (off); + use_dns (no); + use_fqdn (no); + create_dirs (no); + keep_hostname (yes); + perm(0640); + group("log"); +}; + +source src { + system(); + internal(); +}; + +destination d_authlog { file("/var/log/auth.log"); }; +destination d_syslog { file("/var/log/syslog.log"); }; +destination d_cron { file("/var/log/crond.log"); }; +destination d_daemon { file("/var/log/daemon.log"); }; +destination d_kernel { file("/var/log/kernel.log"); }; +destination d_lpr { file("/var/log/lpr.log"); }; +destination d_user { file("/var/log/user.log"); }; +destination d_uucp { file("/var/log/uucp.log"); }; +destination d_mail { file("/var/log/mail.log"); }; +destination d_news { file("/var/log/news.log"); }; +destination d_ppp { file("/var/log/ppp.log"); }; +destination d_debug { file("/var/log/debug.log"); }; +destination d_messages { file("/var/log/messages.log"); }; +destination d_errors { file("/var/log/errors.log"); }; +destination d_everything { file("/var/log/everything.log"); }; +destination d_iptables { file("/var/log/iptables.log"); }; +destination d_acpid { file("/var/log/acpid.log"); }; +destination d_console { usertty("root"); }; + +# Log everything to tty12 +destination console_all { file("/dev/tty12"); }; + +filter f_auth { facility(auth); }; +filter f_authpriv { facility(auth, authpriv); }; +filter f_syslog { program(syslog-ng); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_kernel { facility(kern) and not filter(f_iptables); }; +filter f_lpr { facility(lpr); }; +filter f_mail { facility(mail); }; +filter f_news { facility(news); }; +filter f_user { facility(user); }; +filter f_uucp { facility(uucp); }; +filter f_ppp { facility(local2); }; +filter f_debug { not facility(auth, authpriv, news, mail); }; +filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news, cron) and not program(syslog-ng) and not filter(f_iptables); }; +filter f_everything { level(debug..emerg) and not facility(auth, authpriv); }; +filter f_emergency { level(emerg); }; +filter f_info { level(info); }; +filter f_notice { level(notice); }; +filter f_warn { level(warn); }; +filter f_crit { level(crit); }; +filter f_err { level(err); }; +filter f_iptables { match("IN=" value("MESSAGE")) and match("OUT=" value("MESSAGE")); }; +filter f_acpid { program("acpid"); }; + +log { source(src); filter(f_acpid); destination(d_acpid); }; +log { source(src); filter(f_authpriv); destination(d_authlog); }; +log { source(src); filter(f_syslog); destination(d_syslog); }; +log { source(src); filter(f_cron); destination(d_cron); }; +log { source(src); filter(f_daemon); destination(d_daemon); }; +log { source(src); filter(f_kernel); destination(d_kernel); }; +log { source(src); filter(f_lpr); destination(d_lpr); }; +log { source(src); filter(f_mail); destination(d_mail); }; +log { source(src); filter(f_news); destination(d_news); }; +log { source(src); filter(f_ppp); destination(d_ppp); }; +log { source(src); filter(f_user); destination(d_user); }; +log { source(src); filter(f_uucp); destination(d_uucp); }; +#log { source(src); filter(f_debug); destination(d_debug); }; +log { source(src); filter(f_messages); destination(d_messages); }; +log { source(src); filter(f_err); destination(d_errors); }; +log { source(src); filter(f_emergency); destination(d_console); }; +log { source(src); filter(f_everything); destination(d_everything); }; +log { source(src); filter(f_iptables); destination(d_iptables); }; + +# Log everything to tty12 +#log { source(src); destination(console_all); }; ADDED PKGBUILDs/syslog-ng/syslog-ng.logrotate Index: PKGBUILDs/syslog-ng/syslog-ng.logrotate ================================================================== --- /dev/null +++ PKGBUILDs/syslog-ng/syslog-ng.logrotate @@ -0,0 +1,7 @@ +/var/log/messages.log /var/log/auth.log /var/log/mail.log /var/log/kernel.log /var/log/errors.log /var/log/daemon.log /var/log/user.log /var/log/iptables.log /var/log/everything.log /var/log/syslog.log /var/log/acpid.log /var/log/crond.log /var/log/lpr.log /var/log/uucp.log /var/log/news.log /var/log/ppp.log /var/log/debug.log { + missingok + sharedscripts + postrotate + /bin/kill -HUP $(cat /run/syslog-ng.pid 2>/dev/null) 2>/dev/null || true + endscript +} ADDED PKGBUILDs/tar/PKGBUILD Index: PKGBUILDs/tar/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/tar/PKGBUILD @@ -0,0 +1,37 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=tar +pkgver=1.27.1 +pkgrel=1 +pkgdesc="Utility used to store, backup, and transport files" +arch=('i586') +url="http://www.gnu.org/software/tar/tar.html" +license=('GPL3') +groups=('base') +depends=('musl' 'sh') +options=('!emptydirs') +install=tar.install +source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}) +md5sums=('e0382a4064e09a4943f3adeff1435978' + 'SKIP') + +build() { + cd ${srcdir}/$pkgname-$pkgver + ./configure --prefix=/usr --libexecdir=/usr/lib/tar + make +} + +check() { + cd ${srcdir}/$pkgname-$pkgver + make check +} + +package() { + cd ${srcdir}/$pkgname-$pkgver + make DESTDIR=${pkgdir} install + rm "${pkgdir}"/usr/lib/charset.alias +} ADDED PKGBUILDs/tar/tar.install Index: PKGBUILDs/tar/tar.install ================================================================== --- /dev/null +++ PKGBUILDs/tar/tar.install @@ -0,0 +1,21 @@ +infodir=usr/share/info +filelist=(tar.info tar.info-1 tar.info-2) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + ADDED PKGBUILDs/tcl/PKGBUILD Index: PKGBUILDs/tcl/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/tcl/PKGBUILD @@ -0,0 +1,58 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=tcl +pkgver=8.6.1 +pkgrel=1 +pkgdesc="The Tcl scripting language" +arch=('i586') +url="http://tcl.sourceforge.net/" +license=('custom') +depends=('zlib') +options=('staticlibs') +source=(http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz) +sha1sums=('5c83d44152cc0496cc0847a2495f659502a30e40') + +prepare() { + cd tcl${pkgver} + # we build the tcl sqlite interface in sqlite-tcl package + rm -rf pkgs/sqlite3* +} + +build() { + cd tcl${pkgver}/unix + [[ $CARCH == "x86_64" ]] && BIT="--enable-64bit" + ./configure --prefix=/usr --mandir=/usr/share/man --enable-threads $BIT + make +} + +check() { + cd tcl${pkgver}/unix + make test +} + +package() { + cd tcl${pkgver}/unix + make INSTALL_ROOT="${pkgdir}" install install-private-headers + ln -sf tclsh${pkgver%.*} "${pkgdir}/usr/bin/tclsh" + ln -sf libtcl${pkgver%.*}.so "${pkgdir}/usr/lib/libtcl.so" + install -Dm644 ../license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # remove buildroot traces + sed -e "s#${srcdir}/tcl${pkgver}/unix#/usr/lib#" \ + -e "s#${srcdir}/tcl${pkgver}#/usr/include#" \ + -i "${pkgdir}/usr/lib/tclConfig.sh" + + sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/tdbc1.0.0#/usr/lib/tdbc1.0.0#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc1.0.0/generic#/usr/include#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc1.0.0/library#/usr/lib/tcl${pkgver%.*}#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc1.0.0#/usr/include#" \ + -i "${pkgdir}/usr/lib/tdbc1.0.0/tdbcConfig.sh" + + sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/itcl4.0.0#/usr/lib/itcl4.0.0#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/itcl4.0.0/generic#/usr/include#" \ + -e "s#${srcdir}/tcl${pkgver}/pkgs/itcl4.0.0#/usr/include#" \ + -i "${pkgdir}/usr/lib/itcl4.0.0/itclConfig.sh" +} ADDED PKGBUILDs/texinfo/PKGBUILD Index: PKGBUILDs/texinfo/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/texinfo/PKGBUILD @@ -0,0 +1,43 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Tom Newsom + +pkgname=texinfo +pkgver=5.2 +pkgrel=2 +pkgdesc="Utilities to work with and produce manuals, ASCII text, and on-line documentation from a single source file" +arch=('i586') +url="http://www.gnu.org/software/texinfo/" +license=('GPL3') +groups=('base' 'base-devel') +depends=('ncurses' 'findutils' 'gzip' 'perl' 'sh') +install=texinfo.install +source=(ftp://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig} + texinfo-5.2-C-n-fix.patch) +md5sums=('cb489df8a7ee9d10a236197aefdb32c5' + 'SKIP' + '89724bac1ecbd1a57b1ea81e87f96f44') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + patch -p0 -i ${srcdir}/texinfo-5.2-C-n-fix.patch +} + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + rm -r ${pkgdir}/usr/lib +} ADDED PKGBUILDs/texinfo/texinfo-4.13a-data_types.patch Index: PKGBUILDs/texinfo/texinfo-4.13a-data_types.patch ================================================================== --- /dev/null +++ PKGBUILDs/texinfo/texinfo-4.13a-data_types.patch @@ -0,0 +1,32 @@ +diff -up texinfo-4.13/info/window.c_old texinfo-4.13/info/window.c +--- texinfo-4.13/info/window.c_old 2009-08-04 13:46:15.000000000 +0200 ++++ texinfo-4.13/info/window.c 2009-08-04 13:47:29.000000000 +0200 +@@ -1581,7 +1581,7 @@ process_node_text (WINDOW *win, char *st + const char *carried_over_ptr; + size_t carried_over_len, carried_over_count; + const char *cur_ptr = mbi_cur_ptr (iter); +- int cur_len = mb_len (mbi_cur (iter)); ++ size_t cur_len = mb_len (mbi_cur (iter)); + int replen; + int delim = 0; + int rc; +@@ -1754,7 +1754,7 @@ clean_manpage (char *manpage) + mbi_advance (iter)) + { + const char *cur_ptr = mbi_cur_ptr (iter); +- int cur_len = mb_len (mbi_cur (iter)); ++ size_t cur_len = mb_len (mbi_cur (iter)); + + if (cur_len == 1) + { +@@ -1852,8 +1852,8 @@ window_scan_line (WINDOW *win, int line, + mbi_advance (iter)) + { + const char *cur_ptr = mbi_cur_ptr (iter); +- int cur_len = mb_len (mbi_cur (iter)); +- int replen; ++ size_t cur_len = mb_len (mbi_cur (iter)); ++ size_t replen; + + if (cur_ptr >= endp) + break; ADDED PKGBUILDs/texinfo/texinfo-5.2-C-n-fix.patch Index: PKGBUILDs/texinfo/texinfo-5.2-C-n-fix.patch ================================================================== --- /dev/null +++ PKGBUILDs/texinfo/texinfo-5.2-C-n-fix.patch @@ -0,0 +1,10 @@ +--- info/infomap.c (revision 5386) ++++ info/infomap.c (working copy) +@@ -297,6 +297,7 @@ + CONTROL('f'), NUL, A_info_forward_char, + CONTROL('h'), NUL, A_info_get_help_window, + CONTROL('l'), NUL, A_info_redraw_display, ++ CONTROL('n'), NUL, A_info_next_line, + CONTROL('p'), NUL, A_info_prev_line, + CONTROL('r'), NUL, A_isearch_backward, + CONTROL('s'), NUL, A_isearch_forward, ADDED PKGBUILDs/texinfo/texinfo.install Index: PKGBUILDs/texinfo/texinfo.install ================================================================== --- /dev/null +++ PKGBUILDs/texinfo/texinfo.install @@ -0,0 +1,21 @@ +infodir=usr/share/info +filelist=(info.info info-stnd.info texinfo.info{,-1,-2,-3}) + +post_install() { + # Scan *all* info files on install + for file in $(find $infodir -type f ! -name dir); do + install-info $file $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/tzbins/Makefile.patch Index: PKGBUILDs/tzbins/Makefile.patch ================================================================== --- /dev/null +++ PKGBUILDs/tzbins/Makefile.patch @@ -0,0 +1,140 @@ +diff -Naur src/Makefile src-p/Makefile +--- src/Makefile 2007-08-20 16:47:41.000000000 +0200 ++++ src-p/Makefile 2007-10-02 04:07:44.000000000 +0200 +@@ -34,17 +34,17 @@ + + # Everything gets put in subdirectories of. . . + +-TOPDIR= /usr/local ++TOPDIR= $(DESTDIR)/usr + + # "Compiled" time zone information is placed in the "TZDIR" directory + # (and subdirectories). + # Use an absolute path name for TZDIR unless you're just testing the software. + +-TZDIR= $(TOPDIR)/etc/zoneinfo ++TZDIR= $(TOPDIR)/share/zoneinfo + + # The "tzselect", "zic", and "zdump" commands get installed in. . . + +-ETCDIR= $(TOPDIR)/etc ++SBINDIR= $(TOPDIR)/sbin + + # If you "make INSTALL", the "date" command gets installed in. . . + +@@ -52,7 +52,7 @@ + + # Manual pages go in subdirectories of. . . + +-MANDIR= $(TOPDIR)/man ++MANDIR= $(TOPDIR)/share/man + + # Library functions are put in an archive in LIBDIR. + +@@ -83,7 +83,7 @@ + + # Non-default libraries needed to link. + # Add -lintl if you want to use `gettext' on Solaris. +-LDLIBS= ++LDLIBS=$(LDFLAGS) + + # Add the following to the end of the "CFLAGS=" line as needed. + # -Dconst= if `const' does not work (SunOS 4.x cc, OSF1 V5.0 cc) +@@ -211,7 +211,7 @@ + # before the first Monday in January when a "%V" format is used and January 1 + # falls on a Friday, Saturday, or Sunday. + +-CFLAGS= ++CFLAGS += -std=gnu99 + + # If you want zic's -s option used when installing, uncomment the next line + # ZFLAGS= -s +@@ -220,7 +220,7 @@ + ZIC= $(zic) $(ZFLAGS) + + # The name of a Posix-compliant `awk' on your system. +-AWK= nawk ++AWK= awk + + # The path where SGML DTDs are kept. + SGML_SEARCH_PATH= $(TOPDIR)/share/doc/sgml-lib/REC-html401-19991224/ +@@ -241,8 +241,10 @@ + + ############################################################################### + +-cc= cc +-CC= $(cc) -DTZDIR=\"$(TZDIR)\" ++CC+= -DTZDIR=\"$(TZDIR)\" ++ifeq ($(NLS),1) ++CC += -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\" ++endif + + TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c + TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o +@@ -282,14 +284,16 @@ + + ALL: all date + +-install: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA) ++install: all $(DATA) $(REDO) $(MANS) $(TABDATA) + $(ZIC) -y $(YEARISTYPE) \ + -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES) + -rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab + cp iso3166.tab zone.tab $(TZDIR)/. +- -mkdir $(TOPDIR) $(ETCDIR) +- cp tzselect zic zdump $(ETCDIR)/. +- -mkdir $(TOPDIR) $(MANDIR) \ ++ -mkdir -p $(TOPDIR) $(SBINDIR) ++ cp zic zdump $(SBINDIR)/. ++ -mkdir -p $(TOPDIR) $(BINDIR) ++ cp tzselect $(BINDIR)/. ++ -mkdir -p $(TOPDIR) $(MANDIR) \ + $(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8 + -rm -f $(MANDIR)/man3/newctime.3 \ + $(MANDIR)/man3/newtzset.3 \ +@@ -298,13 +302,11 @@ + $(MANDIR)/man8/zdump.8 \ + $(MANDIR)/man8/zic.8 + cp newctime.3 newtzset.3 $(MANDIR)/man3/. +- cp tzfile.5 $(MANDIR)/man5/. +- cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/. + + INSTALL: ALL install date.1 +- -mkdir $(TOPDIR) $(BINDIR) ++ -mkdir -p $(TOPDIR) $(BINDIR) + cp date $(BINDIR)/. +- -mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1 ++ -mkdir -p $(TOPDIR) $(MANDIR) $(MANDIR)/man1 + -rm -f $(MANDIR)/man1/date.1 + cp date.1 $(MANDIR)/man1/. + +@@ -334,9 +336,9 @@ + # You must replace all of $(TZDIR) to switch from not using leap seconds + # to using them, or vice versa. + other_two: zic leapseconds $(TDATA) +- $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA) ++ $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)/posix -L /dev/null $(TDATA) + $(ZIC) -y $(YEARISTYPE) \ +- -d $(TZDIR)-leaps -L leapseconds $(TDATA) ++ -d $(TZDIR)/right -L leapseconds $(TDATA) + + posix_right: posix_only other_two + +@@ -367,7 +369,7 @@ + <$? >$@ + chmod +x $@ + +-check: check_tables check_web ++check: check_tables + + check_tables: checktab.awk $(PRIMARY_YDATA) + $(AWK) -f checktab.awk $(PRIMARY_YDATA) +diff -Naur src/tzselect.ksh src-p/tzselect.ksh +--- src/tzselect.ksh 2007-08-20 16:47:42.000000000 +0200 ++++ src-p/tzselect.ksh 2007-10-02 04:07:44.000000000 +0200 +@@ -1,4 +1,4 @@ +-#! /bin/ksh ++#! /bin/bash + + # '@(#)tzselect.ksh 8.1' + ADDED PKGBUILDs/tzbins/PKGBUILD Index: PKGBUILDs/tzbins/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/tzbins/PKGBUILD @@ -0,0 +1,50 @@ +# Taken from ConnochaetOS +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Andreas Radke +# (ConnochaetOS) Maintainer: Henry Jensen + +# We're using this old stuff since it contains the tz related binaries that were +# moved to glibc later and are not (yet?) part of musl. + +pkgname=tzbins +pkgver=2010l +pkgrel=2 +_tzcode=2010l +_tzdata=2010l +pkgdesc="Sources for time zone and daylight saving time data" +arch=('i586') +url="http://www.twinsun.com/tz/tz-link.htm" +license=('GPL') +depends=() +makedepends=() +optdepends=('sh: required by tzselect') +options=('!emptydirs') +source=(ftp://elsie.nci.nih.gov/pub/tzcode${_tzcode}.tar.gz \ + ftp://elsie.nci.nih.gov/pub/tzdata${_tzdata}.tar.gz \ + Makefile.patch) + + +md5sums=('77668c37a0b13753c65eee5db3a4b009' + '0458bd8ffd537146d34b1a658c42efa5' + 'a64ed97d1fc03c66ee8612c0d9f40507') + +build() { + cd ${srcdir} + + tar -xf tzcode${_tzcode}.tar.gz || return 1 + tar -xf tzdata${_tzdata}.tar.gz || return 1 + + patch -Np1 -i "${srcdir}/Makefile.patch" || return 1 + + make || return 1 + +} + +package() { + cd ${srcdir} + + make DESTDIR="${pkgdir}" install || return 1 + + rm -r "${pkgdir}/usr/share/" +} ADDED PKGBUILDs/tzdata/PKGBUILD Index: PKGBUILDs/tzdata/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/tzdata/PKGBUILD @@ -0,0 +1,32 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Andreas Radke + +pkgname=tzdata +pkgver=2014b +pkgrel=1 +pkgdesc="Sources for time zone and daylight saving time data" +arch=('any') +url="http://www.iana.org/time-zones" +license=('GPL') +makedepends=('tzbins') +options=('!emptydirs') +source=(http://www.iana.org/time-zones/repository/releases/${pkgname}${pkgver}.tar.gz{,.asc}) +sha1sums=('e35461362701c5f55a98c72bf0822dd0b47f2076' + 'SKIP') + +timezones=('africa' 'antarctica' 'asia' 'australasia' + 'europe' 'northamerica' 'southamerica' + 'pacificnew' 'etcetera' 'backward' + 'systemv' 'factory') + +package() { + cd ${srcdir} + zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo ${timezones[@]} + zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/posix ${timezones[@]} + zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo/right -L leapseconds ${timezones[@]} + + zic -y ./yearistype -d ${pkgdir}/usr/share/zoneinfo -p America/New_York + install -m444 -t ${pkgdir}/usr/share/zoneinfo iso3166.tab zone.tab +} ADDED PKGBUILDs/util-linux/PKGBUILD Index: PKGBUILDs/util-linux/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/PKGBUILD @@ -0,0 +1,116 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Tom Gundersen +# (Arch Linux) Maintainer: Dave Reisner +# (Arch Linux) Contributor: judd + +pkgbase=util-linux +pkgname=(util-linux libutil-linux) +pkgver=2.23.2 +pkgrel=0 +pkgdesc="Miscellaneous system utilities for Linux" +url="http://www.kernel.org/pub/linux/utils/util-linux/" +arch=('i586') +groups=('base' 'base-devel') +makedepends=('python') +# checkdepends=('bc') +license=('GPL2') +options=('strip' 'debug') +source=("ftp://ftp.kernel.org/pub/linux/utils/$pkgname/v2.23/$pkgname-$pkgver.tar.xz" + util-linux-posix.patch + ttydefaults.h + uuidd.tmpfiles + pam-login + pam-common + pam-su) +md5sums=('b39fde897334a4858bb2098edcce5b3f' + '43a03270b6e49fdf4c7fb0ab3390c242' + '6196f1ce853dfaf717569c1e35555d6d' + 'a39554bfd65cccfd8254bb46922f4a67' + '4368b3f98abd8a32662e094c54e7f9b1' + 'a31374fef2cba0ca34dfc7078e2969e4' + 'fa85e5cce5d723275b14365ba71a8aad') + +build() { + cd "$pkgname-$pkgver" + + patch -p1 -i ../util-linux-posix.patch + cp ../ttydefaults.h include + + ./configure --prefix=/usr \ + --libdir=/usr/lib \ + --bindir=/usr/bin \ + --localstatedir=/run \ + --enable-fs-paths-extra=/usr/bin \ + --disable-nls \ + --enable-raw \ + --enable-newgrp \ + --enable-chfn-chsh \ + --enable-write \ + --enable-mesg \ + --enable-socket-activation \ + --with-ncurses \ + --with-python=3 + +# --enable-reset \ # part of ncurses +# --enable-last \ # not compat +# --enable-vipw \ + + make +} + +#check() { +# fails for some reason in chroot, works outside +# make -C "$pkgname-$pkgver" check +#} + +package_util-linux() { + conflicts=('util-linux-ng' 'eject') + provides=("util-linux-ng=$pkgver" 'eject') +# depends=('pam' 'shadow' 'coreutils' 'libsystemd' 'libutil-linux') + depends=('pam' 'coreutils' 'libutil-linux') + optdepends=('python: python bindings to libmount') + install=util-linux.install + backup=(etc/pam.d/chfn + etc/pam.d/chsh + etc/pam.d/login + etc/pam.d/su + etc/pam.d/su-l) + + cd "$pkgname-$pkgver" + + make DESTDIR="${pkgdir}" install + + # setuid chfn and chsh + chmod 4755 "$pkgdir"/usr/bin/{newgrp,ch{sh,fn}} + + # install PAM files for login-utils + install -Dm644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chfn" + install -m644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chsh" + install -m644 "$srcdir/pam-login" "$pkgdir/etc/pam.d/login" + install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su" + install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su-l" + + # include tmpfiles fragment for uuidd + # TODO(dreisner): offer this upstream? + install -Dm644 "$srcdir/uuidd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/uuidd.conf" + + # usrmove + cd "$pkgdir" + mv {,usr/}sbin/* usr/bin + rmdir sbin usr/sbin + + ### create libutil-linux split + rm -rf "$srcdir/_libutil-linux" + install -dm755 "$srcdir"/_libutil-linux/usr/lib + cd "$srcdir"/_libutil-linux + mv "$pkgdir"/usr/lib/lib*.{a,so}* usr/lib +} + +package_libutil-linux() { + pkgdesc="util-linux runtime libraries" + provides=('libblkid.so' 'libmount.so' 'libuuid.so') + + mv "$srcdir/_libutil-linux"/* "$pkgdir" +} ADDED PKGBUILDs/util-linux/pam-common Index: PKGBUILDs/util-linux/pam-common ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/pam-common @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so +password required pam_permit.so ADDED PKGBUILDs/util-linux/pam-login Index: PKGBUILDs/util-linux/pam-login ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/pam-login @@ -0,0 +1,7 @@ +#%PAM-1.0 + +auth required pam_securetty.so +auth requisite pam_nologin.so +auth include system-local-login +account include system-local-login +session include system-local-login ADDED PKGBUILDs/util-linux/pam-su Index: PKGBUILDs/util-linux/pam-su ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/pam-su @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +# Uncomment the following line to implicitly trust users in the "wheel" group. +#auth sufficient pam_wheel.so trust use_uid +# Uncomment the following line to require a user to be in the "wheel" group. +#auth required pam_wheel.so use_uid +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so ADDED PKGBUILDs/util-linux/ttydefaults.h Index: PKGBUILDs/util-linux/ttydefaults.h ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/ttydefaults.h @@ -0,0 +1,39 @@ +#ifndef _SYS_TTYDEFAULTS_H_ +#define _SYS_TTYDEFAULTS_H_ +#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) +#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS) +#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL) +#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL) +#define TTYDEF_SPEED (B9600) +#define CTRL(x) (x&037) +#define CEOF CTRL('d') +#ifdef _POSIX_VDISABLE +# define CEOL _POSIX_VDISABLE +#else +# define CEOL '\0' +#endif +#define CERASE 0177 +#define CINTR CTRL('c') +#ifdef _POSIX_VDISABLE +# define CSTATUS _POSIX_VDISABLE +#else +# define CSTATUS '\0' +#endif +#define CKILL CTRL('u') +#define CMIN 1 +#define CQUIT 034 +#define CSUSP CTRL('z') +#define CTIME 0 +#define CDSUSP CTRL('y') +#define CSTART CTRL('q') +#define CSTOP CTRL('s') +#define CLNEXT CTRL('v') +#define CDISCARD CTRL('o') +#define CWERASE CTRL('w') +#define CREPRINT CTRL('r') +#define CEOT CEOF +#define CBRK CEOL +#define CRPRNT CREPRINT +#define CFLUSH CDISCARD +#endif + ADDED PKGBUILDs/util-linux/util-linux-posix.patch Index: PKGBUILDs/util-linux/util-linux-posix.patch ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/util-linux-posix.patch @@ -0,0 +1,101 @@ +patch taken from sabotage linux -- https://github.com/rofl0r/sabotage +diff -aur util-linux-2.23.1.org/fdisks/cfdisk.c util-linux-2.23.1/fdisks/cfdisk.c +--- util-linux-2.23.1.org/fdisks/cfdisk.c 2013-07-01 21:37:58.508000002 +0000 ++++ util-linux-2.23.1/fdisks/cfdisk.c 2013-07-01 22:00:23.042000002 +0000 +@@ -325,7 +325,7 @@ + int logical = 0; + long long logical_sectors[MAXIMUM_PARTS]; + +-__sighandler_t old_SIGINT, old_SIGTERM; ++sighandler_t old_SIGINT, old_SIGTERM; + + int arrow_cursor = FALSE; + int display_units = MEGABYTES; +diff -aur util-linux-2.23.1.org/fdisks/fdisksunlabel.c util-linux-2.23.1/fdisks/fdisksunlabel.c +--- util-linux-2.23.1.org/fdisks/fdisksunlabel.c 2013-07-01 21:37:58.508000002 +0000 ++++ util-linux-2.23.1/fdisks/fdisksunlabel.c 2013-07-01 21:59:43.721000002 +0000 +@@ -383,9 +383,11 @@ + } + } + +-static int verify_sun_cmp(int *a, int *b, void *data) ++static void* cmp_data; ++static int verify_sun_cmp(const void *pa, const void *pb) + { +- unsigned int *verify_sun_starts = (unsigned int *) data; ++ const int *a = pa, *b = pb; ++ unsigned int *verify_sun_starts = (unsigned int *) cmp_data; + + if (*a == -1) + return 1; +@@ -449,9 +451,8 @@ + else + array[i] = -1; + } +- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), +- (int (*)(const void *,const void *,void *)) verify_sun_cmp, +- verify_sun_starts); ++ cmp_data = verify_sun_starts; ++ qsort(array,ARRAY_SIZE(array),sizeof(array[0]), verify_sun_cmp); + + if (array[0] == -1) { + fdisk_info(cxt, _("No partitions defined")); +diff -aur util-linux-2.23.1.org/include/ttyutils.h util-linux-2.23.1/include/ttyutils.h +--- util-linux-2.23.1.org/include/ttyutils.h 2013-07-01 21:37:58.433000002 +0000 ++++ util-linux-2.23.1/include/ttyutils.h 2013-07-01 21:48:42.328000002 +0000 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include "ttydefaults.h" + #ifdef HAVE_SYS_IOCTL_H + #include + #endif +diff -aur util-linux-2.23.1.org/term-utils/setterm.c util-linux-2.23.1/term-utils/setterm.c +--- util-linux-2.23.1.org/term-utils/setterm.c 2013-07-01 21:37:58.442000002 +0000 ++++ util-linux-2.23.1/term-utils/setterm.c 2013-07-01 22:02:54.244000002 +0000 +@@ -123,7 +123,7 @@ + #include "nls.h" + #include "closestream.h" + +-#if __GNU_LIBRARY__ < 5 ++#if defined(__GLIBC__) && __GNU_LIBRARY__ < 5 + #ifndef __alpha__ + # include + #define __NR_klogctl __NR_syslog +diff -aur util-linux-2.23.1.org/term-utils/ttymsg.c util-linux-2.23.1/term-utils/ttymsg.c +--- util-linux-2.23.1.org/term-utils/ttymsg.c 2013-07-01 21:37:58.442000002 +0000 ++++ util-linux-2.23.1/term-utils/ttymsg.c 2013-07-01 22:07:02.788000002 +0000 +@@ -41,6 +41,7 @@ + */ + + #include ++#include + #include + #include + #include +diff -aur util-linux-2.23.1.org/text-utils/hexdump.h util-linux-2.23.1/text-utils/hexdump.h +--- util-linux-2.23.1.org/text-utils/hexdump.h 2013-07-01 21:37:58.437000002 +0000 ++++ util-linux-2.23.1/text-utils/hexdump.h 2013-07-01 22:01:27.005000002 +0000 +@@ -32,7 +32,7 @@ + * + * @(#)hexdump.h 5.4 (Berkeley) 6/1/90 + */ +- ++#include + typedef struct _pr { + struct _pr *nextpr; /* next print unit */ + #define F_ADDRESS 0x001 /* print offset */ +diff -aur util-linux-2.23.1.org/text-utils/pg.c util-linux-2.23.1/text-utils/pg.c +--- util-linux-2.23.1.org/text-utils/pg.c 2013-07-01 21:37:58.437000002 +0000 ++++ util-linux-2.23.1/text-utils/pg.c 2013-07-01 22:01:55.831000002 +0000 +@@ -37,7 +37,7 @@ + #ifndef TIOCGWINSZ + # include + #endif +-#include ++#include + #include + #include + #include + ADDED PKGBUILDs/util-linux/util-linux.install Index: PKGBUILDs/util-linux/util-linux.install ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/util-linux.install @@ -0,0 +1,21 @@ +post_install() { + # we don't want use systemd-tmpfiles here because + # the package dependency would create a circular dep. + if [ ! -d run/uuidd ]; then + # refer to uid/gid by number to avoid dependency on filesystem + install -o 68 -g 68 -dm755 run/uuidd + fi +} + +post_upgrade() { + if [ "$(vercmp $2 2.21.2-4)" -lt 0 ]; then + if [ -f /var/lib/hwclock/adjtime ]; then + mv /var/lib/hwclock/adjtime /etc/adjtime + fi + if [ -d /var/lib/hwclock ]; then + rmdir /var/lib/hwclock + fi + fi + + post_install +} ADDED PKGBUILDs/util-linux/uuidd.tmpfiles Index: PKGBUILDs/util-linux/uuidd.tmpfiles ================================================================== --- /dev/null +++ PKGBUILDs/util-linux/uuidd.tmpfiles @@ -0,0 +1,1 @@ +d /run/uuidd 0755 uuidd uuidd ADDED PKGBUILDs/vim/PKGBUILD Index: PKGBUILDs/vim/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/vim/PKGBUILD @@ -0,0 +1,235 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Thomas Dziedzic +# (Arch Linux) Contributor: Jan "heftig" Steffens +# (Arch Linux) Contributor: tobias [ tobias at archlinux org ] +# (Arch Linux) Contributor: Daniel J Griffiths + +# Disregard gvim; I was just too lazy to distangle the linkage between it and the runtime package. + +pkgbase=vim +pkgname=('vim' 'gvim' 'vim-runtime') +_topver=7.4 +_patchlevel=214 +__hgrev=d2ef98a43b5d +_versiondir="vim${_topver//./}" +pkgver=${_topver}.${_patchlevel} +pkgrel=1 +arch=('i586') +license=('custom:vim') +url="http://www.vim.org" +#makedepends=('gpm' 'python2' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' 'lua') +makedepends=('python2' 'lua') +source=("ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz" + "ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz.sig" + 'vimrc' + 'archlinux.vim' + 'gvim.desktop') +md5sums=('5ec7d7f84955dacfef88e52ebc79b267' + 'SKIP' + 'b9d4dcb9d3ee2e151dc4be1e94934f6a' + '10353a61aadc3f276692d0e17db1478e' + 'd90413bd21f400313a785bb4010120cd') + +# source PKGBUILD && mksource +mksource() { + [[ -x /usr/bin/hg ]] || (echo "hg not found. Install mercurial." && return 1) + + __hgroot='http://vim.googlecode.com/hg/' + __hgrepo='vim' + __hgbranch='default' + + hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} + + pushd ${__hgrepo} + if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then + printf 'You are not building the latest revision!\n' + printf "Consider updating __hgrev to $(hg id -r ${__hgbranch}).\n" + fi + popd + + mv vim ${pkgname}-${pkgver} + find ${pkgname}-${pkgver} -depth -type d -name .hg -exec rm -rf {} \; + rm ${pkgname}-${pkgver}/{.hgignore,.hgtags} + tar -cJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}/* + rm -r ${pkgname}-${pkgver} + + gpg --detach-sign ${pkgname}-${pkgver}.tar.xz + + scp ${pkgname}-${pkgver}.tar.xz nym:/srv/ftp/other/vim/ + scp ${pkgname}-${pkgver}.tar.xz.sig nym:/srv/ftp/other/vim/ +} + +build() { + cp -a ${pkgname}-${pkgver} vim-build + + # define the place for the global (g)vimrc file (set to /etc/vimrc) + sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \ + vim-build/src/feature.h + sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \ + vim-build/src/feature.h + + (cd vim-build/src && autoconf) + + cp -a vim-build gvim-build + + cd "${srcdir}"/vim-build + + ./configure \ + --prefix=/usr \ + --localstatedir=/var/lib/vim \ + --with-features=huge \ + --with-compiledby='Arch Linux' \ + --enable-gpm \ + --enable-acl \ + --with-x=no \ + --disable-gui \ + --enable-multibyte \ + --enable-cscope \ + --disable-netbeans \ + --enable-perlinterp \ + --disable-pythoninterp \ + --disable-python3interp \ + --disable-rubyinterp \ + --disable-luainterp + + make + + cd "${srcdir}"/gvim-build + + ./configure \ + --prefix=/usr \ + --localstatedir=/var/lib/vim \ + --with-features=huge \ + --with-compiledby='Arch Linux' \ + --enable-gpm \ + --enable-acl \ + --with-x=yes \ + --enable-gui=gtk2 \ + --enable-multibyte \ + --enable-cscope \ + --enable-netbeans \ + --enable-perlinterp \ + --enable-pythoninterp \ + --disable-python3interp \ + --enable-rubyinterp \ + --enable-luainterp + + make +} + +check() { + # disable tests because they seem to freeze + + cd "${srcdir}"/vim-build + + #make test + + cd "${srcdir}"/gvim-build + + #make test +} + +package_vim() { + pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' + depends=("vim-runtime=${pkgver}-${pkgrel}") # 'gpm') + conflicts=('gvim') + + cd "${srcdir}"/vim-build + make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install + + # provided by (n)vi in core + rm "${pkgdir}"/usr/bin/{ex,view} + + # delete some manpages + find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \ + while read _mandir; do + cd ${_mandir} + rm -f ex.1 view.1 # provided by (n)vi + rm -f evim.1 # this does not make sense if we have no GUI + done + + # Runtime provided by runtime package + rm -r "${pkgdir}"/usr/share/vim + + # license + install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt + + ln -s /usr/bin/vim ${pkgdir}/usr/bin/vi +} + +package_gvim() { + pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)' + depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'ruby' 'libxt' + 'desktop-file-utils' 'gtk2' 'lua' 'python2') + provides=("vim=${pkgver}-${pkgrel}") + conflicts=('vim') + install=gvim.install + + cd "${srcdir}"/gvim-build + make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install + + # provided by (n)vi in core + rm "${pkgdir}"/usr/bin/{ex,view} + + # delete some manpages + find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \ + while read _mandir; do + cd ${_mandir} + rm -f ex.1 view.1 # provided by (n)vi + done + + # Move the runtime for later packaging + mv "${pkgdir}"/usr/share/vim "${srcdir}"/runtime-install + + # freedesktop links + install -Dm644 "${srcdir}"/gvim.desktop \ + "${pkgdir}"/usr/share/applications/gvim.desktop + install -Dm644 runtime/vim48x48.png "${pkgdir}"/usr/share/pixmaps/gvim.png + + # license + install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt +} + +package_vim-runtime() { + pkgdesc='Runtime for vim and gvim' + depends=('perl' 'gawk') + backup=('etc/vimrc') + + # Install the runtime split from gvim + install -dm755 "${pkgdir}"/usr/share + mv "${srcdir}"/runtime-install "${pkgdir}"/usr/share/vim + + # Don't forget logtalk.dict + install -Dm644 "${srcdir}"/gvim-build/runtime/ftplugin/logtalk.dict \ + "${pkgdir}"/usr/share/vim/${_versiondir}/ftplugin/logtalk.dict + + # fix FS#17216 + sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \ + "${pkgdir}"/usr/share/vim/${_versiondir}/filetype.vim + + # patch filetype.vim for better handling of pacman related files + sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \ + "${pkgdir}"/usr/share/vim/${_versiondir}/filetype.vim + sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \ + "${pkgdir}"/usr/share/vim/${_versiondir}/ftplugin/changelog.vim + + # rc files + install -Dm644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc + install -Dm644 "${srcdir}"/archlinux.vim \ + "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim + + # rgb.txt file + install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/rgb.txt \ + "${pkgdir}"/usr/share/vim/${_versiondir}/rgb.txt + + # license + install -dm755 "${pkgdir}"/usr/share/licenses/vim-runtime + ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt +} + +# vim:set sw=2 sts=2 et: ADDED PKGBUILDs/vim/archlinux.vim Index: PKGBUILDs/vim/archlinux.vim ================================================================== --- /dev/null +++ PKGBUILDs/vim/archlinux.vim @@ -0,0 +1,26 @@ +" The ArchLinux global vimrc - setting only a few sane defaults +" +" Maintainer: Tobias Kieslich [tobias funnychar archlinux dot org] +" +" NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION +" SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc + +" Normally we use vim-extensions. If you want true vi-compatibility +" remove change the following statements +set nocompatible " Use Vim defaults instead of 100% vi compatibility +set backspace=indent,eol,start " more powerful backspacing + +" Now we set some defaults for the editor +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time + +" Suffixes that get lower priority when doing tab completion for filenames. +" These are files we are not likely to want to edit or read. +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc + + +if has('gui_running') + " Make shift-insert work like in Xterm + map + map! +endif ADDED PKGBUILDs/vim/gvim.desktop Index: PKGBUILDs/vim/gvim.desktop ================================================================== --- /dev/null +++ PKGBUILDs/vim/gvim.desktop @@ -0,0 +1,63 @@ +[Desktop Entry] +Name=Vi IMproved +Name[bg]=Vi Ðåäàêòîð +Name[ca]=Vi Millorat +Name[da]=Vi forbedret +Name[eo]=VIM +Name[et]=Täiustatud Vi (vim) +Name[fr]=Vi étendu (VIM) +Name[he]=רפושמ Vi +Name[hu]=Vi +Name[is]=Vi IMproved ritillinn +Name[it]=Vi iMproved +Name[no]=Vi IMproved (forbedret VI) +Name[pl]=Poprawiony VI (vim) +Name[ro]=VIM +Name[ru]=Улучшенный VI +Name[sk]=Vi IMpreved +Name[sl]=Izboljšani vi (vim) +Name[sv]=Förbättrad Vi +Name[zh_CN.GB2312]=改进的 Vi +Comment=Powerful text editor with scripting functions and macro recorder +Comment[bg]=Ðåäàêòîð ñ ìíîãî âúçìîæíîñòè +Comment[ca]=Editor vi potent +Comment[cs]=Mocný textový editor vi +Comment[da]=En kraftig vi tekstbehandler +Comment[de]=Ein leistungsfähiger vi-Editor +Comment[el]=Πανίσχυρος διορθωτής vi +Comment[eo]=VIM similas al redaktilo "vi", sed havas aldonajn ecojn +Comment[es]=Una versión mejorada del editor vi +Comment[et]=Võimas tekstiredaktor vi +Comment[fi]=Tehokas vi-tekstieditori +Comment[fr]=Éditeur vi puissant +Comment[gl]=Potente editor vi +Comment[he]=Vi המצועה בר ךרועה +Comment[hr]=Napredni vi uređivač +Comment[hu]=Vi szövegszerkesztő +Comment[is]=Öflug útgáfa vi ritilsins +Comment[it]=Un editor vi potenziato +Comment[ja]=強力なViエディタ +Comment[lt]=Galingas vi redaktorius +Comment[mk]=Моќен VI уредувач +Comment[nl]=Krachtige vi-editor +Comment[no]=En kraftig vi-redigerer +Comment[no_NY]=Kraftig vi-tekstredigeringsprogram +Comment[pl]=Edytor vi +Comment[pt]=Um poderoso editor de texto +Comment[ro]=Un editor de texte VI, puternic +Comment[ru]=Мощный текстовый редактор vi +Comment[sk]=Silný textový procesor vi +Comment[sl]=Zmogljivi urejevalnik vi +Comment[sr]=Moćni vi editor +Comment[sv]=En kraftfull texteditor +Comment[ta]=ºì¾¢Å¡öó¾ vi ¦¾¡ÌôÀ¡Ç÷ +Comment[tr]=Güçlü vi düzenleyicisi +Comment[uk]=Потужний редактор vi +Comment[zh_CN.GB2312]=功能强大的 vi 编辑器 +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; +Exec=gvim -f %F +Icon=gvim +Type=Application +Terminal=false +X-XClassHintResName=VIM +Categories=Utility;TextEditor; ADDED PKGBUILDs/vim/gvim.install Index: PKGBUILDs/vim/gvim.install ================================================================== --- /dev/null +++ PKGBUILDs/vim/gvim.install @@ -0,0 +1,11 @@ +post_install() { + update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} ADDED PKGBUILDs/vim/vimrc Index: PKGBUILDs/vim/vimrc ================================================================== --- /dev/null +++ PKGBUILDs/vim/vimrc @@ -0,0 +1,16 @@ +" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just +" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime +" you can find below. If you wish to change any of those settings, you should +" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten +" everytime an upgrade of the vim packages is performed. It is recommended to +" make changes after sourcing archlinux.vim since it alters the value of the +" 'compatible' option. + +" This line should not be removed as it ensures that various options are +" properly set to work with the Vim-related packages. +runtime! archlinux.vim + +" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' +" Or better yet, read /usr/share/vim/vim74/vimrc_example.vim or the vim manual +" and configure vim to your own liking! + ADDED PKGBUILDs/w3m/PKGBUILD Index: PKGBUILDs/w3m/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/w3m/PKGBUILD @@ -0,0 +1,56 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Gaetan Bisson +# (Arch Linux) Contributor: dorphell + +pkgname=w3m +pkgver=0.5.3 +pkgrel=5 +pkgdesc='Text-based Web browser, as well as pager' +url='http://w3m.sourceforge.net/' +license=('custom') +arch=('i586') +#makedepends=('imlib2') +#optdepends=('imlib2: for graphics support') +depends=('openssl' 'gc' 'ncurses') +source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz" + 'form_unknown.patch' + 'file_handle.patch' + 'https.patch' + 'gc72.patch') +sha1sums=('444b6c8cf7094ee95f8e9de96b37f814b9d83237' + '23d648033ad77f3c67d370c62cf7b7ed86b5c6f2' + '457de43be7eabc652614461a7ab25e3ba76b2aff' + '66affb2f695fe0bdde25cf774642bfd6a9404e88' + '7baa06ca684fd140503a2adc65e2d606970c4662') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + ls ../*.patch | xargs -i patch -p1 -i {} +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib \ + --with-termlib=ncurses \ + --disable-w3mmailer \ + --disable-mouse --disable-nls + +# --enable-image=x11,fb \ +# --with-imagelib=imlib2 \ + +# sed 's/@my_libs@/-lX11/g' -i Makefile + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + install -d "${pkgdir}"/usr/share/{doc,licenses}/"${pkgname}" + find doc/* | grep -v CVS | xargs -i install -m644 "{}" "${pkgdir}/usr/share/doc/${pkgname}" + ln -s ../../doc/"${pkgname}"/README "${pkgdir}/usr/share/licenses/${pkgname}" +} ADDED PKGBUILDs/w3m/file_handle.patch Index: PKGBUILDs/w3m/file_handle.patch ================================================================== --- /dev/null +++ PKGBUILDs/w3m/file_handle.patch @@ -0,0 +1,60 @@ +diff -Naur old/istream.c new/istream.c +--- old/istream.c 2011-01-04 20:22:22.000000000 +1100 ++++ new/istream.c 2012-07-04 21:50:51.529661517 +1000 +@@ -22,8 +22,8 @@ + static void basic_close(int *handle); + static int basic_read(int *handle, char *buf, int len); + +-static void file_close(struct file_handle *handle); +-static int file_read(struct file_handle *handle, char *buf, int len); ++static void file_close(struct file_handle_rofl *handle); ++static int file_read(struct file_handle_rofl *handle, char *buf, int len); + + static int str_read(Str handle, char *buf, int len); + +@@ -114,7 +114,7 @@ + stream = New(union input_stream); + init_base_stream(&stream->base, STREAM_BUF_SIZE); + stream->file.type = IST_FILE; +- stream->file.handle = New(struct file_handle); ++ stream->file.handle = New(struct file_handle_rofl); + stream->file.handle->f = f; + if (closep) + stream->file.handle->close = closep; +@@ -658,13 +658,13 @@ + } + + static void +-file_close(struct file_handle *handle) ++file_close(struct file_handle_rofl *handle) + { + handle->close(handle->f); + } + + static int +-file_read(struct file_handle *handle, char *buf, int len) ++file_read(struct file_handle_rofl *handle, char *buf, int len) + { + return fread(buf, 1, len, handle->f); + } +diff -Naur old/istream.h new/istream.h +--- old/istream.h 2003-10-21 02:41:56.000000000 +1000 ++++ new/istream.h 2012-07-04 21:50:51.529661517 +1000 +@@ -20,7 +20,7 @@ + + typedef struct stream_buffer *StreamBuffer; + +-struct file_handle { ++struct file_handle_rofl { + FILE *f; + void (*close) (); + }; +@@ -53,7 +53,7 @@ + + struct file_stream { + struct stream_buffer stream; +- struct file_handle *handle; ++ struct file_handle_rofl *handle; + char type; + char iseos; + int (*read) (); ADDED PKGBUILDs/w3m/form_unknown.patch Index: PKGBUILDs/w3m/form_unknown.patch ================================================================== --- /dev/null +++ PKGBUILDs/w3m/form_unknown.patch @@ -0,0 +1,15 @@ +See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615843 + +Index: w3m-git/form.c +=================================================================== +--- w3m-git.orig/form.c 2011-02-28 15:03:36.000000000 +0100 ++++ w3m-git/form.c 2011-02-28 15:32:33.000000000 +0100 +@@ -196,7 +196,7 @@ + if (!strcasecmp(typestr, _formtypetbl[i])) + return i; + } +- return FORM_UNKNOWN; ++ return FORM_INPUT_TEXT; + } + + void ADDED PKGBUILDs/w3m/gc72.patch Index: PKGBUILDs/w3m/gc72.patch ================================================================== --- /dev/null +++ PKGBUILDs/w3m/gc72.patch @@ -0,0 +1,13 @@ +diff -Naur old/main.c new/main.c +--- old/main.c 2011-01-04 20:42:19.000000000 +1100 ++++ new/main.c 2012-07-04 21:49:10.136212236 +1000 +@@ -833,7 +833,8 @@ + mySignal(SIGPIPE, SigPipe); + #endif + +- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); ++ orig_GC_warn_proc = GC_get_warn_proc(); ++ GC_set_warn_proc(wrap_GC_warn_proc); + err_msg = Strnew(); + if (load_argc == 0) { + /* no URL specified */ ADDED PKGBUILDs/w3m/https.patch Index: PKGBUILDs/w3m/https.patch ================================================================== --- /dev/null +++ PKGBUILDs/w3m/https.patch @@ -0,0 +1,19 @@ +Fedora patch; see https://bugzilla.redhat.com/show_bug.cgi?id=707994 + +--- old/url.c 2011-01-04 14:52:24.000000000 +0530 ++++ new/url.c 2011-09-02 18:25:43.305652690 +0530 +@@ -82,11 +82,11 @@ + {"ftp", SCM_FTP}, + {"local", SCM_LOCAL}, + {"file", SCM_LOCAL}, +- /* {"exec", SCM_EXEC}, */ ++ {"exec", SCM_EXEC}, + {"nntp", SCM_NNTP}, +- /* {"nntp", SCM_NNTP_GROUP}, */ ++ {"nntp", SCM_NNTP_GROUP}, + {"news", SCM_NEWS}, +- /* {"news", SCM_NEWS_GROUP}, */ ++ {"news", SCM_NEWS_GROUP}, + {"data", SCM_DATA}, + #ifndef USE_W3MMAILER + {"mailto", SCM_MAILTO}, ADDED PKGBUILDs/wget/PKGBUILD Index: PKGBUILDs/wget/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/wget/PKGBUILD @@ -0,0 +1,46 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Eric Bélanger + +pkgname=wget +pkgver=1.15 +pkgrel=1 +pkgdesc="A network utility to retrieve files from the Web" +arch=('i586') +url="http://www.gnu.org/software/wget/wget.html" +license=('GPL3') +depends=('openssl' 'libidn' 'util-linux') +#checkdepends=('perl-http-daemon' 'perl-io-socket-ssl') +optdepends=('ca-certificates: HTTPS downloads') +backup=('etc/wgetrc') +install=wget.install +source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig}) +sha1sums=('e9fb1d25fa04f9c69e74e656a3174dca02700ba1' + 'SKIP') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + cat >> doc/sample.wgetrc < /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/which/PKGBUILD Index: PKGBUILDs/which/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/which/PKGBUILD @@ -0,0 +1,29 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Allan McRae +# (Arch Linux) Contributor: Andreas Radke + +pkgname=which +pkgver=2.20 +pkgrel=6 +pkgdesc="A utility to show the full path of commands" +arch=('i586') +url="http://www.xs4all.nl/~carlo17/which" +license=('GPL3') +groups=('base' 'base-devel') +depends=('musl' 'sh') +install=which.install +source=(http://www.xs4all.nl/~carlo17/$pkgname/$pkgname-$pkgver.tar.gz) +md5sums=('95be0501a466e515422cde4af46b2744') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install +} ADDED PKGBUILDs/which/which.install Index: PKGBUILDs/which/which.install ================================================================== --- /dev/null +++ PKGBUILDs/which/which.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(which.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} ADDED PKGBUILDs/xz/PKGBUILD Index: PKGBUILDs/xz/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/xz/PKGBUILD @@ -0,0 +1,40 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Pierre Schmitz +# (Arch Linux) Contributor: François Charette + +pkgname=xz +pkgver=5.0.5 +pkgrel=2 +pkgdesc='Library and command line tools for XZ and LZMA compressed files' +arch=('i586') +url='http://tukaani.org/xz/' +license=('GPL' 'LGPL' 'custom') +depends=('sh') +source=("http://tukaani.org/${pkgname}/${pkgname}-${pkgver}.tar.gz" + "http://tukaani.org/${pkgname}/${pkgname}-${pkgver}.tar.gz.sig") +md5sums=('19d924e066b6fff0bc9d1981b4e53196' + 'SKIP') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + ./configure --prefix=/usr \ + --disable-rpath \ + --disable-werror + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + make check +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR=${pkgdir} install + install -d -m755 ${pkgdir}/usr/share/licenses/xz/ + ln -sf /usr/share/doc/xz/COPYING ${pkgdir}/usr/share/licenses/xz/ + ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/doc/xz/COPYING.GPLv2 +} ADDED PKGBUILDs/zlib/PKGBUILD Index: PKGBUILDs/zlib/PKGBUILD ================================================================== --- /dev/null +++ PKGBUILDs/zlib/PKGBUILD @@ -0,0 +1,38 @@ +# Taken from Arch Linux +# Modified by kraileth +############################################################################### +# (Arch Linux) Maintainer: Pierre Schmitz + +pkgname=zlib +pkgver=1.2.8 +pkgrel=3 +pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP' +arch=('i586') +license=('custom') +url="http://www.zlib.net/" +depends=('musl') +options=('staticlibs') # needed by binutils testsuite +source=("http://zlib.net/current/zlib-${pkgver}.tar.gz") +md5sums=('44d667c142d7cda120332623eab69f40') + +prepare() { + cd ${srcdir}/zlib-$pkgver + grep -A 24 '^ Copyright' zlib.h > LICENSE +} + +build() { + cd ${srcdir}/zlib-$pkgver + ./configure --prefix=/usr + make +} + +check() { + cd ${srcdir}/zlib-$pkgver + make test +} + +package() { + cd ${srcdir}/zlib-$pkgver + make install DESTDIR=${pkgdir} + install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/zlib/LICENSE +}