Commit 9ec3c2ee authored by Francesco Marinucci's avatar Francesco Marinucci

[skip-ci] burg-bzr: removed obsolete package files, closing issue #134

parent 2439b09a
Pipeline #2542 skipped
#! /bin/sh -e
########################################################
# This script generates a memtest86+ entry on grub.cfg #
# if memtest is installed on the system. #
########################################################
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/burg/burg-mkconfig_lib
MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
CLASS="--class memtest86 --class gnu --class tool"
if [ -e $MEMTEST86_IMAGE ] && is_path_readable_by_grub $MEMTEST86_IMAGE; then
# image exists, create menu entry
echo "Found memtest86+ image: $MEMTEST86_IMAGE" >&2
cat << EOF
menuentry "Memory test (memtest86+)" $CLASS {
EOF
prepare_grub_to_access_device `${grub_probe} --target=device $MEMTEST86_IMAGE` | sed -e "s/^/ /"
cat << EOF
linux16 (\$root)`make_system_path_relative_to_its_root $MEMTEST86_IMAGE`
}
EOF
fi
echo "Unmaintained by upstream; we don't use it anymore"
exit; # aborts makepkg
#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dot]org
# maintainer (x86_64): Giuseppe Calà <jiveaxe[at]gmail[dot]com>
# Tunables: change y to n to disable
_rm_build_dirs="${_rm_build_dirs:-n}" # remove build directories
_mk_burg_emu="${_mk_burg_emu:-n}" # enable burg emu
pkgname=burg-bzr
pkgver=1844
pkgrel=8
url="https://launchpad.net/burg"
license="GPL3"
arch=('i686' 'x86_64')
if [ "$CARCH" = "i686" ]; then
depends=('freetype2')
pkgdesc="Brand-new Universal loadeR from GRUB2 - Built for i386 BIOS"
fi
if [ "$CARCH" = "x86_64" ]; then
depends=('gettext' 'freetype2' 'dosfstools' 'efibootmgr')
pkgdesc="Brand-new Universal loadeR from GRUB2 - Built for x86_64 UEFI"
fi
optdepends=('os-prober' 'memtest86+' 'mtools')
makedepends=('bzr' 'ruby' 'bdf-unifont' 'python2' 'ncurses' 'sdl')
changelog=burg.changelog
backup=('etc/default/burg' 'etc/burg.d/40_custom')
provides=('burg')
if [[ "${_mk_burg_emu}" == 'y' ]]; then
makedepends+=('sdl')
depends+=('sdl')
conflicts+=('burg-emu')
provides+=('burg-emu')
fi
md5sums=('39a0e3f1035342d75a9eda7a65f9793f'
'743c7f6cec624bf0c696dae83b6e4d06'
'60bdcc9a3f86deb4f1a361f3bea4ae98'
'990eba4f3cb1808c97c2972de6957a3c'
'460a91c0998117285decdb176ad98ee1')
source=('burg.default'
'chakra-burg.patch'
'resume-hook.patch'
'20_memtest86+'
'update-burg')
install='burg.install'
_bzrmod="burg"
_bzrtrunk="lp:${_bzrmod}"
_builddir="${_bzrmod}-build"
_builddir_emu="${_bzrmod}-emu-build"
_common_configure_opts="--host="${CARCH}-pc-linux-gnu" --program-prefix="" \
--prefix=/usr --bindir=/bin \
--sbindir=/sbin --mandir=/usr/share/man \
--infodir=/usr/share/info --sysconfdir=/etc \
--disable-werror"
_update_bzr() {
cd "${srcdir}/"
msg "Connecting to the server...."
if [[ ! -d "${srcdir}/${_bzrmod}" ]] ; then
bzr branch "${_bzrtrunk}"
else
cd "${srcdir}/${_bzrmod}" && bzr pull "${_bzrtrunk}"
fi
msg "BZR checkout done or server timeout"
}
_build_dir() {
local _rm_builddir='0'
while (( "$#" ))
do
local _check="$1"
if [[ "${_check}" == '-r' ]]; then
_rm_builddir='1'
elif [[ "${_check}" == 'emu' ]]; then
_builddir="${_bzrmod}-build"
_builddir_emu="${_bzrmod}-emu-build"
else
_builddir="${_bzrmod}-$1-build"
fi
shift
done
if [[ "${_check}" == 'emu' ]]; then
rm -rf "${srcdir}/${_builddir_emu}" || true
else
rm -rf "${srcdir}/${_builddir}" || true
fi
if [[ "${_rm_builddir}" == '0' ]]; then
if [[ "${_check}" == 'emu' ]]; then
cp -rip "${srcdir}/${_bzrmod}" "${srcdir}/${_builddir_emu}"
cd "${srcdir}/${_builddir_emu}"
else
cp -rip "${srcdir}/${_bzrmod}" "${srcdir}/${_builddir}"
cd "${srcdir}/${_builddir}/"
fi
fi
}
_build_common() {
local _check="$1"
if [[ "${_check}" == 'emu' ]]; then
cd "${srcdir}/${_builddir_emu}"
else
cd "${srcdir}/${_builddir}"
fi
# Archlinux changed default python to python3, need to use /usr/bin/python2 instead
sed 's|python|python2|g' -i ./autogen.sh || true
echo
./autogen.sh
echo
}
_build_bios() {
msg "Building burg bios...."
_build_dir
echo
# some random patches to facilitate automatic creation of burg.cfg
patch -Np1 -i "${srcdir}/chakra-burg.patch"
echo
_build_common
echo
cd "${srcdir}/${_builddir}/"
## fix unifont.bdf location so burg-mkfont can create *.pf2 files
sed 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|g' -i ./configure || true
_bios_configure_opts="${_common_configure_opts} --with-platform=pc --disable-grub-emu-usb"
./configure ${_bios_configure_opts}
echo
CFLAGS="" make
echo
}
_build_uefi_x86_64() {
msg "Building burg uefi x86_64...."
_build_dir
echo
# some random patches to facilitate automatic creation of burg.cfg
patch -Np1 -i "${srcdir}/chakra-burg.patch"
echo
_build_common
echo
cd "${srcdir}/${_builddir}/"
## fix unifont.bdf location so burg-mkfont can create *.pf2 files
sed 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|g' -i ./configure || true
_uefi_configure_opts="${_common_configure_opts} --with-platform=efi --target=x86_64 --disable-efiemu --disable-grub-emu-usb"
./configure ${_uefi_configure_opts}
echo
CFLAGS="" make
echo
}
_build_emu() {
msg "Building burg-emu...."
_build_dir emu
echo
_build_common emu
echo
cd "${srcdir}/${_builddir_emu}/"
## fix unifont.bdf location so burg-mkfont can create *.pf2 files
sed 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|g' -i ./configure || true
_emu_configure_opts="${_common_configure_opts} --with-platform=emu --disable-grub-emu-usb"
./configure ${_emu_configure_opts}
echo
CFLAGS="" make
echo
}
build() {
_update_bzr
echo
if [[ "$CARCH" == 'i686' ]]; then
_build_bios
fi
echo
if [[ "$CARCH" == 'x86_64' ]]; then
_build_uefi_x86_64
fi
echo
if [[ "${_mk_burg_emu}" == 'y' ]]; then
_build_emu
fi
echo
}
package() {
cd "${srcdir}/${_builddir}/"
make DESTDIR="${pkgdir}/" install
echo
if [[ "${_mk_burg_emu}" == 'y' ]]; then
install -D -m0755 "${srcdir}/${_builddir_emu}/grub-emu" "${pkgdir}/bin/burg-emu"
fi
# install /etc/default/burg(needed config file)
install -D -m0644 "${srcdir}/burg.default" "${pkgdir}/etc/default/burg"
# install update-burg script
install -D -m0755 "${srcdir}/update-burg" "${pkgdir}/sbin/update-burg"
# install memtest config detection
install -D -m0755 "${srcdir}/20_memtest86+" "${pkgdir}/etc/burg.d/20_memtest86+"
if [[ "${_rm_build_dirs}" == 'y' ]]; then
_build_dir -r
if [[ "${_mk_burg_emu}" == 'y' ]]; then
_build_dir -r emu
fi
fi
echo
cd ${pkgdir}/sbin
patch -Np0 -i ${srcdir}/resume-hook.patch
}
2010-09-24 cruznick <cruznick@archlinux.us>
*PKGBUILD Changelog 0.1
Well I have implemented some fixes
so that it could be posible too
run without any more fixing.
10_linux script fixed:
now folding for Archlinux boot
entries is working (Thanks to fsckd for the help)
20_memtest86+ for memtest config:
Script added so now if you have
memtest86+ you can run it from burg
Also added os-prober and memtest86+
as optional depends
Hope you like this PKGBUILD
2011-12-25 philm <philm@chakra-project.org>
Config generation script now
ignores symlinks of kernel images
and should correctly handle the
old naming scheme as well as the
new one.
Merge in burg-emu.
New tunable to turn off compiling
burg-emu. See the
2010-09-24 cruznick <cruznick@archlinux.us>
*PKGBUILD Changelog 0.1
Well I have implemented some fixes
so that it could be posible too
run without any more fixing.
10_linux script fixed:
now folding for Archlinux boot
entries is working (Thanks to fsckd for the help)
20_memtest86+ for memtest config:
Script added so now if you have
memtest86+ you can run it from burg
Also added os-prober and memtest86+
as optional depends
Hope you like this PKGBUILD
# If you change this file, run 'burg-mkconfig -o /boot/burg/burg.cfg' afterwards to update
# /boot/burg/burg.cfg.
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Chakra`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true
# 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'
# In the boot menu, use hotkey 'r' to popup a resolution selection menu.
GRUB_GFXMODE=saved
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# GRUB_THEME's value can be 'saved' or a specific BURG theme name, you can also
# set it to the pathname of a GRUB2 theme file.
# In the boot menu, use hotkey 't' to popup a theme selection menu
GRUB_THEME=saved
# GRUB_FOLD's value can be 'saved', 'true' or 'false'.
# In the boot menu, use hotkey 'F7' to show the full list, 'f' to toggle
# between folding modes.
GRUB_FOLD=saved
# Add user with burg-adduser, then use GRUB_USERS to config authentication.
# The following example means user1 can boot Ubuntu, no password is needed to
# boot Windows, user1 amd user2 can boot other OS. Superusers can boot any OS
# and use hotkeys like `c' to enter console mode.
#GRUB_USERS="*=user1,user2:ubuntu=user1:windows="
# For a complete list of supported variables, refer to this wiki page:
# http://code.google.com/p/burg/wiki/ConfigurationVariables
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 --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
}
--- orig/util/grub.d/10_linux.in 2011-08-08 11:17:57.946312000 -0400
+++ new/util/grub.d/10_linux.in 2011-08-08 20:01:37.745654006 -0400
@@ -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}" = "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.
@@ -104,7 +102,7 @@
EOF
}
-list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
+list=`for i in $( find / /boot -maxdepth 1 -name 'vmlinu[xz]*' ! -type l ) ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done`
prepare_boot_cache=
@@ -116,14 +114,13 @@
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"`
+ echo $basename | grep -q 'vmlinu[xz]26' && initname=kernel || initname=initramfs
+ base_init=`echo $basename | sed -e "s,vmlinu[xz],$initname,g"`
+ alt_version="${base_init}-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 "${base_init}.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
--- 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}
#!/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 "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment