Quellcode durchsuchen

lvm2: add from old repo and update

Also add patch to fix blkid header location as suggested in #17877

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle vor 10 Jahren
Ursprung
Commit
1a911c1fe5

+ 89
- 0
utils/lvm2/Makefile Datei anzeigen

@@ -0,0 +1,89 @@
1
+#
2
+# Copyright (C) 2009-2010 Stefan Monnier
3
+# Copyright (C) 2011-2014 OpenWrt.org
4
+#
5
+# This is free software, licensed under the GNU General Public License v3+.
6
+# See /LICENSE for more information.
7
+#
8
+
9
+include $(TOPDIR)/rules.mk
10
+
11
+PKG_NAME:=LVM2
12
+PKG_VERSION:=2.02.111
13
+PKG_RELEASE:=1
14
+PKG_LICENSE:=GPL-2.0 LGPL-2.1
15
+
16
+PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
17
+PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
18
+PKG_MD5SUM:=02487ab2a9e02d1ee76fe217183df28a
19
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
20
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
21
+
22
+include $(INCLUDE_DIR)/package.mk
23
+
24
+define Package/libdevmapper
25
+  SECTION:=libs
26
+  CATEGORY:=Libraries
27
+  TITLE:=The Linux Kernel Device Mapper userspace library
28
+  URL:=http://sourceware.org/dm/
29
+  DEPENDS:=+kmod-dm +libpthread
30
+endef
31
+
32
+define Package/libdevmapper/description
33
+ The device-mapper is a component of the 2.6 linux kernel that supports logical
34
+ volume management. It is required by LVM2 and EVMS.
35
+endef
36
+
37
+define Package/lvm2
38
+  SECTION:=utils
39
+  CATEGORY:=Utilities
40
+  SUBMENU:=disc
41
+  TITLE:=The Linux Logical Volume Manager
42
+  URL:=http://sourceware.org/lvm2/
43
+  DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
44
+endef
45
+
46
+define Package/lvm2/description
47
+ LVM2 refers to a new userspace toolset that provide logical volume management
48
+ facilities on linux. It is reasonably backwards-compatible with the original
49
+ LVM toolset.
50
+endef
51
+
52
+CONFIGURE_ARGS += --disable-o_direct
53
+
54
+define Build/Compile
55
+	$(MAKE) -C $(PKG_BUILD_DIR) \
56
+		CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
57
+		DESTDIR="$(PKG_INSTALL_DIR)" \
58
+		install
59
+endef
60
+
61
+define Build/InstallDev
62
+	$(INSTALL_DIR) $(1)/usr/include
63
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
64
+	$(INSTALL_DIR) $(1)/usr/lib
65
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
66
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
67
+	$(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
68
+endef
69
+
70
+define Package/libdevmapper/install
71
+	$(INSTALL_DIR) $(1)/usr/lib
72
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
73
+endef
74
+
75
+define Package/lvm2/install
76
+	$(INSTALL_DIR) $(1)/sbin
77
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin
78
+	$(INSTALL_DIR) $(1)/etc/lvm
79
+	$(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/example.conf $(1)/etc/lvm/lvm.conf
80
+	$(INSTALL_DIR) $(1)/etc/init.d
81
+	$(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
82
+endef
83
+
84
+define Package/lvm2/conffiles
85
+/etc/lvm/lvm.conf
86
+endef
87
+
88
+$(eval $(call BuildPackage,libdevmapper))
89
+$(eval $(call BuildPackage,lvm2))

+ 12
- 0
utils/lvm2/files/lvm2.init Datei anzeigen

@@ -0,0 +1,12 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2009 Stefan Monnier
3
+START=15
4
+
5
+start () {
6
+   /sbin/lvm vgscan --ignorelockingfailure --mknodes || :
7
+   /sbin/lvm vgchange -aly --ignorelockingfailure || return 2
8
+}
9
+
10
+stop () {
11
+    /sbin/lvm vgchange -aln --ignorelockingfailure || return 2
12
+}

+ 11
- 0
utils/lvm2/patches/000-compile.patch Datei anzeigen

@@ -0,0 +1,11 @@
1
+--- a/make.tmpl.in
2
++++ b/make.tmpl.in
3
+@@ -19,7 +19,7 @@
4
+ 
5
+ # Allow environment to override any built-in default value for CC.
6
+ # If there is a built-in default, CC is NOT set to @CC@ here.
7
+-CC ?= @CC@
8
++CC = @CC@
9
+ 
10
+ # If $(CC) holds the usual built-in default value of 'cc' then replace it with
11
+ # the configured value.

+ 12
- 0
utils/lvm2/patches/001-include_fix.patch Datei anzeigen

@@ -0,0 +1,12 @@
1
+diff -urN LVM2.2.02.111.old/lib/device/dev-type.c LVM2.2.02.111/lib/device/dev-type.c
2
+--- LVM2.2.02.111.old/lib/device/dev-type.c	2014-09-17 09:41:08.281821278 -0400
3
++++ LVM2.2.02.111/lib/device/dev-type.c	2014-09-17 09:41:50.773821280 -0400
4
+@@ -22,7 +22,7 @@
5
+ #include <ctype.h>
6
+ 
7
+ #ifdef BLKID_WIPING_SUPPORT
8
+-#include <blkid.h>
9
++#include <blkid/blkid.h>
10
+ #endif
11
+ 
12
+ #include "device-types.h"