├── .gitattributes ├── .gitignore ├── AUTHORS ├── BUGS ├── HACKING ├── Makefile ├── README ├── TODO ├── arch ├── alpha │ ├── arch-config │ ├── config.sh │ └── modules_load ├── arm │ ├── arch-config │ ├── config.sh │ └── modules_load ├── arm64 │ ├── arch-config │ ├── config.sh │ └── modules_load ├── ia64 │ ├── arch-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── mips │ ├── arch-config │ ├── config.sh │ ├── ip22r4k-2006_1.cf │ ├── ip22r5k-2006_1.cf │ ├── ip27r10k-2006_1.cf │ ├── ip28r10k-2006_1.cf │ ├── ip30r10k-2006_1.cf │ ├── ip32r5k-2006_1.cf │ ├── ip32rm5k-2006_1.cf │ └── modules_load ├── parisc │ ├── arch-config │ ├── config.sh │ └── modules_load ├── parisc64 │ ├── arch-config │ ├── config.sh │ └── modules_load ├── ppc │ ├── arch-config │ ├── config.sh │ └── modules_load ├── ppc64 │ ├── arch-config │ ├── config.sh │ ├── kernel-2.6-pSeries │ ├── kernel-2.6.g5 │ └── modules_load ├── ppc64le │ ├── arch-config │ ├── config.sh │ └── modules_load ├── riscv64 │ ├── arch-config │ ├── config.sh │ └── modules_load ├── s390 │ ├── arch-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── s390x │ ├── arch-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── sparc │ ├── arch-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── sparc64 │ ├── arch-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── um │ ├── arch-config │ ├── config.sh │ ├── kernel-config │ └── modules_load ├── x86 │ ├── arch-config │ ├── config.sh │ └── modules_load └── x86_64 │ ├── arch-config │ ├── config.sh │ └── modules_load ├── defaults ├── busy-config ├── compression_methods.sh ├── config.sh ├── gksosreport.sh ├── initrd.defaults ├── initrd.scripts ├── kernel-generic-config ├── keymaps │ ├── 1.map │ ├── 10.map │ ├── 11.map │ ├── 12.map │ ├── 13.map │ ├── 14.map │ ├── 15.map │ ├── 16.map │ ├── 17.map │ ├── 18.map │ ├── 19.map │ ├── 2.map │ ├── 20.map │ ├── 21.map │ ├── 22.map │ ├── 23.map │ ├── 24.map │ ├── 25.map │ ├── 26.map │ ├── 27.map │ ├── 28.map │ ├── 29.map │ ├── 3.map │ ├── 30.map │ ├── 31.map │ ├── 32.map │ ├── 33.map │ ├── 34.map │ ├── 35.map │ ├── 36.map │ ├── 37.map │ ├── 38.map │ ├── 39.map │ ├── 4.map │ ├── 40.map │ ├── 41.map │ ├── 42.map │ ├── 43.map │ ├── 44.map │ ├── 5.map │ ├── 6.map │ ├── 7.map │ ├── 8.map │ ├── 9.map │ ├── azerty.map │ ├── be.map │ ├── bepo.map │ ├── bg.map │ ├── br-a.map │ ├── br-l.map │ ├── by.map │ ├── cf.map │ ├── colemak.map │ ├── croat.map │ ├── cz.map │ ├── de.map │ ├── dk.map │ ├── dvorak.map │ ├── es.map │ ├── et.map │ ├── fi.map │ ├── fr.map │ ├── gr.map │ ├── hu.map │ ├── il.map │ ├── is.map │ ├── it.map │ ├── jp.map │ ├── keymapList │ ├── la.map │ ├── lt.map │ ├── mk.map │ ├── nl.map │ ├── no.map │ ├── pl.map │ ├── pt.map │ ├── ro.map │ ├── ru.map │ ├── se.map │ ├── sf.map │ ├── sg.map │ ├── sk-y.map │ ├── sk-z.map │ ├── slovene.map │ ├── trq.map │ ├── ua.map │ ├── uk.map │ ├── us.map │ └── wangbe.map ├── linuxrc ├── login-remote.sh ├── modules_load ├── resume-boot.sh ├── software.sh ├── udhcpc.scripts ├── unlock-luks.sh └── unlock-zfs.sh ├── doc ├── asciidoc.conf └── genkernel.8.txt ├── gen_arch.sh ├── gen_bootloader.sh ├── gen_cmdline.sh ├── gen_compile.sh ├── gen_configkernel.sh ├── gen_determineargs.sh ├── gen_funcs.sh ├── gen_initramfs.sh ├── gen_moddeps.sh ├── gen_package.sh ├── gen_worker.sh ├── genkernel ├── genkernel.conf ├── gkbuilds ├── bcache-tools-1.0.8_p20141204.gkbuild ├── bcache-tools-1.1_p20230217.gkbuild ├── boost-build.gkbuild ├── boost.gkbuild ├── btrfs-progs.gkbuild ├── busybox.gkbuild ├── coreutils.gkbuild ├── cryptsetup.gkbuild ├── dmraid.gkbuild ├── dropbear.gkbuild ├── e2fsprogs.gkbuild ├── eudev.gkbuild ├── expat.gkbuild ├── fuse.gkbuild ├── gnupg.gkbuild ├── hwids.gkbuild ├── json-c-0.17.gkbuild ├── json-c.gkbuild ├── keyutils.gkbuild ├── kmod.gkbuild ├── libaio.gkbuild ├── libgcrypt.gkbuild ├── libgpg-error.gkbuild ├── libxcrypt.gkbuild ├── lvm-2.03.22.gkbuild ├── lvm.gkbuild ├── lzo.gkbuild ├── mdadm-4.2.gkbuild ├── mdadm.gkbuild ├── open-iscsi.gkbuild ├── popt.gkbuild ├── strace.gkbuild ├── thin-provisioning-tools.gkbuild ├── unionfs-fuse.gkbuild ├── userspace-rcu.gkbuild ├── util-linux.gkbuild ├── xfsprogs.gkbuild ├── xz.gkbuild ├── zlib.gkbuild └── zstd.gkbuild ├── maintenance └── docmatcher.py ├── merge.pl ├── modules └── README ├── netboot ├── linuxrc.x └── misc │ ├── bin │ ├── ashlogin │ └── net-setup │ ├── etc │ ├── fstab │ ├── group │ ├── inittab │ ├── passwd │ ├── profile │ ├── resolv.conf │ ├── shadow │ └── shells │ └── usr │ └── share │ └── terminfo │ └── p │ └── putty ├── patches ├── bcache-tools │ └── 1.0.8_p20141204 │ │ ├── bcache-tools-1.0.8_p20141204-build.patch │ │ ├── bcache-tools-1.0.8_p20141204-crc64.patch │ │ └── bcache-tools-1.0.8_p20141204-modprobe.patch ├── boost-build │ └── 1.76.0 │ │ ├── boost-build-1.71.0-disable_python_rpath.patch │ │ ├── boost-build-1.73.0-add-none-feature-options.patch │ │ ├── boost-build-1.74.0-no-implicit-march-flags.patch │ │ ├── boost-build-1.76.0-python-numpy.patch │ │ └── boost-build-1.76.0-respect-user-flags.patch ├── boost │ ├── 1.76.0 │ │ ├── boost-1.71.0-context-x32.patch │ │ ├── boost-1.71.0-disable_icu_rpath.patch │ │ ├── boost-1.73-boost-mpi-python-PEP-328.patch │ │ ├── boost-1.74-CVE-2012-2677.patch │ │ ├── boost-1.76-boost-numpy.patch │ │ └── boost-1.76-sparc-define.patch │ └── 1.79.0 │ │ └── boost-1.79.0-fix-mips1-transition.patch ├── btrfs-progs │ └── 5.15 │ │ ├── btrfs-honor-LDFLAGS.patch │ │ ├── btrfs-lzo-via-pkgconfig.patch │ │ └── btrfs-m4.patch ├── busybox │ ├── 1.33.1 │ │ ├── busybox-1.20.2-modprobe.patch │ │ └── busybox-1.30.1-allow-for-genkernel-cross-compile.patch │ └── 1.36.1 │ │ └── busybox-1.36.1-kernel-6.8.patch ├── coreutils │ └── 8.32 │ │ └── coreutils-8.32-ls-restore-8.31-behavior-on-removed-directories.patch ├── dmraid │ └── 1.0.0.rc16-3 │ │ ├── dmraid-1.0.0_rc16-001-undo-p-rename.patch │ │ ├── dmraid-1.0.0_rc16-002-return-all-sets.patch │ │ ├── dmraid-1.0.0_rc16-003-static-build-fixes.patch │ │ ├── dmraid-1.0.0_rc16-004-staticlink.patch │ │ └── dmraid-1.0.0_rc16-005-parallel-make.patch ├── e2fsprogs │ ├── 1.46.4 │ │ ├── e2fsprogs-1.42.13-fix-build-cflags.patch │ │ ├── e2fsprogs-1.44.6-parallel_install.patch │ │ └── e2fsprogs-1.46.0-build.patch │ └── 1.47.0 │ │ ├── e2fsprogs-1.42.13-fix-build-cflags.patch │ │ ├── e2fsprogs-1.44.6-parallel_install.patch │ │ └── e2fsprogs-1.46.0-build.patch ├── eudev │ └── 3.2.14 │ │ └── eudev-3.2.14-static.patch ├── fuse │ └── 2.9.9 │ │ └── fuse-2.9.9-glibc-2.34.patch ├── gnupg │ └── 1.4.23 │ │ └── gnupg-1.4.23-gcc-10.patch ├── json-c │ └── 0.13.1 │ │ └── json-c-0.13.1-CVE-2020-12762.patch ├── kmod │ ├── 29 │ │ └── kmod-29-static.patch │ ├── 30 │ │ └── kmod-29-static.patch │ └── 31 │ │ ├── kmod-29-static.patch │ │ └── kmod-31-musl-basename.patch ├── libaio │ └── 0.3.112 │ │ ├── libaio-0.3.111-optional-werror.patch │ │ └── libaio-0.3.112-cppflags.patch ├── libgcrypt │ ├── 1.10.3 │ │ ├── libgcrypt-1.10.3-hppa.patch │ │ ├── libgcrypt-1.10.3-x86-refactor.patch │ │ ├── libgcrypt-1.10.3-x86.patch │ │ ├── libgcrypt-1.9.4-no-fgrep-libgcrypt-config.patch │ │ ├── libgcrypt-multilib-syspath.patch │ │ └── libgcrypt-powerpc-darwin.patch │ └── 1.9.4 │ │ └── libgcrypt-1.92-use-pkg-config.patch ├── libgpg-error │ └── 1.43 │ │ ├── libgpg-error-1.36-gpg-error-config.patch │ │ └── libgpg-error-1.37-remove_broken_check.patch ├── lvm │ ├── 2.02.188 │ │ ├── lvm2-001-example.conf.in.patch │ │ ├── lvm2-002-always-make-static-libdm.patch │ │ ├── lvm2-003-lvm2create_initrd.patch │ │ ├── lvm2-004-createinitrd.patch │ │ ├── lvm2-005-locale-muck.patch │ │ ├── lvm2-006-asneeded.patch │ │ ├── lvm2-007-dynamic-static-ldflags.patch │ │ ├── lvm2-008-static-pkgconfig-libs.patch │ │ ├── lvm2-009-pthread-pkgconfig.patch │ │ ├── lvm2-010-static-libm.patch │ │ ├── lvm2-011-HPPA-no-O_DIRECT.patch │ │ ├── lvm2-012-mallinfo.patch │ │ ├── lvm2-013-fix-stdio-usage.patch │ │ ├── lvm2-014-make-malloc-realloc-check-optional.patch │ │ ├── lvm2-015-mksh_build.patch │ │ ├── lvm2-016-implement-libc-specific-reopen_stream.patch │ │ └── lvm2-017-udev_remove_unsupported_option.patch │ └── 2.03.22 │ │ ├── lvm2-001-example.conf.in.patch │ │ ├── lvm2-002-always-make-static-libdm.patch │ │ ├── lvm2-003-lvm2create_initrd.patch │ │ ├── lvm2-004-createinitrd.patch │ │ ├── lvm2-005-locale-muck.patch │ │ ├── lvm2-011-HPPA-no-O_DIRECT.patch │ │ ├── lvm2-013-fix-stdio-usage.patch │ │ ├── lvm2-014-make-malloc-realloc-check-optional.patch │ │ ├── lvm2-016-implement-libc-specific-reopen_stream.patch │ │ ├── lvm2-018-autoconf-2.72-egrep.patch │ │ ├── lvm2-019-musl-basename.patch │ │ └── lvm2-020-freopen-musl.patch ├── mdadm │ ├── 4.1 │ │ └── mdadm-3.4-sysmacros.patch │ └── 4.2 │ │ └── mdadm-3.4-sysmacros.patch ├── open-iscsi │ ├── 2.1.4 │ │ ├── open-iscsi-2.1.4-Makefiles.patch │ │ └── open-iscsi-2.1.4-static-iscsistart.patch │ └── 2.1.8 │ │ ├── open-iscsi-2.1.8-Makefiles.patch │ │ └── open-iscsi-2.1.8-static-iscsistart.patch ├── thin-provisioning-tools │ └── 0.9.0 │ │ ├── thin-provisioning-tools-0.8.5-no-manpages.patch │ │ └── thin-provisioning-tools-0.9.0-build-fixes.patch ├── unionfs-fuse │ └── 2.0 │ │ └── unionfs-fuse-2.0-use-PKG_CONFIG-env-variable.patch ├── xfsprogs │ └── 5.13.0 │ │ └── xfsprogs-5.10.0-remove-inih-dep.patch └── zlib │ ├── 1.2.11 │ ├── zlib-1.2.11-fix-deflateParams-usage.patch │ └── zlib-1.2.11-minizip-drop-crypt-header.patch │ └── 1.3.1 │ └── zlib-1.2.11-minizip-drop-crypt-header.patch ├── path_expander.py └── worker_modules ├── dropbear.sh ├── gkbuild.sh └── unpack.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | AUTHORS ident 2 | BUGS ident 3 | ChangeLog ident 4 | HACKING ident 5 | README ident 6 | TODO ident 7 | genkernel ident 8 | *.conf ident 9 | *.sh ident 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /genkernel.8 2 | /genkernel-*.tar.bz2 3 | /genkernel-*.tar.xz 4 | /ChangeLog 5 | /arch/*/generated-config 6 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # $Id: 3ac777dcd602737d77e262d13b149c5a61cb49c9 $ 2 | 3 | This list is split into two alphabetical lists. The first is a listing of the 4 | authors of the original Gentoo package. The copyrights for all of those code 5 | contributions belong to the Gentoo Foundation. The second list is the authors 6 | whom have contributed significant code to the new project. All code added to 7 | the new project is copyrighted by the respective authors. 8 | 9 | Gentoo Foundation authors: 10 | ------ 11 | Luca Barbato 12 | Eric Edgar 13 | Mike Frysinger 14 | Tom Gall 15 | Andrew Gaffney 16 | Chris Gianelloni 17 | Brad House 18 | Brain Jackson 19 | Robin H. Johnson 20 | Joshua Kinard 21 | Seemant Kulleen 22 | Guy Martin 23 | Daniel Robbins 24 | Travis Tilley 25 | Pieter van den Abeele 26 | Jason Wever 27 | Tim Yamin 28 | 29 | Copyright authors: 30 | ------ 31 | Andrew Gaffney 32 | Chris Gianelloni 33 | Stefan Behte 34 | -------------------------------------------------------------------------------- /BUGS: -------------------------------------------------------------------------------- 1 | # $Id: c8a0b3c2c961e15423e4612cc1618d8b446d77b5 $ 2 | 3 | This file lists out some known bugs which need to be resolved. Do not file bug 4 | reports against these bugs, as the genkernel team is aware of them and has yet 5 | to implement a solution. 6 | -------------------------------------------------------------------------------- /HACKING: -------------------------------------------------------------------------------- 1 | # $Id: 32ab8a6397519f9a4674ad5816e55270079d647c $ 2 | 3 | This document is a work-in-progress to describe the workflow through the various 4 | parts of genkernel so that we can split the code into modular chunks. If you 5 | are interested in helping with genkernel development, please get in touch at 6 | . 7 | 8 | Phases: 9 | 10 | - read configs 11 | - source global scripts 12 | - 13 | 14 | Testing things: 15 | $ cd genkernel 16 | $ sudo GK_SHARE="$PWD" ./genkernel initramfs --no-install --no-postclear --loglevel=2 17 | 18 | Rolling a release: 19 | - export PV="NEWVER" 20 | - Bump the version in the main genkernel file: 21 | - sed -i "/^GK_V=/s/='.*'$/='$PV'/" genkernel 22 | - make dist UNCLEAN=1 # verify it can build. 23 | - git commit -s -a -m "Bump version to ${PV}" 24 | - git tag -s -a -m "Tag release v${PV}" v${PV} 25 | - make dist # Real tarball 26 | - git push ${REMOTE} master --tags 27 | - upload genkernel-${PV}.tar.xz to the hosting: 28 | scp genkernel-${PV}.tar.xz ${USER}@dev.gentoo.org:/space/distfiles-local/ 29 | - copy to portage's DISTDIR so you can bump the ebuild 30 | before the tarball hits distfile mirrors 31 | - cp genkernel-${PV}.tar.xz /var/cache/distfiles/ 32 | - Bump the ebuild 33 | - Propagate ebuild changes to the live ebuild 34 | diff genkernel-${OLD_PV}.ebuild genkernel-${NEW_PV}.ebuild | patch genkernel-9999.ebuild 35 | - check open bugs with keyword "InSVN" or "InVCS" for closability 36 | and close these bugs with a comment like "Fixed in ${PV}, just released. Closing." 37 | - Send a mail with subject "genkernel ${PV} released" to both 38 | and . 39 | Use 40 | 41 | PREV_TAG=$(git tag -l | tail -n 2 | head -n 1) \ 42 | git shortlog ${PREV_TAG}..v${PV} | xsel 43 | 44 | to generate the mail body. 45 | 46 | Changes: 47 | Changelogs prior to 2012 are available in Changelog.old [1], removed from 48 | regular distribution in commit 4ec9886457a58330843f5c46a38e73fda9957410. 49 | 50 | [1] https://gitweb.gentoo.org/proj/genkernel.git/tree/ChangeLog.old?id=71507545eec3031ade9b4f9a314c53216f2c97f2 51 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | # $Id: 1df4231d55a3203c7c8cc6ece3c3b439aa868733 $ 2 | 3 | GENERAL CONCEPT: 4 | Genkernel's primary job is to bring up only the basic stuff needed 5 | to mount your (block) device containing the root filesystem so that 6 | we can hand off control to real system as soon as possible. 7 | 8 | It's _not_ genkernel's goal to load all available modules, to start 9 | all available devices, to unlock additional volumes, to start network 10 | or do other fancy stuff. So don't forget to set up your normal boot 11 | services so that the real system can finish boot and do all of the 12 | things mentioned above. 13 | 14 | DEPENDENCIES: 15 | - GCC and binutils 16 | - GNU Bash 17 | - PaX Utilities 18 | - Autoconf and Automake 19 | 20 | USAGE: 21 | See https://wiki.gentoo.org/wiki/Genkernel or 22 | issue ``genkernel --help''. 23 | 24 | PORTING: 25 | To port to other arches: 26 | 27 | # cd /usr/share/genkernel 28 | # cp -Rp x86_64 ${myarch} 29 | 30 | Modify what is needed in the /usr/share/genkernel/${myarch} 31 | directory, as well making a generic kernel-config. 32 | 33 | Check determine_real_args() function in gen_determineargs.sh 34 | if you need to add anything like support for your architecture's 35 | GCC triplet or mapping to kernel's arch. 36 | 37 | IMPORTANT KERNEL NOTES: 38 | - You MUST have /dev/pts turned on. 39 | - To boot genkernel properly, the kernel config must have 40 | Initial RAM disk support. 41 | 42 | BOOTING A KERNEL WITH INITRAMFS: 43 | 44 | GRUB: 45 | root= needs to point to your root partition 46 | vga= should be the resolution you want your screen. 0x317 is 47 | 1024x768 - 16bpp and you'll get a pretty splash if 48 | configured properly 49 | 50 | GRUB 1.x EXAMPLE ENTRY: 51 | title Gentoo Linux 52 | root (hd0,0) 53 | kernel /vmlinuz-5.4.2-gentoo-x86_64 root=/dev/sda1 vga=0x791 54 | initrd /initramfs-5.4.2-gentoo-x86_64.img 55 | 56 | EXTLINUX (SYSLINUX) EXAMPLE ENTRY: 57 | LABEL genkernel-latest 58 | MENU LABEL Gentoo Linux (latest) 59 | LINUX /kernel 60 | INITRD /initramfs 61 | APPEND dolvm crypt_root=UUID=a8c5be51-bd1b-4446-a430-1d0ed576fa73 root=UUID=a2e5968c-5917-41ef-bf81-edffd54c8abd rootfs=ext4 root_trim=yes dosshd 62 | 63 | NOTE: The example above uses genkernel's --symlink feature and 64 | initramfs was built with --lvm, --luks and --ssh. 65 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | # $Id: 483865066b10f048d45cdfb962ae97584a8762ff $ 2 | 3 | - Need configs for other currently-unsupported arches 4 | - Make configs stackable 5 | - Move modules_load to /etc/genkernel 6 | - Move main config to /etc/genkernel 7 | - Refactor code to be more simple and extendable 8 | - Fix all TODO sections in the code 9 | - Add "include" options to genkernel.conf 10 | - Create hooks for various points in the build/install phases for modules 11 | - Add new boot support for the following: 12 | - Hardware 13 | - Infiniband 14 | - FCP 15 | - Security Tokens (TPM, Smart Cards, etc) 16 | - Software 17 | - Block protocols over Ethernet/IP 18 | - ATA over Ethernet 19 | - FCP over Ethernet 20 | - Infiniband over IP 21 | - Security Tokens for encrypted block devices 22 | - Document the different code paths and hooks for external modules 23 | - Add support for Hardware auto-detection 24 | - Fully automatic 25 | - Verify required kernel support for detected hardware used at boot 26 | - Automatically enable missing options 27 | - All supported modules copied to initramfs via default modules_load 28 | - Enable all "hot pluggable" devices (USB, PCMCIA, etc) 29 | - Partially automatic 30 | - Verify required kernel support for detected hardware used at boot 31 | - Automatically enable missing options 32 | - Copy only required modules to initramfs via modules_load 33 | - Interactive 34 | - Ask user what to do 35 | 36 | -------------------------------------------------------------------------------- /arch/alpha/arch-config: -------------------------------------------------------------------------------- 1 | CONFIG_64BIT=y 2 | # CONFIG_ALPHA_ALCOR is not set 3 | # CONFIG_ALPHA_AVANTI_CH is not set 4 | # CONFIG_ALPHA_BOOK1 is not set 5 | CONFIG_ALPHA_BROKEN_IRQ_MASK=y 6 | # CONFIG_ALPHA_CABRIOLET is not set 7 | CONFIG_ALPHA_CORE_AGP=y 8 | # CONFIG_ALPHA_DP264 is not set 9 | # CONFIG_ALPHA_EB164 is not set 10 | # CONFIG_ALPHA_EB64P_CH is not set 11 | # CONFIG_ALPHA_EB66 is not set 12 | # CONFIG_ALPHA_EB66P is not set 13 | # CONFIG_ALPHA_EIGER is not set 14 | CONFIG_ALPHA_GENERIC=y 15 | # CONFIG_ALPHA_JENSEN is not set 16 | # CONFIG_ALPHA_LX164 is not set 17 | # CONFIG_ALPHA_LYNX is not set 18 | # CONFIG_ALPHA_MARVEL is not set 19 | # CONFIG_ALPHA_MIATA is not set 20 | # CONFIG_ALPHA_MIKASA is not set 21 | # CONFIG_ALPHA_NAUTILUS is not set 22 | # CONFIG_ALPHA_NONAME_CH is not set 23 | # CONFIG_ALPHA_NORITAKE is not set 24 | # CONFIG_ALPHA_P2K is not set 25 | # CONFIG_ALPHA_PC164 is not set 26 | # CONFIG_ALPHA_RAWHIDE is not set 27 | # CONFIG_ALPHA_RUFFIAN is not set 28 | # CONFIG_ALPHA_RX164 is not set 29 | # CONFIG_ALPHA_SABLE is not set 30 | # CONFIG_ALPHA_SHARK is not set 31 | # CONFIG_ALPHA_SX164 is not set 32 | # CONFIG_ALPHA_TAKARA is not set 33 | # CONFIG_ALPHA_TITAN is not set 34 | CONFIG_ALPHA_UAC_SYSCTL=y 35 | # CONFIG_ALPHA_WILDFIRE is not set 36 | # CONFIG_ALPHA_XL is not set 37 | CONFIG_ALPHA=y 38 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 39 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set 40 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set 41 | # CONFIG_ARCH_SUPPORTS_MSI is not set 42 | CONFIG_AUTO_IRQ_AFFINITY=y 43 | CONFIG_BINFMT_AOUT=m 44 | CONFIG_BINFMT_EM86=m 45 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 46 | # CONFIG_DISCONTIGMEM_MANUAL is not set 47 | CONFIG_EISA_NAMES=y 48 | CONFIG_EISA_PCI_EISA=y 49 | CONFIG_EISA_VIRTUAL_ROOT=y 50 | CONFIG_EISA=y 51 | CONFIG_FLATMEM_MANUAL=y 52 | CONFIG_FLATMEM=y 53 | CONFIG_FLAT_NODE_MEM_MAP=y 54 | CONFIG_GENERIC_FIND_NEXT_BIT=y 55 | CONFIG_GENERIC_HARDIRQS=y 56 | CONFIG_GENERIC_HWEIGHT=y 57 | # CONFIG_GENERIC_IOMAP is not set 58 | CONFIG_HAVE_DEC_LOCK=y 59 | CONFIG_NR_CPUS=32 60 | CONFIG_OSF4_COMPAT=y 61 | # CONFIG_PCCARD is not set 62 | CONFIG_PCI_SYSCALL=y 63 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y 64 | # CONFIG_SPARSEMEM_MANUAL is not set 65 | # CONFIG_SPARSEMEM_STATIC is not set 66 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 67 | CONFIG_SRM_ENV=m 68 | CONFIG_VERBOSE_MCHECK_ON=1 69 | CONFIG_VERBOSE_MCHECK=y 70 | CONFIG_VGA_HOSE=y 71 | CONFIG_ZONE_DMA_FLAG=1 72 | -------------------------------------------------------------------------------- /arch/alpha/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 60dad5124e451e3aa06c3b79a5a334a5ab96d5f7 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="boot" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/alpha/boot/vmlinux.gz" 9 | -------------------------------------------------------------------------------- /arch/alpha/modules_load: -------------------------------------------------------------------------------- 1 | # alpha module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/arm/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/arm/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: ce478c8de942860628ed9a38ad2a7aac4425e2f3 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/arm/boot/zImage" 9 | -------------------------------------------------------------------------------- /arch/arm/modules_load: -------------------------------------------------------------------------------- 1 | # arm module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Hardware (IDE/SCSI/SATA/NVMe) 5 | MODULES_SATA+=" ahci_xgene" 6 | 7 | # Hardware (Network) 8 | MODULES_NET+=" xgene_enet" 9 | -------------------------------------------------------------------------------- /arch/arm64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 676ce597a7b970f4b2fbd01faa829ee9357dc81d $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="Image" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/arm64/boot/Image" 9 | -------------------------------------------------------------------------------- /arch/arm64/modules_load: -------------------------------------------------------------------------------- 1 | # arm64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Hardware (IDE/SCSI/SATA/NVMe) 5 | MODULES_SATA+=" ahci_xgene" 6 | 7 | # Hardware (Network) 8 | MODULES_NET+=" xgene_enet" 9 | 10 | # Crypto 11 | MODULES_CRYPTO+=" aes-ce-blk" 12 | -------------------------------------------------------------------------------- /arch/ia64/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/ia64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: fc636480fc292bd96459330377396fec87c6eede $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="vmlinux.gz" 9 | -------------------------------------------------------------------------------- /arch/ia64/modules_load: -------------------------------------------------------------------------------- 1 | # ia64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/mips/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/mips/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 50757e338101e0c27be5d32d45c7e74993964ba7 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="./vmlinux" 9 | 10 | # Initrd/Initramfs Options 11 | RAMDISKMODULES="no" 12 | BUSYBOX="yes" 13 | DMRAID="no" 14 | 15 | # genkernel on mips is only used for LiveCDs && netboots. Catalyst 16 | # will know where to get the kernels at. 17 | INSTALL="no" 18 | -------------------------------------------------------------------------------- /arch/mips/modules_load: -------------------------------------------------------------------------------- 1 | # mips module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Crypto 5 | MODULES_CRYPTO+=" crc32-mips" 6 | -------------------------------------------------------------------------------- /arch/parisc/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/parisc/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 5793af2309b1295d8102d1e6181a863ffa881da6 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="vmlinux" 9 | -------------------------------------------------------------------------------- /arch/parisc/modules_load: -------------------------------------------------------------------------------- 1 | # parisc module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/parisc64/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/parisc64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 5793af2309b1295d8102d1e6181a863ffa881da6 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="vmlinux" 9 | -------------------------------------------------------------------------------- /arch/parisc64/modules_load: -------------------------------------------------------------------------------- 1 | # parisc64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/ppc/arch-config: -------------------------------------------------------------------------------- 1 | # CONFIG_ADB is not set 2 | # CONFIG_ADB_PMU is not set 3 | CONFIG_CMM=y 4 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y 5 | CONFIG_FB_NVIDIA=m 6 | CONFIG_FB_RADEON_I2C=y 7 | CONFIG_FB_RADEON=m 8 | CONFIG_HZ_100=y 9 | CONFIG_KEXEC_AUTO_RESERVE=y 10 | CONFIG_NEED_MULTIPLE_NODES=y 11 | CONFIG_NODES_SHIFT=8 12 | CONFIG_PPC_SMLPAR=y 13 | CONFIG_PPC_SPLPAR=y 14 | # CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set 15 | CONFIG_VSX=y 16 | # CONFIG_WINDFARM is not set 17 | # CONFIG_WINDFARM_PM112 is not set 18 | -------------------------------------------------------------------------------- /arch/ppc/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 173cff1d6ff1c5098f35e6548a034d6dd4067a99 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_BINARY="vmlinux" 8 | -------------------------------------------------------------------------------- /arch/ppc/modules_load: -------------------------------------------------------------------------------- 1 | # ppc module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/ppc64/arch-config: -------------------------------------------------------------------------------- 1 | # CONFIG_ADB_PMU_LED_IDE is not set 2 | # CONFIG_ADB_PMU_LED is not set 3 | # CONFIG_AXON_RAM is not set 4 | CONFIG_BLK_DEV_RSXX=m 5 | # CONFIG_CBE_AXON_PCI is not set 6 | # CONFIG_CBE_AXON_UTL is not set 7 | # CONFIG_CBE_CPUFREQ is not set 8 | # CONFIG_CBE_CPUFREQ_PMI is not set 9 | # CONFIG_CBE_CPUFREQ_SPU_GOVERNOR is not set 10 | # CONFIG_CBE_RAS is not set 11 | # CONFIG_CBE_THERM is not set 12 | CONFIG_CRASH=y 13 | # CONFIG_CRYPTO_DEV_NX is not set 14 | # CONFIG_EDAC_CELL is not set 15 | CONFIG_FA_DUMP=y 16 | # CONFIG_FB_PS3_DEFAULT_SIZE_M is not set 17 | # CONFIG_FB_PS3 is not set 18 | CONFIG_FORCE_MAX_ZONEORDER=9 19 | CONFIG_HOTPLUG_PCI_RPA=y 20 | CONFIG_HW_RANDOM_PSERIES=y 21 | CONFIG_IBM_BSR=y 22 | CONFIG_NR_CPUS=1024 23 | # CONFIG_OPROFILE_CELL is not set 24 | # CONFIG_PHYP_DUMP is not set 25 | CONFIG_POWER4_ONLY=y 26 | CONFIG_PPC_64K_PAGES=y 27 | # CONFIG_PPC_CELLEB is not set 28 | # CONFIG_PPC_CELL is not set 29 | # CONFIG_PPC_CELL_NATIVE is not set 30 | # CONFIG_PPC_CELL_QPACE is not set 31 | # CONFIG_PPC_IBM_CELL_BLADE is not set 32 | # CONFIG_PPC_ISERIES is not set 33 | # CONFIG_PPC_MAPLE is not set 34 | # CONFIG_PPC_PMAC64 is not set 35 | # CONFIG_PPC_PMAC is not set 36 | # CONFIG_PPC_PS3 is not set 37 | CONFIG_PPC_SUBPAGE_PROT=y 38 | CONFIG_PSERIES_ENERGY=m 39 | # CONFIG_RTC_DRV_PS3 is not set 40 | CONFIG_SCSI_IBMVFC=m 41 | CONFIG_SCSI_IBMVFC_TRACE=y 42 | # CONFIG_SND_PS3_DEFAULT_START_DELAY is not set 43 | # CONFIG_SND_PS3 is not set 44 | # CONFIG_SPARSEMEM_VMEMMAP is not set 45 | # CONFIG_SPU_BASE is not set 46 | # CONFIG_SPU_FS is not set 47 | # CONFIG_SPUFS_MMAP is not set 48 | # CONFIG_TUNE_CELL is not set 49 | # CONFIG_UDBG_RTAS_CONSOLE is not set 50 | # CONFIG_WINDFARM_PM121 is not set 51 | # CONFIG_WINDFARM_PM81 is not set 52 | # CONFIG_WINDFARM_PM91 is not set 53 | -------------------------------------------------------------------------------- /arch/ppc64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 173cff1d6ff1c5098f35e6548a034d6dd4067a99 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_BINARY="vmlinux" 8 | -------------------------------------------------------------------------------- /arch/ppc64/modules_load: -------------------------------------------------------------------------------- 1 | # ppc64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Crypto 5 | MODULES_CRYPTO+=" crc32c-vpmsum" 6 | -------------------------------------------------------------------------------- /arch/ppc64le/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: c40ba0fc69a7e08e23778d654e949696ac874066 $ 2 | # 3 | # Arch-specific options that normally shouldn't be changed. 4 | # 5 | KERNEL_MAKE_DIRECTIVE="vmlinux" 6 | KERNEL_BINARY="vmlinux" 7 | 8 | # 9 | # Arch-specific defaults that can be overridden in the config file or on the 10 | # command line. 11 | # 12 | DEFAULT_COMPRESS_INITRD=yes 13 | DEFAULT_COMPRESS_INITRD_TYPE=best 14 | 15 | DEFAULT_MAKEOPTS="-j2" 16 | 17 | DEFAULT_KERNEL_MAKE=make 18 | DEFAULT_UTILS_MAKE=make 19 | 20 | DEFAULT_KERNEL_CC=gcc 21 | DEFAULT_KERNEL_AS=as 22 | DEFAULT_KERNEL_LD=ld 23 | 24 | DEFAULT_UTILS_CC=gcc 25 | DEFAULT_UTILS_AS=as 26 | DEFAULT_UTILS_LD=ld 27 | -------------------------------------------------------------------------------- /arch/ppc64le/modules_load: -------------------------------------------------------------------------------- 1 | # ppc64le module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Crypto 5 | MODULES_CRYPTO+=" crc32c-vpmsum" 6 | -------------------------------------------------------------------------------- /arch/riscv64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 6e57e3d7fbb0ec217b3297a93a7086bf921ffb8f $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="Image" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/riscv/boot/Image" 9 | -------------------------------------------------------------------------------- /arch/riscv64/modules_load: -------------------------------------------------------------------------------- 1 | # riscv64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/s390/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/s390/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 7ef4aa2f687c4eac426fc1d1c2cd63b65f37474b $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/s390/boot/bzImage" 9 | -------------------------------------------------------------------------------- /arch/s390/modules_load: -------------------------------------------------------------------------------- 1 | # s390 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/s390x/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/s390x/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 7ef4aa2f687c4eac426fc1d1c2cd63b65f37474b $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/s390/boot/bzImage" 9 | -------------------------------------------------------------------------------- /arch/s390x/modules_load: -------------------------------------------------------------------------------- 1 | # s390 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/sparc/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/sparc/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: dbab06ffa9ef34a229222aec257008db4df0fa5d $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="vmlinux" 9 | 10 | NOCOLOR="true" 11 | -------------------------------------------------------------------------------- /arch/sparc/modules_load: -------------------------------------------------------------------------------- 1 | # sparc module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/sparc64/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/sparc64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 8e828d24d6522e45ccbd372b32e313ecd672c057 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="vmlinux" 7 | KERNEL_MAKE_DIRECTIVE_2="image" 8 | KERNEL_BINARY="arch/sparc64/boot/image arch/sparc/boot/image" 9 | 10 | NOCOLOR="true" 11 | -------------------------------------------------------------------------------- /arch/sparc64/modules_load: -------------------------------------------------------------------------------- 1 | # sparc64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Crypto 5 | MODULES_CRYPTO+=" crc32c-sparc64" 6 | -------------------------------------------------------------------------------- /arch/um/arch-config: -------------------------------------------------------------------------------- 1 | THIS_CONFIG_IS_BROKEN 2 | -------------------------------------------------------------------------------- /arch/um/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: f8bfd958e89903f824332510952fc0aa6baa1110 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="linux" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="linux" 9 | 10 | ARCH_HAVENOPREPARE=yes 11 | DEFAULT_KERNEL_MAKE="make ARCH=um" 12 | -------------------------------------------------------------------------------- /arch/um/modules_load: -------------------------------------------------------------------------------- 1 | # um module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | -------------------------------------------------------------------------------- /arch/x86/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 578ab0e25eae432174584969b48d12e7d2f1f92b $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="bzImage" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/i386/boot/bzImage" 9 | KERNEL_SUPPORT_MICROCODE=yes 10 | -------------------------------------------------------------------------------- /arch/x86/modules_load: -------------------------------------------------------------------------------- 1 | # x86 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Crypto 5 | MODULES_CRYPTO+=" crc32c-intel crc32-pclmul aes_586 aesni-intel serpent-sse2-i586" 6 | -------------------------------------------------------------------------------- /arch/x86_64/config.sh: -------------------------------------------------------------------------------- 1 | # $Id: 0243f6b81f1774c0a106f1c4baff096d70e21363 $ 2 | # 3 | # This file is sourced AFTER defaults/config.sh; generic options should be set there. 4 | # Arch-specific options that normally shouldn't be changed. 5 | # 6 | KERNEL_MAKE_DIRECTIVE="bzImage" 7 | KERNEL_MAKE_DIRECTIVE_2="" 8 | KERNEL_BINARY="arch/x86_64/boot/bzImage" 9 | KERNEL_SUPPORT_MICROCODE=yes 10 | -------------------------------------------------------------------------------- /arch/x86_64/modules_load: -------------------------------------------------------------------------------- 1 | # x86_64 module groups for genkernel initramfs auto-loading 2 | # (extending defaults/modules_load) 3 | 4 | # Crypto 5 | MODULES_CRYPTO+=" crc32c-intel crc32-pclmul aes-x86_64 aesni-intel serpent-sse2-x86_64 serpent-avx-x86_64 serpent-avx2" 6 | -------------------------------------------------------------------------------- /defaults/compression_methods.sh: -------------------------------------------------------------------------------- 1 | # NOTE: 2 | # - This file (compression_methods.sh) is sourced by genkernel. 3 | # Rather than changing this very file, please override specific variables 4 | # somewhere in /etc/genkernel.conf . 5 | # 6 | # - This file should not override previously defined variables, as their values may 7 | # originate from user changes to /etc/genkernel.conf . 8 | 9 | GKICM_BZ2_KOPTNAME="BZIP2" 10 | GKICM_BZ2_CMD="bzip2 -z -f -9" 11 | GKICM_BZ2_EXT=".bz2" 12 | GKICM_BZ2_PKG="app-arch/bzip2" 13 | 14 | GKICM_GZ_KOPTNAME="GZIP" 15 | GKICM_GZ_CMD="gzip -f -9" 16 | GKICM_GZ_EXT=".gz" 17 | GKICM_GZ_PKG="app-arch/gzip" 18 | 19 | GKICM_LZO_KOPTNAME="LZO" 20 | GKICM_LZO_CMD="lzop -f -9" 21 | GKICM_LZO_EXT=".lzo" 22 | GKICM_LZO_PKG="app-arch/lzop" 23 | 24 | GKICM_LZ4_KOPTNAME="LZ4" 25 | GKICM_LZ4_CMD="lz4 -f -9 -l -q" 26 | GKICM_LZ4_EXT=".lz4" 27 | GKICM_LZ4_PKG="app-arch/lz4" 28 | 29 | GKICM_LZMA_KOPTNAME="LZMA" 30 | GKICM_LZMA_CMD="lzma -z -f -9" 31 | GKICM_LZMA_EXT=".lzma" 32 | GKICM_LZMA_PKG="app-arch/xz-utils" 33 | 34 | GKICM_XZ_KOPTNAME="XZ" 35 | GKICM_XZ_CMD="xz -e --check=none -z -f -9 -T 0" 36 | GKICM_XZ_EXT=".xz" 37 | GKICM_XZ_PKG="app-arch/xz-utils" 38 | 39 | GKICM_ZSTD_KOPTNAME="ZSTD" 40 | GKICM_ZSTD_CMD="zstd -f -19 -q -T0" 41 | GKICM_ZSTD_EXT=".zst" 42 | GKICM_ZSTD_PKG="app-arch/zstd" 43 | -------------------------------------------------------------------------------- /defaults/config.sh: -------------------------------------------------------------------------------- 1 | # This file is sourced before the arch-specific configs. 2 | # $Id: a5d9ea3d2d5790188f5ee9c69ef373aa6cd2780a $ 3 | # 4 | # Arch-specific options that normally shouldn't be changed (and should be set in the arch-specific configs) 5 | # 6 | KERNEL_MAKE_DIRECTIVE="--INVALID--" 7 | # since "" is allowed (this will translate in `make `, which is nice 8 | # for xen-based kernels, the default value of 9 | # KERNEL_MAKE_DIRECTIVE_OVERRIDE cannot be "" 10 | DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE="--INVALID--" 11 | KERNEL_MAKE_DIRECTIVE_OVERRIDE="${KERNEL_MAKE_DIRECTIVE_OVERRIDE:-${DEFAULT_KERNEL_MAKE_DIRECTIVE_OVERRIDE}}" 12 | KERNEL_MAKE_DIRECTIVE_2="" 13 | KERNEL_BINARY="--INVALID--" 14 | KERNEL_SUPPORT_MICROCODE=no 15 | 16 | # At a bare minimum, every arch MUST override these two options: 17 | # KERNEL_MAKE_DIRECTIVE 18 | # KERNEL_BINARY 19 | 20 | # 21 | # Arch-specific defaults that can be overridden in the config file or on the 22 | # command line. 23 | # 24 | DEFAULT_INITRAMFS_FILENAME="initramfs-%%KV%%.img" 25 | DEFAULT_INITRAMFS_SYMLINK_NAME="initramfs" 26 | DEFAULT_KERNEL_CONFIG_FILENAME="kernel-config-%%KV%%" 27 | DEFAULT_KERNEL_FILENAME="vmlinuz-%%KV%%" 28 | DEFAULT_KERNEL_SYMLINK_NAME="kernel" 29 | DEFAULT_SYSTEMMAP_FILENAME="System.map-%%KV%%" 30 | DEFAULT_SYSTEMMAP_SYMLINK_NAME="System.map" 31 | 32 | DEFAULT_COMPRESS_INITRD=yes 33 | DEFAULT_COMPRESS_INITRD_TYPE=best 34 | 35 | PORTAGE_MAKEOPTS="$(portageq envvar MAKEOPTS)" 36 | DEFAULT_MAKEOPTS="${PORTAGE_MAKEOPTS:- -j$(nproc)}" 37 | 38 | DEFAULT_MODULEREBUILD_CMD="emerge --ignore-default-opts --buildpkg=n --usepkg=n --quiet-build=y @module-rebuild" 39 | 40 | DEFAULT_KERNEL_AS=as 41 | DEFAULT_KERNEL_AR=ar 42 | DEFAULT_KERNEL_CC=gcc 43 | DEFAULT_KERNEL_CXX=g++ 44 | DEFAULT_KERNEL_LD=ld 45 | DEFAULT_KERNEL_NM=nm 46 | DEFAULT_KERNEL_MAKE=make 47 | DEFAULT_KERNEL_OBJCOPY=objcopy 48 | DEFAULT_KERNEL_OBJDUMP=objdump 49 | DEFAULT_KERNEL_RANLIB=ranlib 50 | DEFAULT_KERNEL_READELF=readelf 51 | DEFAULT_KERNEL_STRIP=strip 52 | 53 | DEFAULT_UTILS_AS=as 54 | DEFAULT_UTILS_AR=ar 55 | DEFAULT_UTILS_CC=gcc 56 | DEFAULT_UTILS_CFLAGS="-Os -pipe -fomit-frame-pointer" 57 | DEFAULT_UTILS_CXX=g++ 58 | DEFAULT_UTILS_LD=ld 59 | DEFAULT_UTILS_NM=nm 60 | DEFAULT_UTILS_MAKE=make 61 | DEFAULT_UTILS_OBJCOPY=objcopy 62 | DEFAULT_UTILS_OBJDUMP=objdump 63 | DEFAULT_UTILS_RANLIB=ranlib 64 | DEFAULT_UTILS_READELF=readelf 65 | DEFAULT_UTILS_STRIP=strip 66 | 67 | PORTAGE_CHOST="$(portageq envvar CHOST)" 68 | DEFAULT_CHOST="${PORTAGE_CHOST:-$(${DEFAULT_UTILS_CC} -dumpmachine 2>/dev/null)}" 69 | -------------------------------------------------------------------------------- /defaults/gksosreport.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo 'Generating "/run/initramfs/gksosreport.txt" ...' 4 | 5 | if [ ! -d /run/initramfs ] 6 | then 7 | mkdir -p /run/initramfs 8 | chmod 0750 /run/initramfs 9 | fi 10 | 11 | exec >/run/initramfs/gksosreport.txt 2>&1 12 | 13 | PWFILTER='s/\(ftp:\/\/.*\):.*@/\1:*******@/g;s/\(cifs:\/\/.*\):.*@/\1:*******@/g;s/cifspass=[^ ]*/cifspass=*******/g;s/iscsi:.*@/iscsi:******@/g;s/rd.iscsi.password=[^ ]*/rd.iscsi.password=******/g;s/rd.iscsi.in.password=[^ ]*/rd.iscsi.in.password=******/g' 14 | 15 | echo "Genkernel SOS report from $(date +'%Y-%m-%d %H:%M:%S'):" 16 | 17 | set -x 18 | 19 | cat /lib/dracut/dracut-gk-version.info 20 | 21 | cat /lib/dracut/build-parameter.txt 22 | 23 | cat /proc/cmdline | sed -e "${PWFILTER}" 24 | 25 | [ -f /etc/cmdline ] && cat /etc/cmdline | sed -e "${PWFILTER}" 26 | 27 | lspci -k 28 | 29 | lsmod 30 | 31 | find /lib/modules/$(uname -r) -type f 32 | 33 | cat /proc/self/mountinfo 34 | cat /proc/mounts 35 | 36 | blkid 37 | blkid -o udev 38 | 39 | ls -l /dev/disk/by* 40 | 41 | if hash lvm >/dev/null 2>/dev/null 42 | then 43 | lvm pvdisplay 44 | lvm vgdisplay 45 | lvm lvdisplay 46 | fi 47 | 48 | if hash dmsetup >/dev/null 2>/dev/null 49 | then 50 | dmsetup ls --tree 51 | fi 52 | 53 | if [ -e /proc/mdstat ] 54 | then 55 | cat /proc/mdstat 56 | fi 57 | 58 | if hash cryptsetup >/dev/null 2>/dev/null 59 | then 60 | if [ -e /dev/mapper/root ] 61 | then 62 | cryptsetup status /dev/mapper/root 63 | fi 64 | fi 65 | 66 | if hash ip >/dev/null 2>/dev/null 67 | then 68 | ip link 69 | ip addr 70 | fi 71 | 72 | dmesg | sed -e "${PWFILTER}" 73 | 74 | [ -f /run/initramfs/init.log ] && cat /run/initramfs/init.log | sed -e "${PWFILTER}" 75 | -------------------------------------------------------------------------------- /defaults/keymaps/1.map: -------------------------------------------------------------------------------- 1 | azerty.map -------------------------------------------------------------------------------- /defaults/keymaps/10.map: -------------------------------------------------------------------------------- 1 | croat.map -------------------------------------------------------------------------------- /defaults/keymaps/11.map: -------------------------------------------------------------------------------- 1 | cz.map -------------------------------------------------------------------------------- /defaults/keymaps/12.map: -------------------------------------------------------------------------------- 1 | de.map -------------------------------------------------------------------------------- /defaults/keymaps/13.map: -------------------------------------------------------------------------------- 1 | dk.map -------------------------------------------------------------------------------- /defaults/keymaps/14.map: -------------------------------------------------------------------------------- 1 | dvorak.map -------------------------------------------------------------------------------- /defaults/keymaps/15.map: -------------------------------------------------------------------------------- 1 | es.map -------------------------------------------------------------------------------- /defaults/keymaps/16.map: -------------------------------------------------------------------------------- 1 | et.map -------------------------------------------------------------------------------- /defaults/keymaps/17.map: -------------------------------------------------------------------------------- 1 | fi.map -------------------------------------------------------------------------------- /defaults/keymaps/18.map: -------------------------------------------------------------------------------- 1 | fr.map -------------------------------------------------------------------------------- /defaults/keymaps/19.map: -------------------------------------------------------------------------------- 1 | gr.map -------------------------------------------------------------------------------- /defaults/keymaps/2.map: -------------------------------------------------------------------------------- 1 | be.map -------------------------------------------------------------------------------- /defaults/keymaps/20.map: -------------------------------------------------------------------------------- 1 | hu.map -------------------------------------------------------------------------------- /defaults/keymaps/21.map: -------------------------------------------------------------------------------- 1 | il.map -------------------------------------------------------------------------------- /defaults/keymaps/22.map: -------------------------------------------------------------------------------- 1 | is.map -------------------------------------------------------------------------------- /defaults/keymaps/23.map: -------------------------------------------------------------------------------- 1 | it.map -------------------------------------------------------------------------------- /defaults/keymaps/24.map: -------------------------------------------------------------------------------- 1 | jp.map -------------------------------------------------------------------------------- /defaults/keymaps/25.map: -------------------------------------------------------------------------------- 1 | la.map -------------------------------------------------------------------------------- /defaults/keymaps/26.map: -------------------------------------------------------------------------------- 1 | lt.map -------------------------------------------------------------------------------- /defaults/keymaps/27.map: -------------------------------------------------------------------------------- 1 | mk.map -------------------------------------------------------------------------------- /defaults/keymaps/28.map: -------------------------------------------------------------------------------- 1 | nl.map -------------------------------------------------------------------------------- /defaults/keymaps/29.map: -------------------------------------------------------------------------------- 1 | no.map -------------------------------------------------------------------------------- /defaults/keymaps/3.map: -------------------------------------------------------------------------------- 1 | bepo.map -------------------------------------------------------------------------------- /defaults/keymaps/30.map: -------------------------------------------------------------------------------- 1 | pl.map -------------------------------------------------------------------------------- /defaults/keymaps/31.map: -------------------------------------------------------------------------------- 1 | pt.map -------------------------------------------------------------------------------- /defaults/keymaps/32.map: -------------------------------------------------------------------------------- 1 | ro.map -------------------------------------------------------------------------------- /defaults/keymaps/33.map: -------------------------------------------------------------------------------- 1 | ru.map -------------------------------------------------------------------------------- /defaults/keymaps/34.map: -------------------------------------------------------------------------------- 1 | se.map -------------------------------------------------------------------------------- /defaults/keymaps/35.map: -------------------------------------------------------------------------------- 1 | sf.map -------------------------------------------------------------------------------- /defaults/keymaps/36.map: -------------------------------------------------------------------------------- 1 | sg.map -------------------------------------------------------------------------------- /defaults/keymaps/37.map: -------------------------------------------------------------------------------- 1 | sk-y.map -------------------------------------------------------------------------------- /defaults/keymaps/38.map: -------------------------------------------------------------------------------- 1 | sk-z.map -------------------------------------------------------------------------------- /defaults/keymaps/39.map: -------------------------------------------------------------------------------- 1 | slovene.map -------------------------------------------------------------------------------- /defaults/keymaps/4.map: -------------------------------------------------------------------------------- 1 | bg.map -------------------------------------------------------------------------------- /defaults/keymaps/40.map: -------------------------------------------------------------------------------- 1 | trq.map -------------------------------------------------------------------------------- /defaults/keymaps/41.map: -------------------------------------------------------------------------------- 1 | ua.map -------------------------------------------------------------------------------- /defaults/keymaps/42.map: -------------------------------------------------------------------------------- 1 | uk.map -------------------------------------------------------------------------------- /defaults/keymaps/43.map: -------------------------------------------------------------------------------- 1 | us.map -------------------------------------------------------------------------------- /defaults/keymaps/44.map: -------------------------------------------------------------------------------- 1 | wangbe.map -------------------------------------------------------------------------------- /defaults/keymaps/5.map: -------------------------------------------------------------------------------- 1 | br-a.map -------------------------------------------------------------------------------- /defaults/keymaps/6.map: -------------------------------------------------------------------------------- 1 | br-l.map -------------------------------------------------------------------------------- /defaults/keymaps/7.map: -------------------------------------------------------------------------------- 1 | by.map -------------------------------------------------------------------------------- /defaults/keymaps/8.map: -------------------------------------------------------------------------------- 1 | cf.map -------------------------------------------------------------------------------- /defaults/keymaps/9.map: -------------------------------------------------------------------------------- 1 | colemak.map -------------------------------------------------------------------------------- /defaults/keymaps/azerty.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/azerty.map -------------------------------------------------------------------------------- /defaults/keymaps/be.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/be.map -------------------------------------------------------------------------------- /defaults/keymaps/bepo.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/bepo.map -------------------------------------------------------------------------------- /defaults/keymaps/bg.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/bg.map -------------------------------------------------------------------------------- /defaults/keymaps/br-a.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/br-a.map -------------------------------------------------------------------------------- /defaults/keymaps/br-l.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/br-l.map -------------------------------------------------------------------------------- /defaults/keymaps/by.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-= q w e r t y u i o p []a s d f g h j k l ;'`\z x c v b n m ,./       2 | < 3 |     !@#$%^&*()_+ Q W E R T Y U I O P {}A S D F G H J K L :"~|Z X C V B N M <>?       4 | > !   5 |      6 |  7 |   8 |  "#$%&'()*+       9 |  10 | |,-   1234567890-= qwertyuiop[] asdfghjkl;'`\zxcvbnm,./        11 |    < 12 |     ~!@#$%^&*((_+ QWERTYUIOP{} ASDFGHJKL:"~|ZXCVBNM<>?       13 | >      14 |          15 |  | 16 |       -------------------------------------------------------------------------------- /defaults/keymaps/cf.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/cf.map -------------------------------------------------------------------------------- /defaults/keymaps/colemak.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/colemak.map -------------------------------------------------------------------------------- /defaults/keymaps/croat.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/croat.map -------------------------------------------------------------------------------- /defaults/keymaps/cz.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/cz.map -------------------------------------------------------------------------------- /defaults/keymaps/de.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/de.map -------------------------------------------------------------------------------- /defaults/keymaps/dk.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/dk.map -------------------------------------------------------------------------------- /defaults/keymaps/dvorak.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890[] ',.p y f g c r l /=a o e u i d h t n s -`\;q j k x b m w v z        2 | < 3 |     !@#$%^&*(){} "<>P Y F G C R L ?+A O E U I D H T N S _~|:Q J K X B M W V Z        4 | > !   5 |   ~@${[]}~ p y f g c r l a o e u i d h t n s \q j k x b m w v z            6 | |      7 |   "#$%&'()*+   8 | ,-   ~    9 |       10 |  ~    11 |       12 |    1234567890[] ',.pyfgcrl/= aoeuidhtns-`\;qjkxbmwvz         13 |    < 14 |     ~!@#$%^&*(){} "<>PYFGCRL?+AOEUIDHTNS_~|:QJKXBMWVZ     15 | >     16 |        17 |   18 |       -------------------------------------------------------------------------------- /defaults/keymaps/es.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/es.map -------------------------------------------------------------------------------- /defaults/keymaps/et.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/et.map -------------------------------------------------------------------------------- /defaults/keymaps/fi.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/fi.map -------------------------------------------------------------------------------- /defaults/keymaps/fr.map: -------------------------------------------------------------------------------- 1 | bkeymap&{"'(-}_/@)= a z e r t y u i o p ^$q s d f g h j k l m |**w x c v b n ,;:!       2 | < 3 |     1234567890]+ A Z E R T Y U I O P <>Q S D F G H J K L M %~#W X C V B N ?./\       4 | > !   5 |   ~~#{[|`\^@]}a z e r t y u i o p ~q s d f g h j k l m w x c v b n             6 | |      7 |  "#$%&'()*+   8 | ,-   ~  9 |     10 |      1234567890-= azertyuiop[] qsdfghjklm'`\wxcvbn,./         11 |    < 12 |       13 |         14 |   15 |       -------------------------------------------------------------------------------- /defaults/keymaps/gr.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-= q w e r t y u i o p []a s d f g h j k l ;'`\z x c v b n m ,./       2 | < 3 |      4 | !@#$%^&*()_+ Q W E R T Y U I O P {}A S D F G H J K L :"~|Z X C V B N M <>?  5 |      6 | > !   7 |    8 | ~@${[]}\q w e r t y u i o p ~a s d f g h j k l z x c v b n m              9 | |     10 |   11 |   "#$%&'()*+   12 | ,-    13 | ~  14 |       15 |   16 | ~  17 |       18 |       19 | 1234567890-= qwertyuiop[] asdfghjkl;'` 20 | \zxcvbnm,./         21 |    < 22 |      23 | ~!@#$%^QWERTYUIOP{}ASDFGHJKL|ZXCVBNM<>     24 |   25 |   26 |          27 |   28 |       29 | -------------------------------------------------------------------------------- /defaults/keymaps/hu.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/hu.map -------------------------------------------------------------------------------- /defaults/keymaps/il.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/il.map -------------------------------------------------------------------------------- /defaults/keymaps/is.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/is.map -------------------------------------------------------------------------------- /defaults/keymaps/it.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/it.map -------------------------------------------------------------------------------- /defaults/keymaps/jp.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890-^ q w e r t y u i o p @[a s d f g h j k l ;:]z x c v b n m ,./       2 | < 3 |  \   \!"#$%&'()~=~ Q W E R T Y U I O P `{A S D F G H J K L +*}Z X C V B N M <>?       4 | > !_     5 | |   6 |   "#$%&'()*+   7 | ,-   ~   8 |       9 |    1234567890-^ qwertyuiop@[ asdfghjkl;:]zxcvbnm,./        10 |    < 11 |  \   \~!"#$%&'()~=~ QWERTYUIOP`{ASDFGHJKL+*}ZXCVBNM<>?     12 | >_   |   13 |         14 |   15 |       -------------------------------------------------------------------------------- /defaults/keymaps/keymapList: -------------------------------------------------------------------------------- 1 | Please select a keymap from the following list by typing in the appropriate 2 | name or number. Hit Enter for the default "us/43" US English keymap. 3 | 4 | 1 azerty 8 cf 15 es 22 is 29 no 36 sg 43 us 5 | 2 be 9 colemak 16 et 23 it 30 pl 37 sk-y 44 wangbe 6 | 3 bepo 10 croat 17 fi 24 jp 31 pt 38 sk-z 7 | 4 bg 11 cz 18 fr 25 la 32 ro 39 slovene 8 | 5 br-a 12 de 19 gr 26 lt 33 ru 40 trf 9 | 6 br-l 13 dk 20 hu 27 mk 34 se 41 ua 10 | 7 by 14 dvorak 21 il 28 nl 35 sf 42 uk 11 | -------------------------------------------------------------------------------- /defaults/keymaps/la.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/la.map -------------------------------------------------------------------------------- /defaults/keymaps/lt.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/lt.map -------------------------------------------------------------------------------- /defaults/keymaps/mk.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/mk.map -------------------------------------------------------------------------------- /defaults/keymaps/nl.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890/= q w e r t y u i o p [*a s d f g h j k l +'@<z x c v b n m ,.-       2 | ] 3 |      4 | !"#$%&_())?~ Q W E R T Y U I O P ^|A S D F G H J K L :`~>Z X C V B N M ;:=       5 | > !   6 |    7 | ~@${[]}\ q w e r t y u i o p ~a s d f g h j k l z x c v b n m             8 | | 9 |       10 |    11 |   "#$%&'()*+   12 | ,-    13 | ~   14 |    ./01234567   15 | 89    16 | ~   17 |    "#$%&'()*+   18 |  ,-     19 | 1234567890/= qwertyuiop[* asdfghjkl+'@<zxcvbnm,.-         20 |    ] 21 |      22 | ~!"#$%&_())?~ QWERTYUIOP^|ASDFGHJKL:`~>ZXCVBNM;:=       23 | >    24 |    25 |         26 |   27 |       28 | -------------------------------------------------------------------------------- /defaults/keymaps/no.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/no.map -------------------------------------------------------------------------------- /defaults/keymaps/pl.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/pl.map -------------------------------------------------------------------------------- /defaults/keymaps/pt.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/pt.map -------------------------------------------------------------------------------- /defaults/keymaps/ro.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/ro.map -------------------------------------------------------------------------------- /defaults/keymaps/ru.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/ru.map -------------------------------------------------------------------------------- /defaults/keymaps/se.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/se.map -------------------------------------------------------------------------------- /defaults/keymaps/sf.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890'^ q w e r t z u i o p a s d f g h j k l $y x c v b n m ,.-       2 | < 3 |     +"*4%&/()=?` Q W E R T Z U I O P !A S D F G H J K L $Y X C V B N M ;:_       4 | > !   5 |   @#4|'~q w e r t z u i o p []a s d f g h j k l {}y x c v b n m             6 | \      7 |   "#$%&'()*+   8 | ,-   4  9 | $     10 |    ~4  11 | $     12 |    1234567890-= qwertzuiop[] asdfghjkl;'`\yxcvbnm,./         13 |    < 14 |     4  15 |   $      16 |   17 |       -------------------------------------------------------------------------------- /defaults/keymaps/sg.map: -------------------------------------------------------------------------------- 1 | bkeymap1234567890'^ q w e r t z u i o p a s d f g h j k l $y x c v b n m ,.-       2 | < 3 |    4 | +"*4%&/()=?` Q W E R T Z U I O P !A S D F G H J K L $Y X C V B N M ;:_       5 | > !   6 |  7 | ~@#4|'~q w e r t z u i o p []a s d f g h j k l {}y x c v b n m            8 | \ 9 |     10 |   11 |   "#$%&'()*+   12 | ,-  13 | ~4  14 | $     15 |   16 | ~4  17 | $      18 |   19 |     20 | 1234567890-= qwertzuiop[] asdfghjkl;'`\yxcvbnm,./         21 |    < 22 |    23 | 4  24 |   $      25 |   26 |     27 |  -------------------------------------------------------------------------------- /defaults/keymaps/sk-y.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/sk-y.map -------------------------------------------------------------------------------- /defaults/keymaps/sk-z.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/sk-z.map -------------------------------------------------------------------------------- /defaults/keymaps/slovene.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/slovene.map -------------------------------------------------------------------------------- /defaults/keymaps/trq.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/trq.map -------------------------------------------------------------------------------- /defaults/keymaps/uk.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/uk.map -------------------------------------------------------------------------------- /defaults/keymaps/us.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/us.map -------------------------------------------------------------------------------- /defaults/keymaps/wangbe.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/defaults/keymaps/wangbe.map -------------------------------------------------------------------------------- /defaults/resume-boot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.defaults 4 | . /etc/initrd.scripts 5 | 6 | GK_INIT_LOG_PREFIX=${0} 7 | if [ -n "${SSH_CLIENT_IP}" ] && [ -n "${SSH_CLIENT_PORT}" ] 8 | then 9 | GK_INIT_LOG_PREFIX="${0}[${SSH_CLIENT_IP}:${SSH_CLIENT_PORT}]" 10 | fi 11 | 12 | # We don't want to kill init script (PID 1), 13 | # ourselves and parent process yet... 14 | pids_to_keep="1 ${$} ${PPID}" 15 | 16 | for pid in $(pgrep sh) 17 | do 18 | if ! echo " ${pids_to_keep} " | grep -q " ${pid} " 19 | then 20 | kill -9 ${pid} &>/dev/null 21 | fi 22 | done 23 | 24 | good_msg "Resuming boot process ..." 25 | [ -f "${GK_SSHD_LOCKFILE}" ] && run rm "${GK_SSHD_LOCKFILE}" 26 | [ "${PPID}" != '1' ] && kill -9 ${PPID} &>/dev/null 27 | 28 | exit 0 29 | -------------------------------------------------------------------------------- /defaults/udhcpc.scripts: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$1" ] 4 | then 5 | echo "Error: should be called from udhcpc" 6 | exit 1 7 | fi 8 | 9 | case ${1} in 10 | bound|renew) 11 | [ -n "$broadcast" ] && BROADCAST="broadcast ${broadcast}" 12 | [ -n "$subnet" ] && NETMASK="netmask ${subnet}" 13 | [ -n "$rootpath" ] && echo "${rootpath}" > /rootpath 14 | [ -n "$hostname" ] && hostname "${hostname}" 15 | 16 | busybox ifconfig "${interface}" ${ip} ${BROADCAST} ${NETMASK} 17 | 18 | if [ -n "${router}" ] 19 | then 20 | while busybox route del default gw 0.0.0.0 dev "${interface}" >/dev/null 2>&1 21 | do 22 | : 23 | done 24 | 25 | for i in ${router} 26 | do 27 | busybox route add default gw ${i} 28 | done 29 | fi 30 | 31 | [ -n "$domain" ] && echo "domain ${domain}" >> /etc/resolv.conf 32 | 33 | if [ -n "${dns}" ] 34 | then 35 | for i in ${dns} 36 | do 37 | echo "nameserver ${i}" >> /etc/resolv.conf 38 | done 39 | fi 40 | ;; 41 | deconfig|leasefail) 42 | busybox ifconfig "${interface}" 0.0.0.0 43 | while busybox route del default dev "${interface}" >/dev/null 2>&1 44 | do 45 | : 46 | done 47 | ;; 48 | nak) 49 | echo "nak: ${message}" 50 | ;; 51 | *) 52 | echo "unknown option $1" >&2 53 | echo "Usage: $0 {bound|deconfig|leasefail|nak|renew}" >&2 54 | exit 1 55 | ;; 56 | esac 57 | 58 | exit 0 59 | -------------------------------------------------------------------------------- /defaults/unlock-zfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /etc/initrd.defaults 4 | . /etc/initrd.scripts 5 | 6 | GK_INIT_LOG_PREFIX=${0} 7 | if [ -n "${SSH_CLIENT_IP}" ] && [ -n "${SSH_CLIENT_PORT}" ] 8 | then 9 | GK_INIT_LOG_PREFIX="${0}[${SSH_CLIENT_IP}:${SSH_CLIENT_PORT}]" 10 | fi 11 | 12 | if [ -f "${ZFS_ENC_ENV_FILE}" ] 13 | then 14 | . "${ZFS_ENC_ENV_FILE}" 15 | else 16 | bad_msg "${ZFS_ENC_ENV_FILE} does not exist! Did you boot without 'dozfs' kernel command-line parameter?" 17 | exit 1 18 | fi 19 | 20 | main() { 21 | if ! hash zfs >/dev/null 2>&1 22 | then 23 | bad_msg "zfs program is missing. Was initramfs built without --zfs parameter?" 24 | exit 1 25 | elif ! hash zpool >/dev/null 2>&1 26 | then 27 | bad_msg "zpool program is missing. Was initramfs built without --zfs parameter?" 28 | exit 1 29 | elif [ -z "${ROOTFSTYPE}" ] 30 | then 31 | bad_msg "Something went wrong. ROOTFSTYPE is not set!" 32 | exit 1 33 | elif [ "${ROOTFSTYPE}" != "zfs" ] 34 | then 35 | bad_msg "ROOTFSTYPE of 'zfs' required but '${ROOTFSTYPE}' detected!" 36 | exit 1 37 | elif [ -z "${REAL_ROOT}" ] 38 | then 39 | bad_msg "Something went wrong. REAL_ROOT is not set!" 40 | exit 1 41 | fi 42 | 43 | if [ "$(zpool list -H -o feature@encryption "${REAL_ROOT%%/*}" 2>/dev/null)" != 'active' ] 44 | then 45 | bad_msg "Root device ${REAL_ROOT} is not encrypted!" 46 | exit 1 47 | fi 48 | 49 | local ZFS_ENCRYPTIONROOT="$(get_zfs_property "${REAL_ROOT}" encryptionroot)" 50 | if [ "${ZFS_ENCRYPTIONROOT}" = '-' ] 51 | then 52 | bad_msg "Failed to determine encryptionroot for ${REAL_ROOT}!" 53 | exit 1 54 | fi 55 | 56 | local ZFS_KEYSTATUS= 57 | while true 58 | do 59 | if [ -e "${ZFS_ENC_OPENED_LOCKFILE}" ] 60 | then 61 | good_msg "${REAL_ROOT} device meanwhile was opened by someone else." 62 | break 63 | fi 64 | 65 | zfs load-key "${ZFS_ENCRYPTIONROOT}" 66 | 67 | ZFS_KEYSTATUS="$(get_zfs_property "${REAL_ROOT}" keystatus)" 68 | if [ "${ZFS_KEYSTATUS}" = 'available' ] 69 | then 70 | run touch "${ZFS_ENC_OPENED_LOCKFILE}" 71 | good_msg "ZFS device ${REAL_ROOT} opened" 72 | break 73 | else 74 | bad_msg "Failed to open ZFS device ${REAL_ROOT}" 75 | 76 | # We need to stop here with a non-zero exit code to prevent 77 | # a loop when invalid keyfile was sent. 78 | exit 1 79 | fi 80 | done 81 | 82 | if [ "${ZFS_KEYSTATUS}" = 'available' ] 83 | then 84 | # Kill any running load-key prompt. 85 | run pkill -f "load-key" >/dev/null 2>&1 86 | fi 87 | } 88 | 89 | main 90 | 91 | exit 0 92 | -------------------------------------------------------------------------------- /doc/asciidoc.conf: -------------------------------------------------------------------------------- 1 | # 2 | # asciidoc.conf for genkernel's man page 3 | # 4 | -------------------------------------------------------------------------------- /gen_arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: b232c3c675ec7918ab0d4e6b942e3208a31a45f2 $ 3 | 4 | determine_kernel_arch() { 5 | [ -z "${VER}" ] && gen_die "Cannot determine KERNEL_ARCH without \$VER!" 6 | [ -z "${SUB}" ] && gen_die "Cannot determine KERNEL_ARCH without \$SUB!" 7 | [ -z "${PAT}" ] && gen_die "Cannot determine KERNEL_ARCH without \$PAT!" 8 | 9 | KERNEL_ARCH=${ARCH} 10 | case ${ARCH} in 11 | parisc|parisc64) 12 | KERNEL_ARCH=parisc 13 | ;; 14 | ppc|ppc64*) 15 | if [ "${VER}" -ge "3" ] 16 | then 17 | KERNEL_ARCH=powerpc 18 | elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] 19 | then 20 | if [ "${PAT}" -eq "6" -a "${SUB}" -ge "16" ] || [ "${PAT}" -gt "6" ] 21 | then 22 | KERNEL_ARCH=powerpc 23 | fi 24 | fi 25 | ;; 26 | riscv|riscv64*) 27 | KERNEL_ARCH=riscv 28 | ;; 29 | s390*) 30 | KERNEL_ARCH=s390 31 | ;; 32 | x86) 33 | if [ "${VER}" -ge "3" ] 34 | then 35 | KERNEL_ARCH=x86 36 | elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ] 37 | then 38 | if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ] 39 | then 40 | KERNEL_ARCH=x86 41 | else 42 | KERNEL_ARCH=i386 43 | fi 44 | fi 45 | ;; 46 | x86_64) 47 | if [ "${VER}" -ge "3" ] 48 | then 49 | KERNEL_ARCH=x86 50 | elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ] 51 | then 52 | if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ] 53 | then 54 | KERNEL_ARCH=x86 55 | fi 56 | fi 57 | ;; 58 | esac 59 | print_info 2 "KERNEL_ARCH set to '${KERNEL_ARCH}' ..." 60 | } 61 | -------------------------------------------------------------------------------- /gen_moddeps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # $Id: ff264f4041364ae4ad6913620a4876d6a72da67c $ 3 | 4 | mod_dep_list() { 5 | if [ ! -f "${TEMP}/moddeps" ] 6 | then 7 | gen_dep_list > "${TEMP}/moddeps" 8 | fi 9 | 10 | cat "${TEMP}/moddeps" 11 | } 12 | 13 | gen_dep_list() { 14 | local -a modlist=() moddeplist=() 15 | local moddir="${KERNEL_MODULES_PREFIX%/}/lib/modules/${KV}" 16 | 17 | # Always include firmware for built-in modules 18 | moddeplist=( $(cat "${moddir}/modules.builtin") ) 19 | 20 | if isTrue "${ALLRAMDISKMODULES}" 21 | then 22 | moddeplist+=( $(cat "${moddir}/modules.dep" | cut -d':' -f1) ) 23 | else 24 | local mygroups 25 | for mygroups in ${!MODULES_*} GK_INITRAMFS_ADDITIONAL_KMODULES 26 | do 27 | modlist+=( ${!mygroups} ) 28 | done 29 | 30 | modlist=( $(printf '%s\n' "${modlist[@]}" | sort | uniq) ) 31 | 32 | modlist+=( $( 33 | local -a rxargs=( "${modlist[@]}" ) 34 | 35 | rxargs=( "${rxargs[@]/#/-ealias\ }" ) 36 | rxargs=( "${rxargs[@]/%/\ }" ) 37 | 38 | cat "${moddir}/modules.alias" \ 39 | | grep -F "${rxargs[@]}" \ 40 | | cut -d' ' -f3- 41 | ) ) 42 | 43 | modlist=( $(printf '%s\n' "${modlist[@]}" | sort | uniq) ) 44 | 45 | local mydeps mymod 46 | while IFS=" " read -r -u 3 mymod mydeps 47 | do 48 | moddeplist+=( ${mymod%:} ${mydeps} ) 49 | done 3< <( 50 | local -a rxargs=( "${modlist[@]}" ) 51 | 52 | rxargs=( "${rxargs[@]/#/-e\/}" ) 53 | rxargs=( 54 | "${rxargs[@]/%/.ko:}" 55 | "${rxargs[@]/%/${KEXT}:}" 56 | ) 57 | 58 | cat "${moddir}/modules.dep" \ 59 | | grep -F "${rxargs[@]}" 60 | ) 61 | fi 62 | 63 | moddeplist=( ${moddeplist[@]##*/} ) 64 | moddeplist=( ${moddeplist[@]%%.*} ) 65 | 66 | printf '%s\n' "${moddeplist[@]}" | sort | uniq 67 | } 68 | -------------------------------------------------------------------------------- /gkbuilds/bcache-tools-1.0.8_p20141204.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | append-ldflags -static 6 | } 7 | 8 | src_compile() { 9 | PKG_CONFIG="$(tc-getPKG_CONFIG) --static" \ 10 | gkmake V=1 11 | } 12 | 13 | src_install() { 14 | gkmake V=1 UDEVLIBDIR="$(get_udevdir)" DESTDIR="${D}" install 15 | 16 | rm -rf \ 17 | "${D}"/lib \ 18 | "${D}"/usr/lib/initcpio \ 19 | "${D}"/usr/sbin \ 20 | "${D}"/usr/share 21 | 22 | "${STRIP}" --strip-all "${D}"/usr/lib/udev/bcache-register \ 23 | || die "Failed to strip '${D}/usr/lib/udev/bcache-register'!" 24 | 25 | "${STRIP}" --strip-all "${D}"/usr/lib/udev/probe-bcache \ 26 | || die "Failed to strip '${D}/usr/lib/udev/probe-bcache'!" 27 | } 28 | -------------------------------------------------------------------------------- /gkbuilds/bcache-tools-1.1_p20230217.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | tc-export CC 8 | sed \ 9 | -e '/^CFLAGS/s:-O2::' \ 10 | -e '/^CFLAGS/s:-g::' \ 11 | -e '/.*INSTALL.*share\/man/d' \ 12 | -e '/.*INSTALL.*bcache-status/d' \ 13 | -i Makefile || die 14 | 15 | append-lfs-flags 16 | } 17 | 18 | src_configure() { 19 | append-ldflags -static 20 | } 21 | 22 | src_compile() { 23 | PKG_CONFIG="$(tc-getPKG_CONFIG) --static" \ 24 | gkmake V=1 25 | } 26 | 27 | src_install() { 28 | mkdir -p "${D}"/usr/sbin "${D}$(get_udevdir)"/rules.d 29 | gkmake V=1 UDEVLIBDIR="$(get_udevdir)" DESTDIR="${D}" install 30 | 31 | rm -rf \ 32 | "${D}"/lib \ 33 | "${D}"/usr/lib/initcpio \ 34 | "${D}"/usr/sbin \ 35 | "${D}"/usr/share 36 | 37 | "${STRIP}" --strip-all "${D}"/usr/lib/udev/bcache-register \ 38 | || die "Failed to strip '${D}/usr/lib/udev/bcache-register'!" 39 | 40 | "${STRIP}" --strip-all "${D}"/usr/lib/udev/probe-bcache \ 41 | || die "Failed to strip '${D}/usr/lib/udev/probe-bcache'!" 42 | } 43 | -------------------------------------------------------------------------------- /gkbuilds/boost-build.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 2019-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # distcc is known to fail compiling boost and will fallback 5 | # to local processing; Even when using distcc pump mode. 6 | DISABLE_DISTCC=yes 7 | 8 | MY_PV="${PV//./_}" 9 | S="${WORKDIR}/boost_${MY_PV}/tools/build/src" 10 | QA_IGNORE_DYNAMICALLY_LINKED_PROGRAM='(bjam|b2)$' 11 | 12 | src_compile() { 13 | cd engine || die "Failed to chdir to '${S}/engine'!" 14 | 15 | # Using BUILD CXX here because the host system 16 | # building the initramfs must be able to execute created b2 program 17 | local myargs=( 18 | ./build.sh 19 | cxx 20 | --cxx="$(tc-getBUILD_CXX)" 21 | --cxxflags="${CXXFLAGS}" 22 | -d+2 23 | --without-python 24 | ) 25 | 26 | gkexec "${myargs[*]}" 27 | } 28 | 29 | src_install() { 30 | mkdir -p "${D}"/usr/bin \ 31 | || die "Failed to create '${D}/usr/bin'!" 32 | 33 | cp --target-directory="${D}/usr/bin" engine/{bjam,b2} \ 34 | || die "Failed to install 'engine/{bjam,b2}' to '${D}/usr/bin'!" 35 | 36 | mkdir -p "${D}"/usr/share/boost-build \ 37 | || die "Failed to create '${D}/usr/share/boost-build'!" 38 | 39 | cp \ 40 | --recursive \ 41 | --target-directory="${D}/usr/share/boost-build" \ 42 | ../boost-build.jam \ 43 | bootstrap.jam \ 44 | build-system.jam \ 45 | ../example/user-config.jam \ 46 | build \ 47 | kernel \ 48 | options \ 49 | tools \ 50 | util \ 51 | || die "Failed to copy *.jam files to '${D}/usr/share/boost-build'!" 52 | 53 | find "${D}/usr/share/boost-build" -iname "*.py" -delete \ 54 | || die "Failed to remove python files" 55 | 56 | echo 'variant gentoorelease : release : off off shared ;' > "${D}/usr/share/boost-build/site-config.jam" \ 57 | || die "Failed to create '${D}/usr/share/boost-build/site-config.jam'!" 58 | } 59 | -------------------------------------------------------------------------------- /gkbuilds/boost.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 2019-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # distcc is known to fail compiling boost and will fallback 5 | # to local processing; Even when using distcc pump mode. 6 | DISABLE_DISTCC=yes 7 | 8 | create_user-config.jam() { 9 | local user_config_jam="${S}"/user-config.jam 10 | if [[ -s ${user_config_jam} ]]; then 11 | return 12 | fi 13 | 14 | local compiler compiler_version compiler_executable="$(tc-getCXX)" 15 | compiler="gcc" 16 | compiler_version="$(gcc-version)" 17 | 18 | cat > "${user_config_jam}" <<- __EOF__ || die 19 | using ${compiler} : ${compiler_version} : ${compiler_executable} : "${CFLAGS}" "${CXXFLAGS}" "${LDFLAGS}" ; 20 | __EOF__ 21 | 22 | # Boost.Build does not allow for disabling of numpy 23 | # extensions, thereby leading to automagic numpy 24 | # https://github.com/boostorg/python/issues/111#issuecomment-280447482 25 | sed \ 26 | -e 's/\[ unless \[ python\.numpy \] : no \]/no/g' \ 27 | -i "${S}"/libs/python/build/Jamfile \ 28 | || die 29 | } 30 | 31 | ejam() { 32 | create_user-config.jam 33 | 34 | local myargs=( 35 | b2 36 | "--user-config=${S}/user-config.jam" 37 | --without-python 38 | "$@" 39 | ) 40 | 41 | gkexec "${myargs[*]}" 42 | } 43 | 44 | src_configure() { 45 | # Workaround for too many parallel processes requested, bug #506064 46 | [[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64" 47 | 48 | OPTIONS=( 49 | gentoorelease 50 | "-j$(makeopts_jobs)" 51 | -q 52 | -d+2 53 | pch=off 54 | --disable-icu boost.locale.icu=off 55 | --without-mpi 56 | --without-locale 57 | --without-context --without-coroutine --without-fiber 58 | --without-stacktrace 59 | --boost-build="${BROOT}"/usr/share/boost-build 60 | --prefix="/usr" 61 | --layout=system 62 | --no-cmake-config 63 | threading=multi 64 | link=shared,static 65 | # this seems to be the only way to disable compression algorithms 66 | # https://www.boost.org/doc/libs/1_70_0/libs/iostreams/doc/installation.html#boost-build 67 | -sNO_BZIP2=1 68 | -sNO_LZMA=1 69 | -sNO_ZLIB=1 70 | -sNO_ZSTD=1 71 | ) 72 | 73 | # bug 298489 74 | if [[ "${CHOST}" == powerpc* ]]; then 75 | [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec 76 | fi 77 | 78 | # Use C++14 globally as of 1.62 79 | append-cxxflags -std=c++14 80 | } 81 | 82 | src_compile() { 83 | ejam "${OPTIONS[@]}" || die "Compilation of Boot libraries failed!" 84 | } 85 | 86 | src_install() { 87 | ejam \ 88 | "${OPTIONS[@]}" \ 89 | --includedir="${D}/usr/include" \ 90 | --libdir="${D}/usr/lib" \ 91 | install || die "Installation of Boost libraries failed!" 92 | } 93 | -------------------------------------------------------------------------------- /gkbuilds/btrfs-progs.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --bindir="/sbin" 7 | --disable-shared 8 | --disable-convert 9 | --disable-python 10 | --disable-documentation 11 | ) 12 | 13 | if isTrue "$(is_glibc)" 14 | then 15 | myconf+=( --enable-backtrace ) 16 | else 17 | # backtrace does not work on musl, bug #815676 18 | myconf+=( --disable-backtrace ) 19 | fi 20 | 21 | gkconf "${myconf[@]}" 22 | } 23 | 24 | src_compile() { 25 | gkmake V=1 static 26 | } 27 | 28 | src_install() { 29 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 30 | 31 | cp -a btrfs.static "${D}"/sbin/btrfs \ 32 | || die "Failed to copy '${S}/btrfs.static' to '${D}/sbin/btrfs'!" 33 | 34 | "${STRIP}" --strip-all "${D}"/sbin/btrfs \ 35 | || die "Failed to strip '${D}/sbin/btrfs'!" 36 | 37 | ln -s btrfs "${D}"/sbin/btrfsck \ 38 | || die "Failed to create symlink '${D}/sbin/btrfsck' to '${D}/sbin/btrfs'!" 39 | } 40 | -------------------------------------------------------------------------------- /gkbuilds/busybox.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | # flag cleanup 8 | sed -i -r \ 9 | -e 's:[[:space:]]?-(Werror|Os|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ 10 | Makefile.flags || gen_die 11 | 12 | sed -i \ 13 | -e 's:-static-libgcc::' \ 14 | Makefile.flags || die 15 | 16 | cp "${TEMP}"/busybox-config "${S}"/.config \ 17 | || die "Failed top copy '${TEMP}/busybox-config' to '${S}/.config'!" 18 | 19 | cp "${TEMP}"/busybox-config "${S}"/.config.gk_orig \ 20 | || die "Failed top copy '${TEMP}/busybox-config' to '${S}/.config.gk_orig'!" 21 | } 22 | 23 | bbmake() { 24 | local args=( 25 | V=1 26 | CROSS_COMPILE="${CHOST}-" 27 | AR="${AR}" 28 | CC="${CC}" 29 | HOSTCC="${BUILD_CC}" 30 | HOSTCFLAGS="${BUILD_CFLAGS}" 31 | PKG_CONFIG="${PKG_CONFIG}" 32 | ) 33 | make "${args[@]}" "$@" 34 | } 35 | 36 | src_configure() { 37 | tc-export AR CC BUILD_CC PKG_CONFIG 38 | BUILD_CFLAGS=${CFLAGS} 39 | BUILD_CFLAGS+=" -D_FILE_OFFSET_BITS=64" 40 | gkexec "yes '' | bbmake V=1 oldconfig" 1 41 | } 42 | 43 | src_compile() { 44 | gkexec bbmake busybox 45 | } 46 | 47 | src_install() { 48 | #gkmake CONFIG_PREFIX="${D}" install 49 | mkdir "${D}"/bin || die "Failed to create '${D}/bin'!" 50 | 51 | cp -a busybox "${D}"/bin/ \ 52 | || die "Failed to copy '${S}/busybox' to '${D}/bin/'!" 53 | 54 | "${STRIP}" --strip-all "${D}"/bin/busybox \ 55 | || die "Failed to strip '${D}/bin/busybox'!" 56 | 57 | mkdir "${D}"/configs || die "Failed to create '${D}/configs'!" 58 | cp -a --target-directory="${D}"/configs \ 59 | "${S}"/.config \ 60 | "${S}"/.config.gk_orig \ 61 | || die "Failed to copy '${S}/.config{,gk_orig}' to '${D}/configs'!" 62 | } 63 | -------------------------------------------------------------------------------- /gkbuilds/coreutils.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | # Since we've patched many .c files, the make process will try to 8 | # re-build the manpages by running `./bin --help`. When doing a 9 | # cross-compile, we can't do that since 'bin' isn't a native bin. 10 | # Also, it's not like we changed the usage on any of these things, 11 | # so let's just update the timestamps and skip the help2man step. 12 | set -- man/*.x 13 | touch ${@/%x/1} 14 | 15 | # Avoid perl dep for compiled in dircolors default #348642 16 | touch src/dircolors.h 17 | touch ${@/%x/1} 18 | } 19 | 20 | src_configure() { 21 | append-ldflags -static 22 | 23 | # configure doesn't like our TMPDIR and would try to write to 24 | # /usr instead which would trigger sandbox 25 | export ac_cv_sys_long_file_names=yes 26 | 27 | export gl_cv_func_mknod_works=yes #409919 28 | 29 | # no selinux 30 | export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no 31 | 32 | if isTrue "$(tc-is-cross-compiler)" 33 | then 34 | export fu_cv_sys_stat_statfs2_bsize=yes #311569 35 | export gl_cv_func_realpath_works=yes #416629 36 | export gl_cv_func_working_mktime=yes 37 | fi 38 | 39 | local myconf=( 40 | --with-packager="genkernel" 41 | --enable-largefile 42 | --disable-libcap 43 | --disable-nls 44 | --disable-acl 45 | --disable-xattr 46 | --without-gmp 47 | --enable-no-install-program="stdbuf,groups,hostname,kill,su,uptime" 48 | ) 49 | 50 | gkconf "${myconf[@]}" 51 | } 52 | 53 | src_install() { 54 | local MYMAKEOPTS=( "V=1" ) 55 | MYMAKEOPTS+=( "DESTDIR=${D}" ) 56 | MYMAKEOPTS+=( "install" ) 57 | gkmake "${MYMAKEOPTS[@]}" 58 | 59 | # We are only interested in b2sum 60 | find "${D}" -type f -not -name 'b2sum' -print0 | xargs --null -I {} rm {} 61 | 62 | rm -rf "${D}"/usr/share || die "Failed to remove '${D}/usr/share'!" 63 | 64 | "${STRIP}" --strip-all "${D}"/usr/bin/b2sum \ 65 | || die "Failed to strip '${D}/usr/bin/b2sum'!" 66 | } 67 | -------------------------------------------------------------------------------- /gkbuilds/cryptsetup.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | export ac_cv_header_security_pam_misc_h=no 6 | export ac_cv_header_security_pam_appl_h=no 7 | 8 | # devicemapper needs to find udev 9 | append-ldflags -Wl,-rpath-link,${BROOT}/usr/lib 10 | 11 | local myconf=( 12 | --enable-internal-argon2 13 | --sbindir=/sbin 14 | --disable-asciidoc 15 | --disable-nls 16 | --disable-selinux 17 | --disable-ssh-token 18 | --disable-veritysetup 19 | --disable-cryptsetup-reencrypt 20 | --disable-integritysetup 21 | --enable-static=yes 22 | --enable-shared=no 23 | --enable-static-cryptsetup 24 | --enable-udev 25 | --with-crypto_backend=gcrypt 26 | ) 27 | 28 | gkconf "${myconf[@]}" 29 | } 30 | 31 | src_install() { 32 | default 33 | 34 | rm -rf \ 35 | "${D}"/sbin/* \ 36 | "${D}"/usr/share/ 37 | 38 | install_exe 'cryptsetup.static' "${D}"/sbin/cryptsetup 39 | 40 | "${STRIP}" --strip-all "${D}"/sbin/cryptsetup \ 41 | || die "Failed to strip '${D}/sbin/cryptsetup'!" 42 | } 43 | -------------------------------------------------------------------------------- /gkbuilds/dmraid.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | # pkg_check_modules is not in aclocal.m4 by default, and autoreconf doesn't add it 6 | cat /usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 \ 7 | || die "Failed to append '/usr/share/aclocal/pkg.m4' to '${S}/aclocal.m4'!" 8 | 9 | default 10 | } 11 | 12 | src_configure() { 13 | local myconf=( 14 | --enable-static_link 15 | ) 16 | 17 | gkconf "${myconf[@]}" 18 | } 19 | 20 | src_install() { 21 | default 22 | 23 | "${STRIP}" --strip-all "${D}"/usr/sbin/dmraid \ 24 | || die "Failed to strip '${D}/usr/sbin/dmraid'!" 25 | 26 | # For backward compatibility 27 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 28 | 29 | ln -s ../usr/sbin/dmraid "${D}"/sbin/dmraid \ 30 | || die "Failed to create symlink '${D}/sbin/dmraid' to '${D}/usr/sbin/dmraid'!" 31 | } 32 | -------------------------------------------------------------------------------- /gkbuilds/dropbear.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | # Disable DSS support 8 | echo "#define DROPBEAR_DSS 0" >> localoptions.h || die "Failed to disable DSS support" 9 | 10 | # Enable AES GCM support 11 | echo "#define DROPBEAR_ENABLE_GCM_MODE 1" >> localoptions.h || die "Failed to enable AES GCM support" 12 | } 13 | 14 | src_configure() { 15 | local myconf=( 16 | --enable-bundled-libtom 17 | --enable-static 18 | --disable-pam 19 | --disable-syslog 20 | --with-zlib="${BROOT}/usr" 21 | ) 22 | 23 | gkconf "${myconf[@]}" 24 | } 25 | 26 | src_compile() { 27 | local MYMAKEOPTS=( "V=1" ) 28 | MYMAKEOPTS+=( "MULTI=1" ) 29 | MYMAKEOPTS+=( "PROGRAMS='dbclient dropbear dropbearkey dropbearconvert scp'" ) 30 | gkmake "${MYMAKEOPTS[@]}" 31 | } 32 | 33 | src_install() { 34 | local mydir= 35 | for mydir in \ 36 | etc/dropbear \ 37 | usr/bin \ 38 | usr/sbin \ 39 | root/.ssh \ 40 | var/log \ 41 | var/run \ 42 | ; do 43 | mkdir -p "${D}"/${mydir} || die "Failed to create '${D}/${mydir}'!" 44 | done 45 | 46 | cp -a dropbearmulti "${D}"/usr/bin/ \ 47 | || die "Failed to copy '${S}/dropbearmulti' to '${D}/usr/bin/'!" 48 | 49 | "${STRIP}" --strip-all "${D}"/usr/bin/dropbearmulti \ 50 | || die "Failed to strip '${D}/usr/bin/dropbearmulti'!" 51 | 52 | ln -s dropbearmulti "${D}"/usr/bin/dbclient \ 53 | || die "Failed to symlink '${D}/usr/bin/dbclient' to '${D}/usr/bin/dropbearmulti'!" 54 | 55 | ln -s ../bin/dropbearmulti "${D}"/usr/sbin/dropbear \ 56 | || die "Failed to symlink '${D}/usr/sbin/dropbear' to '${D}/usr/bin/dropbearmulti'!" 57 | 58 | ln -s dropbearmulti "${D}"/usr/bin/dropbearconvert \ 59 | || die "Failed to symlink '${D}/usr/bin/dropbearconvert' to '${D}/usr/bin/dropbearmulti'!" 60 | 61 | ln -s dropbearmulti "${D}"/usr/bin/dropbearkey \ 62 | || die "Failed to symlink '${D}/usr/bin/dropbearkey' to '${D}/usr/bin/dropbearmulti'!" 63 | 64 | ln -s dropbearmulti "${D}"/usr/bin/scp \ 65 | || die "Failed to symlink '${D}/usr/bin/scp' to '${D}/usr/bin/dropbearmulti'!" 66 | 67 | chmod 0700 "${D}"/root/.ssh \ 68 | || die "Failed to chmod of '${D}/root/.ssh'!" 69 | 70 | mkfifo "${D}"/etc/dropbear/fifo_root \ 71 | || die "Failed to create '${D}/etc/dropbear/fifo_root'!" 72 | 73 | mkfifo "${D}"/etc/dropbear/fifo_swap \ 74 | || die "Failed to create '${D}/etc/dropbear/fifo_swap'!" 75 | } 76 | -------------------------------------------------------------------------------- /gkbuilds/e2fsprogs.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # e2fsprogs-1.45.6-build.patch would trigger gkautoreconf 5 | # which we cannot run because of gettext-0.20 incompatibility 6 | WANT_AUTORECONF=no 7 | 8 | src_configure() { 9 | append-ldflags -static 10 | 11 | export VARTEXFONTS="${T}/fonts" 12 | 13 | local myconf=( 14 | --bindir=/bin 15 | --with-root-prefix="" 16 | --disable-nls 17 | --enable-libblkid 18 | --enable-libuuid 19 | --disable-fsck 20 | --disable-uuidd 21 | --disable-debugfs 22 | --disable-imager 23 | --enable-resizer 24 | --disable-defrag 25 | ) 26 | 27 | ac_cv_path_LDCONFIG=: \ 28 | CC="$(tc-getCC)" \ 29 | BUILD_CC="$(tc-getBUILD_CC)" \ 30 | BUILD_LD="$(tc-getBUILD_LD)" \ 31 | gkconf "${myconf[@]}" 32 | } 33 | 34 | src_install() { 35 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 36 | 37 | local file= 38 | for file in \ 39 | e2fsck/e2fsck \ 40 | misc/mke2fs \ 41 | resize/resize2fs \ 42 | ; do 43 | cp -a "${S}"/${file} "${D}"/sbin/ \ 44 | || die "Failed to copy '${S}/${file}' to '${D}/sbin/'!" 45 | 46 | local filename=$(basename "${file}") 47 | "${STRIP}" --strip-all "${D}"/sbin/${filename} \ 48 | || die "Failed to strip '${D}/sbin/${file}'!" 49 | done 50 | } 51 | -------------------------------------------------------------------------------- /gkbuilds/eudev.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --exec-prefix= 7 | --bindir=/usr/bin 8 | --sbindir=/usr/sbin 9 | --includedir=/usr/include 10 | --libdir=/usr/lib 11 | --enable-static 12 | --enable-blkid 13 | --disable-introspection 14 | --disable-manpages 15 | --disable-selinux 16 | --disable-rule-generator 17 | --disable-hwdb 18 | --enable-kmod 19 | ) 20 | 21 | gkconf "${myconf[@]}" 22 | } 23 | 24 | src_install() { 25 | default 26 | 27 | local files_to_strip=() 28 | files_to_strip+=( /usr/bin/udevadm ) 29 | files_to_strip+=( /usr/lib/udev/ata_id ) 30 | files_to_strip+=( /usr/lib/udev/cdrom_id ) 31 | files_to_strip+=( /usr/lib/udev/collect ) 32 | files_to_strip+=( /usr/lib/udev/mtd_probe ) 33 | files_to_strip+=( /usr/lib/udev/scsi_id ) 34 | files_to_strip+=( /usr/lib/udev/v4l_id ) 35 | files_to_strip+=( /usr/sbin/udevd ) 36 | 37 | local file_to_strip= 38 | for file_to_strip in "${files_to_strip[@]}" 39 | do 40 | "${STRIP}" --strip-all "${D}"${file_to_strip} \ 41 | || die "Failed to strip '${D}${file_to_strip}'!" 42 | done 43 | } 44 | -------------------------------------------------------------------------------- /gkbuilds/expat.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --enable-static 7 | --without-docbook 8 | ) 9 | 10 | gkconf "${myconf[@]}" 11 | } 12 | 13 | src_install() { 14 | default 15 | 16 | rm -rf \ 17 | "${D}"/usr/bin \ 18 | "${D}"/usr/share 19 | } 20 | -------------------------------------------------------------------------------- /gkbuilds/fuse.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --disable-example 7 | ) 8 | 9 | gkconf "${myconf[@]}" 10 | } 11 | 12 | src_install() { 13 | default 14 | 15 | rm -rf \ 16 | "${D}"/dev \ 17 | "${D}"/etc \ 18 | "${D}"/sbin \ 19 | "${D}"/usr/bin \ 20 | "${D}"/usr/share 21 | } 22 | -------------------------------------------------------------------------------- /gkbuilds/gnupg.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | append-ldflags -static 6 | 7 | local myconf=( 8 | --enable-static-rnd=linux 9 | --disable-dev-random 10 | --disable-asm 11 | --disable-selinux-support 12 | --disable-gnupg-iconv 13 | --disable-card-support 14 | --disable-agent-support 15 | --disable-bzip2 16 | --disable-exec 17 | --disable-photo-viewers 18 | --disable-keyserver-helpers 19 | --disable-ldap 20 | --disable-hkp 21 | --disable-finger 22 | --disable-generic 23 | --disable-mailto 24 | --disable-keyserver-path 25 | --disable-dns-srv 26 | --disable-dns-cert 27 | --disable-nls 28 | --disable-threads 29 | --disable-regex 30 | --disable-optimization 31 | --with-included-zlib 32 | --without-capabilities 33 | --without-tar 34 | --without-ldap 35 | --without-libcurl 36 | --without-mailprog 37 | --without-libpth-prefix 38 | --without-libiconv-prefix 39 | --without-libintl-prefix 40 | --without-zlib 41 | --without-bzip2 42 | --without-libusb 43 | --without-readline 44 | CC_FOR_BUILD="$(tc-getBUILD_CC)" 45 | ) 46 | 47 | gkconf "${myconf[@]}" 48 | } 49 | 50 | src_install() { 51 | default 52 | 53 | rm -rf \ 54 | "${D}"/usr/bin/gpgsplit \ 55 | "${D}"/usr/bin/gpgv \ 56 | "${D}"/usr/share 57 | 58 | "${STRIP}" --strip-all "${D}"/usr/bin/gpg \ 59 | || die "Failed to strip '${D}/usr/bin/gpg'!" 60 | 61 | # For backward compatibility 62 | mkdir "${D}"/bin || die "Failed to create '${D}/bin'!" 63 | 64 | ln -s ../usr/bin/gpg "${D}"/bin/gpg \ 65 | || die "Failed to create symlink '${D}/bin/gpg' to '${D}/usr/bin/gpg'!" 66 | } 67 | -------------------------------------------------------------------------------- /gkbuilds/hwids.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | S="${WORKDIR}/hwids-${P}" 5 | 6 | _emake() { 7 | gkmake \ 8 | V=1 \ 9 | NET=yes \ 10 | PCI=yes \ 11 | UDEV=yes \ 12 | USB=yes \ 13 | "$@" 14 | } 15 | 16 | src_prepare() { 17 | default 18 | 19 | # we cannot run host's udevadm 20 | sed -i -e '/udevadm hwdb/d' Makefile || die 21 | } 22 | 23 | src_compile() { 24 | _emake 25 | } 26 | 27 | src_install() { 28 | _emake \ 29 | HWDBDIR="$(get_udevdir)/hwdb.d" \ 30 | DESTDIR="${D}" \ 31 | install 32 | 33 | rm -rf \ 34 | "${D}"/usr/share 35 | } 36 | -------------------------------------------------------------------------------- /gkbuilds/json-c-0.17.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | # 4 | src_configure() { 5 | mkdir ../${P}_build 6 | cd ../${P}_build 7 | 8 | gkexec "cmake \ 9 | -DCMAKE_INSTALL_PREFIX=/usr \ 10 | -DBUILD_APPS=OFF \ 11 | -DDISABLE_EXTRA_LIBS=ON \ 12 | -DDISABLE_WERROR=ON \ 13 | -DENABLE_RDRAND=no \ 14 | -DENABLE_THREADING=no \ 15 | -DCMAKE_BUILD_TYPE=RelWithDebInfo \ 16 | -DCMAKE_INSTALL_LIBDIR=lib \ 17 | ../${P}" 18 | } 19 | 20 | src_compile() { 21 | cd ../${P}_build 22 | gkmake 23 | } 24 | 25 | src_install() { 26 | cd ../${P}_build 27 | gkmake DESTDIR="${D}" install 28 | } 29 | -------------------------------------------------------------------------------- /gkbuilds/json-c.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | -------------------------------------------------------------------------------- /gkbuilds/keyutils.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | sed -i \ 8 | -e "1iRPATH = -static" \ 9 | -e 's:-Werror::' \ 10 | -e '/^NO_SOLIB/d' \ 11 | Makefile || die 12 | } 13 | 14 | src_compile() { 15 | export NO_SOLIB=1 16 | 17 | gkmake keyctl 18 | } 19 | 20 | src_install() { 21 | mkdir "${D}"/bin || die "Failed to create '${D}/bin'!" 22 | cp -a keyctl "${D}"/bin/ \ 23 | || die "Failed to copy '${S}/keyctl'!" 24 | 25 | "${STRIP}" --strip-all "${D}"/bin/keyctl \ 26 | || die "Failed to strip keyctl!" 27 | } 28 | -------------------------------------------------------------------------------- /gkbuilds/kmod.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | sed -i \ 8 | -e '/--enable-static is not supported by kmod/s:as_fn_error:echo:' \ 9 | configure || die "Failed to re-enable static support" 10 | 11 | # List of symbols which are clashing with (e)udev 12 | cat <<-EOF >> kmod.syms 13 | mkdir_p _kmod_mkdir_p 14 | mkdir_parents _kmod_mkdir_parents 15 | path_is_absolute _kmod_path_is_absolute 16 | path_make_absolute_cwd _kmod_path_make_absolute_cwd 17 | EOF 18 | } 19 | 20 | src_configure() { 21 | local myconf=( 22 | --enable-static 23 | --disable-manpages 24 | --disable-python 25 | --enable-tools 26 | --with-xz 27 | --with-zlib 28 | --with-zstd 29 | --without-openssl 30 | ) 31 | 32 | gkconf "${myconf[@]}" 33 | } 34 | 35 | src_install() { 36 | default 37 | 38 | # remove hardcoded $BROOT 39 | sed -i \ 40 | -e 's/-L\/[^ ]*/-L${libdir}/g' \ 41 | "${D}"/usr/lib*/pkgconfig/*.pc \ 42 | || die 43 | 44 | # rename internal symbols to avoid clashing with (e)udev 45 | $(tc-getOBJCOPY) \ 46 | --redefine-syms=kmod.syms \ 47 | "${D}"/usr/lib*/libkmod.a \ 48 | || die 49 | 50 | rm -rf \ 51 | "${D}"/usr/share/ 52 | 53 | "${STRIP}" --strip-all "${D}"/usr/bin/kmod \ 54 | || die "Failed to strip '${D}/usr/bin/kmod'!" 55 | 56 | mkdir "${D}"/bin || die "Failed to create '${D}/bin'!" 57 | 58 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 59 | 60 | # We need to install these links where busybox would create them 61 | local symlink_targets=() 62 | symlink_targets+=( /sbin/depmod ) 63 | symlink_targets+=( /sbin/insmod ) 64 | symlink_targets+=( /sbin/lsmod ) 65 | symlink_targets+=( /sbin/modinfo ) 66 | symlink_targets+=( /sbin/modprobe ) 67 | symlink_targets+=( /sbin/rmmod ) 68 | 69 | local symlink_target= 70 | for symlink_target in "${symlink_targets[@]}" 71 | do 72 | ln -s ../usr/bin/kmod "${D}${symlink_target}" \ 73 | || die "Failed to create symlink '${D}${symlink_target}' to '${D}/usr/bin/kmod'!" 74 | done 75 | } 76 | -------------------------------------------------------------------------------- /gkbuilds/libaio.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | -------------------------------------------------------------------------------- /gkbuilds/libgcrypt.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | gkautoreconf 8 | } 9 | 10 | src_configure() { 11 | export enable_pkg_config=yes 12 | 13 | local myconf=( 14 | --enable-static=yes 15 | --disable-padlock-support 16 | ) 17 | 18 | CC_FOR_BUILD="$(tc-getBUILD_CC)" \ 19 | gkconf "${myconf[@]}" 20 | } 21 | 22 | src_install() { 23 | default 24 | 25 | rm -rf \ 26 | "${D}"/usr/bin/dumpsexp \ 27 | "${D}"/usr/bin/hmac256 \ 28 | "${D}"/usr/bin/mpicalc \ 29 | "${D}"/usr/share 30 | 31 | # remove hardcoded $BROOT 32 | sed -i \ 33 | -e 's/-L\/[^-"]*//' \ 34 | -e 's/-I\/[^"]*//' \ 35 | "${D}"/usr/bin/libgcrypt-config \ 36 | || die 37 | 38 | # libgcrypt-config tries to be smart and will omit include 39 | # and lib dir due to set prefix 40 | sed -i \ 41 | -e "s|x/usr/include|x/dont-try-to-be-smart|" \ 42 | -e "s|x/usr/lib|x/dont-try-to-be-smart|" \ 43 | "${D}"/usr/bin/libgcrypt-config \ 44 | || die "Failed to make libgcrypt-config dumb!" 45 | 46 | mv "${D}"/usr/bin/libgcrypt-config "${D}"/usr/bin/libgcrypt-config.ori \ 47 | || die "Failed to rename '${D}/usr/bin/libgcrypt-config' to '${D}/usr/bin/libgcrypt-config.ori'!" 48 | 49 | cat >"${D}"/usr/bin/libgcrypt-config <<-EOF 50 | #!/bin/sh 51 | 52 | SYSROOT=\$(dirname "\$(dirname "\$(dirname "\$(readlink -fm "\$0")")")") 53 | 54 | exec "\${SYSROOT}"/usr/bin/libgcrypt-config.ori "\$@" | sed -e 's#/#'\${SYSROOT}'/#' 55 | EOF 56 | 57 | chmod +x "${D}"/usr/bin/libgcrypt-config \ 58 | || die "Failed to chmod of '${D}/bin/libgcrypt-config'!" 59 | } 60 | -------------------------------------------------------------------------------- /gkbuilds/libgpg-error.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --disable-nls 7 | --enable-static 8 | CC_FOR_BUILD="$(tc-getBUILD_CC)" 9 | ) 10 | 11 | gkconf "${myconf[@]}" 12 | } 13 | 14 | src_install() { 15 | default 16 | 17 | rm -rf \ 18 | "${D}"/usr/bin/gpg-error \ 19 | "${D}"/usr/bin/gpg-error-config \ 20 | "${D}"/usr/bin/gpgrt-config \ 21 | "${D}"/usr/bin/yat2m \ 22 | "${D}"/usr/share 23 | } 24 | -------------------------------------------------------------------------------- /gkbuilds/libxcrypt.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | gkautoreconf 8 | } 9 | 10 | src_configure() { 11 | local myopts=( 12 | --enable-shared 13 | --enable-static 14 | ) 15 | 16 | gkconf "${myopts[@]}" 17 | } 18 | -------------------------------------------------------------------------------- /gkbuilds/lvm-2.03.22.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | # devicemapper needs to find udev 6 | append-ldflags -Wl,-rpath-link,${BROOT}/usr/lib 7 | 8 | export ac_cv_header_security_pam_misc_h=no 9 | export ac_cv_header_security_pam_appl_h=no 10 | 11 | local myconf=( 12 | --enable-static_link 13 | --enable-pkgconfig 14 | --enable-dmeventd 15 | --enable-cmdlib 16 | --disable-lvmetad 17 | --with-clvmd=none 18 | --with-cluster=none 19 | --disable-readline 20 | --disable-selinux 21 | --with-mirrors=internal 22 | --with-snapshots=internal 23 | --with-thin=internal 24 | --with-cache=internal 25 | --disable-udev-systemd-background-jobs 26 | --enable-udev_sync 27 | --enable-udev_rules 28 | ) 29 | 30 | local texec 31 | for texec in check dump repair restore 32 | do 33 | myconf+=( --with-thin-${texec}=/usr/sbin/thin_${texec} ) 34 | myconf+=( --with-cache-${texec}=/usr/sbin/cache_${texec} ) 35 | done 36 | 37 | # Hard-wire this to bash as some shells (dash) don't know 38 | # "-o pipefail" #682404, #716496 39 | CONFIG_SHELL="/bin/bash" \ 40 | gkconf "${myconf[@]}" 41 | } 42 | 43 | src_install() { 44 | default 45 | 46 | rm -rf \ 47 | "${D}"/etc \ 48 | "${D}"/usr/sbin/* \ 49 | "${D}"/share 50 | 51 | cp -a tools/lvm.static "${D}"/usr/sbin/lvm \ 52 | || die "Failed to copy '${S}/tools/lvm.static' to '${D}/usr/sbin/lvm'!" 53 | 54 | "${STRIP}" --strip-all "${D}"/usr/sbin/lvm \ 55 | || die "Failed to strip '${D}/usr/sbin/lvm'!" 56 | 57 | cp -a libdm/dm-tools/dmsetup.static "${D}"/usr/sbin/dmsetup \ 58 | || die "Failed to copy '${S}/tools/dmsetup.static' to '${D}/usr/sbin/dmsetup'!" 59 | 60 | "${STRIP}" --strip-all "${D}"/usr/sbin/dmsetup \ 61 | || die "Failed to strip '${D}/usr/sbin/dmsetup'!" 62 | 63 | ln -s dmsetup "${D}"/usr/sbin/dmstats \ 64 | || die "Failed to create symlink '${D}/usr/sbin/dmstats' to '${D}/usr/sbin/dmsetup'!" 65 | 66 | # For backward compatibility (packages like multipath-tools are 67 | # expecting /sbin/dmsetup in udev rules). 68 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 69 | 70 | ln -s ../usr/sbin/dmsetup "${D}"/sbin/dmsetup \ 71 | || die "Failed to create symlink '${D}/sbin/dmsetup' to '${D}/usr/sbin/dmsetup'!" 72 | 73 | ln -s ../usr/sbin/dmstats "${D}"/sbin/dmstats \ 74 | || die "Failed to create symlink '${D}/sbin/dmstats' to '${D}/usr/sbin/dmstats'!" 75 | 76 | ln -s ../usr/sbin/lvm "${D}"/sbin/lvm \ 77 | || die "Failed to create symlink '${D}/sbin/lvm' to '${D}/usr/sbin/lvm'!" 78 | } 79 | -------------------------------------------------------------------------------- /gkbuilds/lvm.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | # devicemapper needs to find udev 6 | append-ldflags -Wl,-rpath-link,${BROOT}/usr/lib 7 | 8 | export ac_cv_header_security_pam_misc_h=no 9 | export ac_cv_header_security_pam_appl_h=no 10 | 11 | local myconf=( 12 | --enable-static_link 13 | --enable-pkgconfig 14 | --enable-dmeventd 15 | --enable-cmdlib 16 | --disable-lvmetad 17 | --with-clvmd=none 18 | --with-cluster=none 19 | --disable-readline 20 | --disable-selinux 21 | --with-mirrors=internal 22 | --with-snapshots=internal 23 | --with-thin=internal 24 | --with-cache=internal 25 | --disable-udev-systemd-background-jobs 26 | --enable-udev_sync 27 | --enable-udev_rules 28 | ) 29 | 30 | local texec 31 | for texec in check dump repair restore 32 | do 33 | myconf+=( --with-thin-${texec}=/usr/sbin/thin_${texec} ) 34 | myconf+=( --with-cache-${texec}=/usr/sbin/cache_${texec} ) 35 | done 36 | 37 | # Hard-wire this to bash as some shells (dash) don't know 38 | # "-o pipefail" #682404, #716496 39 | CONFIG_SHELL="/bin/bash" \ 40 | gkconf "${myconf[@]}" 41 | } 42 | 43 | src_install() { 44 | default 45 | 46 | rm -rf \ 47 | "${D}"/etc \ 48 | "${D}"/usr/sbin/* \ 49 | "${D}"/share 50 | 51 | cp -a tools/lvm.static "${D}"/usr/sbin/lvm \ 52 | || die "Failed to copy '${S}/tools/lvm.static' to '${D}/usr/sbin/lvm'!" 53 | 54 | "${STRIP}" --strip-all "${D}"/usr/sbin/lvm \ 55 | || die "Failed to strip '${D}/usr/sbin/lvm'!" 56 | 57 | cp -a tools/dmsetup.static "${D}"/usr/sbin/dmsetup \ 58 | || die "Failed to copy '${S}/tools/dmsetup.static' to '${D}/usr/sbin/dmsetup'!" 59 | 60 | "${STRIP}" --strip-all "${D}"/usr/sbin/dmsetup \ 61 | || die "Failed to strip '${D}/usr/sbin/dmsetup'!" 62 | 63 | ln -s dmsetup "${D}"/usr/sbin/dmstats \ 64 | || die "Failed to create symlink '${D}/usr/sbin/dmstats' to '${D}/usr/sbin/dmsetup'!" 65 | 66 | # For backward compatibility (packages like multipath-tools are 67 | # expecting /sbin/dmsetup in udev rules). 68 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 69 | 70 | ln -s ../usr/sbin/dmsetup "${D}"/sbin/dmsetup \ 71 | || die "Failed to create symlink '${D}/sbin/dmsetup' to '${D}/usr/sbin/dmsetup'!" 72 | 73 | ln -s ../usr/sbin/dmstats "${D}"/sbin/dmstats \ 74 | || die "Failed to create symlink '${D}/sbin/dmstats' to '${D}/usr/sbin/dmstats'!" 75 | 76 | ln -s ../usr/sbin/lvm "${D}"/sbin/lvm \ 77 | || die "Failed to create symlink '${D}/sbin/lvm' to '${D}/usr/sbin/lvm'!" 78 | } 79 | -------------------------------------------------------------------------------- /gkbuilds/lzo.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myopts=( 6 | --enable-shared 7 | --enable-static 8 | ) 9 | 10 | gkconf "${myopts[@]}" 11 | } 12 | 13 | src_install() { 14 | default 15 | 16 | rm -rf "${D}"/usr/share 17 | } 18 | -------------------------------------------------------------------------------- /gkbuilds/mdadm-4.2.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | local defs='-DNO_DLM -DNO_COROSYNC -DNO_LIBUDEV' 8 | sed -i \ 9 | -e "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = ${CFLAGS} ${defs}:" \ 10 | -e "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = ${CFLAGS} ${defs}:" \ 11 | -e "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" \ 12 | -e "s/^# LDFLAGS = -static/LDFLAGS = -static/" \ 13 | -e "s|^UDEVDIR := .*|UDEVDIR = $(get_udevdir)|" \ 14 | Makefile \ 15 | || die "Failed to sed mdadm Makefile" 16 | } 17 | 18 | src_compile() { 19 | # bug 907082 20 | append-cppflags -D_LARGEFILE64_SOURCE 21 | 22 | CXFLAGS="-DNO_LIBUDEV" gkmake V=1 mdadm mdmon 23 | } 24 | 25 | src_install() { 26 | gkmake V=1 DESTDIR="${D}" install-udev 27 | 28 | mkdir -p "${D}"/sbin || die "Failed to create '${D}/sbin'!" 29 | 30 | cp -a mdadm "${D}"/sbin/ \ 31 | || die "Failed to copy '${S}/mdadm' to '${D}/sbin/'!" 32 | 33 | "${STRIP}" --strip-all "${D}"/sbin/mdadm \ 34 | || die "Failed to strip '${D}/sbin/mdadm'!" 35 | 36 | cp -a mdmon "${D}"/sbin/ \ 37 | || die "Failed to copy '${D}/sbin/mdmon' to '${D}/sbin/'!" 38 | 39 | "${STRIP}" --strip-all "${D}"/sbin/mdmon \ 40 | || die "Failed to strip '${D}/sbin/mdmon'!" 41 | } 42 | -------------------------------------------------------------------------------- /gkbuilds/mdadm.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | local defs='-DNO_DLM -DNO_COROSYNC' 8 | sed -i \ 9 | -e "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = ${CFLAGS} ${defs}:" \ 10 | -e "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = ${CFLAGS} ${defs}:" \ 11 | -e "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" \ 12 | -e "s/^# LDFLAGS = -static/LDFLAGS = -static/" \ 13 | -e "s|^UDEVDIR := .*|UDEVDIR = $(get_udevdir)|" \ 14 | Makefile \ 15 | || die "Failed to sed mdadm Makefile" 16 | } 17 | 18 | src_compile() { 19 | gkmake V=1 mdadm mdmon 20 | } 21 | 22 | src_install() { 23 | gkmake V=1 DESTDIR="${D}" install-udev 24 | 25 | mkdir -p "${D}"/sbin || die "Failed to create '${D}/sbin'!" 26 | 27 | cp -a mdadm "${D}"/sbin/ \ 28 | || die "Failed to copy '${S}/mdadm' to '${D}/sbin/'!" 29 | 30 | "${STRIP}" --strip-all "${D}"/sbin/mdadm \ 31 | || die "Failed to strip '${D}/sbin/mdadm'!" 32 | 33 | cp -a mdmon "${D}"/sbin/ \ 34 | || die "Failed to copy '${D}/sbin/mdmon' to '${D}/sbin/'!" 35 | 36 | "${STRIP}" --strip-all "${D}"/sbin/mdmon \ 37 | || die "Failed to strip '${D}/sbin/mdmon'!" 38 | } 39 | -------------------------------------------------------------------------------- /gkbuilds/open-iscsi.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_compile() { 5 | append-cppflags -DNO_SYSTEMD 6 | export NO_SYSTEMD=1 7 | export PKG_CONFIG="$(tc-getPKG_CONFIG) --static" 8 | 9 | gkmake -C sysdeps V=1 10 | gkmake -C usr/fwparam_ibft V=1 11 | gkmake -C libopeniscsiusr V=1 12 | gkmake -C usr -j1 V=1 iscsistart 13 | } 14 | 15 | src_install() { 16 | mkdir "${D}"/bin || die "Failed to create '${D}/bin'!" 17 | 18 | cp -a usr/iscsistart "${D}"/bin/ \ 19 | || die "Failed to copy '${S}/usr/iscsistart' to '${D}/bin/'!" 20 | 21 | "${STRIP}" --strip-all "${D}"/bin/iscsistart \ 22 | || die "Failed to strip '${D}/bin/iscsistart'!" 23 | } 24 | -------------------------------------------------------------------------------- /gkbuilds/popt.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --disable-nls 7 | ) 8 | 9 | gkconf "${myconf[@]}" 10 | } 11 | 12 | src_install() { 13 | default 14 | 15 | rm -rf "${D}"/usr/share 16 | } 17 | -------------------------------------------------------------------------------- /gkbuilds/strace.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | append-ldflags -static -pthread 6 | 7 | local myconf=( 8 | --disable-gcc-Werror 9 | --enable-mpers=check 10 | --enable-static 11 | --without-libunwind 12 | --without-libdw 13 | ) 14 | 15 | CC_FOR_BUILD="$(tc-getBUILD_CC)" \ 16 | CPP_FOR_BUILD="$(tc-getBUILD_CPP)" \ 17 | gkconf "${myconf[@]}" 18 | } 19 | 20 | src_install() { 21 | mkdir -p "${D}"/usr/bin || die "Failed to create '${D}/usr/bin'!" 22 | 23 | cp -a src/strace "${D}"/usr/bin/ \ 24 | || die "Failed to copy '${S}/src/strace' to '${D}/usr/bin/'!" 25 | 26 | "${STRIP}" --strip-all "${D}"/usr/bin/strace \ 27 | || die "Failed to strip '${D}/usr/bin/strace'!" 28 | } 29 | -------------------------------------------------------------------------------- /gkbuilds/thin-provisioning-tools.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2021 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --with-optimisation='' 7 | --disable-testing 8 | --enable-static 9 | ) 10 | 11 | gkconf "${myconf[@]}" 12 | } 13 | 14 | src_compile() { 15 | MAKEOPTS+=" V=" 16 | gkmake 17 | } 18 | 19 | src_install() { 20 | local MYMAKEOPTS=( "DESTDIR=${D}" ) 21 | MYMAKEOPTS+=( -j1 ) 22 | MYMAKEOPTS+=( "DATADIR=${D}/usr/share" ) 23 | MYMAKEOPTS+=( "install" ) 24 | 25 | gkmake "${MYMAKEOPTS[@]}" 26 | 27 | rm -rf \ 28 | "${D}"/usr/share 29 | } 30 | -------------------------------------------------------------------------------- /gkbuilds/unionfs-fuse.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | append-ldflags -static 6 | } 7 | 8 | src_install() { 9 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 10 | install -m 0755 -s src/unionfs "${D}"/sbin/unionfs \ 11 | || die "Failed to install 'unionfs' to '${D}/sbin/'!" 12 | 13 | "${STRIP}" --strip-all "${D}"/sbin/unionfs \ 14 | || die "Failed to strip '${D}/sbin/unionfs'!" 15 | } 16 | -------------------------------------------------------------------------------- /gkbuilds/userspace-rcu.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | gkconf --enable-static 6 | } 7 | 8 | src_install() { 9 | default 10 | 11 | rm -rf "${D}"/usr/share 12 | } 13 | 14 | -------------------------------------------------------------------------------- /gkbuilds/util-linux.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | # Build static switch_root 8 | sed -i \ 9 | -e '/^switch_root_SOURCES =.*/a switch_root_LDFLAGS = -all-static' \ 10 | sys-utils/Makemodule.am \ 11 | || die 12 | 13 | gkautoreconf 14 | } 15 | 16 | src_configure() { 17 | export ac_cv_header_security_pam_misc_h=no 18 | export ac_cv_header_security_pam_appl_h=no 19 | 20 | local myconf=( 21 | --disable-libtool-lock 22 | --enable-libmount 23 | --disable-libsmartcols 24 | --disable-libfdisk 25 | --enable-libuuid 26 | --without-ncursesw 27 | --without-ncurses 28 | --disable-widechar 29 | --without-python 30 | --disable-pylibmount 31 | --enable-switch_root 32 | --enable-static-programs=blkid 33 | ) 34 | 35 | gkconf "${myconf[@]}" 36 | } 37 | 38 | src_install() { 39 | local MYMAKEOPTS=( "V=1" ) 40 | MYMAKEOPTS+=( "DESTDIR=${D}" ) 41 | MYMAKEOPTS+=( "install-pkgconfigDATA" ) 42 | MYMAKEOPTS+=( "install-nodist_blkidincHEADERS" ) 43 | MYMAKEOPTS+=( "install-nodist_mountincHEADERS" ) 44 | MYMAKEOPTS+=( "install-usrlib_execLTLIBRARIES" ) 45 | MYMAKEOPTS+=( "install-uuidincHEADERS" ) 46 | gkmake "${MYMAKEOPTS[@]}" 47 | 48 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 49 | 50 | install_exe 'blkid.static' "${D}"/sbin/blkid 51 | install_exe 'switch_root' "${D}"/sbin/switch_root 52 | 53 | local sbin 54 | for sbin in \ 55 | "${D}/sbin/blkid" \ 56 | "${D}/sbin/switch_root" \ 57 | ; do 58 | "${STRIP}" --strip-all "${sbin}" \ 59 | || die "Failed to strip '${sbin}'!" 60 | done 61 | } 62 | -------------------------------------------------------------------------------- /gkbuilds/xfsprogs.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_prepare() { 5 | default 6 | 7 | # Force static programs 8 | find -name Makefile -exec \ 9 | sed -i -r -e 's/-static(-libtool-libs)?/-all-static/' {} + 10 | } 11 | 12 | src_configure() { 13 | export DEBUG=-DNDEBUG 14 | export OPTIMIZER=${CFLAGS} 15 | unset PLATFORM # if set in user env, this breaks configure 16 | 17 | # Avoid automagic on libdevmapper, #709694 18 | export ac_cv_search_dm_task_create=no 19 | 20 | local myconf=( 21 | --enable-blkid 22 | --disable-libicu 23 | --disable-gettext 24 | --disable-readline 25 | --disable-editline 26 | --disable-scrub 27 | ) 28 | 29 | BUILD_CC="$(tc-getBUILD_CC)" \ 30 | BUILD_LD="$(tc-getBUILD_LD)" \ 31 | gkconf "${myconf[@]}" 32 | } 33 | 34 | src_compile() { 35 | gkmake V=1 headers growfs repair 36 | } 37 | 38 | src_install() { 39 | mkdir "${D}"/sbin || die "Failed to create '${D}/sbin'!" 40 | 41 | cp growfs/xfs_growfs "${D}"/sbin \ 42 | || die "Failed to copy '${S}/repair/xfs_growfs' to '${D}/sbin/'!" 43 | 44 | cp repair/xfs_repair "${D}"/sbin \ 45 | || die "Failed to copy '${S}/repair/xfs_repair' to '${D}/sbin/'!" 46 | 47 | local sbin 48 | for sbin in \ 49 | "${D}/sbin/xfs_growfs" \ 50 | "${D}/sbin/xfs_repair" \ 51 | ; do 52 | "${STRIP}" --strip-all "${sbin}" \ 53 | || die "Failed to strip '${sbin}'!" 54 | done 55 | } 56 | -------------------------------------------------------------------------------- /gkbuilds/xz.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2020 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local myconf=( 6 | --enable-threads 7 | --enable-static 8 | --disable-nls 9 | --disable-xz 10 | --disable-xzdec 11 | --disable-lzmadec 12 | --disable-lzmainfo 13 | --disable-lzma-links 14 | --disable-scripts 15 | --disable-doc 16 | ) 17 | 18 | gkconf "${myconf[@]}" 19 | } 20 | -------------------------------------------------------------------------------- /gkbuilds/zlib.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_configure() { 5 | local uname=$(/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) 6 | 7 | local myargs=( 8 | "${S}"/configure 9 | --shared 10 | --prefix="/usr" 11 | ${uname:+--uname=${uname}} 12 | ) 13 | 14 | gkexec "${myargs[*]}" 15 | } 16 | 17 | src_install() { 18 | gkmake V=1 DESTDIR="${D}" install LDCONFIG=: 19 | 20 | rm -rf "${D}"/usr/share 21 | } 22 | -------------------------------------------------------------------------------- /gkbuilds/zstd.gkbuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2019 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | src_compile() { 5 | gkmake -C lib V=1 PREFIX=/usr libzstd libzstd.a libzstd.pc 6 | } 7 | 8 | src_install() { 9 | gkmake -C lib V=1 PREFIX=/usr DESTDIR="${D}" install 10 | } 11 | -------------------------------------------------------------------------------- /merge.pl: -------------------------------------------------------------------------------- 1 | #! /usr/bin/perl 2 | 3 | my @args=@ARGV; 4 | my %configvalues; 5 | my @configoptions; 6 | my $configcounter = 0; 7 | 8 | # optionally print out the architecture as the first line of our output 9 | my $arch = $args[2]; 10 | if (defined $arch) { 11 | print "# $arch\n"; 12 | } 13 | 14 | # first, read the override file 15 | 16 | open (FILE,"$args[0]") || die "Could not open $args[0]"; 17 | while () { 18 | my $str = $_; 19 | my $configname; 20 | 21 | if (/\# ([\w]+) is not set/) { 22 | $configname = $1; 23 | } elsif (/([\w]+)=/) { 24 | $configname = $1; 25 | } 26 | 27 | if (defined($configname) && !exists($configvalues{$configname})) { 28 | $configvalues{$configname} = $str; 29 | $configoptions[$configcounter] = $configname; 30 | $configcounter ++; 31 | } 32 | }; 33 | 34 | # now, read and output the entire configfile, except for the overridden 35 | # parts... for those the new value is printed. 36 | 37 | open (FILE2,"$args[1]") || die "Could not open $args[1]"; 38 | while () { 39 | my $configname; 40 | 41 | if (/\# ([\w]+) is not set/) { 42 | $configname = $1; 43 | } elsif (/([\w]+)=/) { 44 | $configname = $1; 45 | } 46 | 47 | if (defined($configname) && exists($configvalues{$configname})) { 48 | print "$configvalues{$configname}"; 49 | delete($configvalues{$configname}); 50 | } else { 51 | print "$_"; 52 | } 53 | } 54 | 55 | # now print the new values from the overridden configfile 56 | my $counter = 0; 57 | 58 | while ($counter < $configcounter) { 59 | my $configname = $configoptions[$counter]; 60 | if (exists($configvalues{$configname})) { 61 | print "$configvalues{$configname}"; 62 | } 63 | $counter++; 64 | } 65 | 66 | 1; 67 | -------------------------------------------------------------------------------- /modules/README: -------------------------------------------------------------------------------- 1 | This directory is used for storing additional modules to extend support in 2 | genkernel. The default modules are also installed here. 3 | -------------------------------------------------------------------------------- /netboot/misc/bin/ashlogin: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | 3 | exec /bin/ash -i 4 | 5 | -------------------------------------------------------------------------------- /netboot/misc/bin/net-setup: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | 3 | MYIP="" 4 | MYGW="" 5 | 6 | 7 | #// Modified Functions copied from Gentoo's /sbin/functions.sh 8 | #//-------------------------------------------------------------------------------- 9 | 10 | # void einfo(char* message) 11 | # show an informative message (with a newline) 12 | einfo() { 13 | printf " * %b\n" "$*" 14 | } 15 | 16 | #//-------------------------------------------------------------------------------- 17 | 18 | 19 | 20 | #// Setup networking 21 | #//-------------------------------------------------------------------------------- 22 | 23 | SetupNetwork() { 24 | #// DHCP or Static? 25 | if [ "${1}" = "dhcp" ]; then 26 | #// Do DHCP 27 | udhcpc -i eth0 -q 28 | else 29 | 30 | #// Check second param 31 | if [ -z "${2}" ]; then 32 | echo 33 | einfo "Please specify a gateway address." 34 | echo 35 | exit 36 | fi 37 | 38 | #// Get networking params 39 | BROADCAST="$(ipcalc -b ${1} | cut -d\= -f2)" 40 | NETMASK="$(ipcalc -m ${1} | cut -d\= -f2)" 41 | 42 | #// Enable static networking 43 | /sbin/ifconfig eth0 ${1} broadcast ${BROADCAST} netmask ${NETMASK} 44 | /sbin/route add -net default gw ${2} netmask 0.0.0.0 metric 1 45 | fi 46 | 47 | #// Setup the loopback 48 | /sbin/ifconfig lo 127.0.0.1 49 | /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 gw 127.0.0.1 dev lo 50 | 51 | #// Finish 52 | MYIP="${1}" 53 | MYGW="${2}" 54 | } 55 | 56 | #//-------------------------------------------------------------------------------- 57 | 58 | 59 | 60 | #// Main Function 61 | #//-------------------------------------------------------------------------------- 62 | 63 | #// Check first param 64 | if [ -z "${1}" ]; then 65 | echo 66 | einfo "Please specify \"dhcp\" for setting up networking via dhcp or" 67 | einfo "specify an IP Address and gateway address to configure static" 68 | einfo "networking." 69 | echo 70 | exit 0 71 | fi 72 | 73 | 74 | #// Setup the Network 75 | SetupNetwork ${1} ${2} ${3} 76 | 77 | 78 | #// Was the network setup? 79 | if [ ! -z "$(ifconfig | grep "eth0")" ]; then 80 | echo 81 | einfo "Network interface eth0 has been started:" 82 | einfo " IP Address: ${MYIP}" 83 | einfo " Gateway: ${MYGW}" 84 | echo 85 | einfo "An sshd server is available on port 22. Please set a root" 86 | einfo "password via \"passwd\" before using." 87 | echo 88 | echo 89 | fi 90 | 91 | #//-------------------------------------------------------------------------------- 92 | 93 | -------------------------------------------------------------------------------- /netboot/misc/etc/fstab: -------------------------------------------------------------------------------- 1 | # /etc/fstab: static file system information. 2 | # 3 | 4 | #// Main Filesystems 5 | none /tmp tmpfs defaults,rw 0 0 6 | 7 | #// Miscellaneous Filesystems 8 | proc /proc proc defaults 0 0 9 | sysfs /sys sysfs defaults 0 0 10 | tmpfs /dev/shm tmpfs defaults 0 0 11 | -------------------------------------------------------------------------------- /netboot/misc/etc/group: -------------------------------------------------------------------------------- 1 | root:x:0:root 2 | nobody:x:65534: 3 | -------------------------------------------------------------------------------- /netboot/misc/etc/inittab: -------------------------------------------------------------------------------- 1 | # /etc/inittab init(8) configuration for BusyBox 2 | # 3 | # Copyright (C) 1999-2003 by Erik Andersen 4 | 5 | 6 | ::sysinit:/linuxrc 7 | ::askfirst:-/bin/ash 8 | #tty2::askfirst:-/bin/ash 9 | #tty3::askfirst:-/bin/ash 10 | #tty4::askfirst:-/bin/ash 11 | ::restart:/sbin/init 12 | ::ctrlaltdel:/sbin/reboot 13 | ::shutdown:/bin/umount -a -r 14 | ::shutdown:/sbin/swapoff -a 15 | 16 | -------------------------------------------------------------------------------- /netboot/misc/etc/passwd: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/root:/bin/ash 2 | nobody:x:65534:65534:nobody:/:/bin/false 3 | -------------------------------------------------------------------------------- /netboot/misc/etc/profile: -------------------------------------------------------------------------------- 1 | export PATH="/usr/bin:/usr/sbin:/bin:/sbin" 2 | -------------------------------------------------------------------------------- /netboot/misc/etc/resolv.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/netboot/misc/etc/resolv.conf -------------------------------------------------------------------------------- /netboot/misc/etc/shadow: -------------------------------------------------------------------------------- 1 | root:*:10770:0::::: 2 | nobody:*:9797:0::::: 3 | -------------------------------------------------------------------------------- /netboot/misc/etc/shells: -------------------------------------------------------------------------------- 1 | /bin/sh 2 | /bin/ash 3 | -------------------------------------------------------------------------------- /netboot/misc/usr/share/terminfo/p/putty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gentoo/genkernel/5e6e0b98c281d149905774b60803435a22cf39a5/netboot/misc/usr/share/terminfo/p/putty -------------------------------------------------------------------------------- /patches/bcache-tools/1.0.8_p20141204/bcache-tools-1.0.8_p20141204-crc64.patch: -------------------------------------------------------------------------------- 1 | --- a/bcache.c 2 | +++ b/bcache.c 3 | @@ -26,7 +26,7 @@ 4 | * x^7 + x^4 + x + 1 5 | */ 6 | 7 | -static const uint64_t crc_table[256] = { 8 | +const uint64_t crc_table[256] = { 9 | 0x0000000000000000ULL, 0x42F0E1EBA9EA3693ULL, 0x85E1C3D753D46D26ULL, 10 | 0xC711223CFA3E5BB5ULL, 0x493366450E42ECDFULL, 0x0BC387AEA7A8DA4CULL, 11 | 0xCCD2A5925D9681F9ULL, 0x8E224479F47CB76AULL, 0x9266CC8A1C85D9BEULL, 12 | @@ -114,16 +114,3 @@ static const uint64_t crc_table[256] = { 13 | 0x5DEDC41A34BBEEB2ULL, 0x1F1D25F19D51D821ULL, 0xD80C07CD676F8394ULL, 14 | 0x9AFCE626CE85B507ULL 15 | }; 16 | - 17 | -inline uint64_t crc64(const void *_data, size_t len) 18 | -{ 19 | - uint64_t crc = 0xFFFFFFFFFFFFFFFFULL; 20 | - const unsigned char *data = _data; 21 | - 22 | - while (len--) { 23 | - int i = ((int) (crc >> 56) ^ *data++) & 0xFF; 24 | - crc = crc_table[i] ^ (crc << 8); 25 | - } 26 | - 27 | - return crc ^ 0xFFFFFFFFFFFFFFFFULL; 28 | -} 29 | --- a/bcache.h 30 | +++ b/bcache.h 31 | @@ -115,7 +115,20 @@ BITMASK(BDEV_STATE, struct cache_sb, flags, 61, 2); 32 | #define BDEV_STATE_DIRTY 2U 33 | #define BDEV_STATE_STALE 3U 34 | 35 | -uint64_t crc64(const void *_data, size_t len); 36 | +extern const uint64_t crc_table[]; 37 | + 38 | +static inline uint64_t crc64(const void *_data, size_t len) 39 | +{ 40 | + uint64_t crc = 0xFFFFFFFFFFFFFFFFULL; 41 | + const unsigned char *data = _data; 42 | + 43 | + while (len--) { 44 | + int i = ((int) (crc >> 56) ^ *data++) & 0xFF; 45 | + crc = crc_table[i] ^ (crc << 8); 46 | + } 47 | + 48 | + return crc ^ 0xFFFFFFFFFFFFFFFFULL; 49 | +} 50 | 51 | #define node(i, j) ((void *) ((i)->d + (j))) 52 | #define end(i) node(i, (i)->keys) 53 | 54 | -------------------------------------------------------------------------------- /patches/bcache-tools/1.0.8_p20141204/bcache-tools-1.0.8_p20141204-modprobe.patch: -------------------------------------------------------------------------------- 1 | --- a/69-bcache.rules 2 | +++ b/69-bcache.rules 3 | @@ -18,7 +18,7 @@ ENV{ID_FS_TYPE}!="bcache", GOTO="bcache_backing_end" 4 | ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" 5 | 6 | LABEL="bcache_backing_found" 7 | -RUN{builtin}+="kmod load bcache" 8 | +RUN+="/sbin/modprobe bcache" 9 | RUN+="bcache-register $tempnode" 10 | LABEL="bcache_backing_end" 11 | 12 | -------------------------------------------------------------------------------- /patches/boost-build/1.76.0/boost-build-1.71.0-disable_python_rpath.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/python.jam 2 | +++ b/tools/python.jam 3 | @@ -1000,7 +1000,7 @@ 4 | # linux). 5 | : $(usage-requirements) 6 | $(set-PYTHONPATH) 7 | - $(libraries) $(dll-path) python.lib 8 | + $(libraries) python.lib 9 | ; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /patches/boost-build/1.76.0/boost-build-1.73.0-add-none-feature-options.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/features/debug-feature.jam 2 | +++ b/tools/features/debug-feature.jam 3 | @@ -18,7 +18,7 @@ 4 | |# # end::doc[] 5 | 6 | feature.feature debug-symbols 7 | - : on off 8 | + : on off none 9 | : propagated ; 10 | 11 | #| tag::prof-doc[] 12 | --- a/tools/features/optimization-feature.jam 13 | +++ b/tools/features/optimization-feature.jam 14 | @@ -16,7 +16,7 @@ 15 | |# # end::doc[] 16 | 17 | feature.feature optimization 18 | - : off speed space 19 | + : off none speed space 20 | : propagated ; 21 | 22 | #| tag::inline-doc[] 23 | -------------------------------------------------------------------------------- /patches/boost-build/1.76.0/boost-build-1.76.0-python-numpy.patch: -------------------------------------------------------------------------------- 1 | From 61adb508853be1fa2c01a0c3a0c55fbd16cb9a52 Mon Sep 17 00:00:00 2001 2 | From: Peter Dimov 3 | Date: Mon, 24 May 2021 22:11:23 +0300 4 | Subject: [PATCH] Declare the /python//numpy target to hold the include path 5 | (fixes #725) 6 | 7 | --- 8 | tools/python.jam | 3 +++ 9 | 1 file changed, 3 insertions(+) 10 | 11 | diff --git a/tools/python.jam b/tools/python.jam 12 | index 00706932d2..0dfc750a22 100644 13 | --- a/tools/python.jam 14 | +++ b/tools/python.jam 15 | @@ -1052,6 +1052,9 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : 16 | ; 17 | } 18 | 19 | + # Declare the numpy target, which contains the NumPy include directory 20 | + 21 | + alias numpy : : $(target-requirements) : : $(.numpy-include) ; 22 | } 23 | 24 | # Conditional rule specification that will prevent building of a target 25 | -------------------------------------------------------------------------------- /patches/boost-build/1.76.0/boost-build-1.76.0-respect-user-flags.patch: -------------------------------------------------------------------------------- 1 | --- a/engine/build.sh 2 | +++ b/engine/build.sh 3 | @@ -496,7 +496,7 @@ 4 | if test_true ${B2_DEBUG_OPT} ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}" 5 | else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG" 6 | fi 7 | - ( B2_VERBOSE_OPT=${TRUE} echo_run ${B2_CXX} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2 ) 8 | + ( B2_VERBOSE_OPT=${TRUE} echo_run ${B2_CXX} ${CPPFLAGS} ${B2_CXXFLAGS} ${LDFLAGS} ${B2_SOURCES} -o b2 ) 9 | ( B2_VERBOSE_OPT=${TRUE} echo_run cp b2 bjam ) 10 | } 11 | 12 | -------------------------------------------------------------------------------- /patches/boost/1.76.0/boost-1.71.0-context-x32.patch: -------------------------------------------------------------------------------- 1 | --- a/libs/context/src/asm/jump_i386_sysv_elf_gas.S 2 | +++ b/libs/context/src/asm/jump_i386_sysv_elf_gas.S 3 | @@ -24,6 +24,10 @@ 4 | * * 5 | ****************************************************************************************/ 6 | 7 | +#ifdef __x86_64__ 8 | +#include "jump_x86_64_sysv_elf_gas.S" 9 | +#else 10 | + 11 | .file "jump_i386_sysv_elf_gas.S" 12 | .text 13 | .globl jump_fcontext 14 | @@ -81,3 +85,5 @@ 15 | 16 | /* Mark that we don't need executable stack. */ 17 | .section .note.GNU-stack,"",%progbits 18 | + 19 | +#endif 20 | --- a/libs/context/src/asm/make_i386_sysv_elf_gas.S 21 | +++ b/libs/context/src/asm/make_i386_sysv_elf_gas.S 22 | @@ -24,6 +24,10 @@ 23 | * * 24 | ****************************************************************************************/ 25 | 26 | +#ifdef __x86_64__ 27 | +#include "make_x86_64_sysv_elf_gas.S" 28 | +#else 29 | + 30 | .file "make_i386_sysv_elf_gas.S" 31 | .text 32 | .globl make_fcontext 33 | @@ -105,3 +109,5 @@ 34 | 35 | /* Mark that we don't need executable stack. */ 36 | .section .note.GNU-stack,"",%progbits 37 | + 38 | +#endif 39 | -------------------------------------------------------------------------------- /patches/boost/1.76.0/boost-1.71.0-disable_icu_rpath.patch: -------------------------------------------------------------------------------- 1 | --- a/libs/locale/build/Jamfile.v2 2 | +++ b/libs/locale/build/Jamfile.v2 3 | @@ -65,8 +65,8 @@ 4 | 5 | if $(ICU_LINK) 6 | { 7 | - ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin shared ; 8 | - ICU64_OPTS = $(ICU_PATH)/include $(ICU_LINK) $(ICU_PATH)/bin64 shared ; 9 | + ICU_OPTS = $(ICU_PATH)/include $(ICU_LINK) shared ; 10 | + ICU64_OPTS = $(ICU_PATH)/include $(ICU_LINK) shared ; 11 | } 12 | else 13 | { 14 | @@ -124,7 +124,6 @@ 15 | icuuc/shared/shared 16 | icudt/shared/shared 17 | icuin/shared/shared 18 | - $(ICU_PATH)/bin 19 | shared ; 20 | 21 | 22 | @@ -183,7 +182,6 @@ 23 | icuuc_64/shared/shared 24 | icudt_64/shared/shared 25 | icuin_64/shared/shared 26 | - $(ICU_PATH)/bin64 27 | shared ; 28 | 29 | 30 | -------------------------------------------------------------------------------- /patches/boost/1.76.0/boost-1.73-boost-mpi-python-PEP-328.patch: -------------------------------------------------------------------------------- 1 | --- a/libs/mpi/build/__init__.py 2 | +++ b/libs/mpi/build/__init__.py 3 | @@ -1,10 +1,12 @@ 4 | +from __future__ import absolute_import 5 | + 6 | import sys 7 | if sys.platform == 'linux2': 8 | import DLFCN as dl 9 | flags = sys.getdlopenflags() 10 | sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) 11 | - import mpi 12 | + from . import mpi 13 | sys.setdlopenflags(flags) 14 | else: 15 | - import mpi 16 | + from . import mpi 17 | 18 | -------------------------------------------------------------------------------- /patches/boost/1.76.0/boost-1.76-boost-numpy.patch: -------------------------------------------------------------------------------- 1 | From 0796305c863804a2b31610507c531da5c0408422 Mon Sep 17 00:00:00 2001 2 | From: Peter Dimov 3 | Date: Mon, 24 May 2021 22:14:55 +0300 4 | Subject: [PATCH] Use the /python//numpy target instead of [ numpy.include ] 5 | (fixes #361) 6 | 7 | --- 8 | libs/python/build/Jamfile | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/libs/python/build/Jamfile b/libs/python/build/Jamfile 12 | index dbc9fb203..03b69a25d 100644 13 | --- a/libs/python/build/Jamfile 14 | +++ b/libs/python/build/Jamfile 15 | @@ -117,7 +117,7 @@ lib boost_numpy 16 | BOOST_NUMPY_SOURCE 17 | [ cond [ python.numpy ] : /python//python_for_extensions ] 18 | [ unless [ python.numpy ] : no ] 19 | - $(numpy-include) 20 | + /python//numpy 21 | boost_python 22 | on:BOOST_DEBUG_PYTHON 23 | -@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag 24 | -------------------------------------------------------------------------------- /patches/boost/1.76.0/boost-1.76-sparc-define.patch: -------------------------------------------------------------------------------- 1 | https://github.com/boostorg/predef/commit/1be0e4a2d8db15a405f64a6f65507b87c1be7e1a.patch 2 | 3 | From 1be0e4a2d8db15a405f64a6f65507b87c1be7e1a Mon Sep 17 00:00:00 2001 4 | From: tkoecker 5 | Date: Fri, 21 May 2021 16:31:11 +0200 6 | Subject: [PATCH] added missing brackets (#118) 7 | --- a/boost/predef/architecture/sparc.h 8 | +++ b/boost/predef/architecture/sparc.h 9 | @@ -34,10 +34,10 @@ Distributed under the Boost Software License, Version 1.0. 10 | 11 | #if defined(__sparc__) || defined(__sparc) 12 | # undef BOOST_ARCH_SPARC 13 | -# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__) 14 | +# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__)) 15 | # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0) 16 | # endif 17 | -# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__) 18 | +# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__)) 19 | # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0) 20 | # endif 21 | # if !defined(BOOST_ARCH_SPARC) 22 | -------------------------------------------------------------------------------- /patches/boost/1.79.0/boost-1.79.0-fix-mips1-transition.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/843212 2 | https://bugs.gentoo.org/913150 3 | https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a9b0d1fe535f498e607f7f8f860656237af347e 4 | 5 | https://github.com/boostorg/boost/commit/791442bf1ed7a3b14893ed9e73ef2ab32b2a6026, and 6 | https://github.com/boostorg/config/commit/1a55d1d9c6d1cf7739645080bdd92fe903b4211e without the file renaming. 7 | 8 | --- a/boostcpp.jam 9 | +++ b/boostcpp.jam 10 | @@ -634,7 +634,7 @@ rule address-model ( ) 11 | return @boostcpp.deduce-address-model ; 12 | } 13 | 14 | -local deducable-architectures = arm mips1 power riscv s390x sparc x86 combined ; 15 | +local deducable-architectures = arm mips power riscv s390x sparc x86 combined ; 16 | feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ; 17 | for a in $(deducable-architectures) 18 | { 19 | @@ -645,10 +645,10 @@ rule deduce-architecture ( properties * ) 20 | { 21 | local result ; 22 | local filtered = [ toolset-properties $(properties) ] ; 23 | - local names = arm mips1 power riscv s390x sparc x86 combined ; 24 | + local names = arm mips power riscv s390x sparc x86 combined ; 25 | local idx = [ configure.find-builds "default architecture" : $(filtered) 26 | : /boost/architecture//arm 27 | - : /boost/architecture//mips1 28 | + : /boost/architecture//mips 29 | : /boost/architecture//power 30 | : /boost/architecture//riscv 31 | : /boost/architecture//s390x 32 | --- a/libs/config/checks/architecture/Jamfile.jam 33 | +++ b/libs/config/checks/architecture/Jamfile.jam 34 | @@ -18,7 +18,8 @@ obj 64 : 64.cpp ; 35 | 36 | obj arm : arm.cpp ; 37 | obj combined : combined.cpp ; 38 | -obj mips1 : mips1.cpp ; 39 | +obj mips : mips1.cpp ; 40 | +alias mips1 : mips ; # Backwards compatibility 41 | obj power : power.cpp ; 42 | obj riscv : riscv.cpp ; 43 | obj sparc : sparc.cpp ; 44 | -------------------------------------------------------------------------------- /patches/btrfs-progs/5.15/btrfs-honor-LDFLAGS.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile 2 | +++ b/Makefile 3 | @@ -130,7 +130,7 @@ LIBBTRFS_LIBS = $(LIBS_BASE) $(LIBS_CRYPTO) 4 | 5 | # Static compilation flags 6 | STATIC_CFLAGS = $(CFLAGS) -ffunction-sections -fdata-sections -DSTATIC_BUILD 7 | -STATIC_LDFLAGS = -static -Wl,--gc-sections 8 | +STATIC_LDFLAGS = $(LDFLAGS) -static -Wl,--gc-sections 9 | STATIC_LIBS = $(STATIC_LIBS_BASE) 10 | 11 | # don't use FORTIFY with sparse because glibc with FORTIFY can 12 | 13 | -------------------------------------------------------------------------------- /patches/btrfs-progs/5.15/btrfs-lzo-via-pkgconfig.patch: -------------------------------------------------------------------------------- 1 | --- a/configure.ac 2 | +++ b/configure.ac 3 | @@ -304,16 +304,8 @@ if ${PKG_CONFIG} udev --atleast-version 190; then 4 | fi 5 | AC_SUBST(UDEVDIR) 6 | 7 | -dnl lzo library does not provide pkg-config, let use classic way 8 | -AC_CHECK_LIB([lzo2], [lzo_version], [ 9 | - LZO2_LIBS="-llzo2" 10 | - LZO2_CFLAGS="" 11 | - LZO2_LIBS_STATIC="-llzo2"],[ 12 | - AC_MSG_ERROR([cannot find lzo2 library]) 13 | -]) 14 | -AC_SUBST([LZO2_LIBS]) 15 | -AC_SUBST([LZO2_LIBS_STATIC]) 16 | -AC_SUBST([LZO2_CFLAGS]) 17 | +PKG_CHECK_MODULES(LZO2, [lzo2]) 18 | +PKG_STATIC(LZO2_LIBS_STATIC, [lzo2]) 19 | 20 | dnl call PKG_INSTALLDIR from pkg.m4 to set pkgconfigdir 21 | m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_MSG_ERROR([please install pkgconf])]) 22 | 23 | -------------------------------------------------------------------------------- /patches/btrfs-progs/5.15/btrfs-m4.patch: -------------------------------------------------------------------------------- 1 | Fixes 2 | 3 | ./configure: line 4077: BTRFS_DETECT_CSTD: command not found 4 | 5 | --- a/configure.ac 6 | +++ b/configure.ac 7 | @@ -18,6 +18,7 @@ AC_SUBST([CFLAGS]) 8 | AC_PREREQ([2.60]) 9 | 10 | AC_CONFIG_AUX_DIR([config]) 11 | +AC_CONFIG_MACRO_DIR([m4]) 12 | dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run 13 | dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors. 14 | AC_USE_SYSTEM_EXTENSIONS 15 | 16 | -------------------------------------------------------------------------------- /patches/busybox/1.33.1/busybox-1.20.2-modprobe.patch: -------------------------------------------------------------------------------- 1 | Load modules by absolute path in busybox modprobe 2 | 3 | Our switch to busybox modprobe broke ZFS module loading where busybox 4 | modprobe would load two modules and then fail. Limited developer time 5 | resulted in a hack being put into place to repeat modprobe until ZFS 6 | appeared. However, this was never a real long term solution. 7 | 8 | Recent analysis with strace suggests that loading two modules corrupts 9 | busybox's current working directory inside the kernel. Consequently, 10 | subsequent tests where absolute paths were used instead of relative ones 11 | made the problem disappear. 12 | 13 | Modifying busybox to use full paths when loading modules makes module 14 | loading work on all affected kernels. While the long term plan is to fix 15 | the kernel, this workaround will be needed indefinitely for affected 16 | kernels, even after mainline Linux is fixed. 17 | 18 | Signed-off-by: Richard Yao 19 | 20 | Added via commit 006a5d6d56e622b5ef82e5a066ca7af7b8c2aeed. 21 | 22 | --- a/modutils/modprobe.c 23 | +++ b/modutils/modprobe.c 24 | @@ -413,7 +413,7 @@ static int do_modprobe(struct module_entry *m) 25 | rc = 0; 26 | while (m->deps) { 27 | struct module_entry *m2; 28 | - char *fn, *options; 29 | + char *fn, *options, *path; 30 | 31 | rc = 0; 32 | fn = llist_pop(&m->deps); /* we leak it */ 33 | @@ -460,7 +460,11 @@ static int do_modprobe(struct module_entry *m) 34 | continue; 35 | } 36 | 37 | - rc = bb_init_module(fn, options); 38 | + path = xmalloc(strlen(fn) + strlen(CONFIG_DEFAULT_MODULES_DIR) + strlen(G.uts.release) + 3); 39 | + sprintf(path, "%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn); 40 | + 41 | + rc = bb_init_module(path, options); 42 | + free(path); 43 | DBG("loaded %s '%s', rc:%d", fn, options, rc); 44 | if (rc == EEXIST) 45 | rc = 0; 46 | 47 | -------------------------------------------------------------------------------- /patches/busybox/1.33.1/busybox-1.30.1-allow-for-genkernel-cross-compile.patch: -------------------------------------------------------------------------------- 1 | We don't use CROSS_COMPILE in genkernel to allow for multilib 2 | compilation (i.e. x86_64 can compile for x86 without dedicated x86 toolchain). 3 | 4 | --- a/Makefile 5 | +++ b/Makefile 6 | @@ -271,8 +271,8 @@ export quiet Q KBUILD_VERBOSE 7 | # Look for make include files relative to root of kernel src 8 | MAKEFLAGS += --include-dir=$(srctree) 9 | 10 | -HOSTCC = gcc 11 | -HOSTCXX = g++ 12 | +HOSTCC ?= gcc 13 | +HOSTCXX ?= g++ 14 | HOSTCFLAGS := 15 | HOSTCXXFLAGS := 16 | # We need some generic definitions 17 | @@ -288,15 +288,15 @@ MAKEFLAGS += -rR 18 | 19 | # Make variables (CC, etc...) 20 | 21 | -AS = $(CROSS_COMPILE)as 22 | -CC = $(CROSS_COMPILE)gcc 23 | +AS ?= $(CROSS_COMPILE)as 24 | +CC ?= $(CROSS_COMPILE)gcc 25 | LD = $(CC) -nostdlib 26 | CPP = $(CC) -E 27 | -AR = $(CROSS_COMPILE)ar 28 | -NM = $(CROSS_COMPILE)nm 29 | -STRIP = $(CROSS_COMPILE)strip 30 | -OBJCOPY = $(CROSS_COMPILE)objcopy 31 | -OBJDUMP = $(CROSS_COMPILE)objdump 32 | +AR ?= $(CROSS_COMPILE)ar 33 | +NM ?= $(CROSS_COMPILE)nm 34 | +STRIP ?= $(CROSS_COMPILE)strip 35 | +OBJCOPY ?= $(CROSS_COMPILE)objcopy 36 | +OBJDUMP ?= $(CROSS_COMPILE)objdump 37 | PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config 38 | AWK = awk 39 | GENKSYMS = scripts/genksyms/genksyms 40 | -------------------------------------------------------------------------------- /patches/busybox/1.36.1/busybox-1.36.1-kernel-6.8.patch: -------------------------------------------------------------------------------- 1 | http://lists.busybox.net/pipermail/busybox/2024-March/090678.html 2 | https://bugs.gentoo.org/928573 3 | 4 | Linux v6.8-rc1 removed the definitions related to CBQ making tc fail to 5 | build. Add some #ifdefs to handle this missing support. 6 | --- a/networking/tc.c 7 | +++ b/networking/tc.c 8 | @@ -231,6 +231,13 @@ static int cbq_parse_opt(int argc, char **argv, struct nlmsghdr *n) 9 | return 0; 10 | } 11 | #endif 12 | + 13 | +#ifndef TCA_CBQ_MAX 14 | +/* 15 | + * Linux v6.8-rc1 removed the uapi definitions for CBQ. 16 | + * See https://git.kernel.org/linus/33241dca48626 17 | + */ 18 | +#else 19 | static int cbq_print_opt(struct rtattr *opt) 20 | { 21 | struct rtattr *tb[TCA_CBQ_MAX+1]; 22 | @@ -322,6 +329,7 @@ static int cbq_print_opt(struct rtattr *opt) 23 | done: 24 | return 0; 25 | } 26 | +#endif 27 | 28 | static FAST_FUNC int print_qdisc( 29 | const struct sockaddr_nl *who UNUSED_PARAM, 30 | @@ -372,8 +380,10 @@ static FAST_FUNC int print_qdisc( 31 | int qqq = index_in_strings(_q_, name); 32 | if (qqq == 0) { /* pfifo_fast aka prio */ 33 | prio_print_opt(tb[TCA_OPTIONS]); 34 | +#ifdef TCA_CBQ_MAX 35 | } else if (qqq == 1) { /* class based queuing */ 36 | cbq_print_opt(tb[TCA_OPTIONS]); 37 | +#endif 38 | } else { 39 | /* don't know how to print options for this qdisc */ 40 | printf("(options for %s)", name); 41 | @@ -442,9 +452,11 @@ static FAST_FUNC int print_class( 42 | int qqq = index_in_strings(_q_, name); 43 | if (qqq == 0) { /* pfifo_fast aka prio */ 44 | /* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/ 45 | +#ifdef TCA_CBQ_MAX 46 | } else if (qqq == 1) { /* class based queuing */ 47 | /* cbq_print_copt() is identical to cbq_print_opt(). */ 48 | cbq_print_opt(tb[TCA_OPTIONS]); 49 | +#endif 50 | } else { 51 | /* don't know how to print options for this class */ 52 | printf("(options for %s)", name); 53 | 54 | -------------------------------------------------------------------------------- /patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-001-undo-p-rename.patch: -------------------------------------------------------------------------------- 1 | Author: Giuseppe Iuculano 2 | Description: Removed "p" from device name. A proper upgrade script is needed before using it. 3 | --- a/1.0.0.rc15/lib/format/partition/dos.c 4 | +++ b/1.0.0.rc15/lib/format/partition/dos.c 5 | @@ -31,7 +31,7 @@ _name(struct lib_context *lc, struct rai 6 | { 7 | const char *base = get_basename(lc, rd->di->path); 8 | 9 | - return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc), 10 | + return type ? snprintf(str, len, "%s%u", base, 11 | partition) : snprintf(str, len, "%s", base); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-002-return-all-sets.patch: -------------------------------------------------------------------------------- 1 | --- a/1.0.0.rc16-3/dmraid/lib/metadata/metadata.c 2 | +++ b/1.0.0.rc16-3/dmraid/lib/metadata/metadata.c 3 | @@ -839,7 +839,7 @@ _discover_partitions(struct lib_context *lc, struct list_head *rs_list) 4 | */ 5 | if (T_GROUP(rs)) { 6 | _discover_partitions(lc, &rs->sets); 7 | - return; 8 | + continue; 9 | } 10 | 11 | /* 12 | -------------------------------------------------------------------------------- /patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-004-staticlink.patch: -------------------------------------------------------------------------------- 1 | diff -ruN dmraid-vanilla/1.0.0.rc16-3/dmraid/tools/Makefile.in dmraid/1.0.0.rc16-3/dmraid/tools/Makefile.in 2 | --- dmraid-vanilla/1.0.0.rc16-3/dmraid/tools/Makefile.in 2010-05-31 13:18:31.000000000 +0200 3 | +++ dmraid/1.0.0.rc16-3/dmraid/tools/Makefile.in 2012-01-03 10:14:01.665000034 +0100 4 | @@ -46,10 +46,10 @@ 5 | DMEVENTTOOLLIBS = -ldevmapper-event_dietc 6 | endif 7 | else 8 | -# DMRAIDLIBS += -ldevmapper 9 | -# ifeq ("@STATIC_LINK@", "no") 10 | -# DMEVENTTOOLLIBS = -ldevmapper-event 11 | -# endif 12 | + DMRAIDLIBS += -ldevmapper 13 | + ifeq ("@STATIC_LINK@", "no") 14 | + DMEVENTTOOLLIBS = -ldevmapper-event 15 | + endif 16 | endif 17 | 18 | # DMRAIDLIBS += -lselinux 19 | -------------------------------------------------------------------------------- /patches/dmraid/1.0.0.rc16-3/dmraid-1.0.0_rc16-005-parallel-make.patch: -------------------------------------------------------------------------------- 1 | --- dmraid/1.0.0.rc16-3/dmraid/lib/Makefile.in.orig 2016-09-20 12:54:09.416628404 +0200 2 | +++ dmraid/1.0.0.rc16-3/dmraid/lib/Makefile.in 2016-09-20 12:55:06.343698229 +0200 3 | @@ -79,7 +79,7 @@ 4 | -Wl,-soname,$(notdir $@).$(DMRAID_LIB_MAJOR) \ 5 | $(DEVMAPPEREVENT_LIBS) $(DEVMAPPER_LIBS) $(DL_LIBS) $(LIBS) 6 | 7 | -$(LIB_EVENTS_SHARED): $(OBJECTS2) 8 | +$(LIB_EVENTS_SHARED): $(OBJECTS2) $(LIB_SHARED) 9 | $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJECTS2) \ 10 | -shared -Wl,--discard-all -Wl,--no-undefined -Wl,-soname,$(notdir $@) \ 11 | $(LIB_SHARED) $(DEVMAPPEREVENT_LIBS) $(DEVMAPPER_LIBS) $(PTHREAD_LIBS) $(LIBS) 12 | -------------------------------------------------------------------------------- /patches/e2fsprogs/1.46.4/e2fsprogs-1.42.13-fix-build-cflags.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/516854 2 | 3 | --- e2fsprogs-1.42.13/configure 4 | +++ e2fsprogs-1.42.13/configure 5 | @@ -1315,6 +1315,8 @@ 6 | if test $cross_compiling = no; then 7 | BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H" 8 | BUILD_LDFLAGS="$LDFLAGS" 9 | +else 10 | + BUILD_CFLAGS="$INCLUDES" 11 | fi 12 | 13 | 14 | -------------------------------------------------------------------------------- /patches/e2fsprogs/1.46.4/e2fsprogs-1.44.6-parallel_install.patch: -------------------------------------------------------------------------------- 1 | --- e2fsprogs-1.44.6/Makefile.in 2 | +++ e2fsprogs-1.44.6/Makefile.in 3 | @@ -72,6 +72,7 @@ 4 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs 5 | 6 | install-libs: install-libs-recursive 7 | +install-libs-recursive:: | install-shlibs-libs-recursive 8 | 9 | uninstall-libs: uninstall-libs-recursive 10 | 11 | -------------------------------------------------------------------------------- /patches/e2fsprogs/1.47.0/e2fsprogs-1.42.13-fix-build-cflags.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/516854 2 | 3 | --- e2fsprogs-1.42.13/configure 4 | +++ e2fsprogs-1.42.13/configure 5 | @@ -1315,6 +1315,8 @@ 6 | if test $cross_compiling = no; then 7 | BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H" 8 | BUILD_LDFLAGS="$LDFLAGS" 9 | +else 10 | + BUILD_CFLAGS="$INCLUDES" 11 | fi 12 | 13 | 14 | -------------------------------------------------------------------------------- /patches/e2fsprogs/1.47.0/e2fsprogs-1.44.6-parallel_install.patch: -------------------------------------------------------------------------------- 1 | --- e2fsprogs-1.44.6/Makefile.in 2 | +++ e2fsprogs-1.44.6/Makefile.in 3 | @@ -72,6 +72,7 @@ 4 | uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs 5 | 6 | install-libs: install-libs-recursive 7 | +install-libs-recursive:: | install-shlibs-libs-recursive 8 | 9 | uninstall-libs: uninstall-libs-recursive 10 | 11 | -------------------------------------------------------------------------------- /patches/fuse/2.9.9/fuse-2.9.9-glibc-2.34.patch: -------------------------------------------------------------------------------- 1 | From 5a43d0f724c56f8836f3f92411e0de1b5f82db32 Mon Sep 17 00:00:00 2001 2 | From: Sam James 3 | Date: Sat, 24 Jul 2021 22:02:45 +0100 4 | Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix 5 | glibc-2.34+) 6 | 7 | closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since 8 | it's available in glibc 2.34+, we want to detect it and only define our 9 | fallback if the libc doesn't provide it. 10 | 11 | Bug: https://bugs.gentoo.org/803923 12 | Signed-off-by: Sam James 13 | --- 14 | configure.ac | 1 + 15 | util/ulockmgr_server.c | 6 ++++++ 16 | 2 files changed, 7 insertions(+) 17 | 18 | diff --git a/configure.ac b/configure.ac 19 | index 9946a0efa..a2d481aa9 100644 20 | --- a/configure.ac 21 | +++ b/configure.ac 22 | @@ -55,6 +55,7 @@ fi 23 | 24 | AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat]) 25 | AC_CHECK_FUNCS([posix_fallocate]) 26 | +AC_CHECK_FUNCS([closefrom]) 27 | AC_CHECK_MEMBERS([struct stat.st_atim]) 28 | AC_CHECK_MEMBERS([struct stat.st_atimespec]) 29 | 30 | diff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c 31 | index 273c7d923..a04dac5c6 100644 32 | --- a/util/ulockmgr_server.c 33 | +++ b/util/ulockmgr_server.c 34 | @@ -22,6 +22,10 @@ 35 | #include 36 | #include 37 | 38 | +#ifdef HAVE_CONFIG_H 39 | + #include "config.h" 40 | +#endif 41 | + 42 | struct message { 43 | unsigned intr : 1; 44 | unsigned nofd : 1; 45 | @@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp, 46 | return res; 47 | } 48 | 49 | +#if !defined(HAVE_CLOSEFROM) 50 | static int closefrom(int minfd) 51 | { 52 | DIR *dir = opendir("/proc/self/fd"); 53 | @@ -141,6 +146,7 @@ static int closefrom(int minfd) 54 | } 55 | return 0; 56 | } 57 | +#endif 58 | 59 | static void send_reply(int cfd, struct message *msg) 60 | { 61 | -------------------------------------------------------------------------------- /patches/kmod/29/kmod-29-static.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile.am 2 | +++ b/Makefile.am 3 | @@ -155,6 +155,8 @@ tools_kmod_SOURCES += \ 4 | tools/remove.c 5 | endif 6 | 7 | +tools_kmod_LDFLAGS = -all-static 8 | + 9 | tools_kmod_LDADD = \ 10 | shared/libshared.la \ 11 | libkmod/libkmod-internal.la 12 | 13 | -------------------------------------------------------------------------------- /patches/kmod/30/kmod-29-static.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile.am 2 | +++ b/Makefile.am 3 | @@ -155,6 +155,8 @@ tools_kmod_SOURCES += \ 4 | tools/remove.c 5 | endif 6 | 7 | +tools_kmod_LDFLAGS = -all-static 8 | + 9 | tools_kmod_LDADD = \ 10 | shared/libshared.la \ 11 | libkmod/libkmod-internal.la 12 | 13 | -------------------------------------------------------------------------------- /patches/kmod/31/kmod-29-static.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile.am 2 | +++ b/Makefile.am 3 | @@ -155,6 +155,8 @@ tools_kmod_SOURCES += \ 4 | tools/remove.c 5 | endif 6 | 7 | +tools_kmod_LDFLAGS = -all-static 8 | + 9 | tools_kmod_LDADD = \ 10 | shared/libshared.la \ 11 | libkmod/libkmod-internal.la 12 | 13 | -------------------------------------------------------------------------------- /patches/libaio/0.3.112/libaio-0.3.111-optional-werror.patch: -------------------------------------------------------------------------------- 1 | From ebe62b178f3e5fcde8a311e64aaffe62099204a5 Mon Sep 17 00:00:00 2001 2 | From: Mike Frysinger 3 | Date: Sun, 21 Apr 2019 12:44:26 +0200 4 | Subject: [PATCH] make -Werror into an optional flag 5 | 6 | This lets distros disable the flag as random errors might come up with 7 | different compiler flags and older/newer toolchain versions. 8 | 9 | Signed-off-by: Mike Frysinger 10 | --- 11 | harness/Makefile | 3 ++- 12 | 1 file changed, 2 insertions(+), 1 deletion(-) 13 | 14 | diff --git a/harness/Makefile b/harness/Makefile 15 | index f477737..a155c4b 100644 16 | --- a/harness/Makefile 17 | +++ b/harness/Makefile 18 | @@ -6,7 +6,8 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS) 19 | HARNESS_SRCS:=main.c 20 | # io_queue.c 21 | 22 | -CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) 23 | +CFLAGS_WERROR?=-Werror 24 | +CFLAGS+=-Wall $(CFLAGS_WERROR) -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) 25 | #-lpthread -lrt 26 | 27 | all: $(PROGS) 28 | -- 29 | 2.21.0 30 | 31 | -------------------------------------------------------------------------------- /patches/libaio/0.3.112/libaio-0.3.112-cppflags.patch: -------------------------------------------------------------------------------- 1 | respect env CPPFLAGS 2 | 3 | --- a/src/Makefile 4 | +++ b/src/Makefile 5 | @@ -2,8 +2,9 @@ prefix=/usr 6 | includedir=$(prefix)/include 7 | libdir=$(prefix)/lib 8 | 9 | -CFLAGS ?= -g -fomit-frame-pointer -O2 10 | -CFLAGS += -Wall -I. -fPIC 11 | +CFLAGS ?= -fomit-frame-pointer -O2 12 | +CFLAGS += -I. -fPIC 13 | +CFLAGS += $(CPPFLAGS) 14 | SO_CFLAGS=-shared $(CFLAGS) 15 | L_CFLAGS=$(CFLAGS) 16 | LINK_FLAGS= 17 | -------------------------------------------------------------------------------- /patches/libgcrypt/1.10.3/libgcrypt-1.9.4-no-fgrep-libgcrypt-config.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/868384 2 | --- a/src/libgcrypt-config.in 3 | +++ b/src/libgcrypt-config.in 4 | @@ -154,7 +154,7 @@ if test "$echo_cflags" = "yes"; then 5 | 6 | tmp="" 7 | for i in $includes $cflags_final; do 8 | - if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then 9 | + if echo "$tmp" | grep -F -v -- "$i" >/dev/null; then 10 | tmp="$tmp $i" 11 | fi 12 | done 13 | @@ -178,7 +178,7 @@ if test "$echo_libs" = "yes"; then 14 | 15 | tmp="" 16 | for i in $libdirs $libs_final; do 17 | - if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then 18 | + if echo "$tmp" | grep -F -v -- "$i" >/dev/null; then 19 | tmp="$tmp $i" 20 | fi 21 | done 22 | -------------------------------------------------------------------------------- /patches/libgcrypt/1.10.3/libgcrypt-multilib-syspath.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in 2 | index c052638..4c8ddc3 100644 3 | --- a/src/libgcrypt-config.in 4 | +++ b/src/libgcrypt-config.in 5 | @@ -154,9 +154,12 @@ if test "$echo_libs" = "yes"; then 6 | libs_final="$libs" 7 | 8 | # Set up `libdirs'. 9 | - if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then 10 | - libdirs="-L$libdir" 11 | - fi 12 | + case "$libdir" in 13 | + /usr/lib|/usr/lib64|/lib|/lib64) ;; 14 | + *) 15 | + libdirs="-L$libdir" 16 | + ;; 17 | + esac 18 | 19 | # Set up `libs_final'. 20 | libs_final="$libs_final $gpg_error_libs" 21 | -- 22 | 1.7.6.1 23 | 24 | -------------------------------------------------------------------------------- /patches/libgcrypt/1.10.3/libgcrypt-powerpc-darwin.patch: -------------------------------------------------------------------------------- 1 | Drop guard for CPU detection, configure won't get this wrong, and this 2 | check fails on some PPC platforms where these guards aren't set (due to 3 | different kernel/libc). 4 | 5 | --- a/src/hwf-ppc.c 6 | +++ b/src/hwf-ppc.c 7 | @@ -33,9 +33,6 @@ 8 | #include "g10lib.h" 9 | #include "hwf-common.h" 10 | 11 | -#if !defined (__powerpc__) && !defined (__powerpc64__) 12 | -# error Module build for wrong CPU. 13 | -#endif 14 | 15 | 16 | #if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ELF_AUX_INFO) && \ 17 | -------------------------------------------------------------------------------- /patches/libgcrypt/1.9.4/libgcrypt-1.92-use-pkg-config.patch: -------------------------------------------------------------------------------- 1 | https://lists.gnupg.org/pipermail/gnupg-devel/2018-October/033985.html 2 | 3 | --- a/m4/gpg-error.m4 4 | +++ b/m4/gpg-error.m4 5 | @@ -26,6 +26,7 @@ dnl is added to the gpg_config_script_warn variable. 6 | dnl 7 | AC_DEFUN([AM_PATH_GPG_ERROR], 8 | [ AC_REQUIRE([AC_CANONICAL_HOST]) 9 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10 | gpg_error_config_prefix="" 11 | dnl --with-libgpg-error-prefix=PFX is the preferred name for this option, 12 | dnl since that is consistent with how our three siblings use the directory/ 13 | @@ -41,6 +42,23 @@ AC_DEFUN([AM_PATH_GPG_ERROR], 14 | AC_ARG_WITH(gpg-error-prefix,, 15 | [gpg_error_config_prefix="$withval"]) 16 | 17 | + min_gpg_error_version=ifelse([$1], ,1.33,$1) 18 | + 19 | + gpg_error_use_config=yes 20 | + if test x"${enable_pkg_config}" = xyes; then 21 | + PKG_CHECK_MODULES( 22 | + [GPG_ERROR], 23 | + [gpg-error >= $min_gpg_error_version], 24 | + [ 25 | + gpg_error_use_config=no 26 | + PKG_CHECK_VAR([GPG_ERROR_MT_CFLAGS], [gpg-error], [mtcflags]) 27 | + PKG_CHECK_VAR([GPG_ERROR_MT_LIBS], [gpg-error], [mtlibs]) 28 | + ], 29 | + [:] 30 | + ) 31 | + fi 32 | + 33 | + if test x"${gpg_error_use_config}" = xyes; then 34 | if test x"${GPG_ERROR_CONFIG}" = x ; then 35 | if test x"${gpg_error_config_prefix}" != x ; then 36 | GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" 37 | @@ -61,7 +79,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], 38 | fi 39 | 40 | AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) 41 | - min_gpg_error_version=ifelse([$1], ,1.33,$1) 42 | ok=no 43 | 44 | if test "$prefix" = NONE ; then 45 | @@ -185,4 +202,5 @@ AC_DEFUN([AM_PATH_GPG_ERROR], 46 | AC_SUBST(GPG_ERROR_LIBS) 47 | AC_SUBST(GPG_ERROR_MT_CFLAGS) 48 | AC_SUBST(GPG_ERROR_MT_LIBS) 49 | + fi 50 | ]) 51 | 52 | -------------------------------------------------------------------------------- /patches/libgpg-error/1.43/libgpg-error-1.36-gpg-error-config.patch: -------------------------------------------------------------------------------- 1 | diff --git a/configure.ac b/configure.ac 2 | index e46b240..4606c31 100644 3 | --- a/configure.ac 4 | +++ b/configure.ac 5 | @@ -531,16 +531,6 @@ fi 6 | GPG_ERROR_CONFIG_HOST="$host" 7 | 8 | case "$includedir" in 9 | - /usr/include|/include) ;; 10 | - '${prefix}/include') 11 | - if test "$prefix" != / -a "$prefix" != /usr; then 12 | - if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then 13 | - GPG_ERROR_CONFIG_CFLAGS="-I$includedir" 14 | - else 15 | - GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" 16 | - fi 17 | - fi 18 | - ;; 19 | *) 20 | if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then 21 | GPG_ERROR_CONFIG_CFLAGS="-I$includedir" 22 | @@ -550,16 +540,6 @@ case "$includedir" in 23 | ;; 24 | esac 25 | case "$libdir" in 26 | - /usr/lib|/usr/lib64|/lib|/lib64) ;; 27 | - '${exec_prefix}/lib') 28 | - if test "$exec_prefix" = "NONE"; then 29 | - if test "$prefix" != / -a "$prefix" != /usr; then 30 | - GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" 31 | - fi 32 | - elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then 33 | - GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" 34 | - fi 35 | - ;; 36 | *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;; 37 | esac 38 | 39 | -------------------------------------------------------------------------------- /patches/libgpg-error/1.43/libgpg-error-1.37-remove_broken_check.patch: -------------------------------------------------------------------------------- 1 | This breaks our multilib builds: 2 | 3 | Confirm gpg-error-config works... no 4 | *** Please report to with gpg-error-config-test.log 5 | 6 | --- libgpg-error-1.37/src/Makefile.am 7 | +++ libgpg-error-1.37/src/Makefile.am 8 | @@ -338,14 +338,6 @@ 9 | cp gpg-error.h gpgrt.h 10 | 11 | gpg-error-config: gpgrt-config gpg-error-config-old 12 | - @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)" 13 | - @if ./gpg-error-config-test.sh --old-new; then \ 14 | - echo "good"; \ 15 | - else \ 16 | - echo "no"; \ 17 | - echo "*** Please report to with gpg-error-config-test.log"; \ 18 | - exit 1; \ 19 | - fi 20 | cp gpg-error-config-old $@ 21 | 22 | install-data-local: 23 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-001-example.conf.in.patch: -------------------------------------------------------------------------------- 1 | --- LVM2.2.02.178/conf/example.conf.in 2 | +++ LVM2.2.02.178/conf/example.conf.in 3 | @@ -128,6 +128,9 @@ 4 | # Example 5 | # Accept every block device: 6 | # filter = [ "a|.*/|" ] 7 | + # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel 8 | + # noise when you probed while not available. 9 | + filter = [ "r|/dev/nbd.*|", "a/.*/" ] 10 | # Reject the cdrom drive: 11 | # filter = [ "r|/dev/cdrom|" ] 12 | # Work with just loopback devices, e.g. for testing: 13 | @@ -704,7 +707,8 @@ 14 | # Configuration option global/fallback_to_lvm1. 15 | # This setting is no longer used. 16 | # This configuration option has an automatic default value. 17 | - # fallback_to_lvm1 = 0 18 | + # Gentoo: the LVM tools are a seperate package. 19 | + fallback_to_lvm1 = 0 20 | 21 | # Configuration option global/format. 22 | # This setting is no longer used. 23 | @@ -1508,7 +1512,7 @@ 24 | 25 | # Configuration section metadata. 26 | # This configuration section has an automatic default value. 27 | -# metadata { 28 | +metadata { 29 | 30 | # Configuration option metadata/check_pv_device_sizes. 31 | # Check device sizes are not smaller than corresponding PV sizes. 32 | @@ -1553,7 +1557,8 @@ 33 | # 34 | # This configuration option is advanced. 35 | # This configuration option has an automatic default value. 36 | - # pvmetadatacopies = 1 37 | + # Gentoo: enable for data safety, but PV resize is then disabled. 38 | + # pvmetadatacopies = 2 39 | 40 | # Configuration option metadata/vgmetadatacopies. 41 | # Number of copies of metadata to maintain for each VG. 42 | @@ -1608,7 +1613,7 @@ 43 | # 44 | # This configuration option is advanced. 45 | # This configuration option does not have a default value defined. 46 | -# } 47 | +} 48 | 49 | # Configuration section report. 50 | # LVM report command output formatting. 51 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-002-always-make-static-libdm.patch: -------------------------------------------------------------------------------- 1 | diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in 2 | --- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in 2010-04-09 14:42:48.000000000 -0700 3 | +++ LVM2.2.02.63/daemons/dmeventd/Makefile.in 2010-04-19 11:53:27.000000000 -0700 4 | @@ -28,11 +28,12 @@ 5 | INSTALL_LIB_TARGETS = install_lib_dynamic 6 | 7 | LIB_NAME = libdevmapper-event 8 | +LIB_STATIC = $(LIB_NAME).a 9 | +INSTALL_LIB_TARGETS += install_lib_static 10 | +TARGETS += $(LIB_STATIC) 11 | ifeq ("@STATIC_LINK@", "yes") 12 | - LIB_STATIC = $(LIB_NAME).a 13 | - TARGETS += $(LIB_STATIC) dmeventd.static 14 | + TARGETS += dmeventd.static 15 | INSTALL_DMEVENTD_TARGETS += install_dmeventd_static 16 | - INSTALL_LIB_TARGETS += install_lib_static 17 | endif 18 | 19 | LIB_VERSION = $(LIB_VERSION_DM) 20 | diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in 21 | --- LVM2.2.02.63.orig/libdm/Makefile.in 2010-04-09 14:42:51.000000000 -0700 22 | +++ LVM2.2.02.63/libdm/Makefile.in 2010-04-19 11:52:20.000000000 -0700 23 | @@ -34,8 +34,8 @@ 24 | 25 | INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir) 26 | 27 | -ifeq ("@STATIC_LINK@", "yes") 28 | LIB_STATIC = $(interface)/libdevmapper.a 29 | +ifeq ("@STATIC_LINK@", "yes") 30 | endif 31 | 32 | LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX) 33 | @@ -63,8 +63,8 @@ 34 | 35 | INSTALL_TYPE = install_dynamic 36 | 37 | -ifeq ("@STATIC_LINK@", "yes") 38 | INSTALL_TYPE += install_static 39 | +ifeq ("@STATIC_LINK@", "yes") 40 | endif 41 | 42 | ifeq ("@PKGCONFIG@", "yes") 43 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-003-lvm2create_initrd.patch: -------------------------------------------------------------------------------- 1 | --- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000 2 | +++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000 3 | @@ -54,7 +54,9 @@ 4 | DEVRAM=/tmp/initrd.$$ 5 | 6 | # set defaults 7 | -BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"} 8 | +LVM=`which lvm.static` 9 | +LVM=${LVM:-"`which lvm`"} 10 | +BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"} 11 | BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"} 12 | BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"} 13 | MAKEDEV=${MAKEDEV:-"debian"} 14 | @@ -119,6 +121,10 @@ 15 | echo "$PRE Mounting /proc" 16 | mount -t proc none /proc 17 | 18 | +# We need /sys for lvm 19 | +echo "$PRE Mounting /sys" 20 | +mount -t sysfs sysfs /sys 21 | + 22 | # plug in modules listed in /etc/modules 23 | if [ -f /etc/modules ]; then 24 | echo -n "$PRE plugging in kernel modules:" 25 | @@ -179,26 +185,29 @@ 26 | # run a shell if we're passed lvm2rescue on commandline 27 | grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1 28 | if [ $? -eq 0 ]; then 29 | - lvm vgchange --ignorelockingfailure -P -a y 30 | + $LVM vgchange --ignorelockingfailure -P -a y 31 | do_shell 32 | else 33 | - lvm vgchange --ignorelockingfailure -a y 34 | + $LVM vgchange --ignorelockingfailure -a y 35 | fi 36 | 37 | echo "$PRE Mounting root filesystem $rootvol ro" 38 | mkdir /rootvol 39 | if ! mount -t auto -o ro $rootvol /rootvol; then 40 | - echo "\t*FAILED*"; 41 | + echo "\t*FAILED TRYING TO MOUNT ROOTVOL*"; 42 | do_shell 43 | fi 44 | 45 | echo "$PRE Umounting /proc" 46 | umount /proc 47 | 48 | +echo "$PRE Umounting /sys" 49 | +umount /sys 50 | + 51 | echo "$PRE Changing roots" 52 | cd /rootvol 53 | if ! pivot_root . initrd ; then 54 | - echo "\t*FAILED*" 55 | + echo "\t*FAILED PIVOT TO NEW ROOT*" 56 | do_shell 57 | fi 58 | 59 | @@ -356,7 +365,7 @@ 60 | fi 61 | 62 | verbose "creating basic set of directories in $TMPMNT" 63 | -(cd $TMPMNT; mkdir bin dev etc lib proc sbin var) 64 | +(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var) 65 | if [ $? -ne 0 ]; then 66 | echo "$cmd -- ERROR creating directories in $TMPMNT" 67 | cleanup 1 68 | @@ -499,4 +508,3 @@ 69 | FINALTXT 70 | 71 | cleanup 0 72 | - 73 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-004-createinitrd.patch: -------------------------------------------------------------------------------- 1 | X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331 2 | X-Gentoo-Bug: 301331 3 | 4 | diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 5 | --- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000 6 | +++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000 7 | @@ -469,9 +469,9 @@ 8 | rmdir $TMPMNT/lost+found 9 | 10 | echo "$cmd -- ummounting ram disk" 11 | -umount $DEVRAM 12 | +umount $TMPMNT 13 | if [ $? -ne 0 ]; then 14 | - echo "$cmd -- ERROR umounting $DEVRAM" 15 | + echo "$cmd -- ERROR umounting $TMPMNT" 16 | cleanup 1 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-005-locale-muck.patch: -------------------------------------------------------------------------------- 1 | --- LVM2/make.tmpl.in 2 | +++ LVM2/make.tmpl.in 3 | @@ -395,7 +395,7 @@ 4 | ( cat $(srcdir)/.exported_symbols; \ 5 | if test x$(EXPORTED_HEADER) != x; then \ 6 | $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \ 7 | - $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ 8 | + LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ 9 | fi \ 10 | ) > $@ 11 | 12 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-006-asneeded.patch: -------------------------------------------------------------------------------- 1 | http://bugs.gentoo.org/330255 2 | 3 | liblvm2app.so: undefined reference to `floor' 4 | 5 | --- LVM2.2.02.178/liblvm/Makefile.in 6 | +++ LVM2.2.02.178/liblvm/Makefile.in 7 | @@ -43,7 +43,7 @@ 8 | include $(top_builddir)/make.tmpl 9 | 10 | LDFLAGS += -L$(top_builddir)/lib -L$(top_builddir)/daemons/dmeventd 11 | -LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio 12 | +LIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio -lm 13 | 14 | .PHONY: install_dynamic install_static install_include install_pkgconfig 15 | 16 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-007-dynamic-static-ldflags.patch: -------------------------------------------------------------------------------- 1 | --- LVM2.2.02.178/configure.ac 2 | +++ LVM2.2.02.178/configure.ac 3 | @@ -33,6 +33,7 @@ 4 | CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" 5 | # equivalent to -rdynamic 6 | ELDFLAGS="-Wl,--export-dynamic" 7 | + STATIC_LDFLAGS="-Wl,--no-export-dynamic" 8 | # FIXME Generate list and use --dynamic-list=.dlopen.sym 9 | CLDWHOLEARCHIVE="-Wl,-whole-archive" 10 | CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" 11 | @@ -2042,6 +2043,7 @@ 12 | AC_SUBST(SYSTEMD_LIBS) 13 | AC_SUBST(SNAPSHOTS) 14 | AC_SUBST(STATICDIR) 15 | +AC_SUBST(STATIC_LDFLAGS) 16 | AC_SUBST(STATIC_LINK) 17 | AC_SUBST(TESTSUITE_DATA) 18 | AC_SUBST(THIN) 19 | --- LVM2.2.02.178/daemons/dmeventd/Makefile.in 20 | +++ LVM2.2.02.178/daemons/dmeventd/Makefile.in 21 | @@ -64,7 +64,7 @@ 22 | -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) 23 | 24 | dmeventd.static: $(LIB_STATIC) dmeventd.o $(interfacebuilddir)/libdevmapper.a 25 | - $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ 26 | + $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ 27 | -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) 28 | 29 | ifeq ("@PKGCONFIG@", "yes") 30 | --- LVM2.2.02.178/make.tmpl.in 31 | +++ LVM2.2.02.178/make.tmpl.in 32 | @@ -64,6 +64,7 @@ 33 | # FIXME set this only where it's needed, not globally? 34 | CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ 35 | LDFLAGS ?= @LDFLAGS@ 36 | +STATIC_LDFLAGS += @STATIC_LDFLAGS@ 37 | CLDFLAGS += @CLDFLAGS@ 38 | ELDFLAGS += @ELDFLAGS@ 39 | LDDEPS += @LDDEPS@ 40 | --- LVM2.2.02.178/tools/Makefile.in 41 | +++ LVM2.2.02.178/tools/Makefile.in 42 | @@ -129,7 +129,7 @@ 43 | 44 | dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a 45 | @echo " [CC] $@" 46 | - $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ 47 | + $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ 48 | -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS) 49 | 50 | all: device-mapper 51 | @@ -159,7 +159,7 @@ 52 | 53 | lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacebuilddir)/libdevmapper.a 54 | @echo " [CC] $@" 55 | - $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ 56 | + $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ 57 | $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) 58 | 59 | liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o 60 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-009-pthread-pkgconfig.patch: -------------------------------------------------------------------------------- 1 | --- LVM2.2.02.176/libdm/libdevmapper.pc.in 2 | +++ LVM2.2.02.176/libdm/libdevmapper.pc.in 3 | @@ -9,4 +9,4 @@ 4 | Cflags: -I${includedir} 5 | Libs: -L${libdir} -ldevmapper 6 | Requires.private: @SELINUX_PC@ @UDEV_PC@ 7 | -Libs.private: -lm @RT_LIBS@ 8 | +Libs.private: -lm @RT_LIBS@ @PTHREAD_LIBS@ 9 | --- LVM2.2.02.176/tools/Makefile.in 10 | +++ LVM2.2.02.176/tools/Makefile.in 11 | @@ -93,6 +93,7 @@ 12 | INSTALL_LVM_TARGETS += install_tools_static 13 | INSTALL_DMSETUP_TARGETS += install_dmsetup_static 14 | INSTALL_CMDLIB_TARGETS += install_cmdlib_static 15 | + STATIC_LIBS += @PTHREAD_LIBS@ 16 | endif 17 | 18 | LVMLIBS = $(LVMINTERNAL_LIBS) -ldevmapper 19 | @@ -118,6 +119,10 @@ 20 | 21 | include $(top_builddir)/make.tmpl 22 | 23 | +ifeq ("@STATIC_LINK@", "yes") 24 | + STATIC_LIBS += @PTHREAD_LIBS@ 25 | +endif 26 | + 27 | device-mapper: $(TARGETS_DM) 28 | 29 | CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS) 30 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-010-static-libm.patch: -------------------------------------------------------------------------------- 1 | diff --git a/make.tmpl.in b/make.tmpl.in 2 | index a40eaaa15..7eea943aa 100644 3 | --- a/make.tmpl.in 4 | +++ b/make.tmpl.in 5 | @@ -53,7 +53,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile 6 | 7 | LIBS = @LIBS@ 8 | # Extra libraries always linked with static binaries 9 | -STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) 10 | +STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS) 11 | DEFS += @DEFS@ 12 | # FIXME set this only where it's needed, not globally? 13 | CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ 14 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-011-HPPA-no-O_DIRECT.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/device/dev-io.c 2 | +++ b/lib/device/dev-io.c 3 | @@ -505,7 +505,9 @@ 4 | dev->flags |= DEV_NOT_O_NOATIME; 5 | if ((dev->fd = open(name, flags, 0777)) >= 0) { 6 | log_debug_devs("%s: Not using O_NOATIME", name); 7 | +#ifdef O_DIRECT_SUPPORT 8 | goto opened; 9 | +#endif 10 | } 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-012-mallinfo.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/mm/memlock.c.orig 2015-03-09 11:18:41.560028850 -0100 2 | +++ b/lib/mm/memlock.c 2015-03-09 11:19:54.504373309 -0100 3 | @@ -137,7 +137,7 @@ 4 | 5 | static void _allocate_memory(void) 6 | { 7 | -#ifndef VALGRIND_POOL 8 | +#if !defined(VALGRIND_POOL) && defined(__GLIBC__) 9 | void *stack_mem; 10 | struct rlimit limit; 11 | int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks; 12 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-013-fix-stdio-usage.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/lvmcmdline.c 2 | +++ b/tools/lvmcmdline.c 3 | @@ -1252,7 +1252,7 @@ 4 | int err = is_valid_fd(STDERR_FILENO); 5 | 6 | if (!is_valid_fd(STDIN_FILENO) && 7 | - !(stdin = fopen(_PATH_DEVNULL, "r"))) { 8 | + !freopen(_PATH_DEVNULL, "r", stdin)) { 9 | if (err) 10 | perror("stdin stream open"); 11 | else 12 | @@ -1262,7 +1262,7 @@ 13 | } 14 | 15 | if (!is_valid_fd(STDOUT_FILENO) && 16 | - !(stdout = fopen(_PATH_DEVNULL, "w"))) { 17 | + !freopen(_PATH_DEVNULL, "w", stdout)) { 18 | if (err) 19 | perror("stdout stream open"); 20 | /* else no stdout */ 21 | @@ -1270,7 +1270,7 @@ 22 | } 23 | 24 | if (!is_valid_fd(STDERR_FILENO) && 25 | - !(stderr = fopen(_PATH_DEVNULL, "w"))) { 26 | + !freopen(_PATH_DEVNULL, "w", stderr)) { 27 | printf("stderr stream open: %s\n", 28 | strerror(errno)); 29 | return 0; 30 | --- ./lib/commands/toolcontext.c.orig 31 | +++ ./lib/commands/toolcontext.c 32 | @@ -1860,7 +1860,7 @@ 33 | /* FIXME Make this configurable? */ 34 | reset_lvm_errno(1); 35 | 36 | -#ifndef VALGRIND_POOL 37 | +#if !defined(VALGRIND_POOL) && defined(__GLIBC__) 38 | /* Set in/out stream buffering before glibc */ 39 | if (set_buffering) { 40 | /* Allocate 2 buffers */ 41 | @@ -2241,7 +2241,7 @@ 42 | 43 | if (cmd->pending_delete_mem) 44 | dm_pool_destroy(cmd->pending_delete_mem); 45 | -#ifndef VALGRIND_POOL 46 | +#if !defined(VALGRIND_POOL) && defined(__GLIBC__) 47 | if (cmd->linebuffer) { 48 | /* Reset stream buffering to defaults */ 49 | if (is_valid_fd(STDIN_FILENO) && 50 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-014-make-malloc-realloc-check-optional.patch: -------------------------------------------------------------------------------- 1 | Breaks cross-compilation 2 | 3 | --- a/configure.ac 4 | +++ b/configure.ac 5 | @@ -154,15 +154,16 @@ AC_FUNC_CLOSEDIR_VOID 6 | AC_FUNC_CHOWN 7 | AC_FUNC_FORK 8 | AC_FUNC_LSTAT 9 | -AC_FUNC_MALLOC 10 | AC_FUNC_MEMCMP 11 | AC_FUNC_MKTIME 12 | AC_FUNC_MMAP 13 | -AC_FUNC_REALLOC 14 | AC_FUNC_STAT 15 | AC_FUNC_STRTOD 16 | AC_FUNC_VPRINTF 17 | 18 | +# Optional functions 19 | +AC_CHECK_FUNCS([malloc realloc]) 20 | + 21 | ################################################################################ 22 | dnl -- Disable dependency tracking 23 | AC_MSG_CHECKING(whether to enable dependency tracking) 24 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-015-mksh_build.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/686652 2 | 3 | --- LVM2.2.02.184/tools/Makefile.in 4 | +++ LVM2.2.02.184/tools/Makefile.in 5 | @@ -220,6 +220,6 @@ 6 | echo "/* Do not edit. This file is generated by the Makefile. */" && \ 7 | echo -en "const char _command_input[] =\n\n\"" && \ 8 | $(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \ 9 | - echo "\\n\";" \ 10 | + printf "%s\n" "\\n\";" \ 11 | ) > $@ 12 | 13 | $(SOURCES:%.c=%.d) $(SOURCES2:%.c=%.d): command-lines-input.h command-count.h cmds.h 14 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-016-implement-libc-specific-reopen_stream.patch: -------------------------------------------------------------------------------- 1 | diff --git a/lib/log/log.c b/lib/log/log.c 2 | index 79fbd7a..0999d10 100644 3 | --- a/lib/log/log.c 4 | +++ b/lib/log/log.c 5 | @@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_ 6 | * Close and reopen standard stream on file descriptor fd. 7 | */ 8 | int reopen_standard_stream(FILE **stream, const char *mode) 9 | +#ifdef __GLIBC__ 10 | { 11 | int fd, fd_copy, new_fd; 12 | const char *name; 13 | @@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) 14 | *stream = new_stream; 15 | return 1; 16 | } 17 | +#else 18 | +{ 19 | + return (freopen(NULL, mode, *stream) != NULL); 20 | +} 21 | +#endif 22 | 23 | void init_log_fn(lvm2_log_fn_t log_fn) 24 | { 25 | -------------------------------------------------------------------------------- /patches/lvm/2.02.188/lvm2-017-udev_remove_unsupported_option.patch: -------------------------------------------------------------------------------- 1 | From f98f79a047dd1c4980008e0ed6c9ad4e18596cdc Mon Sep 17 00:00:00 2001 2 | From: Peter Rajnoha 3 | Date: Tue, 13 Aug 2019 15:18:30 +0200 4 | Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule 5 | 6 | The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216, 7 | that is ~5 years ago. 8 | 9 | Since systemd/udev version 243, there's a new message printed if unsupported 10 | OPTIONS value is used: 11 | 12 | Invalid value for OPTIONS key, ignoring: 'event_timeout=180' 13 | 14 | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666 15 | --- 16 | udev/11-dm-lvm.rules.in | 2 -- 17 | 1 file changed, 2 deletions(-) 18 | 19 | diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in 20 | index 91cb991df9..7c589943b7 100644 21 | --- a/udev/11-dm-lvm.rules.in 22 | +++ b/udev/11-dm-lvm.rules.in 23 | @@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE 24 | 25 | ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end" 26 | 27 | -OPTIONS+="event_timeout=180" 28 | - 29 | # Do not create symlinks for inappropriate subdevices. 30 | ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable" 31 | ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable" 32 | -- 33 | 2.24.0 34 | 35 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-001-example.conf.in.patch: -------------------------------------------------------------------------------- 1 | Add Gentoo specific changes 2 | 3 | --- a/conf/example.conf.in 4 | +++ b/conf/example.conf.in 5 | @@ -170,6 +170,9 @@ 6 | # Example 7 | # Accept every block device: 8 | # filter = [ "a|.*|" ] 9 | + # Gentoo: we exclude /dev/nbd by default, because it makes a lot of kernel 10 | + # noise when you probed while not available. 11 | + filter = [ "r|/dev/nbd.*|", "a|.*|" ] 12 | # Reject the cdrom drive: 13 | # filter = [ "r|/dev/cdrom|" ] 14 | # Work with just loopback devices, e.g. for testing: 15 | @@ -1843,7 +1846,7 @@ 16 | 17 | # Configuration section metadata. 18 | # This configuration section has an automatic default value. 19 | -# metadata { 20 | +metadata { 21 | 22 | # Configuration option metadata/check_pv_device_sizes. 23 | # Check device sizes are not smaller than corresponding PV sizes. 24 | @@ -1888,7 +1891,8 @@ 25 | # 26 | # This configuration option is advanced. 27 | # This configuration option has an automatic default value. 28 | - # pvmetadatacopies = 1 29 | + # Gentoo: enable for data safety, but PV resize is then disabled. 30 | + # pvmetadatacopies = 2 31 | 32 | # Configuration option metadata/vgmetadatacopies. 33 | # Number of copies of metadata to maintain for each VG. 34 | @@ -1931,7 +1935,7 @@ 35 | # This configuration option is advanced. 36 | # This configuration option has an automatic default value. 37 | # stripesize = 64 38 | -# } 39 | +} 40 | 41 | # Configuration section report. 42 | # LVM report command output formatting. 43 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-002-always-make-static-libdm.patch: -------------------------------------------------------------------------------- 1 | diff -Nuar --exclude '*~' LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in LVM2.2.02.63/daemons/dmeventd/Makefile.in 2 | --- LVM2.2.02.63.orig/daemons/dmeventd/Makefile.in 2010-04-09 14:42:48.000000000 -0700 3 | +++ LVM2.2.02.63/daemons/dmeventd/Makefile.in 2010-04-19 11:53:27.000000000 -0700 4 | @@ -28,11 +28,12 @@ 5 | INSTALL_LIB_TARGETS = install_lib_dynamic 6 | 7 | LIB_NAME = libdevmapper-event 8 | +LIB_STATIC = $(LIB_NAME).a 9 | +INSTALL_LIB_TARGETS += install_lib_static 10 | +TARGETS += $(LIB_STATIC) 11 | ifeq ("@STATIC_LINK@", "yes") 12 | - LIB_STATIC = $(LIB_NAME).a 13 | - TARGETS += $(LIB_STATIC) dmeventd.static 14 | + TARGETS += dmeventd.static 15 | INSTALL_DMEVENTD_TARGETS += install_dmeventd_static 16 | - INSTALL_LIB_TARGETS += install_lib_static 17 | endif 18 | 19 | LIB_VERSION = $(LIB_VERSION_DM) 20 | diff -Nuar --exclude '*~' LVM2.2.02.63.orig/libdm/Makefile.in LVM2.2.02.63/libdm/Makefile.in 21 | --- LVM2.2.02.63.orig/libdm/Makefile.in 2010-04-09 14:42:51.000000000 -0700 22 | +++ LVM2.2.02.63/libdm/Makefile.in 2010-04-19 11:52:20.000000000 -0700 23 | @@ -34,8 +34,8 @@ 24 | 25 | INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir) 26 | 27 | -ifeq ("@STATIC_LINK@", "yes") 28 | LIB_STATIC = $(interface)/libdevmapper.a 29 | +ifeq ("@STATIC_LINK@", "yes") 30 | endif 31 | 32 | LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX) 33 | @@ -63,8 +63,8 @@ 34 | 35 | INSTALL_TYPE = install_dynamic 36 | 37 | -ifeq ("@STATIC_LINK@", "yes") 38 | INSTALL_TYPE += install_static 39 | +ifeq ("@STATIC_LINK@", "yes") 40 | endif 41 | 42 | ifeq ("@PKGCONFIG@", "yes") 43 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-003-lvm2create_initrd.patch: -------------------------------------------------------------------------------- 1 | --- LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd.orig 2006-11-21 22:41:56.000000000 +0000 2 | +++ LVM2.2.02.56/scripts/lvm2create_initrd/lvm2create_initrd 2009-12-26 01:47:08.025224602 +0000 3 | @@ -54,7 +54,9 @@ 4 | DEVRAM=/tmp/initrd.$$ 5 | 6 | # set defaults 7 | -BINFILES=${BINFILES:-"`which lvm` `which bash` `which busybox` `which pivot_root`"} 8 | +LVM=`which lvm.static` 9 | +LVM=${LVM:-"`which lvm`"} 10 | +BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"} 11 | BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"} 12 | BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"} 13 | MAKEDEV=${MAKEDEV:-"debian"} 14 | @@ -119,6 +121,10 @@ 15 | echo "$PRE Mounting /proc" 16 | mount -t proc none /proc 17 | 18 | +# We need /sys for lvm 19 | +echo "$PRE Mounting /sys" 20 | +mount -t sysfs sysfs /sys 21 | + 22 | # plug in modules listed in /etc/modules 23 | if [ -f /etc/modules ]; then 24 | echo -n "$PRE plugging in kernel modules:" 25 | @@ -179,26 +185,29 @@ 26 | # run a shell if we're passed lvm2rescue on commandline 27 | grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1 28 | if [ $? -eq 0 ]; then 29 | - lvm vgchange --ignorelockingfailure -P -a y 30 | + $LVM vgchange --ignorelockingfailure -P -a y 31 | do_shell 32 | else 33 | - lvm vgchange --ignorelockingfailure -a y 34 | + $LVM vgchange --ignorelockingfailure -a y 35 | fi 36 | 37 | echo "$PRE Mounting root filesystem $rootvol ro" 38 | mkdir /rootvol 39 | if ! mount -t auto -o ro $rootvol /rootvol; then 40 | - echo "\t*FAILED*"; 41 | + echo "\t*FAILED TRYING TO MOUNT ROOTVOL*"; 42 | do_shell 43 | fi 44 | 45 | echo "$PRE Umounting /proc" 46 | umount /proc 47 | 48 | +echo "$PRE Umounting /sys" 49 | +umount /sys 50 | + 51 | echo "$PRE Changing roots" 52 | cd /rootvol 53 | if ! pivot_root . initrd ; then 54 | - echo "\t*FAILED*" 55 | + echo "\t*FAILED PIVOT TO NEW ROOT*" 56 | do_shell 57 | fi 58 | 59 | @@ -356,7 +365,7 @@ 60 | fi 61 | 62 | verbose "creating basic set of directories in $TMPMNT" 63 | -(cd $TMPMNT; mkdir bin dev etc lib proc sbin var) 64 | +(cd $TMPMNT; mkdir bin dev etc lib proc sbin sys var) 65 | if [ $? -ne 0 ]; then 66 | echo "$cmd -- ERROR creating directories in $TMPMNT" 67 | cleanup 1 68 | @@ -499,4 +508,3 @@ 69 | FINALTXT 70 | 71 | cleanup 0 72 | - 73 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-004-createinitrd.patch: -------------------------------------------------------------------------------- 1 | X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=301331 2 | X-Gentoo-Bug: 301331 3 | 4 | diff -Nuar LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 5 | --- LVM2.2.02.67.orig/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:44:34.182980475 +0000 6 | +++ LVM2.2.02.67/scripts/lvm2create_initrd/lvm2create_initrd 2010-06-07 18:51:27.636312899 +0000 7 | @@ -469,9 +469,9 @@ 8 | rmdir $TMPMNT/lost+found 9 | 10 | echo "$cmd -- ummounting ram disk" 11 | -umount $DEVRAM 12 | +umount $TMPMNT 13 | if [ $? -ne 0 ]; then 14 | - echo "$cmd -- ERROR umounting $DEVRAM" 15 | + echo "$cmd -- ERROR umounting $TMPMNT" 16 | cleanup 1 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-005-locale-muck.patch: -------------------------------------------------------------------------------- 1 | --- LVM2/make.tmpl.in 2 | +++ LVM2/make.tmpl.in 3 | @@ -395,7 +395,7 @@ 4 | ( cat $(srcdir)/.exported_symbols; \ 5 | if test x$(EXPORTED_HEADER) != x; then \ 6 | $(CC) -E -P $(INCLUDES) $(DEFS) $(EXPORTED_HEADER) | \ 7 | - $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ 8 | + LC_ALL=C $(SED) -ne "/^typedef|}/!s/.*[ *]\($(EXPORTED_FN_PREFIX)_[a-z0-9_]*\)(.*/\1/p"; \ 9 | fi \ 10 | ) > $@ 11 | 12 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-011-HPPA-no-O_DIRECT.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/device/dev-io.c 2 | +++ b/lib/device/dev-io.c 3 | @@ -505,7 +505,9 @@ 4 | dev->flags |= DEV_NOT_O_NOATIME; 5 | if ((dev->fd = open(name, flags, 0777)) >= 0) { 6 | log_debug_devs("%s: Not using O_NOATIME", name); 7 | +#ifdef O_DIRECT_SUPPORT 8 | goto opened; 9 | +#endif 10 | } 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-013-fix-stdio-usage.patch: -------------------------------------------------------------------------------- 1 | diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c 2 | index 2256352..0408808 100644 3 | --- a/lib/commands/toolcontext.c 4 | +++ b/lib/commands/toolcontext.c 5 | @@ -1667,7 +1667,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd, 6 | /* FIXME Make this configurable? */ 7 | reset_lvm_errno(1); 8 | 9 | -#ifndef VALGRIND_POOL 10 | +#if !defined(VALGRIND_POOL) && defined(__GLIBC__) 11 | /* Set in/out stream buffering before glibc */ 12 | if (set_buffering 13 | #ifdef SYS_gettid 14 | @@ -2043,7 +2043,7 @@ void destroy_toolcontext(struct cmd_context *cmd) 15 | dm_hash_destroy(cmd->cft_def_hash); 16 | 17 | dm_device_list_destroy(&cmd->cache_dm_devs); 18 | -#ifndef VALGRIND_POOL 19 | +#if !defined(VALGRIND_POOL) && defined(__GLIBC__) 20 | if (cmd->linebuffer) { 21 | /* Reset stream buffering to defaults */ 22 | if (is_valid_fd(STDIN_FILENO) && 23 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-014-make-malloc-realloc-check-optional.patch: -------------------------------------------------------------------------------- 1 | Breaks cross-compilation 2 | 3 | --- a/configure.ac 4 | +++ b/configure.ac 5 | @@ -154,15 +154,16 @@ AC_FUNC_CLOSEDIR_VOID 6 | AC_FUNC_CHOWN 7 | AC_FUNC_FORK 8 | AC_FUNC_LSTAT 9 | -AC_FUNC_MALLOC 10 | AC_FUNC_MEMCMP 11 | AC_FUNC_MKTIME 12 | AC_FUNC_MMAP 13 | -AC_FUNC_REALLOC 14 | AC_FUNC_STAT 15 | AC_FUNC_STRTOD 16 | AC_FUNC_VPRINTF 17 | 18 | +# Optional functions 19 | +AC_CHECK_FUNCS([malloc realloc]) 20 | + 21 | ################################################################################ 22 | dnl -- Disable dependency tracking 23 | AC_MSG_CHECKING(whether to enable dependency tracking) 24 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-016-implement-libc-specific-reopen_stream.patch: -------------------------------------------------------------------------------- 1 | diff --git a/lib/log/log.c b/lib/log/log.c 2 | index 79fbd7a..0999d10 100644 3 | --- a/lib/log/log.c 4 | +++ b/lib/log/log.c 5 | @@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_ 6 | * Close and reopen standard stream on file descriptor fd. 7 | */ 8 | int reopen_standard_stream(FILE **stream, const char *mode) 9 | +#ifdef __GLIBC__ 10 | { 11 | int fd, fd_copy, new_fd; 12 | const char *name; 13 | @@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) 14 | *stream = new_stream; 15 | return 1; 16 | } 17 | +#else 18 | +{ 19 | + return (freopen(NULL, mode, *stream) != NULL); 20 | +} 21 | +#endif 22 | 23 | void init_log_fn(lvm2_log_fn_t log_fn) 24 | { 25 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-018-autoconf-2.72-egrep.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/920798 2 | https://gitlab.com/lvmteam/lvm2/-/merge_requests/4 3 | 4 | From 39cb34e56b8c04b4d652eb9dbd643e10a05ff21c Mon Sep 17 00:00:00 2001 5 | From: Kai Kang 6 | Date: Mon, 6 Nov 2023 16:44:41 +0800 7 | Subject: [PATCH] configure.ac: check egrep 8 | 9 | The macro AC_HEADER_STDC which requires AC_PROG_EGREP has been removed 10 | from configure.ac, then it fails to substitute '@EGREP@': 11 | 12 | | [GEN] command-lines-input.h 13 | | /bin/bash: line 2: @EGREP@: command not found 14 | | [GEN] command-count.h 15 | 16 | Call AC_PROG_EGREP to fix the error. 17 | 18 | Signed-off-by: Kai Kang 19 | --- a/configure.ac 20 | +++ b/configure.ac 21 | @@ -78,6 +78,7 @@ AC_PROG_LN_S 22 | AC_PROG_MAKE_SET 23 | AC_PROG_MKDIR_P 24 | AC_PROG_RANLIB 25 | +AC_PROG_EGREP 26 | AC_CHECK_TOOL([READELF], [readelf]) 27 | AC_CHECK_TOOL(AR, ar) 28 | AC_PATH_TOOL(CFLOW_CMD, cflow) 29 | -- 30 | GitLab 31 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-019-musl-basename.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/937239 2 | https://github.com/lvmteam/lvm2/commit/f98d2ffe8753895c84160a7abce4223bd127cd9e 3 | 4 | From f98d2ffe8753895c84160a7abce4223bd127cd9e Mon Sep 17 00:00:00 2001 5 | From: Zdenek Kabelac 6 | Date: Wed, 27 Mar 2024 00:28:14 +0100 7 | Subject: [PATCH] device_id: use dm_basename 8 | 9 | Avoid problems for other libc like muslc and use dm_basename. 10 | 11 | Prototype for basename has been removed from string.h from latest musl [1] 12 | compilers e.g. clang-18 flags the absense of prototype as error. therefore 13 | include libgen.h for providing it. 14 | 15 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 16 | 17 | Reported-by: Khem Raj 18 | --- 19 | lib/device/device_id.c | 2 +- 20 | 1 file changed, 1 insertion(+), 1 deletion(-) 21 | 22 | diff --git a/lib/device/device_id.c b/lib/device/device_id.c 23 | index 7d67a1cb7..200d39432 100644 24 | --- a/lib/device/device_id.c 25 | +++ b/lib/device/device_id.c 26 | @@ -740,7 +740,7 @@ static int _dev_read_sys_serial(struct cmd_context *cmd, struct device *dev, 27 | int ret; 28 | 29 | /* /dev/vda to vda */ 30 | - base = basename(devname); 31 | + base = dm_basename(devname); 32 | 33 | /* vda1 to vda */ 34 | for (i = 0; i < strlen(base); i++) { 35 | -------------------------------------------------------------------------------- /patches/lvm/2.03.22/lvm2-020-freopen-musl.patch: -------------------------------------------------------------------------------- 1 | From 4cf08811e112100a2b10c60047f3c537ad21d674 Mon Sep 17 00:00:00 2001 2 | From: David Seifert 3 | Date: Sat, 28 Jan 2023 14:22:42 +0100 4 | Subject: [PATCH] Use `freopen()` on {stdin,stdout,stderr} 5 | 6 | * ISO C does not guarantee that the standard streams are modifiable 7 | lvalues. Glibc even calls out this behaviour as non-portable: 8 | https://www.gnu.org/software/libc/manual/html_node/Standard-Streams.html 9 | --- a/lib/log/log.c 10 | +++ b/lib/log/log.c 11 | @@ -208,7 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode) 12 | 13 | _check_and_replace_standard_log_streams(old_stream, new_stream); 14 | 15 | +#ifdef __GLIBC__ 16 | *stream = new_stream; 17 | +#else 18 | + freopen(NULL, mode, *stream); 19 | +#endif 20 | return 1; 21 | } 22 | 23 | --- a/tools/lvmcmdline.c 24 | +++ b/tools/lvmcmdline.c 25 | @@ -3422,7 +3422,7 @@ static int _check_standard_fds(void) 26 | int err = is_valid_fd(STDERR_FILENO); 27 | 28 | if (!is_valid_fd(STDIN_FILENO) && 29 | - !(stdin = fopen(_PATH_DEVNULL, "r"))) { 30 | + !freopen(_PATH_DEVNULL, "r", stdin)) { 31 | if (err) 32 | perror("stdin stream open"); 33 | else 34 | @@ -3432,7 +3432,7 @@ static int _check_standard_fds(void) 35 | } 36 | 37 | if (!is_valid_fd(STDOUT_FILENO) && 38 | - !(stdout = fopen(_PATH_DEVNULL, "w"))) { 39 | + !freopen(_PATH_DEVNULL, "w", stdout)) { 40 | if (err) 41 | perror("stdout stream open"); 42 | /* else no stdout */ 43 | @@ -3440,7 +3440,7 @@ static int _check_standard_fds(void) 44 | } 45 | 46 | if (!is_valid_fd(STDERR_FILENO) && 47 | - !(stderr = fopen(_PATH_DEVNULL, "w"))) { 48 | + !freopen(_PATH_DEVNULL, "w", stderr)) { 49 | printf("stderr stream open: %s\n", 50 | strerror(errno)); 51 | return 0; 52 | -- 53 | 2.39.2 54 | 55 | -------------------------------------------------------------------------------- /patches/mdadm/4.1/mdadm-3.4-sysmacros.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/580188 2 | 3 | From 5c97e465b33bf8fefb17da7f553a1c3812e508d5 Mon Sep 17 00:00:00 2001 4 | From: Mike Frysinger 5 | Date: Tue, 19 Apr 2016 18:10:54 -0400 6 | Subject: [PATCH] include sys/sysmacros.h for major/minor/makedev prototypes 7 | 8 | These funcs are defined in sys/sysmacros.h, so include it for them. 9 | It works today due to an implicit include by sys/types.h, but the 10 | various Linux C libraries are moving away from that. 11 | 12 | Signed-off-by: Mike Frysinger 13 | --- 14 | mdadm.h | 1 + 15 | 1 file changed, 1 insertion(+) 16 | 17 | diff --git a/mdadm.h b/mdadm.h 18 | index d209488..b8767a7 100755 19 | --- a/mdadm.h 20 | +++ b/mdadm.h 21 | @@ -33,6 +33,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); 22 | # endif 23 | #endif 24 | 25 | +#include 26 | #include 27 | #include 28 | #include 29 | -- 30 | 2.7.4 31 | 32 | -------------------------------------------------------------------------------- /patches/mdadm/4.2/mdadm-3.4-sysmacros.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/580188 2 | 3 | From 5c97e465b33bf8fefb17da7f553a1c3812e508d5 Mon Sep 17 00:00:00 2001 4 | From: Mike Frysinger 5 | Date: Tue, 19 Apr 2016 18:10:54 -0400 6 | Subject: [PATCH] include sys/sysmacros.h for major/minor/makedev prototypes 7 | 8 | These funcs are defined in sys/sysmacros.h, so include it for them. 9 | It works today due to an implicit include by sys/types.h, but the 10 | various Linux C libraries are moving away from that. 11 | 12 | Signed-off-by: Mike Frysinger 13 | --- 14 | mdadm.h | 1 + 15 | 1 file changed, 1 insertion(+) 16 | 17 | diff --git a/mdadm.h b/mdadm.h 18 | index d209488..b8767a7 100755 19 | --- a/mdadm.h 20 | +++ b/mdadm.h 21 | @@ -33,6 +33,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); 22 | # endif 23 | #endif 24 | 25 | +#include 26 | #include 27 | #include 28 | #include 29 | -- 30 | 2.7.4 31 | 32 | -------------------------------------------------------------------------------- /patches/open-iscsi/2.1.4/open-iscsi-2.1.4-static-iscsistart.patch: -------------------------------------------------------------------------------- 1 | --- a/usr/Makefile 2 | +++ b/usr/Makefile 3 | @@ -76,7 +76,7 @@ $(CC) $(CFLAGS) $^ -o $@ -lisns -lcrypto -lmount $(LDFLAGS) $(ISCSI_LIB) 4 | 5 | iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ 6 | iscsistart.o statics.o 7 | - $(CC) $(CFLAGS) $^ -o $@ -lcrypto -lrt $(LDFLAGS) $(ISCSI_LIB) 8 | + $(CC) $(CFLAGS) $^ -o $@ -static -lcrypto -lrt $(LDFLAGS) $(ISCSI_LIB) 9 | clean: 10 | $(RM) *.o $(PROGRAMS) .depend $(LIBSYS) 11 | 12 | -------------------------------------------------------------------------------- /patches/open-iscsi/2.1.8/open-iscsi-2.1.8-Makefiles.patch: -------------------------------------------------------------------------------- 1 | --- a/libopeniscsiusr/Makefile 2 | +++ b/libopeniscsiusr/Makefile 3 | @@ -50,7 +50,7 @@ EXTRA_MAN_FILE = libopeniscsiusr.h.3 4 | OBJS = context.o misc.o session.o sysfs.o iface.o idbm.o node.o default.o 5 | 6 | CFLAGS ?= -O2 -g 7 | -CFLAGS += -Wall -Werror -Wextra -fvisibility=hidden -fPIC 8 | +CFLAGS += -Wextra -fvisibility=hidden -fPIC 9 | CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod) 10 | CFLAGS += -DSBINDIR=\"$(SBINDIR)\" 11 | CFLAGS += -DISCSI_DB_ROOT=\"$(DBROOT)\" 12 | @@ -60,9 +60,10 @@ LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod) 13 | 14 | LIBADD = 15 | 16 | -all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc 17 | +all: $(LIBS) $(LIBS_MAJOR) 18 | 19 | $(LIBS): $(OBJS) 20 | + $(AR) $(ARFLAGS) libopeniscsiusr.a $^ 21 | $(CC) $(CFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LDFLAGS) $(LIBADD) 22 | ln -sf $@ $(DEVLIB) 23 | 24 | -- 25 | -------------------------------------------------------------------------------- /patches/open-iscsi/2.1.8/open-iscsi-2.1.8-static-iscsistart.patch: -------------------------------------------------------------------------------- 1 | --- a/usr/Makefile 2 | +++ b/usr/Makefile 3 | @@ -99,7 +99,7 @@ iscsiadm: $(ISCSI_LIB_OBJS) $(SYSDEPS_OBJS) $(DISCOVERY_OBJS) $(FW_BOOT_OBJS) \ 4 | 5 | iscsistart: $(ISCSI_LIB_OBJS) $(SYSDEPS_OBJS) $(INITIATOR_OBJS) $(FW_BOOT_OBJS) \ 6 | $(ISCSISTART_OBJS) 7 | - $(CC) $(CFLAGS) $^ -o $@ -lcrypto -lrt $(LDFLAGS) $(ISCSI_LIB) 8 | + $(CC) $(CFLAGS) $^ -o $@ -static -lcrypto -lrt $(LDFLAGS) $(ISCSI_LIB) 9 | 10 | install: $(DESTDIR)$(SBINDIR) $(PROGRAMS_DEST) 11 | 12 | -------------------------------------------------------------------------------- /patches/thin-provisioning-tools/0.9.0/thin-provisioning-tools-0.8.5-no-manpages.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile.in 2 | +++ b/Makefile.in 3 | @@ -279,7 +279,7 @@ TOOLS:=\ 4 | 5 | MANPAGES:=$(patsubst %,man8/%.8,$(TOOLS)) 6 | 7 | -install: bin/pdata_tools $(MANPAGES) 8 | +install: bin/pdata_tools 9 | $(INSTALL_DIR) $(BINDIR) 10 | $(INSTALL_PROGRAM) bin/pdata_tools $(BINDIR) 11 | $(STRIP) $(BINDIR)/pdata_tools 12 | @@ -302,6 +302,7 @@ install: bin/pdata_tools $(MANPAGES) 13 | ln -s -f pdata_tools $(BINDIR)/era_dump 14 | ln -s -f pdata_tools $(BINDIR)/era_invalidate 15 | ln -s -f pdata_tools $(BINDIR)/era_restore 16 | +ifeq ("@INSTALLMANPAGES@", "yes") 17 | $(INSTALL_DIR) $(MANPATH)/man8 18 | $(INSTALL_DATA) man8/cache_check.8 $(MANPATH)/man8 19 | $(INSTALL_DATA) man8/cache_dump.8 $(MANPATH)/man8 20 | @@ -322,6 +323,7 @@ install: bin/pdata_tools $(MANPAGES) 21 | $(INSTALL_DATA) man8/era_restore.8 $(MANPATH)/man8 22 | $(INSTALL_DATA) man8/era_invalidate.8 $(MANPATH)/man8 23 | $(INSTALL_DATA) man8/thin_trim.8 $(MANPATH)/man8 24 | +endif 25 | ifeq ("@DEVTOOLS@", "yes") 26 | ln -s -f pdata_tools $(BINDIR)/thin_show_duplicates 27 | ln -s -f pdata_tools $(BINDIR)/thin_ll_dump 28 | -------------------------------------------------------------------------------- /patches/thin-provisioning-tools/0.9.0/thin-provisioning-tools-0.9.0-build-fixes.patch: -------------------------------------------------------------------------------- 1 | --- a/Makefile.in 2 | +++ b/Makefile.in 3 | @@ -160,9 +160,9 @@ endif 4 | 5 | TOP_DIR:=@top_srcdir@ 6 | TOP_BUILDDIR:=@top_builddir@ 7 | -CFLAGS+=-g -Wall -O3 -fPIC 8 | +CFLAGS+=-fPIC 9 | CFLAGS+=@LFS_FLAGS@ 10 | -CXXFLAGS+=-g -Wall -fPIC -fno-strict-aliasing -std=c++11 11 | +CXXFLAGS+=-fPIC -fno-strict-aliasing -std=c++11 12 | 13 | ifeq ("@DEVTOOLS@", "yes") 14 | CXXFLAGS+=-DDEV_TOOLS 15 | @@ -363,7 +363,7 @@ LIBFT_OBJECTS=$(subst .c,.o,$(LIBFT_SOURCE)) 16 | 17 | lib/libft.so: $(LIBFT_OBJECTS) 18 | @echo " [LD]" $@ 19 | - $(V) gcc -shared -o $@ $+ -laio 20 | + $(V) $(CC) -shared -o $@ $+ -laio 21 | 22 | .PHONEY: functional-test unit-test 23 | 24 | --- a/configure.ac 25 | +++ b/configure.ac 26 | @@ -35,6 +35,8 @@ AC_LANG(C++) 27 | 28 | ################################################################ 29 | dnl -- Checks for programs. 30 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL([AR],[ar])]) 31 | +AC_PROG_AR 32 | AC_PROG_SED 33 | AC_PROG_AWK 34 | AC_PROG_LN_S 35 | --- a/functional-tests/bcache/Makefile 36 | +++ b/functional-tests/bcache/Makefile 37 | @@ -1,8 +1,8 @@ 38 | bcache.so: bcache.o 39 | - gcc -shared -o $@ $< -laio 40 | + $(CC) -shared -o $@ $< -laio 41 | 42 | bcache.o: bcache.c 43 | - gcc -std=gnu11 -fpic -I. -Wall -c -o $@ $< 44 | + $(CC) -std=gnu11 -fpic -I. -Wall -c -o $@ $< 45 | 46 | .PHONEY: clean 47 | clean: 48 | --- a/functional-tests/crc32c/Makefile 49 | +++ b/functional-tests/crc32c/Makefile 50 | @@ -1,8 +1,8 @@ 51 | crc32c.so: crc32c.o 52 | - gcc -shared -o $@ $< -laio 53 | + $(CC) -shared -o $@ $< -laio 54 | 55 | crc32c.o: crc32c.c 56 | - gcc -std=gnu11 -fpic -I. -Wall -c -o $@ $< 57 | + $(CC) -std=gnu11 -fpic -I. -Wall -c -o $@ $< 58 | 59 | .PHONEY: clean 60 | clean: 61 | --- a/functional-tests/device-mapper/Makefile 62 | +++ b/functional-tests/device-mapper/Makefile 63 | @@ -1,8 +1,8 @@ 64 | dm-ioctl.so: dm-ioctl.o 65 | - gcc -shared -o $@ $< -laio 66 | + $(CC) -shared -o $@ $< -laio 67 | 68 | dm-ioctl.o: dm-ioctl.c 69 | - gcc -std=gnu11 -fpic -I. -Wall -c -o $@ $< 70 | + $(CC) -std=gnu11 -fpic -I. -Wall -c -o $@ $< 71 | 72 | .PHONEY: clean 73 | clean: 74 | --- a/unit-tests/Makefile.in 75 | +++ b/unit-tests/Makefile.in 76 | @@ -25,7 +25,7 @@ GMOCK_FLAGS=\ 77 | -Wno-unused-local-typedefs 78 | 79 | GMOCK_LIBS=\ 80 | - -Llib -lpdata -lgmock -lpthread -laio 81 | + -Llib -lpdata -lgmock -lpthread -laio -lgtest 82 | 83 | GMOCK_DEPS=\ 84 | $(wildcard $(GMOCK_DIR)/googlemock/include/*.h) \ 85 | 86 | -------------------------------------------------------------------------------- /patches/unionfs-fuse/2.0/unionfs-fuse-2.0-use-PKG_CONFIG-env-variable.patch: -------------------------------------------------------------------------------- 1 | Use pkg-config from environment variable (mimic's autotools' behavior). 2 | 3 | While here, request static libs because genkernel builds static unionfs only. 4 | 5 | --- a/src/Makefile 6 | +++ b/src/Makefile 7 | @@ -1,5 +1,7 @@ 8 | +PKG_CONFIG ?= pkg-config 9 | + 10 | CFLAGS += -Wall 11 | -CPPFLAGS += $(shell pkg-config --cflags fuse) 12 | +CPPFLAGS += $(shell $(PKG_CONFIG) --cflags fuse) 13 | CPPFLAGS += -DFUSE_USE_VERSION=29 14 | 15 | CPPFLAGS += -DLIBC_XATTR # glibc nowadays includes xattr 16 | @@ -10,7 +12,7 @@ CPPFLAGS += -DLIBC_XATTR # glibc nowadays includes xattr 17 | 18 | LDFLAGS += 19 | 20 | -LIB = $(shell pkg-config --libs fuse) -lpthread 21 | +LIB = $(shell $(PKG_CONFIG) --static --libs fuse) -lpthread 22 | 23 | HASHTABLE_OBJ = hashtable.o hashtable_itr.o 24 | UNIONFS_OBJ = unionfs.o opts.o debug.o findbranch.o readdir.o \ 25 | -------------------------------------------------------------------------------- /patches/zlib/1.2.11/zlib-1.2.11-minizip-drop-crypt-header.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/658536 2 | https://github.com/madler/zlib/pull/229 3 | 4 | From e490ddad3091574a0c2e3b5a66a8fee9a7ab212f Mon Sep 17 00:00:00 2001 5 | From: Pavel Raiskup 6 | Date: Sun, 19 Feb 2017 16:42:12 +0100 7 | Subject: [PATCH] minizip: don't install crypt.h 8 | 9 | People did mistakenly or unintentionally include crypt.h before, 10 | don't install this internal header from now. 11 | --- 12 | contrib/minizip/Makefile.am | 4 +++- 13 | 1 file changed, 3 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am 16 | index d343011ebc3b..4f46610238d2 100644 17 | --- a/contrib/minizip/Makefile.am 18 | +++ b/contrib/minizip/Makefile.am 19 | @@ -26,13 +26,15 @@ libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 20 | 21 | minizip_includedir = $(includedir)/minizip 22 | minizip_include_HEADERS = \ 23 | - crypt.h \ 24 | ioapi.h \ 25 | mztools.h \ 26 | unzip.h \ 27 | zip.h \ 28 | ${iowin32_h} 29 | 30 | +noinst_HEADERS = \ 31 | + crypt.h 32 | + 33 | pkgconfigdir = $(libdir)/pkgconfig 34 | pkgconfig_DATA = minizip.pc 35 | 36 | -- 37 | 2.17.1 38 | 39 | -------------------------------------------------------------------------------- /patches/zlib/1.3.1/zlib-1.2.11-minizip-drop-crypt-header.patch: -------------------------------------------------------------------------------- 1 | https://bugs.gentoo.org/658536 2 | https://github.com/madler/zlib/pull/229 3 | 4 | From e490ddad3091574a0c2e3b5a66a8fee9a7ab212f Mon Sep 17 00:00:00 2001 5 | From: Pavel Raiskup 6 | Date: Sun, 19 Feb 2017 16:42:12 +0100 7 | Subject: [PATCH] minizip: don't install crypt.h 8 | 9 | People did mistakenly or unintentionally include crypt.h before, 10 | don't install this internal header from now. 11 | --- 12 | contrib/minizip/Makefile.am | 4 +++- 13 | 1 file changed, 3 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am 16 | index d343011ebc3b..4f46610238d2 100644 17 | --- a/contrib/minizip/Makefile.am 18 | +++ b/contrib/minizip/Makefile.am 19 | @@ -26,13 +26,15 @@ libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 20 | 21 | minizip_includedir = $(includedir)/minizip 22 | minizip_include_HEADERS = \ 23 | - crypt.h \ 24 | ioapi.h \ 25 | mztools.h \ 26 | unzip.h \ 27 | zip.h \ 28 | ${iowin32_h} 29 | 30 | +noinst_HEADERS = \ 31 | + crypt.h 32 | + 33 | pkgconfigdir = $(libdir)/pkgconfig 34 | pkgconfig_DATA = minizip.pc 35 | 36 | -- 37 | 2.17.1 38 | 39 | -------------------------------------------------------------------------------- /path_expander.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | 6 | def main(argv): 7 | if len(argv) != 1: 8 | print( 9 | "%s expects exactly one argument but %s were given!" 10 | % (os.path.basename(__file__), len(argv)), 11 | file=sys.stderr 12 | ) 13 | sys.exit(1) 14 | 15 | print(os.path.expanduser(argv[0])) 16 | 17 | if __name__ == "__main__": 18 | main(sys.argv[1:]) 19 | -------------------------------------------------------------------------------- /worker_modules/unpack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 1999-2019 Gentoo Authors 3 | # Distributed under the terms of the GNU General Public License v2 4 | 5 | __module_main() { 6 | _unpack_main 7 | } 8 | 9 | _unpack_main() { 10 | if [[ -z "${UNPACK_FILE}" ]] 11 | then 12 | die "Unable to unpack: UNPACK_FILE not set!" 13 | elif [[ ! -e "${UNPACK_FILE}" ]] 14 | then 15 | die "Unable to unpack: UNPACK_FILE '${UNPACK_FILE}' does NOT exist!" 16 | elif [[ -z "${UNPACK_DIR}" ]] 17 | then 18 | die "Unable to unpack: UNPACK_DIR not set!" 19 | elif [[ ! -d "${UNPACK_DIR}" ]] 20 | then 21 | mkdir -p "${UNPACK_DIR}" || die "Failed to create '${UNPACK_DIR}'!" 22 | fi 23 | 24 | "${TAR_COMMAND}" -xaf "${UNPACK_FILE}" --directory "${UNPACK_DIR}" \ 25 | || die "Failed to unpack '${UNPACK_FILE}' to '${UNPACK_DIR}'!" 26 | } 27 | --------------------------------------------------------------------------------