├── README.md ├── archlinux ├── abs │ └── core │ │ └── grub-git │ │ ├── 10_archlinux │ │ ├── 60_memtest86+ │ │ ├── PKGBUILD │ │ ├── apple.patch │ │ ├── grub-add-GRUB_COLOR_variables.patch │ │ ├── grub.cfg │ │ ├── grub.default │ │ └── grub.install ├── etc │ ├── X11 │ │ └── xorg.conf.d │ │ │ ├── 10-evdev.conf │ │ │ ├── 10-quirks.conf │ │ │ ├── 20-intel.conf │ │ │ └── 50-synaptics.conf │ ├── default │ │ └── grub │ ├── makepkg.conf │ ├── modprobe.d │ │ ├── blacklist.conf │ │ └── i915.conf │ └── profile ├── home │ └── luke │ │ ├── .bash_profile │ │ ├── .i3 │ │ └── config │ │ ├── .i3status.conf │ │ ├── .xinitrc │ │ ├── .xserverrc │ │ ├── kbd │ │ └── macbook.keymap │ │ ├── vpn │ │ ├── ipsec.candidate │ │ ├── ipsec.template │ │ ├── mirror.txt │ │ ├── options.l2tpd.client │ │ ├── se.sh │ │ └── vpn.template │ │ └── xkb │ │ ├── keymap │ │ └── macbook78 │ │ ├── symbols │ │ └── macbook78 │ │ └── types │ │ └── macbook78 ├── pkgbuild │ └── libsolv-git │ │ └── PKGBUILD └── usr │ └── lib │ └── systemd │ └── system │ └── goagent.service ├── etc └── init.d │ ├── goagent │ └── vpnclient └── home └── luke ├── .profile ├── .wmii └── wmiirc ├── .xsession └── vpngate ├── README ├── csv.awk ├── csv.good ├── csv.raw ├── csv.sh ├── gate.txt ├── mirror.list ├── mirror.sh ├── openvpncfg.awk ├── route.sh ├── ssl.vpn ├── ssl.vpn.template ├── vpn.sh ├── vpnconnect.cmd ├── vpndef.sh ├── vpndel.cmd ├── vpndisconnect.cmd ├── vpngate.sh ├── vpnimport.cmd └── vpnlist.cmd /README.md: -------------------------------------------------------------------------------- 1 | linux-debian7-admin 2 | =================== 3 | 4 | linux administration script,config files, misc. Directories are arranged according to Debian 7 file system structure. 5 | 6 | 7 | -------------------------------------------------------------------------------- /archlinux/abs/core/grub-git/10_archlinux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## 4 | ## grub-mkconfig helper script specific to Arch Linux 5 | ## Contributed by "Keshav Amburay" 6 | ## Updated on 08 February 2014 7 | ## 8 | ## Script based on do_grub_config() function in Arch Linux Archboot ISO Installer/Setup script 9 | ## Some parts taken from /etc/grub.d/10_linux script shipped by GRUB(2) upstream 10 | ## 11 | ## This script can be freely distributed and/or modified 12 | ## under the terms of the GNU General Public License as published by 13 | ## the Free Software Foundation, either version 3 of the License, or 14 | ## (at your option) any later version. 15 | ## 16 | ## This script is distributed in the hope that it will be useful, 17 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | ## GNU General Public License for more details. 20 | ## 21 | 22 | _FUNC_GRUB_FILE_PRESENT() { 23 | 24 | [[ -z "${GRUB_PLATFORM}" ]] && GRUB_PLATFORM="x86" 25 | 26 | if [[ "${GRUB_PLATFORM}" == "x86" ]]; then 27 | check="--is-x86-linux32" 28 | elif [[ "${GRUB_PLATFORM}" == "i386-xen-pae" ]]; then 29 | check="--is-i386-xen-pae-domu" 30 | elif [[ "${GRUB_PLATFORM}" == "x86_64-xen" ]]; then 31 | check="--is-x86_64-xen-domu" 32 | else 33 | check="--is-${GRUB_PLATFORM}-linux" 34 | fi 35 | 36 | case "${GRUB_PLATFORM}" in 37 | x86) 38 | list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do 39 | if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi 40 | done)" ;; 41 | *) 42 | list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do 43 | if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi 44 | done)" ;; 45 | esac 46 | } 47 | 48 | set -e 49 | 50 | prefix="/usr" 51 | exec_prefix="${prefix}" 52 | datarootdir="/usr/share" 53 | datadir="${datarootdir}" 54 | sysconfdir="/etc" 55 | 56 | . "${datarootdir}/grub/grub-mkconfig_lib" 57 | 58 | . "${sysconfdir}/default/grub" 59 | 60 | export TEXTDOMAIN="grub" 61 | export TEXTDOMAINDIR="${datarootdir}/locale" 62 | 63 | CLASS="--class arch-linux --class arch --class gnu-linux --class gnu --class os" 64 | 65 | [[ "${grub_file}" != "" ]] && _FUNC_GRUB_FILE_PRESENT 66 | 67 | BOOT_PART_FS_UUID="$(${grub_probe} --target="fs_uuid" "/boot" 2>/dev/null)" 68 | BOOT_PART_HINTS_STRING="$(${grub_probe} --target="hints_string" "/boot" 2>/dev/null || true)" 69 | BOOT_PART_FS="$(${grub_probe} --target="fs" "/boot" 2>/dev/null)" 70 | 71 | ROOT_PART_GRUB_DEVICE="$(${grub_probe} --target=device / || true)" 72 | ROOT_PART_FS="$(${grub_probe} --device ${ROOT_PART_GRUB_DEVICE} --target=fs 2> /dev/null || echo "unknown")" 73 | 74 | if [[ "${GRUB_LINUX_ROOT_DEVICE}" == "" ]]; then 75 | 76 | case "${ROOT_PART_FS}" in 77 | btrfs) 78 | rootsubvol="$(make_system_path_relative_to_its_root /)" 79 | rootsubvol="${rootsubvol#/}" 80 | if [[ "${rootsubvol}" != "" ]]; then 81 | GRUB_LINUX_ROOT_DEVICE="subvol=${rootsubvol}" 82 | fi 83 | ;; 84 | zfs) 85 | rpool="$(${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true)" 86 | bootfs="$(make_system_path_relative_to_its_root / | sed -e "s,@$,,")" 87 | GRUB_LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}" 88 | ;; 89 | esac 90 | 91 | if [[ "${GRUB_DEVICE_UUID}" == "" ]] || \ 92 | [[ "${GRUB_DISABLE_LINUX_UUID}" == "true" ]] || \ 93 | [[ ! -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ]] || \ 94 | uses_abstraction "${GRUB_DEVICE}" lvm ; then 95 | GRUB_LINUX_ROOT_DEVICE="${GRUB_DEVICE}" 96 | else 97 | GRUB_LINUX_ROOT_DEVICE="UUID=${GRUB_DEVICE_UUID}" 98 | fi 99 | fi 100 | 101 | [[ "${GRUB_LINUX_PARAMS}" == "" ]] && GRUB_LINUX_PARAMS="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" 102 | 103 | for _KERNEL_ in ${list} ; do 104 | 105 | echo "Found linux image: ${_KERNEL_}" >&2 106 | 107 | basename="$(basename "${_KERNEL_}")" 108 | dirname="$(dirname "${_KERNEL_}")" 109 | REAL_DIR="$(make_system_path_relative_to_its_root "${dirname}")" 110 | 111 | _KERNEL_FILE_="$(echo ${_KERNEL_} | sed 's,/boot/,,g')" 112 | _KERNEL_PKG_="pkg-$(echo ${_KERNEL_FILE_} | sed 's,vmlinuz-,,g')" 113 | 114 | _INITRAMFS_="${_KERNEL_FILE_/vmlinuz-/initramfs-}.img" 115 | 116 | if [[ -e "/boot/${_INITRAMFS_}" ]]; then 117 | 118 | echo "Found initramfs image: /boot/${_INITRAMFS_}" >&2 119 | 120 | cat << EOF 121 | 122 | menuentry "Arch Linux ${_KERNEL_PKG_} kernel" ${CLASS} { 123 | $(save_default_entry) 124 | if [ x\$feature_all_video_module = xy ]; then 125 | insmod all_video 126 | fi 127 | set gfxpayload=keep 128 | insmod ${BOOT_PART_FS} 129 | if [ x\$feature_platform_search_hint = xy ]; then 130 | search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID} 131 | else 132 | search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID} 133 | fi 134 | echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...' 135 | linux ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS} 136 | echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel initramfs ...' 137 | initrd ${REAL_DIR}/${_INITRAMFS_} 138 | } 139 | 140 | EOF 141 | fi 142 | 143 | _INITRAMFS_FALLBACK_="${_KERNEL_FILE_/vmlinuz-/initramfs-}-fallback.img" 144 | 145 | if [[ -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then 146 | 147 | echo "Found fallback initramfs image: /boot/${_INITRAMFS_FALLBACK_}" >&2 148 | 149 | cat << EOF 150 | 151 | menuentry "Arch Linux ${_KERNEL_PKG_} kernel (fallback initramfs)" ${CLASS} { 152 | $(save_default_entry) 153 | if [ x\$feature_all_video_module = xy ]; then 154 | insmod all_video 155 | fi 156 | set gfxpayload=keep 157 | insmod ${BOOT_PART_FS} 158 | if [ x\$feature_platform_search_hint = xy ]; then 159 | search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID} 160 | else 161 | search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID} 162 | fi 163 | echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...' 164 | linux ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS} 165 | echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel fallback initramfs ...' 166 | initrd ${REAL_DIR}/${_INITRAMFS_FALLBACK_} 167 | } 168 | 169 | EOF 170 | fi 171 | 172 | if [[ ! -e "/boot/${_INITRAMFS_}" ]] && [[ ! -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then 173 | cat << EOF 174 | 175 | menuentry "Arch Linux ${_KERNEL_PKG_} kernel (no initramfs)" ${CLASS} { 176 | $(save_default_entry) 177 | if [ x\$feature_all_video_module = xy ]; then 178 | insmod all_video 179 | fi 180 | set gfxpayload=keep 181 | insmod ${BOOT_PART_FS} 182 | if [ x\$feature_platform_search_hint = xy ]; then 183 | search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID} 184 | else 185 | search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID} 186 | fi 187 | echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...' 188 | linux ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS} 189 | } 190 | 191 | EOF 192 | fi 193 | 194 | done 195 | -------------------------------------------------------------------------------- /archlinux/abs/core/grub-git/60_memtest86+: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ######################################################## 3 | # This script generates a memtest86+ entry on grub.cfg # 4 | # if memtest is installed on the system. # 5 | ######################################################## 6 | 7 | prefix="/usr" 8 | exec_prefix="${prefix}" 9 | datarootdir="/usr/share" 10 | datadir="${datarootdir}" 11 | sysconfdir="/etc" 12 | 13 | . "${datadir}/grub/grub-mkconfig_lib" 14 | 15 | . "${sysconfdir}/default/grub" 16 | 17 | MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin" 18 | CLASS="--class memtest86 --class gnu --class tool" 19 | 20 | [[ -z "${GRUB_PLATFORM}" ]] && GRUB_PLATFORM="x86" 21 | 22 | check="--is-${GRUB_PLATFORM}-linux" 23 | 24 | # MEMTEST86_IMAGE="$(if grub_file_is_not_garbage "${MEMTEST86_IMAGE}" && "${grub_file}" ${check} "${MEMTEST86_IMAGE}" ; then echo -n "${MEMTEST86_IMAGE} " ; fi)" 25 | 26 | if [[ "${GRUB_PLATFORM}" == "x86" ]]; then 27 | if [[ -e "${MEMTEST86_IMAGE}" ]] && is_path_readable_by_grub "${MEMTEST86_IMAGE}" ; then 28 | ## image exists, create menu entry 29 | echo "Found memtest86+ image: ${MEMTEST86_IMAGE}" >&2 30 | _GRUB_MEMTEST_HINTS_STRING="$(${grub_probe} --target=hints_string ${MEMTEST86_IMAGE})" 31 | _GRUB_MEMTEST_FS_UUID="$(${grub_probe} --target=fs_uuid ${MEMTEST86_IMAGE})" 32 | _GRUB_MEMTEST_REL_PATH="$(make_system_path_relative_to_its_root ${MEMTEST86_IMAGE})" 33 | cat << EOF 34 | if [ x\$grub_platform = xpc ]; then 35 | menuentry "Memory Tester (memtest86+)" ${CLASS} { 36 | search --fs-uuid --no-floppy --set=root ${_GRUB_MEMTEST_HINTS_STRING} ${_GRUB_MEMTEST_FS_UUID} 37 | linux16 ${_GRUB_MEMTEST_REL_PATH} ${GRUB_CMDLINE_MEMTEST86} 38 | } 39 | fi 40 | EOF 41 | fi 42 | fi 43 | -------------------------------------------------------------------------------- /archlinux/abs/core/grub-git/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer : Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)> 2 | # Contributor: Zack Buhman 3 | # Contributor: Tobias Powalowski 4 | # Contributor: Ronald van Haren 5 | 6 | ## "1" to enable IA32-EFI build in Arch x86_64, "0" to disable 7 | _GRUB_IA32_EFI_ARCH_X64="0" 8 | 9 | ## "1" to enable EMU build, "0" to disable 10 | _GRUB_EMU_BUILD="0" 11 | 12 | _UNIFONT_VER="6.3.20131217" 13 | 14 | [[ "${CARCH}" == "x86_64" ]] && _EFI_ARCH="x86_64" 15 | [[ "${CARCH}" == "i686" ]] && _EFI_ARCH="i386" 16 | 17 | [[ "${CARCH}" == "x86_64" ]] && _EMU_ARCH="x86_64" 18 | [[ "${CARCH}" == "i686" ]] && _EMU_ARCH="i386" 19 | 20 | _pkgname="grub" 21 | pkgname="${_pkgname}-git" 22 | 23 | pkgdesc="GNU GRand Unified Bootloader (2) - GIT Version" 24 | pkgver=2.02.beta2.60.g9585647 25 | pkgrel=1 26 | url="https://www.gnu.org/software/grub/" 27 | arch=('x86_64' 'i686') 28 | license=('GPL3') 29 | backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom') 30 | install="${_pkgname}.install" 31 | options=('!makeflags') 32 | 33 | conflicts=('grub' 'grub-common' 'grub-bios' "grub-efi-${_EFI_ARCH}" 'grub-emu' 'grub-bzr' 'grub-legacy') 34 | provides=("grub=${pkgver}" "grub-common=${pkgver}" "grub-bios=${pkgver}" "grub-efi-${_EFI_ARCH}=${pkgver}" "grub-emu=${pkgver}" "grub-bzr=${pkgver}") 35 | 36 | makedepends=('git' 'rsync' 'xz' 'freetype2' 'ttf-dejavu' 'python' 'autogen' 37 | 'texinfo' 'help2man' 'gettext' 'device-mapper' 'fuse') 38 | depends=('sh' 'xz' 'gettext' 'device-mapper') 39 | optdepends=('freetype2: For grub-mkfont usage' 40 | 'fuse: For grub-mount usage' 41 | 'dosfstools: For grub-mkrescue FAT FS and EFI support' 42 | 'efibootmgr: For grub-install EFI support' 43 | 'libisoburn: Provides xorriso for generating grub rescue iso using grub-mkrescue' 44 | 'os-prober: To detect other OSes when generating grub.cfg in BIOS systems' 45 | 'mtools: For grub-mkrescue FAT FS support') 46 | 47 | if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then 48 | makedepends+=('libusbx' 'sdl') 49 | optdepends+=('libusbx: For grub-emu USB support' 50 | 'sdl: For grub-emu SDL support') 51 | fi 52 | 53 | source=("grub::git+git://git.sv.gnu.org/grub.git#branch=master" 54 | "grub-extras::git+git://git.sv.gnu.org/grub-extras.git#branch=master" 55 | "http://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz" 56 | "http://ftp.gnu.org/gnu/unifont/unifont-${_UNIFONT_VER}/unifont-${_UNIFONT_VER}.bdf.gz.sig" 57 | 'grub-add-GRUB_COLOR_variables.patch' 58 | '10_archlinux' 59 | '60_memtest86+' 60 | 'grub.default' 61 | 'grub.cfg' 62 | 'apple.patch' 63 | ) 64 | 65 | sha1sums=('SKIP' 66 | 'SKIP' 67 | '30797ba7a86fc32213b9ae994c9fa45f37d01170' 68 | 'SKIP' 69 | 'c03d2ea83aa6a44dc383fbf67c29c20469e57f1b' 70 | '59ca4a97221676b642506c461789889b2bc77ecc' 71 | '10e30eb68fb95c86301112ac95c5b7515413152a' 72 | '55cf103b60f405bd37d44dd24357dedfff0214ee' 73 | '5b7fcb0718a23035c039eb2fda9e088bb13ae611' 74 | 'SKIP' 75 | ) 76 | 77 | pkgver() { 78 | cd "${srcdir}/grub/" 79 | echo "$(git describe --tags)" | sed -e 's|grub.||g' -e 's|-|\.|g' 80 | } 81 | 82 | prepare() { 83 | 84 | cd "${srcdir}/grub/" 85 | 86 | msg "Patch to enable GRUB_COLOR_* variables in grub-mkconfig" 87 | ## Based on http://lists.gnu.org/archive/html/grub-devel/2012-02/msg00021.html 88 | patch -Np1 -i "${srcdir}/grub-add-GRUB_COLOR_variables.patch" 89 | echo 90 | 91 | msg "Patch to enable apple_set_os" 92 | ## Based on http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html 93 | patch -Np1 -i "${srcdir}/apple.patch" 94 | echo 95 | 96 | msg "Fix DejaVuSans.ttf location so that grub-mkfont can create *.pf2 files for starfield theme" 97 | sed 's|/usr/share/fonts/dejavu|/usr/share/fonts/dejavu /usr/share/fonts/TTF|g' -i "${srcdir}/grub/configure.ac" 98 | 99 | msg "Fix mkinitcpio 'rw' FS#36275" 100 | sed 's| ro | rw |g' -i "${srcdir}/grub/util/grub.d/10_linux.in" 101 | 102 | msg "Fix OS naming FS#33393" 103 | sed 's|GNU/Linux|Linux|' -i "${srcdir}/grub/util/grub.d/10_linux.in" 104 | 105 | # msg "Requires python2" 106 | # sed 's|python |python2 |g' -i "${srcdir}/grub/autogen.sh" 107 | 108 | msg "Pull in latest language files" 109 | ./linguas.sh 110 | echo 111 | 112 | msg "Remove not working langs which need LC_ALL=C.UTF-8" 113 | sed -e 's#en@cyrillic en@greek##g' -i "${srcdir}/grub/po/LINGUAS" 114 | 115 | msg "Avoid problem with unifont during compile of grub, http://savannah.gnu.org/bugs/?40330 and https://bugs.archlinux.org/task/37847" 116 | cp "${srcdir}/unifont-${_UNIFONT_VER}.bdf" "${srcdir}/grub/unifont.bdf" 117 | 118 | } 119 | 120 | _build_grub-common_and_bios() { 121 | 122 | msg "Set ARCH dependent variables for bios build" 123 | if [[ "${CARCH}" == 'x86_64' ]]; then 124 | _EFIEMU="--enable-efiemu" 125 | else 126 | _EFIEMU="--disable-efiemu" 127 | fi 128 | 129 | msg "Copy the source for building the bios part" 130 | cp -r "${srcdir}/grub" "${srcdir}/grub-bios" 131 | cd "${srcdir}/grub-bios/" 132 | 133 | msg "Add the grub-extra sources for bios build" 134 | install -d "${srcdir}/grub-bios/grub-extras" 135 | cp -r "${srcdir}/grub-extras/915resolution" "${srcdir}/grub-bios/grub-extras/915resolution" 136 | export GRUB_CONTRIB="${srcdir}/grub-bios/grub-extras/" 137 | 138 | msg "Unset all compiler FLAGS for bios build" 139 | unset CFLAGS 140 | unset CPPFLAGS 141 | unset CXXFLAGS 142 | unset LDFLAGS 143 | unset MAKEFLAGS 144 | 145 | cd "${srcdir}/grub-bios/" 146 | 147 | msg "Run autogen.sh for bios build" 148 | ./autogen.sh 149 | echo 150 | 151 | msg "Run ./configure for bios build" 152 | ./configure \ 153 | --with-platform="pc" \ 154 | --target="i386" \ 155 | "${_EFIEMU}" \ 156 | --enable-mm-debug \ 157 | --enable-nls \ 158 | --enable-device-mapper \ 159 | --enable-cache-stats \ 160 | --enable-boot-time \ 161 | --enable-grub-mkfont \ 162 | --enable-grub-mount \ 163 | --prefix="/usr" \ 164 | --bindir="/usr/bin" \ 165 | --sbindir="/usr/bin" \ 166 | --mandir="/usr/share/man" \ 167 | --infodir="/usr/share/info" \ 168 | --datarootdir="/usr/share" \ 169 | --sysconfdir="/etc" \ 170 | --program-prefix="" \ 171 | --with-bootdir="/boot" \ 172 | --with-grubdir="grub" \ 173 | --disable-silent-rules \ 174 | --disable-werror 175 | echo 176 | 177 | msg "Run make for bios build" 178 | make 179 | echo 180 | } 181 | 182 | _build_grub-efi() { 183 | 184 | msg "Copy the source for building the ${_EFI_ARCH} efi part" 185 | cp -r "${srcdir}/grub" "${srcdir}/grub-efi-${_EFI_ARCH}" 186 | cd "${srcdir}/grub-efi-${_EFI_ARCH}/" 187 | 188 | msg "Unset all compiler FLAGS for ${_EFI_ARCH} efi build" 189 | unset CFLAGS 190 | unset CPPFLAGS 191 | unset CXXFLAGS 192 | unset LDFLAGS 193 | unset MAKEFLAGS 194 | 195 | cd "${srcdir}/grub-efi-${_EFI_ARCH}/" 196 | 197 | msg "Run autogen.sh for ${_EFI_ARCH} efi build" 198 | ./autogen.sh 199 | echo 200 | 201 | msg "Run ./configure for ${_EFI_ARCH} efi build" 202 | ./configure \ 203 | --with-platform="efi" \ 204 | --target="${_EFI_ARCH}" \ 205 | --disable-efiemu \ 206 | --enable-mm-debug \ 207 | --enable-nls \ 208 | --enable-device-mapper \ 209 | --enable-cache-stats \ 210 | --enable-boot-time \ 211 | --enable-grub-mkfont \ 212 | --enable-grub-mount \ 213 | --prefix="/usr" \ 214 | --bindir="/usr/bin" \ 215 | --sbindir="/usr/bin" \ 216 | --mandir="/usr/share/man" \ 217 | --infodir="/usr/share/info" \ 218 | --datarootdir="/usr/share" \ 219 | --sysconfdir="/etc" \ 220 | --program-prefix="" \ 221 | --with-bootdir="/boot" \ 222 | --with-grubdir="grub" \ 223 | --disable-silent-rules \ 224 | --disable-werror 225 | echo 226 | 227 | msg "Run make for ${_EFI_ARCH} efi build" 228 | make 229 | echo 230 | 231 | } 232 | 233 | _build_grub-emu() { 234 | 235 | msg "Copy the source for building the emu part" 236 | cp -r "${srcdir}/grub" "${srcdir}/grub-emu" 237 | cd "${srcdir}/grub-emu/" 238 | 239 | msg "Unset all compiler FLAGS for emu build" 240 | unset CFLAGS 241 | unset CPPFLAGS 242 | unset CXXFLAGS 243 | unset LDFLAGS 244 | unset MAKEFLAGS 245 | 246 | cd "${srcdir}/grub-emu/" 247 | 248 | msg "Run autogen.sh for emu build" 249 | ./autogen.sh 250 | echo 251 | 252 | msg "Run ./configure for emu build" 253 | ./configure \ 254 | --with-platform="emu" \ 255 | --target="${_EMU_ARCH}" \ 256 | --enable-mm-debug \ 257 | --enable-nls \ 258 | --enable-device-mapper \ 259 | --enable-cache-stats \ 260 | --enable-grub-mkfont \ 261 | --enable-grub-mount \ 262 | --enable-grub-emu-usb=no \ 263 | --enable-grub-emu-sdl=no \ 264 | --disable-grub-emu-pci \ 265 | --prefix="/usr" \ 266 | --bindir="/usr/bin" \ 267 | --sbindir="/usr/bin" \ 268 | --mandir="/usr/share/man" \ 269 | --infodir="/usr/share/info" \ 270 | --datarootdir="/usr/share" \ 271 | --sysconfdir="/etc" \ 272 | --program-prefix="" \ 273 | --with-bootdir="/boot" \ 274 | --with-grubdir="grub" \ 275 | --disable-silent-rules \ 276 | --disable-werror 277 | echo 278 | 279 | msg "Run make for emu build" 280 | make 281 | echo 282 | 283 | } 284 | 285 | build() { 286 | 287 | cd "${srcdir}/grub/" 288 | 289 | msg "Build grub bios stuff" 290 | _build_grub-common_and_bios 291 | echo 292 | 293 | msg "Build grub ${_EFI_ARCH} efi stuff" 294 | _build_grub-efi 295 | echo 296 | 297 | if [[ "${CARCH}" == "x86_64" ]] && [[ "${_GRUB_IA32_EFI_ARCH_X64}" == "1" ]]; then 298 | msg "Build grub i386 efi stuff" 299 | _EFI_ARCH="i386" _build_grub-efi 300 | echo 301 | fi 302 | 303 | if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then 304 | msg "Build grub emu stuff" 305 | _build_grub-emu 306 | echo 307 | fi 308 | 309 | } 310 | 311 | _package_grub-common_and_bios() { 312 | 313 | cd "${srcdir}/grub-bios/" 314 | 315 | msg "Run make install for bios build" 316 | make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install 317 | echo 318 | 319 | msg "Remove gdb debugging related files for bios build" 320 | rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.module || true 321 | rm -f "${pkgdir}/usr/lib/grub/i386-pc"/*.image || true 322 | rm -f "${pkgdir}/usr/lib/grub/i386-pc"/{kernel.exec,gdb_grub,gmodule.pl} || true 323 | 324 | msg "Install 10_archlinux helper script for grub-mkconfig" 325 | install -D -m0755 "${srcdir}/10_archlinux" "${pkgdir}/etc/grub.d/10_archlinux" 326 | 327 | msg "Install extra /etc/grub.d/ files" 328 | install -D -m0755 "${srcdir}/60_memtest86+" "${pkgdir}/etc/grub.d/60_memtest86+" 329 | 330 | msg "Install /etc/default/grub (used by grub-mkconfig)" 331 | install -D -m0644 "${srcdir}/grub.default" "${pkgdir}/etc/default/grub" 332 | 333 | msg "Install grub.cfg for backup array" 334 | install -D -m0644 "${srcdir}/grub.cfg" "${pkgdir}/boot/grub/grub.cfg" 335 | 336 | } 337 | 338 | _package_grub-efi() { 339 | 340 | cd "${srcdir}/grub-efi-${_EFI_ARCH}/" 341 | 342 | msg "Run make install for ${_EFI_ARCH} efi build" 343 | make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install 344 | echo 345 | 346 | msg "Remove gdb debugging related files for ${_EFI_ARCH} efi build" 347 | rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.module || true 348 | rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/*.image || true 349 | rm -f "${pkgdir}/usr/lib/grub/${_EFI_ARCH}-efi"/{kernel.exec,gdb_grub,gmodule.pl} || true 350 | 351 | } 352 | 353 | _package_grub-emu() { 354 | 355 | cd "${srcdir}/grub-emu/" 356 | 357 | msg "Run make install for emu build" 358 | make DESTDIR="${pkgdir}/" bashcompletiondir="/usr/share/bash-completion/completions" install 359 | echo 360 | 361 | msg "Remove gdb debugging related files for emu build" 362 | rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.module || true 363 | rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/*.image || true 364 | rm -f "${pkgdir}/usr/lib/grub/${_EMU_ARCH}-emu"/{kernel.exec,gdb_grub,gmodule.pl} || true 365 | 366 | } 367 | 368 | package() { 369 | 370 | cd "${srcdir}/grub/" 371 | 372 | if [[ "${_GRUB_EMU_BUILD}" == "1" ]]; then 373 | msg "Package grub emu stuff" 374 | _package_grub-emu 375 | echo 376 | fi 377 | 378 | msg "Package grub ${_EFI_ARCH} efi stuff" 379 | _package_grub-efi 380 | echo 381 | 382 | if [[ "${CARCH}" == "x86_64" ]] && [[ "${_GRUB_IA32_EFI_ARCH_X64}" == "1" ]]; then 383 | msg "Package grub i386 efi stuff" 384 | _EFI_ARCH="i386" _package_grub-efi 385 | echo 386 | fi 387 | 388 | msg "Package grub bios stuff" 389 | _package_grub-common_and_bios 390 | echo 391 | 392 | } 393 | -------------------------------------------------------------------------------- /archlinux/abs/core/grub-git/apple.patch: -------------------------------------------------------------------------------- 1 | --- 2 | grub-core/Makefile.core.def | 6 +++ 3 | grub-core/commands/efi/applesetos.c | 82 +++++++++++++++++++++++++++++++++++++ 4 | 2 files changed, 88 insertions(+) 5 | create mode 100644 grub-core/commands/efi/applesetos.c 6 | 7 | diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def 8 | index 42443bc..dc9c4de 100644 9 | --- a/grub-core/Makefile.core.def 10 | +++ b/grub-core/Makefile.core.def 11 | @@ -742,6 +742,12 @@ module = { 12 | }; 13 | 14 | module = { 15 | + name = applesetos; 16 | + common = commands/efi/applesetos.c; 17 | + enable = efi; 18 | +}; 19 | + 20 | +module = { 21 | name = blocklist; 22 | common = commands/blocklist.c; 23 | }; 24 | diff --git a/grub-core/commands/efi/applesetos.c b/grub-core/commands/efi/applesetos.c 25 | new file mode 100644 26 | index 0000000..9464307 27 | --- /dev/null 28 | +++ b/grub-core/commands/efi/applesetos.c 29 | @@ -0,0 +1,82 @@ 30 | +/* applesetos.c - Pretend to be Mac OS X. */ 31 | +/* 32 | + * GRUB -- GRand Unified Bootloader 33 | + * Copyright (C) 2013 Free Software Foundation, Inc. 34 | + * 35 | + * GRUB is free software: you can redistribute it and/or modify 36 | + * it under the terms of the GNU General Public License as published by 37 | + * the Free Software Foundation, either version 3 of the License, or 38 | + * (at your option) any later version. 39 | + * 40 | + * GRUB is distributed in the hope that it will be useful, 41 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of 42 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 43 | + * GNU General Public License for more details. 44 | + * 45 | + * You should have received a copy of the GNU General Public License 46 | + * along with GRUB. If not, see . 47 | + */ 48 | +#include 49 | +#include 50 | +#include 51 | +/* For NULL. */ 52 | +#include 53 | + 54 | +GRUB_MOD_LICENSE ("GPLv3+"); 55 | + 56 | +#define GRUB_EFI_APPLE_SET_OS_PROTOCOL_GUID \ 57 | + { 0xc5c5da95, 0x7d5c, 0x45e6, \ 58 | + { 0xb2, 0xf1, 0x3f, 0xd5, 0x2b, 0xb1, 0x00, 0x77 } \ 59 | + } 60 | + 61 | +struct grub_efi_apple_set_os_interface 62 | +{ 63 | + grub_efi_uint64_t version; 64 | + void (*set_os_version) (const grub_efi_char8_t *os_version); 65 | + void (*set_os_vendor) (const grub_efi_char8_t *os_vendor); 66 | +}; 67 | +typedef struct grub_efi_apple_set_os_interface 68 | +grub_efi_apple_set_os_interface_t; 69 | + 70 | +static const grub_efi_char8_t apple_os_version[] = "Mac OS X 10.9"; 71 | +static const grub_efi_char8_t apple_os_vendor[] = "Apple Inc."; 72 | + 73 | +static grub_err_t 74 | +grub_cmd_apple_set_os (grub_command_t cmd __attribute__ ((unused)), 75 | + int argc __attribute__ ((unused)), 76 | + char **args __attribute__ ((unused))) 77 | +{ 78 | + grub_efi_guid_t apple_set_os_guid = GRUB_EFI_APPLE_SET_OS_PROTOCOL_GUID; 79 | + grub_efi_apple_set_os_interface_t *set_os; 80 | + set_os = grub_efi_locate_protocol (&apple_set_os_guid, 0); 81 | + if (!set_os) { 82 | + return grub_error (GRUB_ERR_FILE_NOT_FOUND, 83 | + "Could not locate the apple set os protocol."); 84 | + } 85 | + 86 | + if (set_os->version != 0) 87 | + { 88 | + efi_call_1 (set_os->set_os_version, apple_os_version); 89 | + grub_printf("Set os version to %s\n", apple_os_version); 90 | + } 91 | + 92 | + if (set_os->version == 2) 93 | + { 94 | + efi_call_1 (set_os->set_os_vendor, apple_os_vendor); 95 | + grub_printf("Set os vendor to %s\n", apple_os_vendor); 96 | + } 97 | + return 0; 98 | +} 99 | + 100 | +static grub_command_t cmd; 101 | + 102 | +GRUB_MOD_INIT(applesetos) 103 | +{ 104 | + cmd = grub_register_command ("apple_set_os", grub_cmd_apple_set_os, NULL, 105 | + "Register as Apple Inc. Mac OS X 10.9."); 106 | +} 107 | + 108 | +GRUB_MOD_FINI(applesetos) 109 | +{ 110 | + grub_unregister_command (cmd); 111 | +} 112 | -------------------------------------------------------------------------------- /archlinux/abs/core/grub-git/grub-add-GRUB_COLOR_variables.patch: -------------------------------------------------------------------------------- 1 | diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in 2 | index ca040dd..b7090ed 100644 3 | --- a/util/grub-mkconfig.in 4 | +++ b/util/grub-mkconfig.in 5 | @@ -219,6 +219,8 @@ export GRUB_DEFAULT \ 6 | GRUB_THEME \ 7 | GRUB_GFXPAYLOAD_LINUX \ 8 | GRUB_DISABLE_OS_PROBER \ 9 | + GRUB_COLOR_NORMAL \ 10 | + GRUB_COLOR_HIGHLIGHT \ 11 | GRUB_INIT_TUNE \ 12 | GRUB_SAVEDEFAULT \ 13 | GRUB_ENABLE_CRYPTODISK \ 14 | diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in 15 | index ce2ec81..315fb8d 100644 16 | --- a/util/grub.d/00_header.in 17 | +++ b/util/grub.d/00_header.in 18 | @@ -125,6 +125,14 @@ cat <