[arch-commits] Commit in lvm2/trunk (PKGBUILD lvm2_install sd-lvm2_install)

Christian Hesse eworm at archlinux.org
Thu Feb 4 10:48:33 UTC 2021


    Date: Thursday, February 4, 2021 @ 10:48:32
  Author: eworm
Revision: 407224

upgpkg: lvm2 2.03.11-2: merge mkinitcpio hooks

Modified:
  lvm2/trunk/PKGBUILD
  lvm2/trunk/lvm2_install
Deleted:
  lvm2/trunk/sd-lvm2_install

-----------------+
 PKGBUILD        |    8 +++-----
 lvm2_install    |   16 +++++++++++++---
 sd-lvm2_install |   44 --------------------------------------------
 3 files changed, 16 insertions(+), 52 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-02-04 09:45:17 UTC (rev 407223)
+++ PKGBUILD	2021-02-04 10:48:32 UTC (rev 407224)
@@ -4,7 +4,7 @@
 pkgbase=lvm2
 pkgname=('lvm2' 'device-mapper')
 pkgver=2.03.11
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 url='https://sourceware.org/lvm2/'
 license=('GPL2' 'LGPL2.1')
@@ -13,11 +13,9 @@
               'D501A478440AE2FD130A1BE8B9112431E509039F') # Marian Csontos <marian.csontos at gmail.com>
 source=("git+https://sourceware.org/git/lvm2.git#tag=v${pkgver//./_}?signed"
         'lvm2_install'
-        'sd-lvm2_install'
         '11-dm-initramfs.rules')
 sha256sums=('SKIP'
-            'af5ea3dac7466eda16da2482714d82f2b12a20b673ba973fa34663542ee34fb5'
-            '88cc3a47e9a46de76341ea588fc642d45a716c38b6ab0a3346e482adb6b40aa3'
+            '7fae2e70b2bf3d81e5ab8710bf1c76a81e26ec10063978f21bafbdddd3790185'
             'e10f24b57582d6e2da71f7c80732a62e0ee2e3b867fe84591ccdb53e80fa92e0')
 
 _backports=(
@@ -122,7 +120,7 @@
   install -d "${pkgdir}"/etc/lvm/{archive,backup}
   # mkinitcpio hook
   install -D -m0644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
-  install -D -m0644 "${srcdir}/sd-lvm2_install" "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
+  ln -s lvm2 "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
   # extra udev rule for non-systemd initramfs
   install -D -m0644 "${srcdir}/lvm2-initramfs/udev/69-dm-lvm-metad.rules" "${pkgdir}/usr/lib/initcpio/udev/69-dm-lvm-metad.rules"
   # systemd support

Modified: lvm2_install
===================================================================
--- lvm2_install	2021-02-04 09:45:17 UTC (rev 407223)
+++ lvm2_install	2021-02-04 10:48:32 UTC (rev 407224)
@@ -9,6 +9,12 @@
         add_module "$mod"
     done
 
+    if command -v add_systemd_unit >/dev/null; then
+        # device mapper and lvm2 systemd units
+        # binaries and libraries are pull automatically, except ...
+        add_systemd_unit "lvm2-pvscan at .service"
+    fi
+
     # binaries from lvm2
     add_binary "lvm"
 
@@ -27,8 +33,14 @@
     add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
     add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
     add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
-    add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
     add_file "/etc/lvm/lvm.conf"
+
+    # this udev rule is specific for systemd and non-systemd systems
+    if command -v add_systemd_unit >/dev/null; then
+        add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+    else
+        add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+    fi
 }
 
 help() {
@@ -36,5 +48,3 @@
 This hook enables LVM2 volumes in initramfs.
 HELPEOF
 }
-
-# vim: set ft=sh ts=4 sw=4 et:

Deleted: sd-lvm2_install
===================================================================
--- sd-lvm2_install	2021-02-04 09:45:17 UTC (rev 407223)
+++ sd-lvm2_install	2021-02-04 10:48:32 UTC (rev 407224)
@@ -1,44 +0,0 @@
-#!/usr/bin/bash
-
-build() {
-    local mod
-    local symlink
-
-    # device mapper modules
-    for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
-        add_module "$mod"
-    done
-
-    # device mapper and lvm2 systemd units
-    # binaries and libraries are pull automatically, except ...
-    add_systemd_unit "lvm2-pvscan at .service"
-
-    # binaries from lvm2
-    add_binary "lvm"
-
-    # beinaries from device-mapper
-    add_binary "dmsetup"
-
-    # from thin-provisioning-tools
-    add_binary "pdata_tools"
-    for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
-        add_symlink "/usr/bin/${symlink}" "pdata_tools"
-    done
-
-    # udev rules and lvm configuration
-    add_file "/usr/lib/udev/rules.d/10-dm.rules"
-    add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
-    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
-    add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
-    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
-    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
-    add_file "/etc/lvm/lvm.conf"
-}
-
-help() {
-  cat <<HELPEOF
-This hook enables LVM2 volumes in systemd-based initramfs.
-HELPEOF
-}
-
-# vim: set ft=sh ts=4 sw=4 et:



More information about the arch-commits mailing list