mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-23 18:14:54 +08:00
Merge testing
This commit is contained in:
parent
06d89f22c8
commit
2e67eafa3c
@ -5,20 +5,20 @@
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
_kernver=`pacman -Q linux | cut -c7-9 | sed 's/linux //g'`-CHAKRA
|
||||
|
||||
pkgname=acpi_call
|
||||
pkgver=20110323
|
||||
pkgver=20110704
|
||||
pkgrel=1
|
||||
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
|
||||
arch=('i686' 'x86_64')
|
||||
url=("http://github.com/mkottman/acpi_call")
|
||||
license=('GPL')
|
||||
depends=('kernel26>=2.6.38' 'kernel26-headers')
|
||||
depends=('linux>=3.0' 'linux<3.1' 'linux-headers')
|
||||
makedepends=('git')
|
||||
install=acpi_call.install
|
||||
source=(http://chakra-project.org/sources/${pkgname}/${pkgname}-${pkgver}.tar.xz)
|
||||
md5sums=('974c77c6e4b8f0599072c8c05691a2d7')
|
||||
md5sums=('a178f28c458be6bc061ad9d281639c54')
|
||||
|
||||
|
||||
# create tarball: source PKGBUILD && mksource
|
||||
@ -40,7 +40,7 @@ build() {
|
||||
cd ${srcdir}/$pkgname-build
|
||||
|
||||
sed \
|
||||
-e 's/$(shell uname -r)/2.6.38-CHAKRA/g' \
|
||||
-e 's/$(shell uname -r)/3.0-CHAKRA/g' \
|
||||
-i Makefile
|
||||
make
|
||||
}
|
||||
|
@ -5,17 +5,17 @@
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
_kernver=`pacman -Q linux | cut -c7-9 | sed 's/linux //g'`-CHAKRA
|
||||
|
||||
pkgname=broadcom-wl
|
||||
pkgver=5.100.82.38
|
||||
pkgrel=4
|
||||
pkgrel=10
|
||||
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.broadcom.com/support/802.11/linux_sta.php'
|
||||
license=('custom')
|
||||
depends=('kernel26>=2.6.38rc5')
|
||||
makedepends=('kernel26-headers')
|
||||
depends=('linux>=3.0' 'linux<3.1')
|
||||
makedepends=('linux-headers')
|
||||
|
||||
[ "$CARCH" = 'x86_64' ] && ARCH=x86_64 || ARCH=x86_32
|
||||
source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz"
|
||||
@ -26,7 +26,7 @@ source=("http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver
|
||||
sha1sums=('3062830f86c5f1f41d8a4b26d6e0072dc989c7ba'
|
||||
'ea7b67982ddc0f56fd3becb9914fd4458fe7d373'
|
||||
'105f8e1d48ebe1f25d53859e5ab9326a27435c66'
|
||||
'adf0138194ae204ad70ce44e98b2dc18ead4ae2a')
|
||||
'97f2bcbbe3b9ac5d88e571fc536f5d59dbc789e1')
|
||||
[ "$CARCH" = 'x86_64' ] && sha1sums[0]='6076de3bd8206b3e7b8bfc2eadbe3a97eec4e735'
|
||||
|
||||
install=install
|
||||
@ -42,6 +42,6 @@ build() {
|
||||
|
||||
package() {
|
||||
cd "$srcdir"
|
||||
install -D -m 755 wl.ko "$pkgdir/lib/modules/`uname -r`/kernel/drivers/net/wireless/wl.ko"
|
||||
install -D -m 755 wl.ko "$pkgdir/lib/modules/$_kernver/kernel/drivers/net/wireless/wl.ko"
|
||||
install -D -m 644 lib/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
@ -1,12 +1,15 @@
|
||||
diff -aur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
|
||||
--- old/src/wl/sys/wl_linux.c 2010-12-25 18:17:33.333343048 +0100
|
||||
+++ new/src/wl/sys/wl_linux.c 2010-12-25 18:21:05.856676376 +0100
|
||||
@@ -483,7 +483,7 @@
|
||||
--- wl/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100
|
||||
+++ temp/src/wl/sys/wl_linux.c 2011-03-04 11:02:12.754753700 +0100
|
||||
@@ -482,7 +482,11 @@
|
||||
#ifdef WL_ALL_PASSIVE
|
||||
spin_lock_init(&wl->txq_lock);
|
||||
#endif
|
||||
- init_MUTEX(&wl->sem);
|
||||
+ sema_init(&wl->sem, 1);
|
||||
+ #ifndef init_MUTEX
|
||||
+ sema_init(&wl->sem,1);
|
||||
+ #else
|
||||
+ init_MUTEX(&wl->sem);
|
||||
+ #endif
|
||||
}
|
||||
|
||||
if (!(wl->wlc = wlc_attach((void *) wl, vendor, device, unit, wl->piomode,
|
||||
|
@ -31,7 +31,7 @@ if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=GNU/Linux
|
||||
OSLABEL=linux
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR}"
|
||||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
|
||||
fi
|
||||
|
||||
@ -60,12 +60,17 @@ linux_entry ()
|
||||
version="$2"
|
||||
recovery="$3"
|
||||
args="$4"
|
||||
if ${recovery} ; then
|
||||
title="$(gettext_quoted "%s" "${GRUB_DISTRIBUTOR} (recovery mode)")"
|
||||
if [ "${version}" = "linux-lts" ] ; then
|
||||
_kernel=LTS
|
||||
else
|
||||
title="$(gettext_quoted "%s" ${GRUB_DISTRIBUTOR})"
|
||||
_kernel=Standard
|
||||
fi
|
||||
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
|
||||
if ${recovery} ; then
|
||||
title="$(gettext_quoted "%s, with ${_kernel}-Kernel (recovery mode)")"
|
||||
else
|
||||
title="$(gettext_quoted "%s, with ${_kernel}-Kernel")"
|
||||
fi
|
||||
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}"
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
|
||||
# Use ELILO's generic "efifb" when it's known to be available.
|
||||
@ -102,7 +107,7 @@ EOF
|
||||
EOF
|
||||
}
|
||||
|
||||
list=`for i in /boot/vmlinu[xz]* /vmlinu[xz]* ; do
|
||||
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
done`
|
||||
prepare_boot_cache=
|
||||
@ -113,13 +118,12 @@ while [ "x$list" != "x" ] ; do
|
||||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
|
||||
base_init=`echo $basename | sed -e "s,vmlinuz,kernel,g"`
|
||||
alt_version="${base_init}-fallback"
|
||||
version=`echo $basename | sed -e "s,^[^0-9]*vmlinu[xz]-,,g"`
|
||||
alt_version="$version-fallback"
|
||||
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
|
||||
|
||||
initrd=
|
||||
for i in "${base_init}.img"; do
|
||||
for i in "initramfs-${version}.img"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
||||
@ -134,9 +138,11 @@ while [ "x$list" != "x" ] ; do
|
||||
|
||||
linux_entry "${OS}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
initrd="${alt_version}.img"
|
||||
linux_entry "${OS} (recovery mode)" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
||||
initrd="initramfs-${alt_version}.img"
|
||||
linux_entry "${OS}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
|
||||
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
|
||||
done
|
||||
|
143
burg-bzr/10_linux.in
Normal file
143
burg-bzr/10_linux.in
Normal file
@ -0,0 +1,143 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
# grub-mkconfig helper script.
|
||||
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libdir=@libdir@
|
||||
. ${libdir}/burg/burg-mkconfig_lib
|
||||
|
||||
export TEXTDOMAIN=@PACKAGE@
|
||||
export TEXTDOMAINDIR=@localedir@
|
||||
|
||||
CLASS="--class gnu-linux --class gnu --class os"
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=GNU/Linux
|
||||
OSLABEL=linux
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
|
||||
fi
|
||||
|
||||
CLASS="--class ${OSLABEL} ${CLASS}"
|
||||
export AUTH_NORMAL AUTH_RESCUE
|
||||
get_auth_option ${OSLABEL}
|
||||
|
||||
# loop-AES arranges things so that /dev/loop/X can be our root device, but
|
||||
# the initrds that Linux uses don't like that.
|
||||
case ${GRUB_DEVICE} in
|
||||
/dev/loop/*|/dev/loop[0-9])
|
||||
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
|
||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||
else
|
||||
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
|
||||
fi
|
||||
|
||||
linux_entry ()
|
||||
{
|
||||
os="$1"
|
||||
version="$2"
|
||||
recovery="$3"
|
||||
args="$4"
|
||||
if ${recovery} ; then
|
||||
title="$(gettext_quoted "%s, (recovery mode)")"
|
||||
else
|
||||
title="$(gettext_quoted "%s")"
|
||||
fi
|
||||
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
|
||||
# Use ELILO's generic "efifb" when it's known to be available.
|
||||
# FIXME: We need an interface to select vesafb in case efifb can't be used.
|
||||
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
|
||||
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
|
||||
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
|
||||
# cat << EOF
|
||||
# set gfxpayload=keep
|
||||
#EOF
|
||||
# fi
|
||||
# else
|
||||
cat << EOF
|
||||
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -z "${prepare_boot_cache}" ]; then
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||
fi
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
|
||||
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||
EOF
|
||||
if test -n "${initrd}" ; then
|
||||
cat << EOF
|
||||
echo '$(gettext_quoted "Loading initial ramdisk ...")'
|
||||
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
|
||||
EOF
|
||||
fi
|
||||
cat << EOF
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
done`
|
||||
prepare_boot_cache=
|
||||
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
echo "Found linux image: $linux" >&2
|
||||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
|
||||
alt_version="$version-fallback"
|
||||
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
|
||||
|
||||
initrd=
|
||||
for i in "initramfs-${version}.img"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${initrd}" ; then
|
||||
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
||||
else
|
||||
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||
fi
|
||||
|
||||
linux_entry "${OS}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
||||
initrd="initramfs-${alt_version}.img"
|
||||
linux_entry "${OS}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
|
||||
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
|
||||
done
|
143
burg-bzr/10_linux.in.o
Normal file
143
burg-bzr/10_linux.in.o
Normal file
@ -0,0 +1,143 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
# grub-mkconfig helper script.
|
||||
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libdir=@libdir@
|
||||
. ${libdir}/burg/burg-mkconfig_lib
|
||||
|
||||
export TEXTDOMAIN=@PACKAGE@
|
||||
export TEXTDOMAINDIR=@localedir@
|
||||
|
||||
CLASS="--class gnu-linux --class gnu --class os"
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=GNU/Linux
|
||||
OSLABEL=linux
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
|
||||
fi
|
||||
|
||||
CLASS="--class ${OSLABEL} ${CLASS}"
|
||||
export AUTH_NORMAL AUTH_RESCUE
|
||||
get_auth_option ${OSLABEL}
|
||||
|
||||
# loop-AES arranges things so that /dev/loop/X can be our root device, but
|
||||
# the initrds that Linux uses don't like that.
|
||||
case ${GRUB_DEVICE} in
|
||||
/dev/loop/*|/dev/loop[0-9])
|
||||
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
|
||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||
else
|
||||
LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
|
||||
fi
|
||||
|
||||
linux_entry ()
|
||||
{
|
||||
os="$1"
|
||||
version="$2"
|
||||
recovery="$3"
|
||||
args="$4"
|
||||
if ${recovery} ; then
|
||||
title="$(gettext_quoted "%s, (recovery mode)")"
|
||||
else
|
||||
title="$(gettext_quoted "%s")"
|
||||
fi
|
||||
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
|
||||
# Use ELILO's generic "efifb" when it's known to be available.
|
||||
# FIXME: We need an interface to select vesafb in case efifb can't be used.
|
||||
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
|
||||
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
|
||||
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
|
||||
# cat << EOF
|
||||
# set gfxpayload=keep
|
||||
#EOF
|
||||
# fi
|
||||
# else
|
||||
cat << EOF
|
||||
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -z "${prepare_boot_cache}" ]; then
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||
fi
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
|
||||
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||
EOF
|
||||
if test -n "${initrd}" ; then
|
||||
cat << EOF
|
||||
echo '$(gettext_quoted "Loading initial ramdisk ...")'
|
||||
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
|
||||
EOF
|
||||
fi
|
||||
cat << EOF
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
done`
|
||||
prepare_boot_cache=
|
||||
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
echo "Found linux image: $linux" >&2
|
||||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
|
||||
alt_version="$version-fallback"
|
||||
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
|
||||
|
||||
initrd=
|
||||
for i in "initramfs-${version}.img"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${initrd}" ; then
|
||||
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
||||
else
|
||||
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||
fi
|
||||
|
||||
linux_entry "${OS}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
||||
initrd="initramfs-${alt_version}.img"
|
||||
linux_entry "${OS}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
|
||||
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
|
||||
done
|
147
burg-bzr/10_linux.orig
Normal file
147
burg-bzr/10_linux.orig
Normal file
@ -0,0 +1,147 @@
|
||||
#! /bin/sh -e
|
||||
|
||||
# grub-mkconfig helper script.
|
||||
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# GRUB is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# GRUB is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
bindir=/bin
|
||||
libdir=${exec_prefix}/lib
|
||||
. ${libdir}/burg/burg-mkconfig_lib
|
||||
|
||||
export TEXTDOMAIN=burg
|
||||
export TEXTDOMAINDIR=${prefix}/share/locale
|
||||
|
||||
CLASS="--class gnu-linux --class gnu --class os"
|
||||
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=GNU/Linux
|
||||
OSLABEL=linux
|
||||
else
|
||||
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
OSLABEL="$(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1)"
|
||||
fi
|
||||
|
||||
CLASS="--class ${OSLABEL} ${CLASS}"
|
||||
export AUTH_NORMAL AUTH_RESCUE
|
||||
get_auth_option ${OSLABEL}
|
||||
|
||||
# loop-AES arranges things so that /dev/loop/X can be our root device, but
|
||||
# the initrds that Linux uses don't like that.
|
||||
case ${GRUB_DEVICE} in
|
||||
/dev/loop/*|/dev/loop[0-9])
|
||||
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
|
||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||
else
|
||||
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||
fi
|
||||
|
||||
linux_entry ()
|
||||
{
|
||||
os="$1"
|
||||
version="$2"
|
||||
recovery="$3"
|
||||
args="$4"
|
||||
if ${recovery} ; then
|
||||
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
|
||||
auth_option=${AUTH_RESCUE}
|
||||
else
|
||||
title="$(gettext_quoted "%s, with Linux %s")"
|
||||
auth_option=${AUTH_NORMAL}
|
||||
fi
|
||||
printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
|
||||
# Use ELILO's generic "efifb" when it's known to be available.
|
||||
# FIXME: We need an interface to select vesafb in case efifb can't be used.
|
||||
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
|
||||
# if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
|
||||
# && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
|
||||
# cat << EOF
|
||||
# set gfxpayload=keep
|
||||
#EOF
|
||||
# fi
|
||||
# else
|
||||
cat << EOF
|
||||
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ -z "${prepare_boot_cache}" ]; then
|
||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||
fi
|
||||
printf '%s\n' "${prepare_boot_cache}"
|
||||
cat << EOF
|
||||
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
|
||||
linux${GRUB_LINUX16} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||
EOF
|
||||
if test -n "${initrd}" ; then
|
||||
cat << EOF
|
||||
echo '$(gettext_quoted "Loading initial ramdisk ...")'
|
||||
initrd${GRUB_LINUX16} ${rel_dirname}/${initrd}
|
||||
EOF
|
||||
fi
|
||||
cat << EOF
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
done`
|
||||
prepare_boot_cache=
|
||||
|
||||
while [ "x$list" != "x" ] ; do
|
||||
linux=`version_find_latest $list`
|
||||
echo "Found linux image: $linux" >&2
|
||||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
|
||||
alt_version=`echo $version | sed -e "s,\.old$,,g"`
|
||||
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
|
||||
|
||||
initrd=
|
||||
for i in "initrd.img-${version}" "initrd-${version}.img" \
|
||||
"initrd-${version}" "initramfs-${version}.img" \
|
||||
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
|
||||
"initrd-${alt_version}" "initramfs-${alt_version}.img"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${initrd}" ; then
|
||||
echo "Found initrd image: ${dirname}/${initrd}" >&2
|
||||
else
|
||||
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
|
||||
linux_root_device_thisversion=${GRUB_DEVICE}
|
||||
fi
|
||||
|
||||
linux_entry "${OS}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
||||
linux_entry "${OS}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
||||
|
||||
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
|
||||
done
|
@ -6,7 +6,7 @@
|
||||
|
||||
pkgname=burg-bzr
|
||||
pkgver=1844
|
||||
pkgrel=1
|
||||
pkgrel=7
|
||||
pkgdesc="A brand-new boot loader based on GRUB."
|
||||
url="https://launchpad.net/burg"
|
||||
license="GPL3"
|
||||
@ -17,16 +17,14 @@ makedepends=('bzr')
|
||||
|
||||
changelog=burg.Changelog
|
||||
provides=('burg')
|
||||
md5sums=('f473ed24228a36d08e861279b26584e7'
|
||||
'fa7e08137c8736c0b90375f09beaa101'
|
||||
'e8735e895ebe33638b3ad3e586fee018'
|
||||
'1dff92d9973ed8eae1a9cb4e7dab842f'
|
||||
md5sums=('39a0e3f1035342d75a9eda7a65f9793f'
|
||||
'e52920e72ae3702a416a4b1a39bf370c'
|
||||
'60bdcc9a3f86deb4f1a361f3bea4ae98'
|
||||
'990eba4f3cb1808c97c2972de6957a3c'
|
||||
'06dbd97a27ce89edd49a5f974679b012')
|
||||
'460a91c0998117285decdb176ad98ee1')
|
||||
source=('burg.default'
|
||||
'arch-burg-detection-folding.patch'
|
||||
'00_header'
|
||||
'10_linux'
|
||||
'chakra-burg-detection-folding.patch'
|
||||
'resume-hook.patch'
|
||||
'20_memtest86+'
|
||||
'update-burg')
|
||||
install='burg.install'
|
||||
@ -37,6 +35,7 @@ _bzrtrunk=lp:${_bzrmod}
|
||||
|
||||
build() {
|
||||
cd $srcdir/
|
||||
export MAKEFLAGS="-j1"
|
||||
|
||||
msg "Connecting to the server...."
|
||||
if [ ! -d ./${_bzrmod} ]; then
|
||||
@ -48,9 +47,9 @@ build() {
|
||||
|
||||
|
||||
cd "${srcdir}/${_bzrmod}"
|
||||
# some random patches to facilitate automatic creation of grub.cfg
|
||||
patch -Np1 -i ${srcdir}/arch-burg-detection-folding.patch
|
||||
cd "${srcdir}/${_bzrmod}"
|
||||
# Restore to old config: use for example: burg-install /dev/sda --no-floppy
|
||||
# disable floppy probing in grub-mkdevicemap
|
||||
#sed -i 's|int floppy_disks = 1;|int floppy_disks = 0;|' ${srcdir}/${_bzrmod}/util/grub-mkdevicemap.c
|
||||
## Archlinux changed default /usr/bin/python to 3.1.2, need to use /usr/bin/python2 instead
|
||||
sed -i 's|python|python2|' ${srcdir}/${_bzrmod}/autogen.sh
|
||||
./autogen.sh || return 1
|
||||
@ -68,6 +67,10 @@ build() {
|
||||
--infodir=/usr/share/info --sysconfdir=/etc || return 1
|
||||
|
||||
make || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $srcdir/$_bzrmod-build
|
||||
make install DESTDIR=$pkgdir || return 1
|
||||
|
||||
# install /etc/default/burg(needed config file)
|
||||
@ -76,5 +79,9 @@ build() {
|
||||
install -Dm755 ${srcdir}/update-burg ${pkgdir}/sbin/update-burg
|
||||
# install memtest config detection
|
||||
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/burg.d/20_memtest86+
|
||||
cd ${pkgdir}
|
||||
patch -Np0 -i ${srcdir}/chakra-burg-detection-folding.patch
|
||||
cd ${pkgdir}/sbin
|
||||
patch -Np0 -i ${srcdir}/resume-hook.patch
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# If you change this file, run 'burg-mkconfig -o /boot/burg/burg.cfg' afterwards to update
|
||||
# /boot/burg/burg.cfg.
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_DEFAULT=saved
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Chakra`
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||
|
@ -1,14 +1,42 @@
|
||||
delete_symlinks() {
|
||||
if [ `readlink /boot/kernel26.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26.img
|
||||
fi
|
||||
if [ `readlink /boot/kernel26-lts.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26-lts.img
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26-lts` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26-lts
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
||||
echo -e "\033[0;31m IMPORTANT"
|
||||
echo -e "\033[0;0m Run \033[0;32m 'burg-install /dev/sda' \033[0;0m as root for installing in MBR"
|
||||
echo -e "\033[0;0m Run \033[0;32m 'burg-install /dev/sda --no-floppy' \033[0;0m as root for installing in MBR"
|
||||
echo -e "\033[0;0m Run \033[0;32m 'burg-mkconfig -o /boot/burg/burg.cfg' \033[0;0m as root for generating burg.cfg"
|
||||
echo -e "\033[0;0m Also you can run \033[0;32m 'update-burg' \033[0;0m as root for generating burg.cfg"
|
||||
delete_symlinks
|
||||
}
|
||||
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
if [ -f /boot/burg/burg.cfg ]
|
||||
then
|
||||
update-burg
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
61
burg-bzr/chakra-burg-detection-folding.patch
Normal file
61
burg-bzr/chakra-burg-detection-folding.patch
Normal file
@ -0,0 +1,61 @@
|
||||
--- etc/burg.d/10_linux.orig 2010-11-01 14:41:38.000000000 -0600
|
||||
+++ etc/burg.d/10_linux 2010-11-01 15:54:26.796667850 -0600
|
||||
@@ -51,7 +51,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [
|
||||
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
|
||||
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
|
||||
else
|
||||
- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||
+ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
|
||||
fi
|
||||
|
||||
linux_entry ()
|
||||
@@ -60,14 +60,17 @@ linux_entry ()
|
||||
version="$2"
|
||||
recovery="$3"
|
||||
args="$4"
|
||||
+ if [ "${version}" = "linux-lts" ] ; then
|
||||
+ _kernel=LTS
|
||||
+ else
|
||||
+ _kernel=Standard
|
||||
+ fi
|
||||
if ${recovery} ; then
|
||||
- title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
|
||||
- auth_option=${AUTH_RESCUE}
|
||||
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel (recovery mode)")"
|
||||
else
|
||||
- title="$(gettext_quoted "%s, with Linux %s")"
|
||||
- auth_option=${AUTH_NORMAL}
|
||||
+ title="$(gettext_quoted "%s, with ${_kernel}-Kernel")"
|
||||
fi
|
||||
- printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}" "${version}"
|
||||
+ printf "menuentry '${title}' ${CLASS} --group group_main ${auth_option}{\n" "${os}"
|
||||
save_default_entry | sed -e "s/^/\t/"
|
||||
|
||||
# Use ELILO's generic "efifb" when it's known to be available.
|
||||
@@ -115,15 +118,12 @@ while [ "x$list" != "x" ] ; do
|
||||
basename=`basename $linux`
|
||||
dirname=`dirname $linux`
|
||||
rel_dirname=`make_system_path_relative_to_its_root $dirname`
|
||||
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
|
||||
- alt_version=`echo $version | sed -e "s,\.old$,,g"`
|
||||
+ version=`echo $basename | sed -e "s,^[^0-9]*vmlinu[xz]-,,g"`
|
||||
+ alt_version="$version-fallback"
|
||||
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
|
||||
|
||||
initrd=
|
||||
- for i in "initrd.img-${version}" "initrd-${version}.img" \
|
||||
- "initrd-${version}" "initramfs-${version}.img" \
|
||||
- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
|
||||
- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
|
||||
+ for i in "initramfs-${version}.img"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
||||
@@ -139,6 +139,7 @@ while [ "x$list" != "x" ] ; do
|
||||
linux_entry "${OS}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
||||
+ initrd="initramfs-${alt_version}.img"
|
||||
linux_entry "${OS}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
fi
|
47
burg-bzr/resume-hook.patch
Normal file
47
burg-bzr/resume-hook.patch
Normal file
@ -0,0 +1,47 @@
|
||||
--- burg-mkconfig~ 2011-05-23 15:40:01.000000000 +0200
|
||||
+++ burg-mkconfig 2011-05-23 15:40:01.000000000 +0200
|
||||
@@ -29,6 +29,7 @@ datarootdir=${prefix}/share
|
||||
datadir=${datarootdir}
|
||||
pkgdatadir=${datadir}/`echo burg | sed "${transform}"`
|
||||
grub_cfg=""
|
||||
+resume_hook=1
|
||||
grub_mkconfig_dir=${sysconfdir}/burg.d
|
||||
|
||||
grub_mkdevicemap=${sbindir}/`echo burg-mkdevicemap | sed ${transform}`
|
||||
@@ -44,6 +45,7 @@ Generate a grub config file
|
||||
-o, --output=FILE output generated config to FILE [default=stdout]
|
||||
-h, --help print this message and exit
|
||||
-v, --version print the version information and exit
|
||||
+ -s, --skip-resume disable resume hook setup
|
||||
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
EOF
|
||||
@@ -65,6 +67,9 @@ for option in "$@"; do
|
||||
--output=*)
|
||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||
;;
|
||||
+ -s | --skip-resume)
|
||||
+ resume_hook=0
|
||||
+ ;;
|
||||
-*)
|
||||
echo "Unrecognized option \`$option'" 1>&2
|
||||
usage
|
||||
@@ -305,6 +310,18 @@ for i in ${grub_mkconfig_dir}/* ; do
|
||||
esac
|
||||
done
|
||||
|
||||
+if [ "${resume_hook}" == 1 ]; then
|
||||
+ echo "Setup resume hook" >&2
|
||||
+ SWAP=`swapon -a | cat /proc/swaps | grep /dev | cut -d" " -f1`
|
||||
+ if [ -z "${SWAP}" ]; then
|
||||
+ echo "No swap partition found. Create one to enable hibernation..." >&2
|
||||
+ else
|
||||
+ echo "Adding swap partition $SWAP" >&2
|
||||
+ SWAPUUID=`blkid $SWAP -s UUID -o value`
|
||||
+ sed -i -e "s~root=/dev~resume=/dev/disk/by-uuid/${SWAPUUID} root=/dev~g" ${grub_cfg}.new
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
if test "x${grub_cfg}" != "x" ; then
|
||||
# none of the children aborted with error, install the new grub.cfg
|
||||
mv -f ${grub_cfg}.new ${grub_cfg}
|
@ -1,2 +1,31 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# do UID checking here so someone can at least get usage instructions
|
||||
if [ "$EUID" != "0" ]; then
|
||||
echo "error: This script must be run as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ `readlink /boot/kernel26.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26.img
|
||||
fi
|
||||
if [ `readlink /boot/kernel26-lts.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26-lts.img
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26-lts` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26-lts
|
||||
fi
|
||||
|
||||
echo "Updating /boot/burg/burg.cfg"
|
||||
exec burg-mkconfig -o /boot/burg/burg.cfg "$@"
|
||||
|
48
chakra-live/PKGBUILD
Normal file
48
chakra-live/PKGBUILD
Normal file
@ -0,0 +1,48 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgbase=chakra-live
|
||||
pkgname=('chakra-live' 'chakra-live-profiles')
|
||||
pkgver=2011.04
|
||||
pkgrel=2
|
||||
arch=('any')
|
||||
url="https://gitorious.org/chakra/chakra-live"
|
||||
license=('GPL')
|
||||
makedepends=('git')
|
||||
provides=()
|
||||
conflicts=()
|
||||
source=(http://chakra-project.org/sources/${pkgname}/${pkgname}-${pkgver}-${pkgrel}.tar.xz)
|
||||
md5sums=(8d778c291e2e76d652a0744447fec455)
|
||||
|
||||
# create tarball: source PKGBUILD && mksource
|
||||
|
||||
mksource() {
|
||||
rm -vRf ${pkgname}
|
||||
git clone git://gitorious.org/chakra/${pkgname}.git
|
||||
rm -vRf ${pkgname}/.git
|
||||
pushd ${pkgname}
|
||||
popd
|
||||
tar -cvJf ${pkgname}-${pkgver}-${pkgrel}.tar.xz ${pkgname}/*
|
||||
md5sum ${pkgname}-${pkgver}-${pkgrel}.tar.xz
|
||||
}
|
||||
|
||||
package_chakra-live() {
|
||||
pkgdesc="Chakra GNU/Linux livecd/liveusb generation scripts"
|
||||
depends=('mkinitcpio' 'mkinitcpio-nfs-utils' 'nbd' 'cdrkit' 'squashfs-tools' 'syslinux')
|
||||
optdepends=('qemu: quickly test isos' 'chakra-live-profiles: Chakra GNU/Linux ISO-Image profiles')
|
||||
cd ${srcdir}/${pkgbase}/chakra-iso
|
||||
sed -ie s'~install -d -m 755 $(DESTDIR)/usr/share/chakraiso/~~'g Makefile
|
||||
sed -ie s'~cp -r ../configs $(DESTDIR)/usr/share/chakraiso/configs~~'g Makefile
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
package_chakra-live-profiles() {
|
||||
pkgdesc="Chakra-Live Profiles"
|
||||
depends=('chakra-live')
|
||||
cd ${srcdir}/${pkgbase}/
|
||||
mkdir -p $pkgdir/usr/share/chakraiso/
|
||||
cp -r configs $pkgdir/usr/share/chakraiso/configs
|
||||
}
|
6
grub2/05_archtheme
Normal file
6
grub2/05_archtheme
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
cat << EOF
|
||||
set menu_color_normal=light-blue/black
|
||||
set menu_color_highlight=light-cyan/blue
|
||||
EOF
|
251
grub2/PKGBUILD
251
grub2/PKGBUILD
@ -1,82 +1,207 @@
|
||||
#
|
||||
# Core Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
# Maintainer: Ronald van Haren <ronald.chakra.org>
|
||||
# Contributor: Keshav P R <skodabenz at rocketmail dot com>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
# The src pkg includes grub2_bzr_export.sh to create newer grub-extras snapshots. Modify the paths in it accordingly.
|
||||
|
||||
pkgname=grub2
|
||||
pkgver=1.98
|
||||
pkgrel=1
|
||||
pkgdesc="The GNU GRand Unified Bootloader"
|
||||
# _grub2_rev=3238
|
||||
|
||||
_grub2_lua_ver=20
|
||||
_grub2_gpxe_ver=12
|
||||
_grub2_ntldr_ver=17
|
||||
_grub2_915_ver=7
|
||||
|
||||
pkgname=('grub2-common' 'grub2-bios' 'grub2-efi-i386')
|
||||
pkgbase="grub2"
|
||||
pkgver='1.99'
|
||||
pkgrel=3
|
||||
url="http://www.gnu.org/software/grub/"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL3')
|
||||
depends=('sh' 'lzo2' 'freetype2')
|
||||
optdepends=('ruby:usr/share/grub/genmk.rb script' 'libusb: /sbin/grub-emu' 'gettext: /sbin/grub-mkconfig')
|
||||
makedepends=('bdf-unifont' 'ruby')
|
||||
backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
|
||||
conflicts=('grub')
|
||||
provides=('grub')
|
||||
source=(ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz
|
||||
'chakralinux-script-fixes.patch'
|
||||
'gfxmenu-dependencies.patch'
|
||||
'menucolors-in-mkconfig.patch'
|
||||
'background-image-in-mkconfig.patch'
|
||||
'hidden-timeout-fix.patch'
|
||||
'grub.default'
|
||||
'grub.cfg'
|
||||
'20_memtest86+'
|
||||
'lvm-detection.patch')
|
||||
epoch=1
|
||||
makedepends=('bdf-unifont' 'python2' 'xz' 'autogen' 'texinfo' 'help2man' 'gettext' 'device-mapper')
|
||||
options=(strip purge docs zipman !emptydirs)
|
||||
|
||||
md5sums=('c0bcf60e524739bb64e3a2d4e3732a59'
|
||||
'0910da120700a6928cd0290211acc79f'
|
||||
'897f8af2fc83fcdaf7329da39f06d3dc'
|
||||
'00ae9ff8991b8f00ab90739859af2921'
|
||||
'fa14d3feabe17ac11dd3163501a66155'
|
||||
'81bcdf26aa01b08b9925d72cbc4c3dab'
|
||||
'6cdfe6bbe7e8fd0d6079d404d810f1bd'
|
||||
'43cf74b91918e3bdec6dee0acc1c7032'
|
||||
'5a07e04c4ecb8ed145d54fec3043e0d5'
|
||||
'60b0157ed87041541ad0f62e3c7c0577')
|
||||
# "http://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
|
||||
source=("ftp://ftp.gnu.org/gnu/grub/grub-1.99.tar.xz"
|
||||
"ftp://http://chakra-project.org/sources/grub2/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
|
||||
"ftp://http://chakra-project.org/sources/grub2/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
|
||||
"ftp://http://chakra-project.org/sources/grub2/grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
|
||||
"ftp://http://chakra-project.org/sources/grub2/grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz"
|
||||
'chakra_grub2_mkconfig_fixes.patch'
|
||||
'grub.default'
|
||||
'grub.cfg'
|
||||
'20_memtest86+'
|
||||
'grub2_bzr_export.sh'
|
||||
'update-grub')
|
||||
|
||||
noextract=("grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
|
||||
"grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
|
||||
"grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
|
||||
"grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz")
|
||||
|
||||
sha1sums=('a5ae9558f30ce7757a76aa130088b053a87e2fb6'
|
||||
'd21ca5033f7069cbb36934cdb71f57a1c7829234'
|
||||
'6c58eee654fa4eb7f057275b330710ffd4a9e989'
|
||||
'0e50955141a45918fcf56f3a5e15fb477f0448a7'
|
||||
'f2a5f1d5b75bd3286b63aefaf5e6553aa03e772b'
|
||||
'b7e5510c7b171e9c4dbddb42bbf54ce5ee86e2de'
|
||||
'e1477db3700b27b5e5ad3d8fa43028555204759b'
|
||||
'8948d89537c12a4202df7c001e65a77030bbe5a3'
|
||||
'82a27eca5277218cf57c6c5767e0b17a72f62229'
|
||||
'beb31419045db70fee7401aa6448c220a491e2a3'
|
||||
'5770fbb559b1f463e1a735a1463d24af489bcc3e')
|
||||
|
||||
build() {
|
||||
cd $srcdir/grub-${pkgver}
|
||||
# set architecture dependent variables
|
||||
if [ "${CARCH}" = "x86_64" ] ; then
|
||||
_EFIEMU="--enable-efiemu"
|
||||
else
|
||||
_EFIEMU="--disable-efiemu"
|
||||
fi
|
||||
_HOST="${CARCH}"
|
||||
|
||||
# some random patches to facilitate automatic creation of grub.cfg
|
||||
patch -Np1 -i ${srcdir}/chakralinux-script-fixes.patch
|
||||
patch -Np1 -i ${srcdir}/gfxmenu-dependencies.patch
|
||||
patch -Np1 -i ${srcdir}/menucolors-in-mkconfig.patch
|
||||
patch -Np1 -i ${srcdir}/background-image-in-mkconfig.patch
|
||||
patch -Np1 -i ${srcdir}/hidden-timeout-fix.patch
|
||||
# fix lvm symlink detection
|
||||
patch -Np0 -i ${srcdir}/lvm-detection.patch
|
||||
# run autogen.sh to create configure files
|
||||
./autogen.sh
|
||||
build_grub2-common_and_bios
|
||||
build_grub2-efi
|
||||
}
|
||||
|
||||
# fix unifont.bdf location
|
||||
sed -i 's|/usr/src/unifont.bdf|/usr/share/fonts/misc/unifont.bdf|' configure
|
||||
build_grub2-common_and_bios() {
|
||||
# copy the source for building the common/bios package
|
||||
cp -r ${srcdir}/grub-${pkgver} ${srcdir}/grub2_bios-${pkgver}
|
||||
|
||||
CFLAGS= ./configure --prefix=/usr --enable-grub-mkfont --bindir=/bin \
|
||||
## Apply Archlinux specific fixes to enable grub2-mkconfig detect Arch kernels and initramfs
|
||||
cd ${srcdir}/grub2_bios-${pkgver}
|
||||
patch -Np1 -i ${srcdir}/chakra_grub2_mkconfig_fixes.patch
|
||||
|
||||
# add the grub-extra sources
|
||||
export GRUB_CONTRIB=${srcdir}/grub2_bios-${pkgver}/grub2-extras/
|
||||
install -d ${srcdir}/grub2_bios-${pkgver}/grub2-extras
|
||||
bsdtar xf ${srcdir}/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz \
|
||||
-C ${srcdir}/grub2_bios-${pkgver}/grub2-extras
|
||||
bsdtar xf ${srcdir}/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz \
|
||||
-C ${srcdir}/grub2_bios-${pkgver}/grub2-extras
|
||||
bsdtar xf ${srcdir}/grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz \
|
||||
-C ${srcdir}/grub2_bios-${pkgver}/grub2-extras
|
||||
bsdtar xf ${srcdir}/grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz \
|
||||
-C ${srcdir}/grub2_bios-${pkgver}/grub2-extras
|
||||
|
||||
## Need to use python2
|
||||
sed -i 's|python|python2|' ${srcdir}/grub2_bios-${pkgver}/autogen.sh
|
||||
|
||||
# start the actual build process
|
||||
cd ${srcdir}/grub2_bios-${pkgver}
|
||||
./autogen.sh
|
||||
|
||||
## fix unifont.bdf location so grub-mkfont can create *.pf2 files
|
||||
sed -i 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|' ${srcdir}/grub2_bios-${pkgver}/configure
|
||||
|
||||
# mkdir ${srcdir}/grub2_bios-${pkgver}/BUILD_BIOS
|
||||
# cd ${srcdir}/grub2_bios-${pkgver}/BUILD_BIOS
|
||||
|
||||
CFLAGS="" ./configure \
|
||||
--with-platform=pc --enable-mm-debug \
|
||||
${_EFIEMU} --host=${CARCH}-unknown-linux-gnu \
|
||||
--enable-grub-mkfont --prefix=/usr \
|
||||
--bindir=/bin --sbindir=/sbin \
|
||||
--mandir=/usr/share/man --infodir=/usr/share/info \
|
||||
--sysconfdir=/etc --enable-nls \
|
||||
--program-transform-name=s,grub,grub,
|
||||
CFLAGS="" make
|
||||
}
|
||||
|
||||
build_grub2-efi() {
|
||||
# copy the source for building the efi package
|
||||
cp -r ${srcdir}/grub-${pkgver} ${srcdir}/grub2_efi-${pkgver}
|
||||
|
||||
# add the grub-extra sources
|
||||
export GRUB_CONTRIB=${srcdir}/grub2_efi-${pkgver}/grub2-extras/
|
||||
install -d ${srcdir}/grub2_efi-${pkgver}/grub2-extras
|
||||
bsdtar xf ${srcdir}/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz \
|
||||
-C ${srcdir}/grub2_efi-${pkgver}/grub2-extras
|
||||
bsdtar xf ${srcdir}/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz \
|
||||
-C ${srcdir}/grub2_efi-${pkgver}/grub2-extras
|
||||
|
||||
## Need to use python2
|
||||
sed -i 's|python|python2|' ${srcdir}/grub2_efi-${pkgver}/autogen.sh
|
||||
|
||||
# start the actual build process
|
||||
cd ${srcdir}/grub2_efi-${pkgver}
|
||||
./autogen.sh
|
||||
|
||||
CFLAGS="" ./configure \
|
||||
--with-platform=efi --target=i386 \
|
||||
--enable-mm-debug --disable-efiemu \
|
||||
--host=${CARCH}-unknown-linux-gnu \
|
||||
--prefix=/usr --bindir=/bin \
|
||||
--sbindir=/sbin --mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info --sysconfdir=/etc
|
||||
|
||||
CFLAGS= make
|
||||
--infodir=/usr/share/info --sysconfdir=/etc \
|
||||
--enable-nls --program-transform-name=s,grub,grub,
|
||||
CFLAGS="" make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $srcdir/grub-${pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
package_grub2-common() {
|
||||
pkgdesc="The GNU GRand Unified Bootloader version 2 - Files common for all platforms"
|
||||
install="grub2.install"
|
||||
depends=('xz' 'freetype2' 'device-mapper' 'gettext' 'texinfo')
|
||||
conflicts=('grub')
|
||||
backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
|
||||
cd ${srcdir}/grub2_bios-${pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
# install /etc/default/grub
|
||||
install -Dm644 ${srcdir}/grub.default ${pkgdir}/etc/default/grub
|
||||
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_bios-install
|
||||
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_efi_x86_64-install
|
||||
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_efi_i386-install
|
||||
# install update-burg script
|
||||
install -Dm755 ${srcdir}/update-grub ${pkgdir}/sbin/update-grub
|
||||
|
||||
# install grub.cfg (needed so it doesn't get removed on upgrading because it was previously here)
|
||||
install -Dm644 ${srcdir}/grub.cfg ${pkgdir}/boot/grub/grub.cfg
|
||||
sed -i "s|^\(target_cpu\)=.*|\1=i386|; \
|
||||
s|^\(platform\)=.*|\1=pc|" \
|
||||
${pkgdir}/sbin/grub_bios-install
|
||||
|
||||
# install memtest config detection
|
||||
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
|
||||
sed -i "s|^\(target_cpu\)=.*|\1=x86_64|; \
|
||||
s|^\(platform\)=.*|\1=efi|" \
|
||||
${pkgdir}/sbin/grub_efi_x86_64-install
|
||||
|
||||
sed -i "s|^\(target_cpu\)=.*|\1=i386|; \
|
||||
s|^\(platform\)=.*|\1=efi|" \
|
||||
${pkgdir}/sbin/grub_efi_i386-install
|
||||
|
||||
## install extra /etc/grub.d/ files
|
||||
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
|
||||
|
||||
## install /etc/default/grub (used by grub-mkconfig)
|
||||
install -Dm644 ${srcdir}/grub.default ${pkgdir}/etc/default/grub
|
||||
|
||||
## install grub.cfg (needed so it doesn't get removed on upgrading because it was previously here)
|
||||
install -Dm644 ${srcdir}/grub.cfg ${pkgdir}/boot/grub/grub.cfg
|
||||
|
||||
# remove platform specific files
|
||||
rm -rf ${pkgdir}/usr/lib/grub/i386-pc/
|
||||
}
|
||||
|
||||
package_grub2-bios() {
|
||||
pkgdesc="The GNU GRand Unified Bootloader version 2 - Built for PC BIOS"
|
||||
depends=(grub2-common=${epoch}:${pkgver})
|
||||
replaces=('grub2')
|
||||
provides=('grub2')
|
||||
|
||||
cd ${srcdir}/grub2_bios-${pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
## remove non platform-specific files
|
||||
rm -rf ${pkgdir}/{boot,bin,sbin,etc,usr/share}
|
||||
rm ${pkgdir}/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
|
||||
}
|
||||
|
||||
package_grub2-efi-i386() {
|
||||
|
||||
pkgdesc="The GNU GRand Unified Bootloader version 2 - i386 UEFI version"
|
||||
depends=("grub2-common=${epoch}:${pkgver}" 'dosfstools' 'efibootmgr')
|
||||
optdepends=('mtools')
|
||||
|
||||
cd ${srcdir}/grub2_efi-${pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
## remove non platform-specific files
|
||||
rm -rf ${pkgdir}/{boot,bin,sbin,etc,usr/share}
|
||||
rm ${pkgdir}/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
|
||||
}
|
||||
|
90
grub2/chakra_grub2_mkconfig_fixes.patch
Executable file
90
grub2/chakra_grub2_mkconfig_fixes.patch
Executable file
@ -0,0 +1,90 @@
|
||||
diff -Nur a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
--- a/util/grub.d/00_header.in 2011-04-06 13:14:27.000000000 +0200
|
||||
+++ b/util/grub.d/00_header.in 2011-08-01 15:19:57.919100452 +0200
|
||||
@@ -100,6 +100,14 @@
|
||||
|
||||
EOF
|
||||
|
||||
+if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
|
||||
+ cat << EOF
|
||||
+set menu_color_normal=$GRUB_COLOR_NORMAL
|
||||
+set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
|
||||
+
|
||||
+EOF
|
||||
+fi
|
||||
+
|
||||
serial=0;
|
||||
gfxterm=0;
|
||||
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
|
||||
diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||||
--- a/util/grub.d/10_linux.in 2011-05-14 22:36:49.000000000 +0200
|
||||
+++ b/util/grub.d/10_linux.in 2011-08-01 15:56:53.324779083 +0200
|
||||
@@ -31,8 +31,8 @@
|
||||
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
|
||||
OS=GNU/Linux
|
||||
else
|
||||
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
|
||||
- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
|
||||
+ OS="${GRUB_DISTRIBUTOR}"
|
||||
+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | tr -d ' ') ${CLASS}"
|
||||
fi
|
||||
|
||||
# loop-AES arranges things so that /dev/loop/X can be our root device, but
|
||||
@@ -65,7 +65,9 @@
|
||||
version="$2"
|
||||
recovery="$3"
|
||||
args="$4"
|
||||
- if ${recovery} ; then
|
||||
+ if [ -n "$5" ] ; then
|
||||
+ title="$(gettext_quoted "%s, with Linux %s") $5"
|
||||
+ elif ${recovery} ; then
|
||||
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
|
||||
else
|
||||
title="$(gettext_quoted "%s, with Linux %s")"
|
||||
@@ -132,7 +134,7 @@
|
||||
|
||||
case x`uname -m` in
|
||||
xi?86 | xx86_64)
|
||||
- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
|
||||
+ list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* ; do
|
||||
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
|
||||
done` ;;
|
||||
*)
|
||||
@@ -160,7 +162,8 @@
|
||||
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
|
||||
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
|
||||
"initramfs-genkernel-${version}" \
|
||||
- "initramfs-genkernel-${alt_version}"; do
|
||||
+ "initramfs-genkernel-${alt_version}" \
|
||||
+ "${basename/vmlinuz/kernel}.img"; do
|
||||
if test -e "${dirname}/${i}" ; then
|
||||
initrd="$i"
|
||||
break
|
||||
@@ -190,6 +193,15 @@
|
||||
|
||||
linux_entry "${OS}" "${version}" false \
|
||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||
+ for i in "initramfs-${version}-fallback.img" \
|
||||
+ "${basename/vmlinuz/kernel}-fallback.img"; do
|
||||
+ if test -e "${dirname}/${i}"; then
|
||||
+ initrd="$i"
|
||||
+ linux_entry "${OS}" "${version}" true \
|
||||
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" Fallback
|
||||
+ break
|
||||
+ fi
|
||||
+ done
|
||||
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||
linux_entry "${OS}" "${version}" true \
|
||||
"single ${GRUB_CMDLINE_LINUX}"
|
||||
diff -Nur a/util/grub-mkconfig.in b/util/grub-mkconfig.in
|
||||
--- a/util/grub-mkconfig.in 2011-04-06 17:45:53.000000000 +0200
|
||||
+++ b/util/grub-mkconfig.in 2011-08-01 15:20:49.256867648 +0200
|
||||
@@ -252,6 +252,8 @@
|
||||
GRUB_THEME \
|
||||
GRUB_GFXPAYLOAD_LINUX \
|
||||
GRUB_DISABLE_OS_PROBER \
|
||||
+ GRUB_COLOR_NORMAL \
|
||||
+ GRUB_COLOR_HIGHLIGHT \
|
||||
GRUB_INIT_TUNE \
|
||||
GRUB_SAVEDEFAULT \
|
||||
GRUB_BADRAM
|
13
grub2/fix_stack_pointer_handling_16_relocator.patch
Executable file
13
grub2/fix_stack_pointer_handling_16_relocator.patch
Executable file
@ -0,0 +1,13 @@
|
||||
diff --git a/grub-core/lib/i386/relocator16.S b/grub-core/lib/i386/relocator16.S
|
||||
index c3768f4..982415d 100644
|
||||
--- a/grub-core/lib/i386/relocator16.S
|
||||
+++ b/grub-core/lib/i386/relocator16.S
|
||||
@@ -130,7 +130,7 @@ VARIABLE(grub_relocator16_ss)
|
||||
.byte 0xb8
|
||||
VARIABLE(grub_relocator16_sp)
|
||||
.word 0
|
||||
- movw %ax, %ss
|
||||
+ movzwl %ax, %esp
|
||||
|
||||
/* movw imm32, %edx. */
|
||||
.byte 0x66, 0xba
|
153
grub2/grub.cfg
153
grub2/grub.cfg
@ -1,32 +1,135 @@
|
||||
# Config file for GRUB2 - The GNU GRand Unified Bootloader
|
||||
# /boot/grub/grub.cfg
|
||||
|
||||
# DEVICE NAME CONVERSIONS
|
||||
#
|
||||
# Linux Grub
|
||||
# -------------------------
|
||||
# /dev/fd0 (fd0)
|
||||
# /dev/sda (hd0)
|
||||
# /dev/sdb2 (hd1,2)
|
||||
# /dev/sda3 (hd0,3)
|
||||
# DO NOT EDIT THIS FILE
|
||||
#
|
||||
# It is automatically generated by grub-mkconfig using templates
|
||||
# from /etc/grub.d and settings from /etc/default/grub
|
||||
#
|
||||
|
||||
# Timeout for menu
|
||||
set timeout=5
|
||||
### BEGIN /etc/grub.d/00_header ###
|
||||
insmod part_gpt
|
||||
insmod part_msdos
|
||||
if [ -s $prefix/grubenv ]; then
|
||||
load_env
|
||||
fi
|
||||
set default="0"
|
||||
if [ "${prev_saved_entry}" ]; then
|
||||
set saved_entry="${prev_saved_entry}"
|
||||
save_env saved_entry
|
||||
set prev_saved_entry=
|
||||
save_env prev_saved_entry
|
||||
set boot_once=true
|
||||
fi
|
||||
|
||||
# Set default boot entry as Entry 0
|
||||
set default=0
|
||||
|
||||
# (0) Chakra Linux
|
||||
menuentry "Chakra Linux" {
|
||||
set root=(hd0,1)
|
||||
linux /vmlinuz26 root=/dev/sda1 ro
|
||||
initrd /kernel26.img
|
||||
function savedefault {
|
||||
if [ -z "${boot_once}" ]; then
|
||||
saved_entry="${chosen}"
|
||||
save_env saved_entry
|
||||
fi
|
||||
}
|
||||
|
||||
## (1) Windows
|
||||
#menuentry "Windows" {
|
||||
#set root=(hd0,3)
|
||||
#chainloader +1
|
||||
#}
|
||||
function load_video {
|
||||
insmod vbe
|
||||
insmod vga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
}
|
||||
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
if loadfont /usr/share/grub/unicode.pf2 ; then
|
||||
set gfxmode=auto
|
||||
load_video
|
||||
insmod gfxterm
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
set locale_dir=($root)/boot/grub/locale
|
||||
set lang=en_US
|
||||
insmod gettext
|
||||
fi
|
||||
terminal_input console
|
||||
terminal_output gfxterm
|
||||
set timeout=5
|
||||
### END /etc/grub.d/00_header ###
|
||||
|
||||
### BEGIN /etc/grub.d/10_linux ###
|
||||
menuentry 'Arch Linux, with Linux vmlinuz26-lts' --class archlinux --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
echo 'Loading Linux vmlinuz26-lts ...'
|
||||
linux /boot/vmlinuz26-lts root=/dev/disk/by-uuid/fb70f55b-e58a-4ac6-af45-19d19cc24d60 ro quiet
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /boot/kernel26-lts.img
|
||||
}
|
||||
menuentry 'Arch Linux, with Linux vmlinuz26-lts Fallback' --class archlinux --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
echo 'Loading Linux vmlinuz26-lts ...Loading Linux Fallback ...'
|
||||
linux /boot/vmlinuz26-lts root=/dev/disk/by-uuid/fb70f55b-e58a-4ac6-af45-19d19cc24d60 ro quiet
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /boot/kernel26-lts-fallback.img
|
||||
}
|
||||
menuentry 'Arch Linux, with Linux vmlinuz26' --class archlinux --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
echo 'Loading Linux vmlinuz26 ...'
|
||||
linux /boot/vmlinuz26 root=/dev/disk/by-uuid/fb70f55b-e58a-4ac6-af45-19d19cc24d60 ro quiet
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /boot/kernel26.img
|
||||
}
|
||||
menuentry 'Arch Linux, with Linux vmlinuz26 Fallback' --class archlinux --class gnu-linux --class gnu --class os {
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
echo 'Loading Linux vmlinuz26 ...Loading Linux Fallback ...'
|
||||
linux /boot/vmlinuz26 root=/dev/disk/by-uuid/fb70f55b-e58a-4ac6-af45-19d19cc24d60 ro quiet
|
||||
echo 'Loading initial ramdisk ...'
|
||||
initrd /boot/kernel26-fallback.img
|
||||
}
|
||||
### END /etc/grub.d/10_linux ###
|
||||
|
||||
### BEGIN /etc/grub.d/20_linux_xen ###
|
||||
### END /etc/grub.d/20_linux_xen ###
|
||||
|
||||
### BEGIN /etc/grub.d/20_memtest86+ ###
|
||||
menuentry "Memory test (memtest86+)" --class memtest86 --class gnu --class tool {
|
||||
insmod part_msdos
|
||||
insmod ext2
|
||||
set root='(hd0,msdos3)'
|
||||
search --no-floppy --fs-uuid --set=root fb70f55b-e58a-4ac6-af45-19d19cc24d60
|
||||
linux16 ($root)/boot/memtest86+/memtest.bin
|
||||
}
|
||||
### END /etc/grub.d/20_memtest86+ ###
|
||||
|
||||
### BEGIN /etc/grub.d/30_os-prober ###
|
||||
### END /etc/grub.d/30_os-prober ###
|
||||
|
||||
### BEGIN /etc/grub.d/40_custom ###
|
||||
# This file provides an easy way to add custom menu entries. Simply type the
|
||||
# menu entries you want to add after this comment. Be careful not to change
|
||||
# the 'exec tail' line above.
|
||||
### END /etc/grub.d/40_custom ###
|
||||
|
||||
### BEGIN /etc/grub.d/41_custom ###
|
||||
if [ -f $prefix/custom.cfg ]; then
|
||||
source $prefix/custom.cfg;
|
||||
fi
|
||||
### END /etc/grub.d/41_custom ###
|
||||
|
@ -1,33 +1,36 @@
|
||||
# If you change this file, run 'update-grub' afterwards to update
|
||||
# /boot/grub/grub.cfg.
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR="Chakra Linux"
|
||||
GRUB_DISTRIBUTOR="Arch Linux"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
|
||||
# Preload both GPT and MBR modules so that they are not missed
|
||||
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
|
||||
|
||||
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
|
||||
#GRUB_HIDDEN_TIMEOUT=5
|
||||
#GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||
|
||||
# Uncomment to use basic console
|
||||
GRUB_TERMINAL_INPUT=console
|
||||
|
||||
# Uncomment to disable graphical terminal
|
||||
#GRUB_TERMINAL=console
|
||||
#GRUB_TERMINAL_OUTPUT=console
|
||||
|
||||
# The resolution used on graphical terminal
|
||||
# note that you can use only modes which your graphic card supports via VBE
|
||||
# you can see them in real GRUB with the command `vbeinfo'
|
||||
#GRUB_GFXMODE=1024x768x24
|
||||
GRUB_GFXMODE=auto
|
||||
|
||||
# Uncomment to allow the kernel use the same resolution used by grub
|
||||
#GRUB_GFXPAYLOAD_LINUX=keep
|
||||
GRUB_GFXPAYLOAD_LINUX=keep
|
||||
|
||||
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
|
||||
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
|
||||
# Uncomment to disable generation of recovery mode menu entries
|
||||
#GRUB_DISABLE_LINUX_RECOVERY="true"
|
||||
GRUB_DISABLE_RECOVERY=true
|
||||
|
||||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
||||
# modes only. Entries specified as foreground/background.
|
||||
|
@ -1,17 +1,67 @@
|
||||
post_install() {
|
||||
echo -n "Generating grub.cfg.example config file... "
|
||||
grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
|
||||
echo "done."
|
||||
|
||||
cat << EOF
|
||||
An example config file is created at /boot/grug/grub.cfg.example
|
||||
|
||||
EOF
|
||||
infodir=usr/share/info
|
||||
filelist=(grub.info grub-dev.info)
|
||||
|
||||
wisperer() {
|
||||
echo -e "\033[0;31m IMPORTANT"
|
||||
echo -e "\033[0;0m Run \033[0;32m 'grub-install /dev/sda --no-floppy' \033[0;0m as root for installing in MBR"
|
||||
echo -e "\033[0;0m Run \033[0;32m 'grub-mkconfig -o /boot/grub/grub.cfg' \033[0;0m as root for generating grub.cfg"
|
||||
echo -e "\033[0;0m Also you can run \033[0;32m 'update-grub' \033[0;0m as root for generating grub.cfg"
|
||||
}
|
||||
|
||||
delete_symlinks() {
|
||||
if [ `readlink /boot/kernel26.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26.img
|
||||
fi
|
||||
if [ `readlink /boot/kernel26-lts.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26-lts.img
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26-lts` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26-lts
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
if [ -f /boot/grub/grub.cfg.pacsave ]; then
|
||||
echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
|
||||
install -Dm644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
|
||||
fi
|
||||
|
||||
echo -n "Generating grub.cfg.example config file... "
|
||||
grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
|
||||
echo "done."
|
||||
|
||||
for file in ${filelist[@]}; do
|
||||
install-info $infodir/$file.gz $infodir/dir 2> /dev/null
|
||||
done
|
||||
delete_symlinks
|
||||
wisperer
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
for file in ${filelist[@]}; do
|
||||
install-info $infodir/$file.gz $infodir/dir 2> /dev/null
|
||||
done
|
||||
delete_symlinks
|
||||
wisperer
|
||||
if [ -f /boot/grub/grub.cfg ]
|
||||
then
|
||||
update-grub
|
||||
fi
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
for file in ${filelist[@]}; do
|
||||
install-info --delete $infodir/$file $infodir/dir 2> /dev/null
|
||||
done
|
||||
}
|
||||
|
103
grub2/grub2_bzr_export.sh
Executable file
103
grub2/grub2_bzr_export.sh
Executable file
@ -0,0 +1,103 @@
|
||||
#!/bin/sh
|
||||
|
||||
## For actual repos
|
||||
|
||||
# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/lua lua
|
||||
# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/gpxe gpxe
|
||||
# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/ntldr-img ntldr-img
|
||||
# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/915resolution 915resolution
|
||||
|
||||
## For launchpad mirror
|
||||
|
||||
# bzr branch lp:~skodabenz/grub/grub2-extras-lua lua
|
||||
# bzr branch lp:~skodabenz/grub/grub2-extras-gpxe gpxe
|
||||
# bzr branch lp:~skodabenz/grub/grub2-extras-ntldr-img ntldr-img
|
||||
# bzr branch lp:~skodabenz/grub/grub2-extras-915resolution 915resolution
|
||||
|
||||
## grub-extras zfs is integrated into grub2 bzr main repo and is no longer needed separately.
|
||||
|
||||
wd=${PWD}/
|
||||
output_dir=${wd}/
|
||||
|
||||
grub2_bzr_dir=${wd}/grub2_BZR/
|
||||
grub2_bzr_exp_dir=${wd}/grub2_experimental_BZR/
|
||||
grub2_extras_dir=${wd}/grub2_extras_BZR/
|
||||
|
||||
main_snapshot() {
|
||||
|
||||
cd ${grub2_bzr_dir}/
|
||||
echo
|
||||
|
||||
revnum=$(bzr revno ${grub2_bzr_dir})
|
||||
bzr export --root=grub2 --format=tar ${output_dir}/grub2_r${revnum}.tar
|
||||
echo
|
||||
|
||||
cd ${output_dir}/
|
||||
|
||||
xz -9 ${output_dir}/grub2_r${revnum}.tar
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
exp_snapshot() {
|
||||
|
||||
cd ${grub2_bzr_exp_dir}/
|
||||
echo
|
||||
|
||||
revnum=$(bzr revno ${grub2_bzr_exp_dir})
|
||||
bzr export --root=grub2_exp --format=tar ${output_dir}/grub2_exp_r${revnum}.tar
|
||||
echo
|
||||
|
||||
cd ${output_dir}/
|
||||
|
||||
xz -9 ${output_dir}/grub2_exp_r${revnum}.tar
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
extras_snapshot() {
|
||||
|
||||
cd ${grub2_extras_dir}/${grub2_extras_name}/
|
||||
echo
|
||||
|
||||
revnum=$(bzr revno ${grub2_extras_dir}/${grub2_extras_name})
|
||||
bzr export --root=${grub2_extras_name} --format=tar ${output_dir}/grub2_extras_${grub2_extras_name}_r${revnum}.tar
|
||||
echo
|
||||
|
||||
cd ${output_dir}/
|
||||
echo
|
||||
|
||||
xz -9 ${output_dir}/grub2_extras_${grub2_extras_name}_r${revnum}.tar
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
echo
|
||||
|
||||
set -x -e
|
||||
|
||||
# main_snapshot
|
||||
|
||||
# exp_snapshot
|
||||
|
||||
grub2_extras_name="lua"
|
||||
extras_snapshot
|
||||
|
||||
grub2_extras_name="gpxe"
|
||||
extras_snapshot
|
||||
|
||||
grub2_extras_name="ntldr-img"
|
||||
extras_snapshot
|
||||
|
||||
grub2_extras_name="915resolution"
|
||||
extras_snapshot
|
||||
|
||||
set +x +e
|
||||
|
||||
echo
|
||||
|
||||
unset wd
|
||||
unset output_dir
|
||||
unset grub2_bzr_dir
|
||||
unset grub2_extras_dir
|
||||
unset grub2_extras_name
|
31
grub2/update-grub
Executable file
31
grub2/update-grub
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# do UID checking here so someone can at least get usage instructions
|
||||
if [ "$EUID" != "0" ]; then
|
||||
echo "error: This script must be run as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ `readlink /boot/kernel26.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26.img
|
||||
fi
|
||||
if [ `readlink /boot/kernel26-lts.img` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/kernel26-lts.img
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26
|
||||
fi
|
||||
if [ `readlink /boot/vmlinuz26-lts` ] ;
|
||||
then
|
||||
echo "removing backward-symlink"
|
||||
rm -v /boot/vmlinuz26-lts
|
||||
fi
|
||||
|
||||
echo "Updating /boot/grub/grub.cfg"
|
||||
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
|
40
initscripts-live/PKGBUILD
Normal file
40
initscripts-live/PKGBUILD
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
_origname=initscripts
|
||||
pkgname=initscripts-live
|
||||
pkgver=2011.09.ms3
|
||||
_pkgver=2011.04.r3
|
||||
pkgrel=1
|
||||
pkgdesc="System initialization/bootup scripts"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.chakra-project.org"
|
||||
license=('GPL2')
|
||||
groups=('livecd')
|
||||
provides=("initscripts=${pkgver}")
|
||||
conflicts=('initscripts' 'chakra-initscripts')
|
||||
backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown etc/conf.d/wireless)
|
||||
depends=('glibc' 'bash' 'grep' 'coreutils' 'udev>=171' 'iproute2'
|
||||
'ncurses' 'kbd' 'findutils' 'sysvinit')
|
||||
optdepends=('bridge-utils: Network bridging support'
|
||||
'dhcpcd: DHCP network configuration'
|
||||
'net-tools: legacy network support'
|
||||
'wireless_tools: Wireless networking')
|
||||
source=("http://chakra-project.org/sources/initscripts/initscripts-${_pkgver}.tar.xz"
|
||||
'http://chakra-project.org/sources/initscripts/wireless.conf.d'
|
||||
"http://chakra-project.org/sources/initscripts/${pkgname}-${_pkgver}.patch")
|
||||
sha256sums=('d74e64e3b8a9ebfda9229ec18e2802e90c4780e50532b1bcc40fabd3fe9bac63'
|
||||
'0eba4250b07e0a727ef64772f5ee9027b123cbd4bb0894ba2842f545035c827f'
|
||||
'27369ec8b3efa56527b208e40cff92b703d9a6c436e6614cc73be69eca226ad3')
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/initscripts-${_pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
install -D -m644 ${srcdir}/wireless.conf.d ${pkgdir}/etc/conf.d/wireless
|
||||
cd ${pkgdir}
|
||||
patch -Np1 -i ${srcdir}/${pkgname}-${_pkgver}.patch || return 1
|
||||
rm -v $(find . -type f -name '*.orig')
|
||||
}
|
@ -5,7 +5,8 @@
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=initscripts
|
||||
pkgver=2011.02
|
||||
pkgver=2011.09.ms3
|
||||
_pkgver=2011.04.r3
|
||||
pkgrel=1
|
||||
pkgdesc="System initialization/bootup scripts"
|
||||
arch=('i686' 'x86_64')
|
||||
@ -13,19 +14,31 @@ url="http://www.chakra-project.org"
|
||||
license=('GPL2')
|
||||
groups=('base')
|
||||
backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown etc/conf.d/wireless)
|
||||
depends=('bash' 'awk' 'grep' 'coreutils' 'sed' 'udev'
|
||||
'net-tools' 'ncurses' 'kbd' 'findutils' 'sysvinit')
|
||||
depends=('glibc' 'bash' 'grep' 'coreutils' 'udev>=171-2' 'iproute2'
|
||||
'ncurses' 'kbd' 'findutils' 'sysvinit')
|
||||
optdepends=('bridge-utils: Network bridging support'
|
||||
'dhcpcd: DHCP network configuration'
|
||||
'net-tools: legacy network support'
|
||||
'wireless_tools: Wireless networking')
|
||||
install=initscripts.install
|
||||
source=("http://chakra-project.org/sources/initscripts/initscripts-${pkgver}.tar.xz"
|
||||
source=("http://chakra-project.org/sources/initscripts/initscripts-${_pkgver}.tar.xz"
|
||||
'http://chakra-project.org/sources/initscripts/wireless.conf.d')
|
||||
sha256sums=('0734166a2fd170a8b144a51d8be5ac3773f8c1381240a744cfd05005464aabda'
|
||||
sha256sums=('d74e64e3b8a9ebfda9229ec18e2802e90c4780e50532b1bcc40fabd3fe9bac63'
|
||||
'0eba4250b07e0a727ef64772f5ee9027b123cbd4bb0894ba2842f545035c827f')
|
||||
|
||||
# create tarball: source PKGBUILD && mksource
|
||||
|
||||
mksource() {
|
||||
rm -vRf chakra-${pkgname}
|
||||
git clone git://gitorious.org/chakra/chakra-${pkgname}.git
|
||||
rm -vRf chakra-${pkgname}/.git
|
||||
pushd chakra-${pkgname}
|
||||
popd
|
||||
tar -cvJf ${pkgname}-${_pkgver}-${pkgrel}.tar.xz chakra-${pkgname}/*
|
||||
sha256sum ${pkgname}-${_pkgver}-${pkgrel}.tar.xz
|
||||
}
|
||||
package() {
|
||||
cd ${srcdir}/${pkgname}-${pkgver}
|
||||
DESTDIR=${pkgdir} ./install.sh
|
||||
cd ${srcdir}/initscripts-${_pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
install -D -m644 ${srcdir}/wireless.conf.d ${pkgdir}/etc/conf.d/wireless
|
||||
}
|
||||
|
@ -4,19 +4,17 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
#
|
||||
# Create a new tarball from the linux-firmware git tree with the following command:
|
||||
# git archive --format=tar --prefix linux-firmware-$(date +%Y%m%d)/ master | xz -9 > linux-firmware-$(date +%Y%m%d).tar.xz
|
||||
#
|
||||
|
||||
pkgname=linux-firmware
|
||||
pkgver=20101228
|
||||
pkgrel=2
|
||||
pkgver=20110722
|
||||
_b43=4.178.10.4
|
||||
_legacy=3.130.20.0
|
||||
_nouveau=20091212
|
||||
pkgrel=1
|
||||
pkgdesc="Firmware files for Linux"
|
||||
arch=('any')
|
||||
url="http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary"
|
||||
license=('GPL2' 'GPL3' 'custom')
|
||||
provides=('kernel26-firmware=2.6.35.99')
|
||||
provides=('kernel26-firmware=3.0.99' 'linux-firmware=3.0.99')
|
||||
conflicts=('linux-firmware-git'
|
||||
'kernel26-firmware'
|
||||
'ar9170-fw'
|
||||
@ -29,7 +27,10 @@ conflicts=('linux-firmware-git'
|
||||
'rt2860-firmware'
|
||||
'rt2870usb-fw'
|
||||
'rt2x00-rt61-fw'
|
||||
'rt2x00-rt71w-fw')
|
||||
'rt2x00-rt71w-fw'
|
||||
'b43-firmware'
|
||||
'b43-firmware-legacy'
|
||||
'nouveau-firmware')
|
||||
replaces=('kernel26-firmware'
|
||||
'ar9170-fw'
|
||||
'iwlwifi-1000-ucode'
|
||||
@ -41,12 +42,34 @@ replaces=('kernel26-firmware'
|
||||
'rt2860-firmware'
|
||||
'rt2870usb-fw'
|
||||
'rt2x00-rt61-fw'
|
||||
'rt2x00-rt71w-fw')
|
||||
'rt2x00-rt71w-fw'
|
||||
'b43-firmware'
|
||||
'b43-firmware-legacy'
|
||||
'nouveau-firmware')
|
||||
makedepends=("b43-fwcutter=014")
|
||||
options=(!strip)
|
||||
source=(http://chakra-project.org/sources/linux-firmware/$pkgname-$pkgver.tar.xz
|
||||
http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw)
|
||||
sha256sums=('489dd4c607826ef9c15fa9befcff7a97b59c3c1d23670e9d330962c8935c8a44'
|
||||
'1b379c5a8d6ab3a43911f7949d6306fe2dae3afb1368be5452a8fc7d9c54e0a0')
|
||||
http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170/ar9170.fw
|
||||
http://mirror2.openwrt.org/sources/broadcom-wl-${_b43}.tar.bz2
|
||||
http://downloads.openwrt.org/sources/wl_apsta-${_legacy}.o
|
||||
http://people.freedesktop.org/~pq/nouveau-drm/nouveau-firmware-$_nouveau.tar.gz)
|
||||
sha256sums=('5f71b3679d3ae9ef434770033df50888e1cdfdfdcf98fbc55d8aaa4d86ce8db5'
|
||||
'1b379c5a8d6ab3a43911f7949d6306fe2dae3afb1368be5452a8fc7d9c54e0a0'
|
||||
'32f6ad98facbb9045646fdc8b54bb03086d204153253f9c65d0234a5d90ae53f'
|
||||
'7dba610b1d96dd14e901bcbce14cd6ecd1b1ac6f5c0035b0d6b6dc46a7c3ef90'
|
||||
'4eaeb2044c1da95b50ea4f1facb0effc74d65d8b13dc10893c26e4fe9fe23fb8')
|
||||
|
||||
# create tarball: source PKGBUILD && mksource
|
||||
|
||||
mksource() {
|
||||
rm -vRf linux-firmware
|
||||
git clone git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git
|
||||
pushd ${pkgname}
|
||||
git archive --format=tar --prefix linux-firmware-$(date +%Y%m%d)/ master | xz -9 > ../linux-firmware-$(date +%Y%m%d).tar.xz
|
||||
popd
|
||||
sha256sum linux-firmware-$(date +%Y%m%d).tar.xz
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
@ -57,10 +80,22 @@ package() {
|
||||
mv "${pkgdir}/lib/firmware"/{LICEN*,WHENCE} "${pkgdir}/usr/share/licenses/linux-firmware/"
|
||||
|
||||
# Symlinks for Broadcom firmware
|
||||
ln -s bcm43xx-0-610-809-0.fw "${pkgdir}/lib/firmware/brcm/bcm43xx-0.fw"
|
||||
ln -s bcm43xx_hdr-0-610-809-0.fw "${pkgdir}/lib/firmware/brcm/bcm43xx_hdr-0.fw"
|
||||
#ln -s bcm43xx-0-610-809-0.fw "${pkgdir}/lib/firmware/brcm/bcm43xx-0.fw"
|
||||
#ln -s bcm43xx_hdr-0-610-809-0.fw "${pkgdir}/lib/firmware/brcm/bcm43xx_hdr-0.fw"
|
||||
|
||||
# https://bugs.archlinux.org/task/20064
|
||||
install -m644 "${srcdir}/ar9170.fw" "${pkgdir}/lib/firmware/"
|
||||
|
||||
# install b43-firmware
|
||||
b43-fwcutter -w "${pkgdir}/lib/firmware/" ${srcdir}/broadcom-wl-${_b43}/linux/wl_apsta.o
|
||||
|
||||
# install b43-legacy-firmware
|
||||
b43-fwcutter -w "${pkgdir}/lib/firmware/" ${srcdir}/wl_apsta-${_legacy}.o
|
||||
|
||||
# install nouveau firmwares
|
||||
cd $srcdir/nouveau
|
||||
for i in `ls`; do
|
||||
install -D -m644 $i ${pkgdir}/lib/firmware/nouveau/$i
|
||||
done
|
||||
}
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
232
linux-lts/PKGBUILD
Normal file
232
linux-lts/PKGBUILD
Normal file
@ -0,0 +1,232 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgbase="linux-lts"
|
||||
pkgname=('linux-lts' 'linux-lts-headers') # Build stock -CHAKRA-LTS kernel
|
||||
_kernelname=${pkgname#linux}
|
||||
_basekernel=2.6.35
|
||||
pkgver=${_basekernel}.14
|
||||
pkgrel=1
|
||||
_patchname="patch-${pkgver}-1-CHAKRA-LTS"
|
||||
arch=(i686 x86_64)
|
||||
license=('GPL2')
|
||||
url="http://www.kernel.org"
|
||||
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_basekernel.tar.bz2
|
||||
http://chakra-project.org/sources/linux/${_patchname}.bz2
|
||||
# the main kernel config files
|
||||
config config.x86_64
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
${pkgname}.preset)
|
||||
md5sums=('091abeb4684ce03d1d936851618687b6'
|
||||
'2523c5f9c1fc8f1b20472a017587f222'
|
||||
'960176c1988f2bdc98ef4c407edcad1c'
|
||||
'382cdfe6a3b8af870a626a2c3bc256d2'
|
||||
'56cdd0978dd4a539a25813fd4273c834')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
# fix setlocalversion
|
||||
sed -i 's|echo "+"|# echo "+"|g' ./scripts/setlocalversion
|
||||
|
||||
# Add -CHAKRA patches
|
||||
patch -Np1 -i ${srcdir}/${_patchname} || return 1
|
||||
|
||||
# Fix drivers/staging/hv/netvsc_drv.c:22:26: fatal error: linux/atomic.h: No such file or directory
|
||||
sed -ie 's~linux/atomic.h~asm/atomic.h~g' drivers/staging/hv/netvsc_drv.c
|
||||
|
||||
if [ "$CARCH" = "x86_64" ]; then
|
||||
cat ../config.x86_64 >./.config
|
||||
else
|
||||
cat ../config >./.config
|
||||
fi
|
||||
|
||||
# hack to prevent output kernel from being marked as dirty or git
|
||||
echo "" > ${srcdir}/linux-${_basekernel}/.scmversion
|
||||
|
||||
# get kernel version
|
||||
make prepare
|
||||
# load configuration
|
||||
# Configure the kernel. Replace the line below with one of your choice.
|
||||
#make menuconfig # CLI menu for configuration
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
# ... or manually edit .config
|
||||
####################
|
||||
# stop here
|
||||
# this is useful to configure the kernel
|
||||
#msg "Stopping build"
|
||||
#return 1
|
||||
####################
|
||||
yes "" | make config
|
||||
# build!
|
||||
make bzImage modules || return 1
|
||||
}
|
||||
|
||||
package_linux-lts() {
|
||||
pkgdesc="The Linux Longterm Support Kernel and modules"
|
||||
backup=(etc/mkinitcpio.d/linux-lts.preset)
|
||||
depends=('coreutils' "linux-firmware>=${pkgver}" 'module-init-tools' 'mkinitcpio>=0.7')
|
||||
# pwc, ieee80211 and hostap-driver26 modules are included in linux-lts now
|
||||
# nforce package support was abandoned by nvidia, kernel modules should cover everything now.
|
||||
# kernel24 support is dropped since glibc24
|
||||
replaces=('kernel24' 'kernel24-scsi' 'kernel26-scsi'
|
||||
'alsa-driver' 'ieee80211' 'hostap-driver26'
|
||||
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
|
||||
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500'
|
||||
'aufs2' 'nouveau-drm-lts' 'kernel26-lts')
|
||||
provides=('aufs2' 'nouveau-drm-lts' "kernel26-lts=${pkgver}")
|
||||
conflicts=('kernel26-lts')
|
||||
install=linux-lts.install
|
||||
optdepends=('crda: to set the correct wireless channels of your country')
|
||||
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
|
||||
KARCH=x86
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}"
|
||||
|
||||
# add vmlinux
|
||||
install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"
|
||||
|
||||
# install fallback mkinitcpio.conf file and preset file for kernel
|
||||
install -D -m644 "${srcdir}/${pkgname}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i "${startdir}/${pkgname}.install"
|
||||
sed \
|
||||
-e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|g" \
|
||||
-e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \
|
||||
-i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
|
||||
|
||||
# remove build and source links
|
||||
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
||||
# add compat symlink for the kernel image
|
||||
ln -sf vmlinuz-${pkgname} "${pkgdir}/boot/vmlinuz26${_kernelname}"
|
||||
# remove the firmware
|
||||
rm -rf "${pkgdir}/lib/firmware"
|
||||
# gzip -9 all modules to safe 100MB of space
|
||||
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
|
||||
}
|
||||
|
||||
package_linux-lts-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for linux-lts"
|
||||
provides=("kernel26-lts-headers=${pkgver}")
|
||||
replaces=("kernel26-lts-headers")
|
||||
conflicts=("kernel26-lts-headers")
|
||||
cd ${srcdir}/linux-${_basekernel}/
|
||||
make oldconfig && make prepare || return 1
|
||||
mkdir -p ${pkgdir}/lib/modules/${_kernver}
|
||||
cd ${pkgdir}/lib/modules/${_kernver}
|
||||
ln -sf ../../../usr/src/linux-${_kernver} build
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
install -D -m644 Makefile \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/Makefile
|
||||
install -D -m644 kernel/Makefile \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile
|
||||
install -D -m644 .config \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/.config
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
|
||||
|
||||
for i in acpi asm-generic config generated linux math-emu media net pcmcia scsi sound trace video; do
|
||||
cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
|
||||
done
|
||||
|
||||
# copy arch includes for external modules
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
|
||||
cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
|
||||
|
||||
# copy files necessary for later builds, like nvidia and vmware
|
||||
cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
|
||||
cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
|
||||
# fix permissions on scripts dir
|
||||
chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
|
||||
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
|
||||
|
||||
cp arch/$KARCH/Makefile ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
|
||||
if [ "$CARCH" = "i686" ]; then
|
||||
cp arch/$KARCH/Makefile_32.cpu ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
|
||||
fi
|
||||
cp arch/$KARCH/kernel/asm-offsets.s ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel/
|
||||
|
||||
# add headers for lirc package
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video
|
||||
cp drivers/media/video/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/
|
||||
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo; do # zc0301 - damaged
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
|
||||
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
|
||||
done
|
||||
# add docbook makefile
|
||||
install -D -m644 Documentation/DocBook/Makefile \
|
||||
${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
|
||||
# add dm headers
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
|
||||
cp drivers/md/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/md
|
||||
# add inotify.h
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/linux
|
||||
cp include/linux/inotify.h ${pkgdir}/usr/src/linux-${_kernver}/include/linux/
|
||||
# add wireless headers
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
|
||||
cp net/mac80211/*.h ${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/
|
||||
# add dvb headers for external modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/9912
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core
|
||||
cp drivers/media/dvb/dvb-core/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/
|
||||
# add dvb headers for external modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/11194
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
|
||||
cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
|
||||
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
cp drivers/media/dvb/frontends/lgdt330x.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
cp drivers/media/video/msp3400-driver.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/mm
|
||||
cp fs/xfs/xfs_sb.h ${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h
|
||||
# add headers for virtualbox
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/drm $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# add headers for broadcom wl
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/14568
|
||||
cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
|
||||
# copy in Kconfig files
|
||||
for i in `find . -name "Kconfig*"`; do
|
||||
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
|
||||
cp $i ${pkgdir}/usr/src/linux-${_kernver}/$i
|
||||
done
|
||||
|
||||
#cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
|
||||
# add header for aufs2-util
|
||||
#mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/asm
|
||||
#cp -a ${srcdir}/linux-$_basekernel/include/asm-generic/bitsperlong.h ${pkgdir}/usr/src/linux-${_kernver}/include/asm/
|
||||
|
||||
chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
|
||||
find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
|
||||
# remove unneeded architectures
|
||||
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
|
||||
# fix aufs
|
||||
# rm -rf ${pkgdir}/usr/src/linux-${_kernver}/include/linux/aufs_type.h
|
||||
}
|
5263
linux-lts/config
Normal file
5263
linux-lts/config
Normal file
File diff suppressed because it is too large
Load Diff
5031
linux-lts/config.x86_64
Normal file
5031
linux-lts/config.x86_64
Normal file
File diff suppressed because it is too large
Load Diff
63
linux-lts/linux-lts.install
Normal file
63
linux-lts/linux-lts.install
Normal file
@ -0,0 +1,63 @@
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=-lts
|
||||
KERNEL_VERSION=2.6.35-CHAKRA-LTS
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
mkinitcpio -p linux${KERNEL_NAME}
|
||||
|
||||
# add compat symlinks for the initramfs images
|
||||
ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
|
||||
ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
|
||||
boot/kernel26${KERNEL_NAME}-fallback.img
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
pacman -Q grub &>/dev/null
|
||||
hasgrub=$?
|
||||
pacman -Q grub2 &>/dev/null
|
||||
hasgrub2=$?
|
||||
pacman -Q lilo &>/dev/null
|
||||
haslilo=$?
|
||||
# reminder notices
|
||||
if [ $haslilo -eq 0 ]; then
|
||||
echo ">>>"
|
||||
if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
|
||||
echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
|
||||
else
|
||||
echo ">>> You appear to be using the LILO bootloader. You should run"
|
||||
echo ">>> 'lilo' before rebooting."
|
||||
fi
|
||||
echo ">>>"
|
||||
fi
|
||||
|
||||
if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
|
||||
echo "WARNING: /boot appears to be a seperate partition but is not mounted"
|
||||
echo " This is most likely not what you want. Please mount your /boot"
|
||||
echo " partition and reinstall the kernel unless you are sure this is OK"
|
||||
fi
|
||||
fi
|
||||
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
mkinitcpio -p linux${KERNEL_NAME}
|
||||
|
||||
# add compat symlinks for the initramfs images
|
||||
ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
|
||||
ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
|
||||
boot/kernel26${KERNEL_NAME}-fallback.img
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
# also remove the compat symlinks
|
||||
rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
|
||||
rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img
|
||||
}
|
14
linux-lts/linux-lts.preset
Normal file
14
linux-lts/linux-lts.preset
Normal file
@ -0,0 +1,14 @@
|
||||
# mkinitcpio preset file for the 'linux-lts' package
|
||||
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
ALL_kver="/boot/vmlinuz-linux-lts"
|
||||
|
||||
PRESETS=('default' 'fallback')
|
||||
|
||||
#default_config="/etc/mkinitcpio.conf"
|
||||
default_image="/boot/initramfs-linux-lts.img"
|
||||
#default_options=""
|
||||
|
||||
#fallback_config="/etc/mkinitcpio.conf"
|
||||
fallback_image="/boot/initramfs-linux-lts-fallback.img"
|
||||
fallback_options="-S autodetect"
|
268
linux/PKGBUILD
Normal file
268
linux/PKGBUILD
Normal file
@ -0,0 +1,268 @@
|
||||
#
|
||||
# Core Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgbase="linux"
|
||||
pkgname=('linux' 'linux-headers' 'linux-docs') # Build stock -CHAKRA kernel
|
||||
# pkgname=linux-custom # Build kernel with a different name
|
||||
_kernelname=${pkgname#linux}
|
||||
_basekernel=3.0
|
||||
pkgver=${_basekernel}.1
|
||||
pkgrel=2
|
||||
makedepends=('xmlto' 'docbook-xsl')
|
||||
_patchname="patch-${pkgver}-2-CHAKRA"
|
||||
arch=(i686 x86_64)
|
||||
license=('GPL2')
|
||||
url="http://www.kernel.org"
|
||||
options=(!strip)
|
||||
source=(ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$_basekernel.tar.bz2
|
||||
http://chakra-project.org/sources/linux/${_patchname}.bz2
|
||||
# the main kernel config files
|
||||
config config.x86_64
|
||||
# standard config files for mkinitcpio ramdisk
|
||||
linux.preset)
|
||||
md5sums=('398e95866794def22b12dfbc15ce89c0'
|
||||
'933995f8a2a1c0fd18d98605cdf9c445'
|
||||
'f1f5607b6c82728779c96ca7ce61e772'
|
||||
'6c7b130696bd7c6c785a858aedf7b5e4'
|
||||
'b019872ce926de3ec82985fc399832c6')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/linux-$_basekernel
|
||||
|
||||
# fix setlocalversion
|
||||
sed -i 's|echo "+"|# echo "+"|g' ./scripts/setlocalversion
|
||||
|
||||
# Add -CHAKRA patches
|
||||
patch -Np1 -i ${srcdir}/${_patchname}
|
||||
|
||||
if [ "$CARCH" = "x86_64" ]; then
|
||||
cat ../config.x86_64 >./.config
|
||||
else
|
||||
cat ../config >./.config
|
||||
fi
|
||||
if [ "${_kernelname}" != "" ]; then
|
||||
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
|
||||
fi
|
||||
# get kernel version
|
||||
make prepare
|
||||
# load configuration
|
||||
# Configure the kernel. Replace the line below with one of your choice.
|
||||
#make menuconfig # CLI menu for configuration
|
||||
#make nconfig # new CLI menu for configuration
|
||||
#make xconfig # X-based configuration
|
||||
#make oldconfig # using old config from previous kernel version
|
||||
# ... or manually edit .config
|
||||
####################
|
||||
# stop here
|
||||
# this is useful to configure the kernel
|
||||
#msg "Stopping build"
|
||||
#return 1
|
||||
####################
|
||||
yes "" | make config
|
||||
# build!
|
||||
make ${MAKEFLAGS} bzImage modules
|
||||
}
|
||||
|
||||
package_linux() {
|
||||
pkgdesc="The Linux Kernel and modules"
|
||||
groups=('base')
|
||||
depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16' 'mkinitcpio>=0.7')
|
||||
optdepends=('crda: to set the correct wireless channels of your country')
|
||||
replaces=('kernel24' 'kernel24-scsi' 'kernel26' 'linux-scsi'
|
||||
'alsa-driver' 'ieee80211' 'hostap-driver26'
|
||||
'pwc' 'nforce' 'squashfs' 'unionfs' 'ivtv'
|
||||
'zd1211' 'kvm-modules' 'iwlwifi' 'rt2x00-cvs'
|
||||
'gspcav1' 'atl2' 'wlan-ng26' 'rt2500'
|
||||
'aufs2' 'nouveau-drm')
|
||||
provides=('aufs2' 'nouveau-drm' 'kernel26')
|
||||
conflicts=('kernel26')
|
||||
backup=("etc/mkinitcpio.d/${pkgname}.preset")
|
||||
install=${pkgname}.install
|
||||
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
|
||||
KARCH=x86
|
||||
|
||||
# get kernel version
|
||||
_kernver="$(make kernelrelease)"
|
||||
|
||||
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
|
||||
make INSTALL_MOD_PATH="${pkgdir}" modules_install
|
||||
cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}"
|
||||
|
||||
# add vmlinux
|
||||
install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"
|
||||
|
||||
# install fallback mkinitcpio.conf file and preset file for kernel
|
||||
install -D -m644 "${srcdir}/${pkgname}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
|
||||
|
||||
# set correct depmod command for install
|
||||
sed \
|
||||
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
|
||||
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
|
||||
-i "${startdir}/${pkgname}.install"
|
||||
sed \
|
||||
-e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|g" \
|
||||
-e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \
|
||||
-i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
|
||||
|
||||
# remove build and source links
|
||||
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
||||
# add compat symlink for the kernel image
|
||||
ln -sf vmlinuz-${pkgname} "${pkgdir}/boot/vmlinuz26${_kernelname}"
|
||||
# remove the firmware
|
||||
rm -rf "${pkgdir}/lib/firmware"
|
||||
# gzip -9 all modules to safe 100MB of space
|
||||
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
|
||||
}
|
||||
|
||||
package_linux-headers() {
|
||||
pkgdesc="Header files and scripts for building modules for linux kernel"
|
||||
provides=('kernel26-headers')
|
||||
conflicts=('kernel26-headers')
|
||||
replaces=('kernel26-headers')
|
||||
|
||||
mkdir -p "${pkgdir}/lib/modules/${_kernver}"
|
||||
|
||||
cd "${pkgdir}/lib/modules/${_kernver}"
|
||||
ln -sf ../../../usr/src/linux-${_kernver} build
|
||||
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
install -D -m644 Makefile \
|
||||
"${pkgdir}/usr/src/linux-${_kernver}/Makefile"
|
||||
install -D -m644 kernel/Makefile \
|
||||
"${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
|
||||
install -D -m644 .config \
|
||||
"${pkgdir}/usr/src/linux-${_kernver}/.config"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
|
||||
|
||||
for i in acpi asm-generic config crypto drm generated linux math-emu \
|
||||
media net pcmcia scsi sound trace video xen; do
|
||||
cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
|
||||
done
|
||||
|
||||
# copy arch includes for external modules
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/x86"
|
||||
cp -a arch/x86/include "${pkgdir}/usr/src/linux-${_kernver}/arch/x86/"
|
||||
|
||||
# copy files necessary for later builds, like nvidia and vmware
|
||||
cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
|
||||
cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
|
||||
|
||||
# fix permissions on scripts dir
|
||||
chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel"
|
||||
|
||||
cp arch/${KARCH}/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
|
||||
|
||||
if [ "${CARCH}" = "i686" ]; then
|
||||
cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
|
||||
fi
|
||||
|
||||
cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"
|
||||
|
||||
# add headers for lirc package
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video"
|
||||
|
||||
cp drivers/media/video/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/"
|
||||
|
||||
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102; do
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}"
|
||||
cp -a drivers/media/video/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}"
|
||||
done
|
||||
|
||||
# add docbook makefile
|
||||
install -D -m644 Documentation/DocBook/Makefile \
|
||||
"${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
|
||||
|
||||
# add dm headers
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
|
||||
cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
|
||||
|
||||
# add inotify.h
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/linux"
|
||||
cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"
|
||||
|
||||
# add wireless headers
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
|
||||
cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
|
||||
|
||||
# add dvb headers for external modules
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/9912
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core"
|
||||
cp drivers/media/dvb/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/"
|
||||
# and...
|
||||
# http://bugs.archlinux.org/task/11194
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
|
||||
cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
|
||||
|
||||
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
|
||||
cp drivers/media/dvb/frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
|
||||
cp drivers/media/video/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
|
||||
|
||||
# add dvb headers
|
||||
# in reference to:
|
||||
# http://bugs.archlinux.org/task/20402
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb"
|
||||
cp drivers/media/dvb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/"
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends"
|
||||
cp drivers/media/dvb/frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/"
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners"
|
||||
cp drivers/media/common/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/"
|
||||
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
|
||||
cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"
|
||||
|
||||
# copy in Kconfig files
|
||||
for i in `find . -name "Kconfig*"`; do
|
||||
mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
|
||||
cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
|
||||
done
|
||||
|
||||
chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
|
||||
find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
|
||||
|
||||
# strip scripts directory
|
||||
find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
|
||||
case "$(file -bi "${binary}")" in
|
||||
*application/x-sharedlib*) # Libraries (.so)
|
||||
/usr/bin/strip ${STRIP_SHARED} "${binary}";;
|
||||
*application/x-archive*) # Libraries (.a)
|
||||
/usr/bin/strip ${STRIP_STATIC} "${binary}";;
|
||||
*application/x-executable*) # Binaries
|
||||
/usr/bin/strip ${STRIP_BINARIES} "${binary}";;
|
||||
esac
|
||||
done
|
||||
|
||||
# remove unneeded architectures
|
||||
rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
|
||||
}
|
||||
|
||||
package_linux-docs() {
|
||||
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
|
||||
provides=('kernel26-docs')
|
||||
conflicts=('kernel26-docs')
|
||||
replaces=('kernel26-docs')
|
||||
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
|
||||
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}"
|
||||
mv Documentation "${pkgdir}/usr/src/linux-${_kernver}"
|
||||
find "${pkgdir}" -type f -exec chmod 444 {} \;
|
||||
find "${pkgdir}" -type d -exec chmod 755 {} \;
|
||||
|
||||
# remove a file already in linux package
|
||||
rm -f "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
|
||||
}
|
5790
linux/config
Normal file
5790
linux/config
Normal file
File diff suppressed because it is too large
Load Diff
5531
linux/config.x86_64
Normal file
5531
linux/config.x86_64
Normal file
File diff suppressed because it is too large
Load Diff
63
linux/linux.install
Normal file
63
linux/linux.install
Normal file
@ -0,0 +1,63 @@
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
|
||||
KERNEL_NAME=
|
||||
KERNEL_VERSION=3.0-CHAKRA
|
||||
|
||||
post_install () {
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
mkinitcpio -p linux${KERNEL_NAME}
|
||||
|
||||
# add compat symlinks for the initramfs images
|
||||
ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
|
||||
ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
|
||||
boot/kernel26${KERNEL_NAME}-fallback.img
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
pacman -Q grub &>/dev/null
|
||||
hasgrub=$?
|
||||
pacman -Q grub2 &>/dev/null
|
||||
hasgrub2=$?
|
||||
pacman -Q lilo &>/dev/null
|
||||
haslilo=$?
|
||||
# reminder notices
|
||||
if [ $haslilo -eq 0 ]; then
|
||||
echo ">>>"
|
||||
if [ $hasgrub -eq 0 -o $hasgrub2 -eq 0 ]; then
|
||||
echo ">>> If you use the LILO bootloader, you should run 'lilo' before rebooting."
|
||||
else
|
||||
echo ">>> You appear to be using the LILO bootloader. You should run"
|
||||
echo ">>> 'lilo' before rebooting."
|
||||
fi
|
||||
echo ">>>"
|
||||
fi
|
||||
|
||||
if grep "^[^#]*[[:space:]]/boot" etc/fstab 2>&1 >/dev/null; then
|
||||
if ! grep "[[:space:]]/boot" etc/mtab 2>&1 >/dev/null; then
|
||||
echo "WARNING: /boot appears to be a seperate partition but is not mounted"
|
||||
echo " This is most likely not what you want. Please mount your /boot"
|
||||
echo " partition and reinstall the kernel unless you are sure this is OK"
|
||||
fi
|
||||
fi
|
||||
|
||||
# updating module dependencies
|
||||
echo ">>> Updating module dependencies. Please wait ..."
|
||||
depmod ${KERNEL_VERSION}
|
||||
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
|
||||
mkinitcpio -p linux${KERNEL_NAME}
|
||||
|
||||
# add compat symlinks for the initramfs images
|
||||
ln -sf initramfs-linux${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
|
||||
ln -sf initramfs-linux${KERNEL_NAME}-fallback.img \
|
||||
boot/kernel26${KERNEL_NAME}-fallback.img
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
# also remove the compat symlinks
|
||||
rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}.img
|
||||
rm -f boot/{initramfs-linux,kernel26}${KERNEL_NAME}-fallback.img
|
||||
}
|
14
linux/linux.preset
Normal file
14
linux/linux.preset
Normal file
@ -0,0 +1,14 @@
|
||||
# mkinitcpio preset file for the 'linux' package
|
||||
|
||||
ALL_config="/etc/mkinitcpio.conf"
|
||||
ALL_kver="/boot/vmlinuz-linux"
|
||||
|
||||
PRESETS=('default' 'fallback')
|
||||
|
||||
#default_config="/etc/mkinitcpio.conf"
|
||||
default_image="/boot/initramfs-linux.img"
|
||||
#default_options=""
|
||||
|
||||
#fallback_config="/etc/mkinitcpio.conf"
|
||||
fallback_image="/boot/initramfs-linux-fallback.img"
|
||||
fallback_options="-S autodetect"
|
@ -4,28 +4,27 @@
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=mkinitcpio
|
||||
pkgver=0.6.7
|
||||
pkgrel=2
|
||||
pkgver=0.7.2
|
||||
pkgrel=1
|
||||
pkgdesc="Modular initramfs image creation utility"
|
||||
arch=(any)
|
||||
url="http://www.archlinux.org/"
|
||||
license=('GPL')
|
||||
depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux-ng>=2.17' 'gen-init-cpio' 'coreutils'
|
||||
'bash' 'findutils' 'sed' 'grep' 'filesystem>=2009.01-2' 'udev>=150' 'file' 'gzip'
|
||||
'which' 'mkinitcpio-nfs-utils')
|
||||
optdepends=('xz: Use lzma compression for the initramfs image'
|
||||
'bzip2: Use bzip2 compression for the initramfs image')
|
||||
depends=('mkinitcpio-busybox>=1.16.1-2' 'module-init-tools' 'util-linux>=2.19' 'libarchive' 'coreutils'
|
||||
'bash' 'findutils' 'sed' 'grep' 'filesystem>=2009.01-2' 'udev>=171-2' 'file' 'gzip'
|
||||
'which')
|
||||
optdepends=('xz: Use lzma or xz compression for the initramfs image'
|
||||
'bzip2: Use bzip2 compression for the initramfs image'
|
||||
'lzop: Use lzo compression for the initramfs image'
|
||||
'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
|
||||
replaces=('mkinitrd' 'mkinitramfs' 'klibc' 'klibc-extras' 'klibc-kbd'
|
||||
'klibc-module-init-tools' 'klibc-udev')
|
||||
source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.gz)
|
||||
backup=(etc/mkinitcpio.conf)
|
||||
sha256sums=('8d34bfa9c8018f02ee938ac68285e3aa16a1ad84ddc0433998e2d43a428cdcbd')
|
||||
sha256sums=('b7282c78ef3144f5547a4012f334b0beb575b7108a5f6a006289a1e78aa9823d')
|
||||
|
||||
build() {
|
||||
package() {
|
||||
cd $srcdir/${pkgname}-${pkgver}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
@ -9,18 +9,18 @@ source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=ndiswrapper
|
||||
pkgver=1.56
|
||||
pkgrel=12
|
||||
pkgrel=16
|
||||
|
||||
# Find the kernel name inside the chroot
|
||||
_kernver=`pacman -Qf kernel26 | cut -c10-15 | sed 's/kernel26 //g'`-CHAKRA
|
||||
_kernver=`pacman -Q linux | cut -c7-9 | sed 's/linux //g'`-CHAKRA
|
||||
|
||||
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For kernel26-testing."
|
||||
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-testing."
|
||||
license=('GPL')
|
||||
arch=(i686 x86_64)
|
||||
url="http://ndiswrapper.sourceforge.net"
|
||||
install="ndiswrapper.install"
|
||||
depends=("ndiswrapper-utils=$pkgver" 'kernel26>=2.6.38rc5')
|
||||
makedepends=('kernel26-headers')
|
||||
depends=("ndiswrapper-utils=$pkgver" 'linux>=3.0' 'linux<3.1')
|
||||
makedepends=('linux-headers')
|
||||
source=(http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz
|
||||
kernel-2.6.35.patch
|
||||
kernel-2.6.36.patch
|
||||
|
@ -2,7 +2,7 @@
|
||||
post_install()
|
||||
{
|
||||
ndiswrapper -m
|
||||
KERNEL_VERSION='2.6.37-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
@ -11,13 +11,13 @@ post_install()
|
||||
post_upgrade()
|
||||
{
|
||||
ndiswrapper -m
|
||||
KERNEL_VERSION='2.6.37-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
post_remove()
|
||||
{
|
||||
KERNEL_VERSION='2.6.37-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod -ae $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
@ -1,10 +1,8 @@
|
||||
# $Id: PKGBUILD 39239 2009-05-14 06:04:46Z eric $
|
||||
# Maintainer: Eric Belanger <eric@archlinux.org>
|
||||
# Contributor: judd <jvinet@zeroflux.org>
|
||||
# Packages for Chakra, part of chakra-project.org
|
||||
|
||||
pkgname=procps
|
||||
pkgver=3.2.8
|
||||
pkgrel=1
|
||||
pkgrel=3
|
||||
pkgdesc="Utilities for monitoring your system and processes on your system"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://procps.sourceforge.net/"
|
||||
@ -12,16 +10,77 @@ license=('GPL' 'LGPL')
|
||||
groups=('base')
|
||||
depends=('ncurses')
|
||||
backup=('etc/sysctl.conf')
|
||||
source=(http://procps.sourceforge.net/procps-${pkgver}.tar.gz sysctl.conf)
|
||||
md5sums=('9532714b6846013ca9898984ba4cd7e0' '9be3a131a7068aae11418e6dd99e2221')
|
||||
sha1sums=('a0c86790569dec26b5d9037e8868ca907acc9829' '9b9a314010d042b5aa487893c06f361531525e6a')
|
||||
source=(http://procps.sourceforge.net/procps-${pkgver}.tar.gz sysctl.conf
|
||||
groff-top-manpage.patch
|
||||
procps-3.2.7-top-manpage.patch
|
||||
procps-3.2.7-free-hlmem.patch
|
||||
procps-3.2.7-ps-man-fmt.patch
|
||||
procps-3.2.7-longcmd.patch
|
||||
procps-3.2.7-psman.patch
|
||||
procps-3.2.7-slabtop-once.patch
|
||||
procps-3.2.7-top-clrscr.patch
|
||||
procps-3.2.7-top-cpu0.patch
|
||||
procps-3.2.7-top-env-cpuloop.patch
|
||||
procps-3.2.7-top-remcpu.patch
|
||||
procps-3.2.7-top-sorthigh.patch
|
||||
procps-3.2.7-watch-unicode.patch
|
||||
procps-3.2.7-w-best.patch
|
||||
procps-3.2.8-gmake-3.82.patch
|
||||
procps-3.2.8-setlocale.patch
|
||||
procps-3.2.8-threads.patch
|
||||
procps-3.2.8-linux-ver-init.patch
|
||||
procps-3.2.8-kernel3-uts.patch)
|
||||
sha1sums=('a0c86790569dec26b5d9037e8868ca907acc9829'
|
||||
'9b9a314010d042b5aa487893c06f361531525e6a'
|
||||
'bdd627f602ed2e38994d49309de0edbd90b41aff'
|
||||
'16737700b22eec8f4e8d16bce099f4b1662501e2'
|
||||
'da1b9e61f8df4a8e23a7032b245dd99e32e2c01c'
|
||||
'ba9ad9f0bde3e84484b5a0238e53534438e924be'
|
||||
'1a656d8094be41e019b2a9598b07c8a3d47f9de3'
|
||||
'9944224ed2f5bd7d7fb505127bd71d6f01d88373'
|
||||
'954026785a9e6c90d796e93563fcea2a693691e8'
|
||||
'8582cd15346fa939f3fd01081620de0ffc617335'
|
||||
'80e31310da53baf095e905d94485324932e433df'
|
||||
'15fe886a2b4bed5885e6d457954e1145d1dcd2a2'
|
||||
'bce21809ee0cb917ddf5b0c0bf2a91ea50feb0c6'
|
||||
'1be00d71e8e16ff2d656e5dd1f9988f2f3c0d5a0'
|
||||
'52068a433535ec3d5d974141be3d6d3b6a41725a'
|
||||
'3a8f1ba912112d7520becb28746e97b11d9b0c86'
|
||||
'3a4908ed8dbc936e39cb9094af8098ef9e656581'
|
||||
'09b1f6a3f9691b9f1432549a7a74a90ee5cfbdde'
|
||||
'926b92913201f21c45d48436c0902cffc059ce27'
|
||||
'171d5352940200c209e0c2d43c17f01c02173a66'
|
||||
'e2b2917e5462bd0aa3cb1b62942dbe8e8e81c16b')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
sed -i "s:\$(lib64):lib:" Makefile || return 1
|
||||
make || return 1
|
||||
make DESTDIR="${pkgdir}" ldconfig=/bin/true install || return 1
|
||||
install -D -m644 "${srcdir}/sysctl.conf" "${pkgdir}/etc/sysctl.conf" || return 1
|
||||
install -d "${pkgdir}/usr/include/proc" || return 1
|
||||
install -m644 proc/*.h "${pkgdir}/usr/include/proc" || return 1
|
||||
patch -p1 < ../groff-top-manpage.patch
|
||||
patch -p1 < ../procps-3.2.7-top-manpage.patch
|
||||
patch -p1 < ../procps-3.2.7-free-hlmem.patch
|
||||
patch -p1 < ../procps-3.2.7-ps-man-fmt.patch
|
||||
patch -p1 < ../procps-3.2.7-psman.patch
|
||||
patch -p1 < ../procps-3.2.7-longcmd.patch
|
||||
patch -p1 < ../procps-3.2.7-slabtop-once.patch
|
||||
patch -p1 < ../procps-3.2.7-top-clrscr.patch
|
||||
patch -p1 < ../procps-3.2.7-top-cpu0.patch
|
||||
patch -p1 < ../procps-3.2.7-top-env-cpuloop.patch
|
||||
patch -p1 < ../procps-3.2.7-top-remcpu.patch
|
||||
patch -p1 < ../procps-3.2.7-top-sorthigh.patch
|
||||
patch -p1 < ../procps-3.2.7-watch-unicode.patch
|
||||
patch -p1 < ../procps-3.2.7-w-best.patch
|
||||
patch -p1 < ../procps-3.2.8-gmake-3.82.patch
|
||||
patch -p1 < ../procps-3.2.8-setlocale.patch
|
||||
patch -p1 < ../procps-3.2.8-threads.patch
|
||||
patch -p0 < ../procps-3.2.8-linux-ver-init.patch
|
||||
patch -p1 < ../procps-3.2.8-kernel3-uts.patch
|
||||
sed -i "s:\$(lib64):lib:" Makefile
|
||||
make CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" ldconfig=/bin/true install
|
||||
install -D -m644 "${srcdir}/sysctl.conf" "${pkgdir}/etc/sysctl.conf"
|
||||
install -d "${pkgdir}/usr/include/proc"
|
||||
install -m644 proc/*.h "${pkgdir}/usr/include/proc"
|
||||
}
|
||||
|
39
procps/groff-top-manpage.patch
Normal file
39
procps/groff-top-manpage.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff -Naur procps-3.2.8-orig//top.1 procps-3.2.8/top.1
|
||||
--- procps-3.2.8-orig//top.1 2010-11-19 00:43:13.000000000 -0500
|
||||
+++ procps-3.2.8/top.1 2010-11-19 00:44:06.000000000 -0500
|
||||
@@ -42,7 +42,7 @@
|
||||
.ds EM \ \fB\-\-\ \fR
|
||||
\# - these two are for chuckles, makes great grammar
|
||||
.ds Me top
|
||||
-.ds ME \fBtop\fR
|
||||
+.ds MM \fBtop\fR
|
||||
\# - other misc strings for consistent usage/emphasis
|
||||
.ds F \fIOff\fR
|
||||
.ds O \fIOn\fR
|
||||
@@ -85,7 +85,7 @@
|
||||
.\" ----------------------------------------------------------------------
|
||||
.SH SYNOPSIS
|
||||
.\" ----------------------------------------------------------------------
|
||||
-\*(ME \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI
|
||||
+\*(MM \-\fBhv\fR | \-\fBbcHisS\fR \-\fBd\fI delay\fR \-\fBn\fI
|
||||
iterations\fR \-\fBp\fI pid\fR [,\fI pid\fR ...]
|
||||
|
||||
The traditional switches '-' and whitespace are optional.
|
||||
@@ -94,7 +94,7 @@
|
||||
.\" ----------------------------------------------------------------------
|
||||
.SH DESCRIPTION
|
||||
.\" ----------------------------------------------------------------------
|
||||
-The \*(ME program provides a dynamic real-time view of a running system.
|
||||
+The \*(MM program provides a dynamic real-time view of a running system.
|
||||
It can display\fB system\fR summary information as well as a list of\fB
|
||||
tasks\fR currently being managed by the Linux kernel.
|
||||
The types of system summary information shown and the types, order and
|
||||
@@ -104,7 +104,7 @@
|
||||
The program provides a limited interactive interface for process
|
||||
manipulation as well as a much more extensive interface for personal
|
||||
configuration \*(EM encompassing every aspect of its operation.
|
||||
-And while \*(ME is referred to throughout this document, you are free
|
||||
+And while \*(MM is referred to throughout this document, you are free
|
||||
to name the program anything you wish.
|
||||
That new name, possibly an alias, will then be reflected on \*(Me's display
|
||||
and used when reading and writing a \*(CF.
|
23
procps/procps-3.2.7-free-hlmem.patch
Normal file
23
procps/procps-3.2.7-free-hlmem.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -up procps-3.2.7/free.1.hlmem procps-3.2.7/free.1
|
||||
--- procps-3.2.7/free.1.hlmem 2009-02-24 10:54:35.000000000 +0100
|
||||
+++ procps-3.2.7/free.1 2009-02-24 11:00:26.000000000 +0100
|
||||
@@ -7,7 +7,7 @@ free \- Display amount of free and used
|
||||
.SH SYNOPSIS
|
||||
.BR "free " [ "\-b" " | " "\-k" " | " "\-m" "] [" "\-o" "] [" "\-s"
|
||||
.I delay
|
||||
-.RB "] [" "\-t" "] [" "\-V" ]
|
||||
+.RB "] [" "\-t" "] [" "\-l" "] [" "\-V" "]
|
||||
.SH DESCRIPTION
|
||||
\fBfree\fP displays the total amount of free and used physical and swap
|
||||
memory in the system, as well as the buffers used by the kernel.
|
||||
@@ -28,7 +28,9 @@ may actually specify any floating point
|
||||
.BR usleep (3)
|
||||
is used for microsecond resolution delay times.
|
||||
.PP
|
||||
-The \fB\-V\fP displays version information.
|
||||
+The \fB-l\fP switch shows detailed low and high memory statistics.
|
||||
+.PP
|
||||
+The \fB\-V\fP switch displays version information.
|
||||
.SH FILES
|
||||
.ta
|
||||
.IR /proc/meminfo "\-\- memory information"
|
22
procps/procps-3.2.7-longcmd.patch
Normal file
22
procps/procps-3.2.7-longcmd.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- procps-3.2.7/proc/readproc.c.kzak 2006-06-16 10:18:13.000000000 +0200
|
||||
+++ procps-3.2.7/proc/readproc.c 2006-09-27 11:25:13.000000000 +0200
|
||||
@@ -432,14 +432,17 @@
|
||||
if(fd==-1) return NULL;
|
||||
|
||||
/* read whole file into a memory buffer, allocating as we go */
|
||||
- while ((n = read(fd, buf, sizeof buf - 1)) > 0) {
|
||||
+ while ((n = read(fd, buf, sizeof buf - 1)) >= 0) {
|
||||
if (n < (int)(sizeof buf - 1))
|
||||
end_of_file = 1;
|
||||
- if (n == 0 && rbuf == 0)
|
||||
+ if (n == 0 && rbuf == 0) {
|
||||
+ close(fd);
|
||||
return NULL; /* process died between our open and read */
|
||||
+ }
|
||||
if (n < 0) {
|
||||
if (rbuf)
|
||||
free(rbuf);
|
||||
+ close(fd);
|
||||
return NULL; /* read error */
|
||||
}
|
||||
if (end_of_file && buf[n-1]) /* last read char not null */
|
12
procps/procps-3.2.7-ps-man-fmt.patch
Normal file
12
procps/procps-3.2.7-ps-man-fmt.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up procps-3.2.7/ps/ps.1.ps-man-fmt procps-3.2.7/ps/ps.1
|
||||
--- procps-3.2.7/ps/ps.1.ps-man-fmt 2008-09-01 11:43:18.000000000 +0200
|
||||
+++ procps-3.2.7/ps/ps.1 2008-09-01 11:43:41.000000000 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
.\" the space needed for the 1st two columns.
|
||||
.\" Making it messy: inches, ens, points, scaled points...
|
||||
.\"
|
||||
-.nr ColSize ((\n(.lu-\n(.iu/\n(.Hu-20u)n)
|
||||
+.nr ColSize ((\n[.l] - \n[.i]) / 1n - 20)
|
||||
.\"
|
||||
.\" This is for command options
|
||||
.nr OptSize (16u)
|
22
procps/procps-3.2.7-psman.patch
Normal file
22
procps/procps-3.2.7-psman.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- procps-3.2.7/ps/ps.1.psman 2007-06-20 08:30:47.000000000 +0200
|
||||
+++ procps-3.2.7/ps/ps.1 2007-06-20 08:50:10.000000000 +0200
|
||||
@@ -21,8 +21,8 @@
|
||||
.\" See /usr/share/groff/current/tmac/an-old.tmac for what these do.
|
||||
.\" Setting them to zero provides extra space, but only do that for
|
||||
.\" plain text output. PostScript and such will remain indented.
|
||||
-.if n .nr IN 0n
|
||||
-.if n .nr an-prevailing-indent 0n
|
||||
+.\" .if n .nr IN 0n
|
||||
+.\" .if n .nr an-prevailing-indent 0n
|
||||
.\"
|
||||
.\"
|
||||
.\" ColSize is used for the format spec table.
|
||||
@@ -838,6 +838,8 @@
|
||||
.\" lB1 lB1 lBw(5.5i)
|
||||
.\" lB1 l1 l.
|
||||
.\"
|
||||
+.RE
|
||||
+
|
||||
.TS
|
||||
expand;
|
||||
lB1 lB1 lBw(\n[ColSize]n)
|
113
procps/procps-3.2.7-slabtop-once.patch
Normal file
113
procps/procps-3.2.7-slabtop-once.patch
Normal file
@ -0,0 +1,113 @@
|
||||
diff -up procps-3.2.7/slabtop.c.once procps-3.2.7/slabtop.c
|
||||
--- procps-3.2.7/slabtop.c.once 2008-12-11 13:24:52.000000000 +0100
|
||||
+++ procps-3.2.7/slabtop.c 2008-12-11 13:33:12.000000000 +0100
|
||||
@@ -268,9 +268,24 @@ static void parse_input(char c)
|
||||
}
|
||||
}
|
||||
|
||||
+/*printw or printf depending on the context*/
|
||||
+static void printwf(int once, const char *s,...)
|
||||
+{
|
||||
+va_list va;
|
||||
+
|
||||
+va_start(va,s);
|
||||
+if(once)
|
||||
+ vprintf(s,va);
|
||||
+else
|
||||
+ vwprintw(stdscr, s, va);
|
||||
+va_end(va);
|
||||
+}
|
||||
+
|
||||
+
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int o;
|
||||
+ int once = 0;
|
||||
unsigned short old_rows;
|
||||
struct slab_info *slab_list = NULL;
|
||||
|
||||
@@ -307,6 +322,7 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'o':
|
||||
delay = 0;
|
||||
+ once = 1;
|
||||
break;
|
||||
case 'V':
|
||||
display_version();
|
||||
@@ -322,12 +338,18 @@ int main(int argc, char *argv[])
|
||||
if (tcgetattr(0, &saved_tty) == -1)
|
||||
perror("tcgetattr");
|
||||
|
||||
- initscr();
|
||||
- term_size(0);
|
||||
- old_rows = rows;
|
||||
- resizeterm(rows, cols);
|
||||
- signal(SIGWINCH, term_size);
|
||||
- signal(SIGINT, sigint_handler);
|
||||
+ if(!once) {
|
||||
+ initscr();
|
||||
+ term_size(0);
|
||||
+ old_rows = rows;
|
||||
+ resizeterm(rows, cols);
|
||||
+ signal(SIGWINCH, term_size);
|
||||
+ signal(SIGINT, sigint_handler);
|
||||
+ } else {
|
||||
+ old_rows = rows;
|
||||
+ rows = 80;
|
||||
+ cols = 24;
|
||||
+ }
|
||||
|
||||
do {
|
||||
struct slab_info *curr;
|
||||
@@ -341,12 +363,12 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
if (old_rows != rows) {
|
||||
- resizeterm(rows, cols);
|
||||
+ if(!once) resizeterm(rows, cols);
|
||||
old_rows = rows;
|
||||
}
|
||||
|
||||
move(0,0);
|
||||
- printw( " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n"
|
||||
+ printwf(once, " Active / Total Objects (%% used) : %d / %d (%.1f%%)\n"
|
||||
" Active / Total Slabs (%% used) : %d / %d (%.1f%%)\n"
|
||||
" Active / Total Caches (%% used) : %d / %d (%.1f%%)\n"
|
||||
" Active / Total Size (%% used) : %.2fK / %.2fK (%.1f%%)\n"
|
||||
@@ -360,15 +382,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
slab_list = slabsort(slab_list);
|
||||
|
||||
- attron(A_REVERSE);
|
||||
- printw( "%6s %6s %4s %8s %6s %8s %10s %-23s\n",
|
||||
+ if(!once) attron(A_REVERSE);
|
||||
+ printwf(once, "%6s %6s %4s %8s %6s %8s %10s %-23s\n",
|
||||
"OBJS", "ACTIVE", "USE", "OBJ SIZE", "SLABS",
|
||||
"OBJ/SLAB", "CACHE SIZE", "NAME");
|
||||
- attroff(A_REVERSE);
|
||||
+ if(!once) attroff(A_REVERSE);
|
||||
|
||||
curr = slab_list;
|
||||
for (i = 0; i < rows - 8 && curr->next; i++) {
|
||||
- printw("%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n",
|
||||
+ printwf(once, "%6u %6u %3u%% %7.2fK %6u %8u %9uK %-23s\n",
|
||||
curr->nr_objs, curr->nr_active_objs, curr->use,
|
||||
curr->obj_size / 1024.0, curr->nr_slabs,
|
||||
curr->objs_per_slab, (unsigned)(curr->cache_size / 1024),
|
||||
@@ -376,7 +398,7 @@ int main(int argc, char *argv[])
|
||||
curr = curr->next;
|
||||
}
|
||||
|
||||
- refresh();
|
||||
+ if(!once) refresh();
|
||||
put_slabinfo(slab_list);
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
@@ -392,6 +414,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
tcsetattr(0, TCSAFLUSH, &saved_tty);
|
||||
free_slabinfo(slab_list);
|
||||
- endwin();
|
||||
+ if(!once) endwin();
|
||||
return 0;
|
||||
}
|
19
procps/procps-3.2.7-top-clrscr.patch
Normal file
19
procps/procps-3.2.7-top-clrscr.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -up procps-3.2.7/top.c.clrscr procps-3.2.7/top.c
|
||||
--- procps-3.2.7/top.c.clrscr 2008-04-08 08:49:48.000000000 +0200
|
||||
+++ procps-3.2.7/top.c 2008-04-08 08:50:07.000000000 +0200
|
||||
@@ -2109,6 +2109,7 @@ static void fields_sort (void)
|
||||
*p = x + 'A';
|
||||
Curwin->rc.sortindx = x;
|
||||
putp(Cap_curs_norm);
|
||||
+ putp(Cap_clr_scr);
|
||||
}
|
||||
|
||||
|
||||
@@ -2134,6 +2135,7 @@ static void fields_toggle (void)
|
||||
*p = i + 'A';
|
||||
}
|
||||
putp(Cap_curs_norm);
|
||||
+ putp(Cap_clr_scr);
|
||||
}
|
||||
|
||||
/*###### Windows/Field Groups support #################################*/
|
20
procps/procps-3.2.7-top-cpu0.patch
Normal file
20
procps/procps-3.2.7-top-cpu0.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- procps-3.2.7/top.c.orig 2007-09-07 21:28:41.000000000 +0100
|
||||
+++ procps-3.2.7/top.c 2007-09-07 21:29:15.000000000 +0100
|
||||
@@ -959,8 +959,15 @@
|
||||
|
||||
// and just in case we're 2.2.xx compiled without SMP support...
|
||||
if (Cpu_tot == 1) {
|
||||
- cpus[1].id = 0;
|
||||
- memcpy(cpus, &cpus[1], sizeof(CPU_t));
|
||||
+ cpus[0].id = cpus[1].id = 0;
|
||||
+ cpus[0].u = cpus[1].u;
|
||||
+ cpus[0].n = cpus[1].n;
|
||||
+ cpus[0].s = cpus[1].s;
|
||||
+ cpus[0].i = cpus[1].i;
|
||||
+ cpus[0].w = cpus[1].w;
|
||||
+ cpus[0].x = cpus[1].x;
|
||||
+ cpus[0].y = cpus[1].y;
|
||||
+ cpus[0].z = cpus[1].z;
|
||||
}
|
||||
|
||||
// now value each separate cpu's tics
|
84
procps/procps-3.2.7-top-env-cpuloop.patch
Normal file
84
procps/procps-3.2.7-top-env-cpuloop.patch
Normal file
@ -0,0 +1,84 @@
|
||||
diff -up procps-3.2.7/top.c.p15 procps-3.2.7/top.c
|
||||
--- procps-3.2.7/top.c.p15 2008-09-01 11:37:51.000000000 +0200
|
||||
+++ procps-3.2.7/top.c 2008-09-01 11:37:51.000000000 +0200
|
||||
@@ -121,6 +121,7 @@ static int No_ksyms = -1, // set t
|
||||
Batch = 0, // batch mode, collect no input, dumb output
|
||||
Loops = -1, // number of iterations, -1 loops forever
|
||||
Secure_mode = 0; // set if some functionality restricted
|
||||
+static int CPU_loop = 0; // wait for reliable CPU data
|
||||
|
||||
/* Some cap's stuff to reduce runtime calls --
|
||||
to accomodate 'Batch' mode, they begin life as empty strings */
|
||||
@@ -1679,6 +1680,9 @@ static void before (char *me)
|
||||
Fieldstab[P_PPD].fmts = pid_fmt;
|
||||
Fieldstab[P_PPD].head = " PPID" + 10 - pid_digits;
|
||||
}
|
||||
+
|
||||
+ if (( getenv("CPULOOP")) && ( atoi(getenv("CPULOOP")) == 1 ))
|
||||
+ CPU_loop = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -2978,6 +2981,7 @@ static proc_t **summary_show (void)
|
||||
{
|
||||
static proc_t **p_table = NULL;
|
||||
static CPU_t *smpcpu = NULL;
|
||||
+ static int first = 0;
|
||||
|
||||
// whoa first time, gotta' prime the pump...
|
||||
if (!p_table) {
|
||||
@@ -3025,6 +3029,28 @@ static proc_t **summary_show (void)
|
||||
|
||||
smpcpu = cpus_refresh(smpcpu);
|
||||
|
||||
+ if (first==0 && CPU_loop)
|
||||
+ {
|
||||
+ int i;
|
||||
+ CPU_t *cpu;
|
||||
+ for (i = 0; i < Cpu_tot; i++) {
|
||||
+ cpu = &smpcpu[i];
|
||||
+ cpu->u_sav = cpu->u;
|
||||
+ cpu->s_sav = cpu->s;
|
||||
+ cpu->n_sav = cpu->n;
|
||||
+ cpu->i_sav = cpu->i;
|
||||
+ cpu->w_sav = cpu->w;
|
||||
+ cpu->x_sav = cpu->x;
|
||||
+ cpu->y_sav = cpu->y;
|
||||
+ cpu->z_sav = cpu->z;
|
||||
+ }
|
||||
+ tv.tv_sec = Rc.delay_time;
|
||||
+ tv.tv_usec = (Rc.delay_time - (int)Rc.delay_time) * 1000000;
|
||||
+ select(0, NULL, NULL, NULL, &tv);
|
||||
+
|
||||
+ smpcpu = cpus_refresh(smpcpu);
|
||||
+ }
|
||||
+
|
||||
if (CHKw(Curwin, View_CPUSUM)) {
|
||||
// display just the 1st /proc/stat line
|
||||
summaryhlp(&smpcpu[Cpu_tot], "Cpu(s):");
|
||||
@@ -3050,6 +3076,8 @@ static proc_t **summary_show (void)
|
||||
}
|
||||
|
||||
SETw(Curwin, NEWFRAM_cwo);
|
||||
+
|
||||
+ first = 1;
|
||||
return p_table;
|
||||
}
|
||||
|
||||
diff -up procps-3.2.7/top.1.p15 procps-3.2.7/top.1
|
||||
--- procps-3.2.7/top.1.p15 2008-09-01 11:37:51.000000000 +0200
|
||||
+++ procps-3.2.7/top.1 2008-09-01 11:37:51.000000000 +0200
|
||||
@@ -1183,6 +1183,13 @@ Then ponder this:
|
||||
Send bug reports to:
|
||||
Albert D\. Cahalan, <albert@users.sf.net>
|
||||
|
||||
+The top command calculates Cpu(s) by looking at the change in CPU time values
|
||||
+between samples. When you first run it, it has no previous sample to compare
|
||||
+to, so these initial values are the percentages since boot. It means you need
|
||||
+at least two loops or you have to ignore summary output from the first loop.
|
||||
+This is problem for example for batch mode. There is a possible workaround if
|
||||
+you define the CPULOOP=1 environment variable. The top command will be run one
|
||||
+extra hidden loop for CPU data before standard output.
|
||||
|
||||
.\" ----------------------------------------------------------------------
|
||||
.SH 8. HISTORY Former top
|
32
procps/procps-3.2.7-top-manpage.patch
Normal file
32
procps/procps-3.2.7-top-manpage.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff -up procps-3.2.7/top.1.cpudesc procps-3.2.7/top.1
|
||||
--- procps-3.2.7/top.1.cpudesc 2008-01-18 08:04:19.000000000 +0100
|
||||
+++ procps-3.2.7/top.1 2008-01-18 08:15:49.000000000 +0100
|
||||
@@ -121,6 +121,7 @@
|
||||
2. FIELDS / Columns
|
||||
a. DESCRIPTIONS of Fields
|
||||
b. SELECTING and ORDERING Columns
|
||||
+ c. SUMMARY Area Fields
|
||||
3. INTERACTIVE Commands
|
||||
a. GLOBAL Commands
|
||||
b. SUMMARY Area Commands
|
||||
@@ -540,6 +540,20 @@ You\fI move\fR a field to the\fB left\fR
|
||||
upper case\fR letter and to the\fB right\fR with the\fB lower case\fR
|
||||
letter.
|
||||
|
||||
+.\" ......................................................................
|
||||
+.SS 2c. SUMMARY Area Fields
|
||||
+.\" ----------------------------------------------------------------------
|
||||
+The summary area fields describing CPU statistics are abbreviated. They provide
|
||||
+information about times spent in:
|
||||
+ \fR us = user mode
|
||||
+ \fR sy = system mode
|
||||
+ \fR ni = low priority user mode (nice)
|
||||
+ \fR id = idle task
|
||||
+ \fR wa = I/O waiting
|
||||
+ \fR hi = servicing IRQs
|
||||
+ \fR si = servicing soft IRQs
|
||||
+ \fR st = steal (time given to other DomU instances)
|
||||
+
|
||||
|
||||
.\" ----------------------------------------------------------------------
|
||||
.SH 3. INTERACTIVE Commands
|
98
procps/procps-3.2.7-top-remcpu.patch
Normal file
98
procps/procps-3.2.7-top-remcpu.patch
Normal file
@ -0,0 +1,98 @@
|
||||
--- procps-3.2.7/top.c.remcpu 2006-07-10 10:41:11.000000000 +0200
|
||||
+++ procps-3.2.7/top.c 2006-07-10 10:41:35.000000000 +0200
|
||||
@@ -912,6 +912,7 @@
|
||||
static CPU_t *cpus_refresh (CPU_t *cpus)
|
||||
{
|
||||
static FILE *fp = NULL;
|
||||
+ static int cpu_max;
|
||||
int i;
|
||||
int num;
|
||||
// enough for a /proc/stat CPU line (not the intr line)
|
||||
@@ -926,24 +927,29 @@
|
||||
can hold tics representing the /proc/stat cpu summary (the first
|
||||
line read) -- that slot supports our View_CPUSUM toggle */
|
||||
cpus = alloc_c((1 + Cpu_tot) * sizeof(CPU_t));
|
||||
+ cpu_max = Cpu_tot;
|
||||
}
|
||||
+ else if (cpu_max > Cpu_tot)
|
||||
+ /* move saved CUPs summary to cpu_max possition */
|
||||
+ memcpy(&cpus[cpu_max], &cpus[Cpu_tot], sizeof(CPU_t));
|
||||
+
|
||||
rewind(fp);
|
||||
fflush(fp);
|
||||
|
||||
// first value the last slot with the cpu summary line
|
||||
if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
|
||||
- cpus[Cpu_tot].x = 0; // FIXME: can't tell by kernel version number
|
||||
- cpus[Cpu_tot].y = 0; // FIXME: can't tell by kernel version number
|
||||
- cpus[Cpu_tot].z = 0; // FIXME: can't tell by kernel version number
|
||||
+ cpus[cpu_max].x = 0; // FIXME: can't tell by kernel version number
|
||||
+ cpus[cpu_max].y = 0; // FIXME: can't tell by kernel version number
|
||||
+ cpus[cpu_max].z = 0; // FIXME: can't tell by kernel version number
|
||||
num = sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
|
||||
- &cpus[Cpu_tot].u,
|
||||
- &cpus[Cpu_tot].n,
|
||||
- &cpus[Cpu_tot].s,
|
||||
- &cpus[Cpu_tot].i,
|
||||
- &cpus[Cpu_tot].w,
|
||||
- &cpus[Cpu_tot].x,
|
||||
- &cpus[Cpu_tot].y,
|
||||
- &cpus[Cpu_tot].z
|
||||
+ &cpus[cpu_max].u,
|
||||
+ &cpus[cpu_max].n,
|
||||
+ &cpus[cpu_max].s,
|
||||
+ &cpus[cpu_max].i,
|
||||
+ &cpus[cpu_max].w,
|
||||
+ &cpus[cpu_max].x,
|
||||
+ &cpus[cpu_max].y,
|
||||
+ &cpus[cpu_max].z
|
||||
);
|
||||
if (num < 4)
|
||||
std_err("failed /proc/stat read");
|
||||
@@ -955,7 +961,7 @@
|
||||
}
|
||||
|
||||
// now value each separate cpu's tics
|
||||
- for (i = 0; 1 < Cpu_tot && i < Cpu_tot; i++) {
|
||||
+ for (i = 0; ; i++) {
|
||||
if (!fgets(buf, sizeof(buf), fp)) std_err("failed /proc/stat read");
|
||||
cpus[i].x = 0; // FIXME: can't tell by kernel version number
|
||||
cpus[i].y = 0; // FIXME: can't tell by kernel version number
|
||||
@@ -964,9 +970,35 @@
|
||||
&cpus[i].id,
|
||||
&cpus[i].u, &cpus[i].n, &cpus[i].s, &cpus[i].i, &cpus[i].w, &cpus[i].x, &cpus[i].y, &cpus[i].z
|
||||
);
|
||||
- if (num < 4)
|
||||
- std_err("failed /proc/stat read");
|
||||
+ if (num < 4) {
|
||||
+ Cpu_tot = i;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i == cpu_max - 1) {
|
||||
+ // Bump cpu_max and extend cpus
|
||||
+ cpu_max++;
|
||||
+ cpus = realloc(cpus, (1 + cpu_max) * sizeof(CPU_t));
|
||||
+ if (!cpus) std_err("realloc failed");
|
||||
+ memcpy(&cpus[cpu_max], &cpus[cpu_max-1], sizeof(CPU_t));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (cpu_max > Cpu_tot)
|
||||
+ memcpy(&cpus[Cpu_tot], &cpus[cpu_max], sizeof(CPU_t));
|
||||
+
|
||||
+ // and just in case we're 2.2.xx compiled without SMP support...
|
||||
+ if (Cpu_tot == 1) {
|
||||
+ cpus[0].id = cpus[1].id = 0;
|
||||
+ cpus[0].u = cpus[1].u;
|
||||
+ cpus[0].n = cpus[1].n;
|
||||
+ cpus[0].s = cpus[1].s;
|
||||
+ cpus[0].i = cpus[1].i;
|
||||
+ cpus[0].w = cpus[1].w;
|
||||
+ cpus[0].x = cpus[1].x;
|
||||
+ cpus[0].y = cpus[1].y;
|
||||
+ cpus[0].z = cpus[1].z;
|
||||
}
|
||||
+
|
||||
return cpus;
|
||||
}
|
||||
|
37
procps/procps-3.2.7-top-sorthigh.patch
Normal file
37
procps/procps-3.2.7-top-sorthigh.patch
Normal file
@ -0,0 +1,37 @@
|
||||
--- procps-3.2.7/top.c.sorthigh 2007-02-05 09:06:34.000000000 +0100
|
||||
+++ procps-3.2.7/top.c 2007-02-05 09:09:35.000000000 +0100
|
||||
@@ -3121,6 +3121,7 @@
|
||||
unsigned w = Fieldstab[i].width;
|
||||
|
||||
int advance = (x==0) && !Rc.mode_altscr;
|
||||
+ f += advance;
|
||||
|
||||
switch (i) {
|
||||
case P_CMD:
|
||||
@@ -3179,7 +3180,7 @@
|
||||
break;
|
||||
case P_PRI:
|
||||
if (unlikely(-99 > p->priority) || unlikely(999 < p->priority)) {
|
||||
- f = " RT";
|
||||
+ f = advance ? " RT" : " RT";
|
||||
MKCOL("");
|
||||
} else
|
||||
MKCOL((int)p->priority);
|
||||
@@ -3227,7 +3228,7 @@
|
||||
break;
|
||||
case P_WCH:
|
||||
if (No_ksyms) {
|
||||
- f = " %08lx ";
|
||||
+ f = advance ? "%08lx " : " %08lx ";
|
||||
MKCOL((long)p->wchan);
|
||||
} else {
|
||||
MKCOL(lookup_wchan(p->wchan, p->XXXID));
|
||||
@@ -3236,7 +3237,7 @@
|
||||
|
||||
} /* end: switch 'procflag' */
|
||||
|
||||
- rp = scat(rp, cbuf+advance);
|
||||
+ rp = scat(rp, cbuf);
|
||||
} /* end: for 'maxpflgs' */
|
||||
|
||||
PUFF(
|
16
procps/procps-3.2.7-w-best.patch
Normal file
16
procps/procps-3.2.7-w-best.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- procps-3.2.7/w.c.kzak 2007-04-02 23:58:30.000000000 +0200
|
||||
+++ procps-3.2.7/w.c 2007-04-03 00:09:15.000000000 +0200
|
||||
@@ -149,11 +149,11 @@
|
||||
const proc_t *restrict const tmp = *pptr;
|
||||
if(unlikely(tmp->tgid == u->ut_pid)) {
|
||||
*found_utpid = 1;
|
||||
- best = tmp;
|
||||
+ if (!best)
|
||||
+ best = tmp;
|
||||
}
|
||||
if(tmp->tty != line) continue;
|
||||
(*jcpu) += tmp->utime + tmp->stime;
|
||||
- secondbest = tmp;
|
||||
/* same time-logic here as for "best" below */
|
||||
if(! (secondbest && tmp->start_time <= secondbest->start_time) ){
|
||||
secondbest = tmp;
|
139
procps/procps-3.2.7-watch-unicode.patch
Normal file
139
procps/procps-3.2.7-watch-unicode.patch
Normal file
@ -0,0 +1,139 @@
|
||||
diff -u procps-3.2.7/Makefile procps/Makefile
|
||||
--- procps-3.2.7/Makefile 2007-01-16 17:24:49.000000000 +0100
|
||||
+++ procps/Makefile 2007-01-16 17:29:27.000000000 +0100
|
||||
@@ -67,7 +67,7 @@
|
||||
# plus the top-level Makefile to make it work stand-alone.
|
||||
_TARFILES := Makefile
|
||||
|
||||
-CURSES := -lncurses
|
||||
+CURSES := -lncursesw
|
||||
|
||||
# This seems about right for the dynamic library stuff.
|
||||
# Something like this is probably needed to make the SE Linux
|
||||
diff -u procps-3.2.7/watch.c procps/watch.c
|
||||
--- procps-3.2.7/watch.c 2007-01-16 17:24:49.000000000 +0100
|
||||
+++ procps/watch.c 2007-01-16 18:06:57.000000000 +0100
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <termios.h>
|
||||
#include <locale.h>
|
||||
#include "proc/procps.h"
|
||||
+#include <wchar.h>
|
||||
+#include <wctype.h>
|
||||
|
||||
#ifdef FORCE_8BIT
|
||||
#undef isprint
|
||||
@@ -137,6 +139,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
+static wint_t
|
||||
+readwc(FILE *stream, mbstate_t *mbs)
|
||||
+{
|
||||
+ for (;;) {
|
||||
+ int chr;
|
||||
+ char c;
|
||||
+ wchar_t wc;
|
||||
+ size_t len;
|
||||
+
|
||||
+ chr = getc(stream);
|
||||
+ if (chr == EOF)
|
||||
+ return WEOF;
|
||||
+ c = chr;
|
||||
+ len = mbrtowc(&wc, &c, 1, mbs);
|
||||
+ if (len == (size_t)-1)
|
||||
+ memset(mbs, 0, sizeof(*mbs));
|
||||
+ else if (len != (size_t)-2)
|
||||
+ return wc;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
@@ -243,6 +266,7 @@
|
||||
FILE *p;
|
||||
int x, y;
|
||||
int oldeolseen = 1;
|
||||
+ mbstate_t mbs;
|
||||
|
||||
if (screen_size_changed) {
|
||||
get_terminal_size();
|
||||
@@ -276,49 +300,63 @@
|
||||
do_exit(2);
|
||||
}
|
||||
|
||||
+ memset(&mbs, 0, sizeof(mbs));
|
||||
for (y = show_title; y < height; y++) {
|
||||
int eolseen = 0, tabpending = 0;
|
||||
for (x = 0; x < width; x++) {
|
||||
- int c = ' ';
|
||||
- int attr = 0;
|
||||
+ wint_t c = L' ';
|
||||
+ int attr = 0, c_width;
|
||||
+ cchar_t cc;
|
||||
+ wchar_t wstr[2];
|
||||
|
||||
if (!eolseen) {
|
||||
/* if there is a tab pending, just spit spaces until the
|
||||
next stop instead of reading characters */
|
||||
if (!tabpending)
|
||||
do
|
||||
- c = getc(p);
|
||||
- while (c != EOF && !isprint(c)
|
||||
- && c != '\n'
|
||||
- && c != '\t');
|
||||
- if (c == '\n')
|
||||
+ c = readwc(p, &mbs);
|
||||
+ while (c != WEOF && !iswprint(c)
|
||||
+ && c != L'\n'
|
||||
+ && c != L'\t');
|
||||
+ if (c == L'\n')
|
||||
if (!oldeolseen && x == 0) {
|
||||
x = -1;
|
||||
continue;
|
||||
} else
|
||||
eolseen = 1;
|
||||
- else if (c == '\t')
|
||||
+ else if (c == L'\t')
|
||||
tabpending = 1;
|
||||
- if (c == EOF || c == '\n' || c == '\t')
|
||||
- c = ' ';
|
||||
+ if (c == WEOF || c == L'\n' || c == L'\t')
|
||||
+ c = L' ';
|
||||
if (tabpending && (((x + 1) % 8) == 0))
|
||||
tabpending = 0;
|
||||
}
|
||||
+ wstr[0] = c;
|
||||
+ wstr[1] = 0;
|
||||
+ setcchar (&cc, wstr, 0, 0, NULL);
|
||||
move(y, x);
|
||||
if (option_differences) {
|
||||
- chtype oldch = inch();
|
||||
- char oldc = oldch & A_CHARTEXT;
|
||||
+ cchar_t oldc;
|
||||
+ wchar_t oldwstr[2];
|
||||
+ attr_t attrs;
|
||||
+ short colors;
|
||||
+
|
||||
+ in_wch(&oldc);
|
||||
+ getcchar(&oldc, oldwstr, &attrs, &colors, NULL);
|
||||
attr = !first_screen
|
||||
- && ((char)c != oldc
|
||||
+ && (wstr[0] != oldwstr[0]
|
||||
||
|
||||
(option_differences_cumulative
|
||||
- && (oldch & A_ATTRIBUTES)));
|
||||
+ && attrs));
|
||||
}
|
||||
if (attr)
|
||||
standout();
|
||||
- addch(c);
|
||||
+ add_wch(&cc);
|
||||
if (attr)
|
||||
standend();
|
||||
+ c_width = wcwidth(c);
|
||||
+ if (c_width > 1)
|
||||
+ x += c_width - 1;
|
||||
}
|
||||
oldeolseen = eolseen;
|
||||
}
|
14
procps/procps-3.2.8-gmake-3.82.patch
Normal file
14
procps/procps-3.2.8-gmake-3.82.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Index: procps-3.2.8/Makefile
|
||||
===================================================================
|
||||
--- procps-3.2.8.orig/Makefile
|
||||
+++ procps-3.2.8/Makefile
|
||||
@@ -174,7 +174,8 @@ INSTALL := $(BINFILES) $(MANFILES)
|
||||
# want this rule first, use := on ALL, and ALL not filled in yet
|
||||
all: do_all
|
||||
|
||||
--include */module.mk
|
||||
+-include proc/module.mk
|
||||
+-include ps/module.mk
|
||||
|
||||
do_all: $(ALL)
|
||||
|
20
procps/procps-3.2.8-kernel3-uts.patch
Normal file
20
procps/procps-3.2.8-kernel3-uts.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -Naur procps-3.2.8-20110302git.orig/proc/version.c procps-3.2.8-20110302git/proc/version.c
|
||||
--- procps-3.2.8-20110302git.orig/proc/version.c 2011-06-10 17:00:33.000000000 +0200
|
||||
+++ procps-3.2.8-20110302git/proc/version.c 2011-06-10 17:20:17.000000000 +0200
|
||||
@@ -38,10 +38,15 @@
|
||||
void init_Linux_version(void) {
|
||||
static struct utsname uts;
|
||||
int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
|
||||
+ int version_string_depth;
|
||||
|
||||
if (uname(&uts) == -1) /* failure implies impending death */
|
||||
exit(1);
|
||||
- if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)
|
||||
+
|
||||
+ version_string_depth = sscanf(uts.release, "%d.%d.%d", &x, &y, &z);
|
||||
+
|
||||
+ if ((version_string_depth < 2) || /* Non-standard for all known kernels */
|
||||
+ ((version_string_depth < 3) && (x < 3))) /* Non-standard for 2.x.x kernels */
|
||||
fprintf(stderr, /* *very* unlikely to happen by accident */
|
||||
"Non-standard uts for running kernel:\n"
|
||||
"release %s=%d.%d.%d gives version code %d\n",
|
23
procps/procps-3.2.8-linux-ver-init.patch
Normal file
23
procps/procps-3.2.8-linux-ver-init.patch
Normal file
@ -0,0 +1,23 @@
|
||||
https://bugs.gentoo.org/303120
|
||||
|
||||
make sure the linux version constructor runs before the libproc constructor
|
||||
since the latter uses variables setup by the former
|
||||
|
||||
fix by Chris Coleman
|
||||
|
||||
Index: proc/version.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/procps/procps/proc/version.c,v
|
||||
retrieving revision 1.7
|
||||
diff -u -p -r1.7 version.c
|
||||
--- proc/version.c 9 Feb 2003 07:27:16 -0000 1.7
|
||||
+++ proc/version.c 14 Nov 2010 00:22:44 -0000
|
||||
@@ -33,7 +33,7 @@ void display_version(void) {
|
||||
|
||||
int linux_version_code;
|
||||
|
||||
-static void init_Linux_version(void) __attribute__((constructor));
|
||||
+static void init_Linux_version(void) __attribute__((constructor(100)));
|
||||
static void init_Linux_version(void) {
|
||||
static struct utsname uts;
|
||||
int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
|
66
procps/procps-3.2.8-setlocale.patch
Normal file
66
procps/procps-3.2.8-setlocale.patch
Normal file
@ -0,0 +1,66 @@
|
||||
diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c
|
||||
--- procps-3.2.8-orig/proc/sysinfo.c 2008-03-24 05:33:43.000000000 +0100
|
||||
+++ procps-3.2.8/proc/sysinfo.c 2009-12-18 22:50:52.000000000 +0100
|
||||
@@ -74,17 +74,19 @@
|
||||
/***********************************************************************/
|
||||
int uptime(double *restrict uptime_secs, double *restrict idle_secs) {
|
||||
double up=0, idle=0;
|
||||
- char *restrict savelocale;
|
||||
+ char *savelocale;
|
||||
|
||||
FILE_TO_BUF(UPTIME_FILE,uptime_fd);
|
||||
- savelocale = setlocale(LC_NUMERIC, NULL);
|
||||
+ savelocale = strdup(setlocale(LC_NUMERIC, NULL));
|
||||
setlocale(LC_NUMERIC,"C");
|
||||
if (sscanf(buf, "%lf %lf", &up, &idle) < 2) {
|
||||
setlocale(LC_NUMERIC,savelocale);
|
||||
+ free(savelocale);
|
||||
fputs("bad data in " UPTIME_FILE "\n", stderr);
|
||||
return 0;
|
||||
}
|
||||
setlocale(LC_NUMERIC,savelocale);
|
||||
+ free(savelocale);
|
||||
SET_IF_DESIRED(uptime_secs, up);
|
||||
SET_IF_DESIRED(idle_secs, idle);
|
||||
return up; /* assume never be zero seconds in practice */
|
||||
@@ -128,9 +130,9 @@
|
||||
double up_1, up_2, seconds;
|
||||
unsigned long long jiffies;
|
||||
unsigned h;
|
||||
- char *restrict savelocale;
|
||||
+ char *savelocale;
|
||||
|
||||
- savelocale = setlocale(LC_NUMERIC, NULL);
|
||||
+ savelocale = strdup(setlocale(LC_NUMERIC, NULL));
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
do{
|
||||
FILE_TO_BUF(UPTIME_FILE,uptime_fd); sscanf(buf, "%lf", &up_1);
|
||||
@@ -141,6 +143,7 @@
|
||||
/* uptime(&up_2, NULL); */
|
||||
} while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */
|
||||
setlocale(LC_NUMERIC, savelocale);
|
||||
+ free(savelocale);
|
||||
jiffies = user_j + nice_j + sys_j + other_j;
|
||||
seconds = (up_1 + up_2) / 2;
|
||||
h = (unsigned)( (double)jiffies/seconds/smp_num_cpus );
|
||||
@@ -303,16 +306,18 @@
|
||||
/***********************************************************************/
|
||||
void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) {
|
||||
double avg_1=0, avg_5=0, avg_15=0;
|
||||
- char *restrict savelocale;
|
||||
+ char *savelocale;
|
||||
|
||||
FILE_TO_BUF(LOADAVG_FILE,loadavg_fd);
|
||||
- savelocale = setlocale(LC_NUMERIC, NULL);
|
||||
+ savelocale = strdup(setlocale(LC_NUMERIC, NULL));
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
if (sscanf(buf, "%lf %lf %lf", &avg_1, &avg_5, &avg_15) < 3) {
|
||||
fputs("bad data in " LOADAVG_FILE "\n", stderr);
|
||||
+ free(savelocale);
|
||||
exit(1);
|
||||
}
|
||||
setlocale(LC_NUMERIC, savelocale);
|
||||
+ free(savelocale);
|
||||
SET_IF_DESIRED(av1, avg_1);
|
||||
SET_IF_DESIRED(av5, avg_5);
|
||||
SET_IF_DESIRED(av15, avg_15);
|
49
procps/procps-3.2.8-threads.patch
Normal file
49
procps/procps-3.2.8-threads.patch
Normal file
@ -0,0 +1,49 @@
|
||||
diff -up procps-3.2.8/top.c.threads procps-3.2.8/top.c
|
||||
--- procps-3.2.8/top.c.threads 2009-10-01 07:14:43.000000000 -0400
|
||||
+++ procps-3.2.8/top.c 2009-10-05 14:05:00.000000000 -0400
|
||||
@@ -1138,6 +1138,7 @@ static proc_t **procs_refresh (proc_t **
|
||||
#define ENTsz sizeof(proc_t)
|
||||
static unsigned savmax = 0; // first time, Bypass: (i)
|
||||
proc_t *ptsk = (proc_t *)-1; // first time, Force: (ii)
|
||||
+ proc_t *saved_ptsk;
|
||||
unsigned curmax = 0; // every time (jeeze)
|
||||
PROCTAB* PT;
|
||||
static int show_threads_was_enabled = 0; // optimization
|
||||
@@ -1172,6 +1173,10 @@ static proc_t **procs_refresh (proc_t **
|
||||
while (curmax < savmax) {
|
||||
proc_t *ttsk;
|
||||
if (unlikely(!(ptsk = readproc(PT, NULL)))) break;
|
||||
+ if(!show_threads_was_enabled)
|
||||
+ saved_ptsk = ptsk;
|
||||
+ else
|
||||
+ saved_ptsk = NULL;
|
||||
show_threads_was_enabled = 1;
|
||||
while (curmax < savmax) {
|
||||
unsigned idx;
|
||||
@@ -1189,7 +1194,7 @@ static proc_t **procs_refresh (proc_t **
|
||||
prochlp(ttsk);
|
||||
++curmax;
|
||||
}
|
||||
- free(ptsk); // readproc() proc_t not used
|
||||
+ if(!saved_ptsk) free(ptsk); // readproc() proc_t not used
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1208,7 +1213,8 @@ static proc_t **procs_refresh (proc_t **
|
||||
else { // show each thread in a process separately
|
||||
while (ptsk) {
|
||||
proc_t *ttsk;
|
||||
- if (likely(ptsk = readproc(PT, NULL))) {
|
||||
+ if (likely(ptsk = readproc(PT, NULL)) ||
|
||||
+ unlikely(saved_ptsk && (ptsk = saved_ptsk)) ) {
|
||||
show_threads_was_enabled = 1;
|
||||
while (1) {
|
||||
table = alloc_r(table, (curmax + 1) * PTRsz);
|
||||
@@ -1216,6 +1222,7 @@ static proc_t **procs_refresh (proc_t **
|
||||
prochlp(ttsk);
|
||||
table[curmax++] = ttsk;
|
||||
}
|
||||
+ saved_ptsk = NULL;
|
||||
free(ptsk); // readproc() proc_t not used
|
||||
}
|
||||
}
|
@ -9,20 +9,21 @@ source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=tiacx
|
||||
pkgver=20080210
|
||||
pkgrel=24
|
||||
pkgdesc="OpenSource module for Texas Instruments ACX100/ACX111 wireless chips. For stock chakra 2.6 kernel"
|
||||
pkgrel=28
|
||||
pkgdesc="OpenSource module for Texas Instruments ACX100/ACX111 wireless chips. For stock chakra kernel"
|
||||
arch=(i686 x86_64)
|
||||
url="http://acx100.sourceforge.net/"
|
||||
license=('MPL')
|
||||
depends=('wireless_tools' 'kernel26>=2.6.38rc5' 'tiacx-firmware')
|
||||
makedepends=('kernel26-headers' 'kernel26-headers')
|
||||
depends=('wireless_tools' 'linux>=3.0' 'linux<3.1' 'tiacx-firmware')
|
||||
makedepends=('linux-headers' 'linux-headers')
|
||||
install=acx.install
|
||||
source=(http://downloads.sourceforge.net/sourceforge/acx100/acx-$pkgver.tar.bz2
|
||||
kernel-2.6.27.patch
|
||||
kernel-2.6.30.patch
|
||||
kernel-2.6.31.patch
|
||||
kernel-2.6.33.patch)
|
||||
_kernver=2.6.38-CHAKRA
|
||||
# Find the kernel name inside the chroot
|
||||
_kernver=`pacman -Q linux | cut -c7-9 | sed 's/linux //g'`-CHAKRA
|
||||
|
||||
build() {
|
||||
cd $startdir/src/acx-$pkgver
|
||||
|
@ -1,19 +1,19 @@
|
||||
# arg 1: the new package version
|
||||
post_install() {
|
||||
KERNEL_VERSION='2.6.38-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# arg 1: the new package version
|
||||
# arg 2: the old package version
|
||||
post_upgrade() {
|
||||
KERNEL_VERSION='2.6.38-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
|
||||
}
|
||||
|
||||
# arg 1: the old package version
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.38-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
@ -6,14 +6,15 @@
|
||||
|
||||
pkgname=vhba-module
|
||||
pkgver=20100822
|
||||
_kernver='2.6.38-CHAKRA'
|
||||
pkgrel=2
|
||||
# Find the kernel name inside the chroot
|
||||
_kernver=`pacman -Q linux | cut -c7-9 | sed 's/linux //g'`-CHAKRA
|
||||
pkgrel=6
|
||||
pkgdesc="Kernel module that emulates SCSI devices"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://cdemu.sourceforge.net/"
|
||||
license=('GPL2')
|
||||
depends=('kernel26')
|
||||
makedepends=('kernel26-headers')
|
||||
depends=('linux>=3.0' 'linux<3.1')
|
||||
makedepends=('linux-headers')
|
||||
install=vhba-module.install
|
||||
source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.gz
|
||||
Make-vhba-compatible-with-kernel-2.6.37-SCSI-host-AP.patch)
|
||||
|
@ -1,7 +1,7 @@
|
||||
post_install() {
|
||||
echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot."
|
||||
echo ">> This module needs to be recompiled for every kernel version upgrade."
|
||||
KERNEL_VERSION='2.6.38-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ post_upgrade() {
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
KERNEL_VERSION='2.6.38-CHAKRA'
|
||||
KERNEL_VERSION='3.0-CHAKRA'
|
||||
depmod $KERNEL_VERSION > /dev/null 2>&1
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
# $Id: PKGBUILD 75183 2010-04-01 01:40:17Z pierre $
|
||||
# Maintainer: Allan McRae <allan@archlinux.org>
|
||||
# Contributor: Judd Vinet <jvinet@zeroflux.org>
|
||||
#
|
||||
# Core Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=wget
|
||||
pkgver=1.12
|
||||
pkgrel=2
|
||||
pkgver=1.13
|
||||
pkgrel=1
|
||||
pkgdesc="A network utility to retrieve files from the Web"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://www.gnu.org/software/wget/wget.html"
|
||||
@ -14,16 +16,32 @@ depends=('glibc' 'openssl')
|
||||
optdepends=('ca-certificates: HTTPS downloads')
|
||||
backup=('etc/wgetrc')
|
||||
install=wget.install
|
||||
source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz)
|
||||
md5sums=('141461b9c04e454dc8933c9d1f2abf83')
|
||||
source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz)
|
||||
md5sums=('d3698837e6a9567ca9be10f115989940')
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/$pkgname-$pkgver
|
||||
./configure --prefix=/usr --sysconfdir=/etc
|
||||
make || return 1
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
# Note : We do not build with --enable-nls, because there is a bug in wget causing
|
||||
# international domain names to be not properly converted to punycode if
|
||||
# the current locale is a UTF-8 one
|
||||
# See : http://lists.gnu.org/archive/html/bug-wget/2011-02/msg00026.html
|
||||
|
||||
./configure -with-ssl --prefix=/usr --sysconfdir=/etc
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/$pkgname-$pkgver
|
||||
make DESTDIR=${pkgdir} install
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
cat >> "$pkgdir/etc/wgetrc" <<EOF
|
||||
|
||||
# default root certs location
|
||||
ca_certificate=/etc/ssl/certs/ca-certificates.crt
|
||||
EOF
|
||||
|
||||
# remove IRI option from wgetrc as it does not work (see above)
|
||||
sed -i '118,120d' $pkgdir/etc/wgetrc
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user