summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lvm2
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-support/lvm2
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/lvm2')
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2.inc52
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch33
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2/lvm.conf292
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2/mlock-ignore-vectors-gate_vma.patch31
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb6
5 files changed, 414 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
new file mode 100644
index 000000000..42f6e3a43
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -0,0 +1,52 @@
1SECTION = "utils"
2DESCRIPTION = "LVM2 is a set of utilities to manage logical volumes in Linux."
3DEPENDS = "udev"
4LICENSE = "GPLv2 & LGPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
6 file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24"
7INC_PR = "r4"
8
9
10S = "${WORKDIR}/LVM2.${PV}"
11SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
12 file://0001-Replace-CPPFunction-with-rl_completion_func_t.patch \
13 file://mlock-ignore-vectors-gate_vma.patch \
14 file://lvm.conf"
15
16PACKAGECONFIG ??= "readline"
17PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline"
18
19# Unset user/group to unbreak install.
20EXTRA_OECONF = "--with-user= \
21 --with-group= \
22 --disable-o_direct \
23 --enable-realtime \
24 --enable-applib \
25 --enable-cmdlib \
26 --enable-udev_sync \
27 --enable-udev_rules \
28 --enable-pkgconfig \
29 --enable-dmeventd \
30 --with-udev-prefix= \
31 --with-usrlibdir=${libdir} \
32"
33
34PACKAGECONFIG += "${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
35
36PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
37
38inherit autotools pkgconfig
39
40do_install_append() {
41 # Install machine specific configuration file
42 install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
43}
44
45TARGET_CC_ARCH += "${LDFLAGS}"
46
47FILES_${PN} += "${libdir}/device-mapper/*.so ${base_libdir}/udev"
48FILES_${PN}-dbg += "${libdir}/device-mapper/.debug"
49
50RDEPENDS_${PN} = "bash"
51
52CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
new file mode 100644
index 000000000..98c21fdb3
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/0001-Replace-CPPFunction-with-rl_completion_func_t.patch
@@ -0,0 +1,33 @@
1From e2484e179c389b98366c8b66b451d9d2ba8f35e8 Mon Sep 17 00:00:00 2001
2From: Zhenhua Luo <zhenhua.luo@freescale.com>
3Date: Tue, 25 Mar 2014 17:39:43 +0800
4Subject: [PATCH] Replace CPPFunction with rl_completion_func_t
5
6lvm2 depends on readline, CPPFunction has been replaced by rl_completion_func_t
7in recent readline,
8
9Upstream-Status: Inappropriate [configuration]
10The change depends on the build environment, it is required by OpenEmbedded env
11due to readline upgrade.
12
13Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
14---
15 tools/lvm.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/tools/lvm.c b/tools/lvm.c
19index e002a76..5fa35d2 100644
20--- a/tools/lvm.c
21+++ b/tools/lvm.c
22@@ -186,7 +186,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
23 char *input = NULL, *args[MAX_ARGS], **argv;
24
25 rl_readline_name = "lvm";
26- rl_attempted_completion_function = (CPPFunction *) _completion;
27+ rl_attempted_completion_function = (rl_completion_func_t *) _completion;
28
29 _read_history(cmd);
30
31--
321.9.1
33
diff --git a/meta-oe/recipes-support/lvm2/lvm2/lvm.conf b/meta-oe/recipes-support/lvm2/lvm2/lvm.conf
new file mode 100644
index 000000000..c44c6a7a0
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/lvm.conf
@@ -0,0 +1,292 @@
1# This is an example configuration file for the LVM2 system.
2# It contains the default settings that would be used if there was no
3# /etc/lvm/lvm.conf file.
4#
5# Refer to 'man lvm.conf' for further information including the file layout.
6#
7# To put this file in a different directory and override /etc/lvm set
8# the environment variable LVM_SYSTEM_DIR before running the tools.
9
10
11# This section allows you to configure which block devices should
12# be used by the LVM system.
13devices {
14
15 # Where do you want your volume groups to appear ?
16 dir = "/dev"
17
18 # An array of directories that contain the device nodes you wish
19 # to use with LVM2.
20 scan = [ "/dev" ]
21
22 # A filter that tells LVM2 to only use a restricted set of devices.
23 # The filter consists of an array of regular expressions. These
24 # expressions can be delimited by a character of your choice, and
25 # prefixed with either an 'a' (for accept) or 'r' (for reject).
26 # The first expression found to match a device name determines if
27 # the device will be accepted or rejected (ignored). Devices that
28 # don't match any patterns are accepted.
29
30 # Be careful if there there are symbolic links or multiple filesystem
31 # entries for the same device as each name is checked separately against
32 # the list of patterns. The effect is that if any name matches any 'a'
33 # pattern, the device is accepted; otherwise if any name matches any 'r'
34 # pattern it is rejected; otherwise it is accepted.
35
36 # Don't have more than one filter line active at once: only one gets used.
37
38 # Run vgscan after you change this parameter to ensure that
39 # the cache file gets regenerated (see below).
40 # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
41
42
43 # By default we accept every block device:
44 filter = [ "a/.*/" ]
45
46 # Exclude the cdrom drive
47 # filter = [ "r|/dev/cdrom|" ]
48
49 # When testing I like to work with just loopback devices:
50 # filter = [ "a/loop/", "r/.*/" ]
51
52 # Or maybe all loops and ide drives except hdc:
53 # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
54
55 # Use anchors if you want to be really specific
56 # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
57
58 # The results of the filtering are cached on disk to avoid
59 # rescanning dud devices (which can take a very long time). By
60 # default this cache file is hidden in the /etc/lvm directory.
61 # It is safe to delete this file: the tools regenerate it.
62 cache = "/etc/lvm/.cache"
63
64 # You can turn off writing this cache file by setting this to 0.
65 write_cache_state = 1
66
67 # Advanced settings.
68
69 # List of pairs of additional acceptable block device types found
70 # in /proc/devices with maximum (non-zero) number of partitions.
71 # types = [ "fd", 16 ]
72
73 # If sysfs is mounted (2.6 kernels) restrict device scanning to
74 # the block devices it believes are valid.
75 # 1 enables; 0 disables.
76 sysfs_scan = 1
77
78 # By default, LVM2 will ignore devices used as components of
79 # software RAID (md) devices by looking for md superblocks.
80 # 1 enables; 0 disables.
81 md_component_detection = 1
82}
83
84# This section that allows you to configure the nature of the
85# information that LVM2 reports.
86log {
87
88 # Controls the messages sent to stdout or stderr.
89 # There are three levels of verbosity, 3 being the most verbose.
90 verbose = 0
91
92 # Should we send log messages through syslog?
93 # 1 is yes; 0 is no.
94 syslog = 1
95
96 # Should we log error and debug messages to a file?
97 # By default there is no log file.
98 #file = "/var/log/lvm2.log"
99
100 # Should we overwrite the log file each time the program is run?
101 # By default we append.
102 overwrite = 0
103
104 # What level of log messages should we send to the log file and/or syslog?
105 # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
106 # 7 is the most verbose (LOG_DEBUG).
107 level = 0
108
109 # Format of output messages
110 # Whether or not (1 or 0) to indent messages according to their severity
111 indent = 1
112
113 # Whether or not (1 or 0) to display the command name on each line output
114 command_names = 0
115
116 # A prefix to use before the message text (but after the command name,
117 # if selected). Default is two spaces, so you can see/grep the severity
118 # of each message.
119 prefix = " "
120
121 # To make the messages look similar to the original LVM tools use:
122 # indent = 0
123 # command_names = 1
124 # prefix = " -- "
125
126 # Set this if you want log messages during activation.
127 # Don't use this in low memory situations (can deadlock).
128 # activation = 0
129}
130
131# Configuration of metadata backups and archiving. In LVM2 when we
132# talk about a 'backup' we mean making a copy of the metadata for the
133# *current* system. The 'archive' contains old metadata configurations.
134# Backups are stored in a human readeable text format.
135backup {
136
137 # Should we maintain a backup of the current metadata configuration ?
138 # Use 1 for Yes; 0 for No.
139 # Think very hard before turning this off!
140 backup = 1
141
142 # Where shall we keep it ?
143 # Remember to back up this directory regularly!
144 backup_dir = "/etc/lvm/backup"
145
146 # Should we maintain an archive of old metadata configurations.
147 # Use 1 for Yes; 0 for No.
148 # On by default. Think very hard before turning this off.
149 archive = 1
150
151 # Where should archived files go ?
152 # Remember to back up this directory regularly!
153 archive_dir = "/etc/lvm/archive"
154
155 # What is the minimum number of archive files you wish to keep ?
156 retain_min = 10
157
158 # What is the minimum time you wish to keep an archive file for ?
159 retain_days = 30
160}
161
162# Settings for the running LVM2 in shell (readline) mode.
163shell {
164
165 # Number of lines of history to store in ~/.lvm_history
166 history_size = 100
167}
168
169
170# Miscellaneous global LVM2 settings
171global {
172
173 # The file creation mask for any files and directories created.
174 # Interpreted as octal if the first digit is zero.
175 umask = 077
176
177 # Allow other users to read the files
178 #umask = 022
179
180 # Enabling test mode means that no changes to the on disk metadata
181 # will be made. Equivalent to having the -t option on every
182 # command. Defaults to off.
183 test = 0
184
185 # Whether or not to communicate with the kernel device-mapper.
186 # Set to 0 if you want to use the tools to manipulate LVM metadata
187 # without activating any logical volumes.
188 # If the device-mapper kernel driver is not present in your kernel
189 # setting this to 0 should suppress the error messages.
190 activation = 1
191
192 # If we can't communicate with device-mapper, should we try running
193 # the LVM1 tools?
194 # This option only applies to 2.4 kernels and is provided to help you
195 # switch between device-mapper kernels and LVM1 kernels.
196 # The LVM1 tools need to be installed with .lvm1 suffices
197 # e.g. vgscan.lvm1 and they will stop working after you start using
198 # the new lvm2 on-disk metadata format.
199 # The default value is set when the tools are built.
200 # fallback_to_lvm1 = 0
201
202 # The default metadata format that commands should use - "lvm1" or "lvm2".
203 # The command line override is -M1 or -M2.
204 # Defaults to "lvm1" if compiled in, else "lvm2".
205 # format = "lvm1"
206
207 # Location of proc filesystem
208 proc = "/proc"
209
210 # Type of locking to use. Defaults to file-based locking (1).
211 # Turn locking off by setting to 0 (dangerous: risks metadata corruption
212 # if LVM2 commands get run concurrently).
213 locking_type = 1
214
215 # Local non-LV directory that holds file-based locks while commands are
216 # in progress. A directory like /tmp that may get wiped on reboot is OK.
217 locking_dir = "/var/lock/lvm"
218
219 # Other entries can go here to allow you to load shared libraries
220 # e.g. if support for LVM1 metadata was compiled as a shared library use
221 # format_libraries = "liblvm2format1.so"
222 # Full pathnames can be given.
223
224 # Search this directory first for shared libraries.
225 # library_dir = "/lib"
226}
227
228activation {
229 # Device used in place of missing stripes if activating incomplete volume.
230 # For now, you need to set this up yourself first (e.g. with 'dmsetup')
231 # For example, you could make it return I/O errors using the 'error'
232 # target or make it return zeros.
233 missing_stripe_filler = "/dev/ioerror"
234
235 # Size (in KB) of each copy operation when mirroring
236 mirror_region_size = 512
237
238 # How much stack (in KB) to reserve for use while devices suspended
239 reserved_stack = 256
240
241 # How much memory (in KB) to reserve for use while devices suspended
242 reserved_memory = 8192
243
244 # Nice value used while devices suspended
245 process_priority = -18
246
247 # If volume_list is defined, each LV is only activated if there is a
248 # match against the list.
249 # "vgname" and "vgname/lvname" are matched exactly.
250 # "@tag" matches any tag set in the LV or VG.
251 # "@*" matches if any tag defined on the host is also set in the LV or VG
252 #
253 # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
254}
255
256
257####################
258# Advanced section #
259####################
260
261# Metadata settings
262#
263# metadata {
264 # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
265 # You might want to override it from the command line with 0
266 # when running pvcreate on new PVs which are to be added to large VGs.
267
268 # pvmetadatacopies = 1
269
270 # Approximate default size of on-disk metadata areas in sectors.
271 # You should increase this if you have large volume groups or
272 # you want to retain a large on-disk history of your metadata changes.
273
274 # pvmetadatasize = 255
275
276 # List of directories holding live copies of text format metadata.
277 # These directories must not be on logical volumes!
278 # It's possible to use LVM2 with a couple of directories here,
279 # preferably on different (non-LV) filesystems, and with no other
280 # on-disk metadata (pvmetadatacopies = 0). Or this can be in
281 # addition to on-disk metadata areas.
282 # The feature was originally added to simplify testing and is not
283 # supported under low memory situations - the machine could lock up.
284 #
285 # Never edit any files in these directories by hand unless you
286 # you are absolutely sure you know what you are doing! Use
287 # the supplied toolset to make changes (e.g. vgcfgrestore).
288
289 # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
290#}
291
292
diff --git a/meta-oe/recipes-support/lvm2/lvm2/mlock-ignore-vectors-gate_vma.patch b/meta-oe/recipes-support/lvm2/lvm2/mlock-ignore-vectors-gate_vma.patch
new file mode 100644
index 000000000..310513679
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2/mlock-ignore-vectors-gate_vma.patch
@@ -0,0 +1,31 @@
1Subject: [PATCH] fix: mlock ignore [vectors] gate_vma
2
3Upstream-Status: Pending
4
5linux kernel has a new commit f9d4861f for [vectors] vma on ARM
6"ARM: 7294/1: vectors: use gate_vma for vectors user mapping".
7
8mlock()/munlock() on a gate_vma would cause NOMEM error, so add
9[vectors] to _ignore_maps[], as other gate_vmas [vdso]/[vsyscall]
10did.
11
12Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
13---
14 lib/mm/memlock.c | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
18index 8c631bf..a6b1955 100644
19--- a/lib/mm/memlock.c
20+++ b/lib/mm/memlock.c
21@@ -84,6 +84,7 @@ static int _default_priority;
22 static const char * const _ignore_maps[] = {
23 "[vdso]",
24 "[vsyscall]",
25+ "[vectors]",
26 };
27
28 /* default blacklist for maps */
29--
301.7.9.5
31
diff --git a/meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb b/meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb
new file mode 100644
index 000000000..2de17cfe3
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb
@@ -0,0 +1,6 @@
1require lvm2.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI[md5sum] = "d18bd01334309db1c422b9bf6b181057"
6SRC_URI[sha256sum] = "edda82012e8a9e1f0b00ba5a331468d3e0201992be14c0dbea71bf564a51fc2b"