2022-03-20 13:19:37 +01:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
|
|
# Website : https://pozol.eu
|
|
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
|
|
|
|
pkgbase=lvm2
|
|
|
|
pkgname=('lvm2' 'device-mapper')
|
2024-01-11 01:01:33 +01:00
|
|
|
#_tag='' # git rev-parse v${pkgver//./_}
|
|
|
|
# latest release does not have a tag... :-\
|
2024-05-17 13:01:04 +02:00
|
|
|
#_commit='d786a8f820d54ce87a919e6af5426c333c173b11'
|
2024-07-14 19:57:50 +02:00
|
|
|
pkgver=2.03.25
|
|
|
|
pkgrel=02
|
2022-03-20 13:19:37 +01:00
|
|
|
url='https://sourceware.org/lvm2/'
|
2023-01-24 22:16:46 +01:00
|
|
|
makedepends=('git' 'libaio' 'thin-provisioning-tools')
|
2022-03-20 13:19:37 +01:00
|
|
|
#options=('!makeflags')
|
2024-01-11 01:01:33 +01:00
|
|
|
#source=("git+https://sourceware.org/git/lvm2.git#tag=${_tag}?signed"
|
2024-05-17 13:01:04 +02:00
|
|
|
#source=("git+https://sourceware.org/git/lvm2.git#commit=${_commit}"
|
|
|
|
source=("git+https://sourceware.org/git/lvm2.git#tag=v${pkgver//./_}?signed"
|
2022-03-20 13:19:37 +01:00
|
|
|
'0001-udev-initcpio.patch'
|
2024-03-04 03:35:30 +01:00
|
|
|
# 'lvm2_install'
|
2022-03-20 13:19:37 +01:00
|
|
|
'11-dm-initramfs.rules')
|
|
|
|
|
|
|
|
#_backports=(
|
|
|
|
# # The path is known anyway and should be the bullet proof option.
|
|
|
|
# '221e75316f472fbf5eb2ad206b861ea255c099ed'#
|
|
|
|
#)
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd lvm2/
|
|
|
|
|
|
|
|
local _c
|
|
|
|
for _c in "${_backports[@]}"; do
|
|
|
|
git log --oneline -1 "${_c}"
|
|
|
|
git show "${_c}" -- ':(exclude)WHATS_NEW' | git apply
|
|
|
|
done
|
|
|
|
|
|
|
|
# prepare for non-systemd initcpio
|
|
|
|
# cp udev/69-dm-lvm.rules.in udev/69-dm-lvm-initcpio.rules.in
|
|
|
|
# patch -Np1 < ../0001-udev-initcpio.patch
|
|
|
|
patch -Np1 --output='udev/69-dm-lvm-initcpio.rules.in' < ../0001-udev-initcpio.patch
|
|
|
|
|
|
|
|
# # remove install section from systemd units that are enabled by default
|
|
|
|
## sed -i -e '/^\[Install\]$/,$d' \
|
|
|
|
## scripts/dm_event_systemd_red_hat.socket.in \
|
|
|
|
## scripts/lvm2_lvmpolld_systemd_red_hat.socket.in \
|
|
|
|
## scripts/lvm2_monitoring_systemd_red_hat.service.in
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# build system requires bash:
|
|
|
|
# https://www.redhat.com/archives/linux-lvm/2020-January/msg00004.html
|
|
|
|
# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Defining-Variables.html
|
|
|
|
export CONFIG_SHELL=/bin/bash
|
|
|
|
|
|
|
|
cd lvm2/
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
CONFIG_SHELL=/bin/bash \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sbindir=/usr/bin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--enable-cmdlib \
|
|
|
|
--enable-dmeventd \
|
|
|
|
--enable-lvmpolld \
|
|
|
|
--enable-pkgconfig \
|
|
|
|
--enable-readline \
|
|
|
|
--enable-udev_rules \
|
|
|
|
--enable-udev_sync \
|
2023-02-15 01:35:34 +01:00
|
|
|
--enable-write_install \
|
2022-03-20 13:19:37 +01:00
|
|
|
--disable-systemd \
|
|
|
|
--with-cache=internal \
|
|
|
|
--with-default-dm-run-dir=/run \
|
|
|
|
--with-default-locking-dir=/run/lock/lvm \
|
|
|
|
--with-default-pid-dir=/run \
|
|
|
|
--with-default-run-dir=/run/lvm \
|
2023-08-15 13:42:39 +02:00
|
|
|
--with-libexecdir=/usr/lib/lvm2 \
|
2022-03-20 13:19:37 +01:00
|
|
|
--without-systemdsystemunitdir \
|
|
|
|
--with-thin=internal \
|
|
|
|
--with-udev-prefix=/usr
|
|
|
|
make
|
|
|
|
|
|
|
|
# --with-systemdsystemunitdir=/usr/lib/systemd/system \
|
|
|
|
make -C udev/ 69-dm-lvm-initcpio.rules
|
|
|
|
}
|
|
|
|
|
|
|
|
package_device-mapper() {
|
|
|
|
pkgdesc="Device mapper userspace library and tools w/o systemd"
|
|
|
|
url="http://sourceware.org/dm/"
|
|
|
|
depends=('glibc' 'libudev.so')
|
|
|
|
provides=('libdevmapper.so'
|
|
|
|
'libdevmapper-event.so')
|
|
|
|
|
|
|
|
cd lvm2/
|
|
|
|
|
|
|
|
make DESTDIR="${pkgdir}" install_device-mapper
|
|
|
|
# extra udev rule for device-mapper in initramfs
|
|
|
|
install -D -m0644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/usr/lib/initcpio/udev/11-dm-initramfs.rules"
|
|
|
|
# Install dmeventd socket and service
|
|
|
|
## make DESTDIR="${pkgdir}" install_systemd_units
|
|
|
|
## rm -f "${pkgdir}/usr/lib/systemd/system/"{blk-availability.service,lvm2-*}
|
|
|
|
## install -d -m0755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
|
|
|
|
## ln -sf ../dm-event.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/dm-event.socket"
|
|
|
|
}
|
|
|
|
|
|
|
|
package_lvm2() {
|
|
|
|
pkgdesc="Logical Volume Manager 2 utilities w/o systemd"
|
|
|
|
depends=('bash' "device-mapper>=${pkgver}"
|
|
|
|
'libudev.so' 'util-linux-libs' 'libblkid.so' 'readline' 'libreadline.so'
|
2023-01-24 22:16:46 +01:00
|
|
|
'thin-provisioning-tools' 'libaio' 'libaio.so')
|
2024-03-04 03:35:30 +01:00
|
|
|
conflicts=('lvm' 'mkinitcpio<38')
|
2022-03-20 13:19:37 +01:00
|
|
|
backup=('etc/lvm/lvm.conf'
|
|
|
|
'etc/lvm/lvmlocal.conf')
|
|
|
|
|
|
|
|
cd lvm2/
|
|
|
|
|
|
|
|
make DESTDIR="${pkgdir}" install_lvm2
|
|
|
|
# /etc directories
|
|
|
|
install -d "${pkgdir}"/etc/lvm/{archive,backup}
|
2024-03-04 03:35:30 +01:00
|
|
|
# # mkinitcpio hook
|
|
|
|
# install -D -m0644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
|
|
|
|
# ln -s lvm2 "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
|
2022-03-20 13:19:37 +01:00
|
|
|
# extra udev rule for non-systemd initramfs
|
|
|
|
install -D -m0644 udev/69-dm-lvm-initcpio.rules "${pkgdir}/usr/lib/initcpio/udev/69-dm-lvm.rules"
|
2024-01-11 01:01:33 +01:00
|
|
|
|
2022-03-20 13:19:37 +01:00
|
|
|
}
|
|
|
|
|
2023-04-22 12:22:10 +02:00
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
|
|
|
|
arch=(x86_64)
|
2022-03-20 13:19:37 +01:00
|
|
|
|
|
|
|
license=('GPL2' 'LGPL2.1')
|
|
|
|
|
|
|
|
validpgpkeys=('88437EF5C077BD113D3B7224228191C1567E2C17' # Alasdair G Kergon <agk@redhat.com>
|
|
|
|
'D501A478440AE2FD130A1BE8B9112431E509039F') # Marian Csontos <marian.csontos@gmail.com>
|
|
|
|
|
2024-07-14 19:57:50 +02:00
|
|
|
sha256sums=(0870ee6d5929274c18be6bfde1e6c24a499ed6a9659114a15c6062dfec924ae8 # lvm2
|
2023-02-23 00:08:29 +01:00
|
|
|
2b3a16ec05e2bc6678e9ebd5ffa8319ebfde29aa260ce004f79f9b8df57d73c9 # 0001-udev-initcpio.patch
|
2024-03-04 03:35:30 +01:00
|
|
|
# def6e03aa1629bbc0ca1ee5e84e620366daf779f037eab2fda47487a8471729b # lvm2_install
|
2022-03-20 13:19:37 +01:00
|
|
|
e10f24b57582d6e2da71f7c80732a62e0ee2e3b867fe84591ccdb53e80fa92e0) # 11-dm-initramfs.rules
|
2022-11-15 16:49:16 +01:00
|
|
|
|
2024-07-14 19:57:50 +02:00
|
|
|
## 56642c59d9864dcd7a0bd16258291fa6f8f116e3c986723ff1533e82f4cc8f35 lvm2-2.03.25-02-x86_64.pkg.tar.lz
|
|
|
|
## 2156b6426143148853c3707f920048a16e2585f1bfee940a4f3fe0f89e1c8278 device-mapper-2.03.25-02-x86_64.pkg.tar.lz
|
2024-05-17 13:01:04 +02:00
|
|
|
|