Add libdmraid package (#6775)

* Update LVM2 (Bump version and add deventd)

* Add libdmraid package

* Update .gitignore

* add lvm2 build

* add binaries for libdmraid

Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
Zopolis4
2022-03-05 04:31:03 +11:00
committed by GitHub
parent 5a420ef097
commit 5d0a45f52d
3 changed files with 68 additions and 18 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,8 @@
release/
*.bz2
*.gz
*.tgz
*.sha256
*.xz
*.zip
/.vs

41
packages/libdmraid.rb Normal file
View File

@@ -0,0 +1,41 @@
require 'package'
class Libdmraid < Package
description 'Device-Mapper Software RAID support tool'
homepage 'http://people.redhat.com/~heinzm/sw/dmraid/'
version '1.0.0.rc16-3'
license 'GPL-2.0'
compatibility 'all'
source_url 'http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-1.0.0.rc16-3.tar.bz2'
source_sha256 '93421bd169d71ff5e7d2db95b62b030bfa205a12010b6468dcdef80337d6fbd8'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libdmraid/1.0.0.rc16-3_armv7l/libdmraid-1.0.0.rc16-3-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libdmraid/1.0.0.rc16-3_armv7l/libdmraid-1.0.0.rc16-3-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libdmraid/1.0.0.rc16-3_i686/libdmraid-1.0.0.rc16-3-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libdmraid/1.0.0.rc16-3_x86_64/libdmraid-1.0.0.rc16-3-chromeos-x86_64.tar.zst'
})
binary_sha256({
aarch64: 'bf6a85cf7fada37b4c6eaf3e20bc029b478ac150910f5b621baa8c5190c098d3',
armv7l: 'bf6a85cf7fada37b4c6eaf3e20bc029b478ac150910f5b621baa8c5190c098d3',
i686: '960b0acb4d557f5d3768e7323f4472e75439dc9f240753a3a62aec27e6843223',
x86_64: '826735e71f3ffc850583862bb58d46369170d7f945efd14406c4bcef8865c428'
})
depends_on 'gawk' => :build
depends_on 'lvm2' => :build
def self.build
Dir.chdir '1.0.0.rc16-3/dmraid' do
system 'autoreconf -fvi'
system "./configure #{CREW_OPTIONS}"
system 'make || make'
end
end
def self.install
Dir.chdir '1.0.0.rc16-3/dmraid' do
system "make install DESTDIR=#{CREW_DEST_DIR}"
end
end
end

View File

@@ -3,38 +3,45 @@ require 'package'
class Lvm2 < Package
description 'LVM2 refers to the userspace toolset that provide logical volume management facilities on linux.'
homepage 'https://sourceware.org/lvm2'
@_ver = '2.03.11'
version @_ver
version '2.03.15'
license 'GPL-2'
compatibility 'all'
source_url "https://www.sourceware.org/pub/lvm2/releases/LVM2.#{@_ver}.tgz"
source_sha256 '842c4510d4653990927d4518a5bf2743126a37531671a05842cdaf8d54bb9dd4'
source_url 'https://sourceware.org/git/lvm2.git'
git_hashtag "v#{version.gsub('.', '_')}"
binary_url ({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.11_armv7l/lvm2-2.03.11-chromeos-armv7l.tar.xz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.11_armv7l/lvm2-2.03.11-chromeos-armv7l.tar.xz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.11_i686/lvm2-2.03.11-chromeos-i686.tar.xz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.11_x86_64/lvm2-2.03.11-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.15_armv7l/lvm2-2.03.15-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.15_armv7l/lvm2-2.03.15-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.15_i686/lvm2-2.03.15-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lvm2/2.03.15_x86_64/lvm2-2.03.15-chromeos-x86_64.tar.zst'
})
binary_sha256 ({
aarch64: 'a60be47b7f7011234587ebba6e28adb36d27138b4bb182aa88da8af7fc6a6079',
armv7l: 'a60be47b7f7011234587ebba6e28adb36d27138b4bb182aa88da8af7fc6a6079',
i686: '62fbf27d3a75a5bf043c02b24ecf4f55f428a14192a59289bb97fd14cd073d78',
x86_64: 'd1b98a8b2c8ca75d78a4fd744a2d1aad44b0c23f102b588f8b5e7a7ed17d42c0',
binary_sha256({
aarch64: '8cfc43361bba3afa4985b060648be0d72adcb7a2e0f27a7fdf771e26adef7219',
armv7l: '8cfc43361bba3afa4985b060648be0d72adcb7a2e0f27a7fdf771e26adef7219',
i686: 'fcc82c8f6189cd3e7050db3b6a2d4b2e18f920888e438c94bbe1620331aa2932',
x86_64: 'c0cd04e473acf8aec4ca3030fce901c793b0b40947f1aa44b2be8b7fea863f24'
})
depends_on 'libaio'
no_env_options
def self.build
system "env CFLAGS='-pipe -flto=auto' CXXFLAGS='-pipe -flto=auto' \
./configure \
# gold linker gives error: ltrans0.ltrans.o: multiple definition of 'dm_bitset_parse_list'
FileUtils.mkdir_p 'bin'
@pwd = `pwd`.chomp
FileUtils.cp "#{CREW_PREFIX}/bin/ld.lld", 'bin/ld'
system "#{CREW_ENV_OPTIONS.gsub('-fuse-ld=gold', '')} LD=ld.lld PATH=#{@pwd}/bin:\$PATH ./configure \
#{CREW_OPTIONS} \
--disable-selinux \
--enable-cmdlib \
--enable-dmeventd \
--enable-pkgconfig \
--with-symvers=no \
--with-confdir=#{CREW_PREFIX}/etc"
system "make"
system "PATH=#{@pwd}/bin:\$PATH make"
end
def self.install
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
end