summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD80
1 files changed, 37 insertions, 43 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 67cfb6c8cc2..06e53e78863 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,29 +5,30 @@
pkgbase=linux-hardened-git
_srcname=${pkgbase/-git/}
-_gitbranch=5.4
-pkgver=5.4.0rc8.r873393.g33c8300eac3b
+_gitbranch=5.5
+pkgver=5.5.0.r889001.gb5d24fe9e7cf
pkgrel=1
pkgdesc='Security-Hardened Linux'
url='https://github.com/anthraxx/linux-hardened'
arch=(x86_64)
license=(GPL2)
makedepends=(
- xmlto kmod inetutils bc libelf
- python-sphinx python-sphinx_rtd_theme graphviz imagemagick git
+ bc kmod libelf
+ xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
+ git
)
options=('!strip')
source=("${_srcname}::git+https://github.com/anthraxx/linux-hardened#branch=${_gitbranch}?signed"
config # the main kernel config files
)
validpgpkeys=(
- 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
- '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
- '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay
- 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak
+ 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
+ '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
+ '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay
+ 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak
)
sha256sums=('SKIP'
- '8fd3e3e5be7c1f6378959292808769bedea93987f80daf14b6d196741788eea2')
+ '55356e788f174a031df4109fa44b323d0093fad93cc28ec361400f6730a0abec')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -47,7 +48,7 @@ pkgver() {
prepare() {
cd $_srcname
- msg2 "Setting version..."
+ echo "Setting version..."
rm -f localversion* include/config/kernel.release
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
@@ -59,21 +60,22 @@ prepare() {
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
- msg2 "Applying patch $src..."
+ echo "Applying patch $src..."
patch -Np1 < "../$src"
done
- msg2 "Setting config..."
+ echo "Setting config..."
cp ../config .config
make olddefconfig
make -s kernelrelease > version
- msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
+ echo "Prepared $pkgbase version $(<version)"
}
build() {
cd $_srcname
- make bzImage modules htmldocs
+ make all
+ make htmldocs
}
_package() {
@@ -87,7 +89,7 @@ _package() {
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
- msg2 "Installing boot image..."
+ echo "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
@@ -95,13 +97,13 @@ _package() {
# Used by mkinitcpio to name the kernel
echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
- msg2 "Installing modules..."
+ echo "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
# remove build and source links
rm "$modulesdir"/{source,build}
- msg2 "Fixing permissions..."
+ echo "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
@@ -111,7 +113,7 @@ _package-headers() {
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- msg2 "Installing build files..."
+ echo "Installing build files..."
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
@@ -124,7 +126,7 @@ _package-headers() {
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
- msg2 "Installing headers..."
+ echo "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
@@ -140,10 +142,10 @@ _package-headers() {
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
- msg2 "Installing KConfig files..."
+ echo "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
- msg2 "Removing unneeded architectures..."
+ echo "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
@@ -151,16 +153,16 @@ _package-headers() {
rm -r "$arch"
done
- msg2 "Removing documentation..."
+ echo "Removing documentation..."
rm -r "$builddir/Documentation"
- msg2 "Removing broken symlinks..."
+ echo "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
- msg2 "Removing loose objects..."
+ echo "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
- msg2 "Stripping build tools..."
+ echo "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -bi "$file")" in
@@ -175,41 +177,33 @@ _package-headers() {
esac
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
- msg2 "Adding symlink..."
+ echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
- msg2 "Fixing permissions..."
+ echo "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
_package-docs() {
- pkgdesc="Kernel hacker's manual for the $pkgdesc kernel"
+ pkgdesc="Documentation for the $pkgdesc kernel"
cd $_srcname
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- msg2 "Installing documentation..."
- mkdir -p "$builddir"
- cp -t "$builddir" -a Documentation
-
- msg2 "Removing unneeded files..."
- rm -rv "$builddir"/Documentation/{,output/}.[^.]*
-
- msg2 "Moving HTML docs..."
+ echo "Installing documentation..."
local src dst
while read -rd '' src; do
- dst="$builddir/Documentation/${src#$builddir/Documentation/output/}"
- mkdir -p "${dst%/*}"
- mv "$src" "$dst"
- rmdir -p --ignore-fail-on-non-empty "${src%/*}"
- done < <(find "$builddir/Documentation/output" -type f -print0)
+ dst="${src#Documentation/}"
+ dst="$builddir/Documentation/${dst#output/}"
+ install -Dm644 "$src" "$dst"
+ done < <(find Documentation -name '.*' -prune -o ! -type d -print0)
- msg2 "Adding symlink..."
+ echo "Adding symlink..."
mkdir -p "$pkgdir/usr/share/doc"
ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
- msg2 "Fixing permissions..."
+ echo "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}