Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/lvm2/files: lvm2-2.02.105-static-pkgconfig-libs.patch lvmetad.initd-2.02.105 lvm2-2.02.105-pthread-pkgconfig.patch lvm.rc-2.02.105
Date: Sun, 02 Feb 2014 05:52:05
Message-Id: 20140202055201.474C72004E@flycatcher.gentoo.org
1 robbat2 14/02/02 05:52:01
2
3 Added: lvm2-2.02.105-static-pkgconfig-libs.patch
4 lvmetad.initd-2.02.105
5 lvm2-2.02.105-pthread-pkgconfig.patch
6 lvm.rc-2.02.105
7 Log:
8 Bump per bug #499972. LVM1 support is deprecated upstream and no longer built by default. lvmetad init added. Bug #485082: init ordering adjusted. Bug #492450: pthread fix for static builds. Bug #437714: fix startup/shutdown with multiple VGs.
9
10 (Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
11
12 Revision Changes Path
13 1.1 sys-fs/lvm2/files/lvm2-2.02.105-static-pkgconfig-libs.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.105-static-pkgconfig-libs.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.105-static-pkgconfig-libs.patch?rev=1.1&content-type=text/plain
17
18 Index: lvm2-2.02.105-static-pkgconfig-libs.patch
19 ===================================================================
20 diff -Nuar LVM2.2.02.105.orig/configure.in LVM2.2.02.105/configure.in
21 --- LVM2.2.02.105.orig/configure.in 2014-02-01 14:53:32.167236743 -0800
22 +++ LVM2.2.02.105/configure.in 2014-02-01 15:01:45.893192059 -0800
23 @@ -994,6 +994,7 @@
24 ])
25 if test x$BLKID_WIPING = xyes; then
26 BLKID_PC="blkid"
27 + BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC`
28 AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
29 fi
30 fi
31 @@ -1022,6 +1023,7 @@
32 pkg_config_init
33 fi
34 PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"])
35 + UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev`
36 AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.])
37 fi
38
39 @@ -1265,19 +1267,31 @@
40 if test x$SELINUX = xyes; then
41 AC_CHECK_LIB([sepol], [sepol_check_context], [
42 AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.])
43 - SELINUX_LIBS="-lsepol"])
44 + SEPOL_LIBS="-lsepol"])
45
46 + dnl -- init pkgconfig if required
47 + if test x$PKGCONFIG_INIT != x1; then
48 + pkg_config_init
49 + fi
50 + PKG_CHECK_MODULES(SELINUX, libselinux, [
51 + SELINUX_PC="libselinux"
52 + SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux`
53 + SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS"
54 + AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
55 + ],[
56 + dnl -- old non-pkgconfig method, is buggy with static builds
57 AC_CHECK_LIB([selinux], [is_selinux_enabled], [
58 AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout)
59 AC_CHECK_HEADERS([selinux/label.h])
60 AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.])
61 - SELINUX_LIBS="-lselinux $SELINUX_LIBS"
62 + SELINUX_LIBS="-lselinux $SEPOL_LIBS"
63 SELINUX_PC="libselinux"
64 HAVE_SELINUX=yes ], [
65 AC_MSG_WARN(Disabling selinux)
66 SELINUX_LIBS=
67 SELINUX_PC=
68 HAVE_SELINUX=no ])
69 + ])
70 fi
71
72 ################################################################################
73 @@ -1592,6 +1606,7 @@
74 AC_SUBST(APPLIB)
75 AC_SUBST(AWK)
76 AC_SUBST(BLKID_LIBS)
77 +AC_SUBST(BLKID_STATIC_LIBS)
78 AC_SUBST(BLKID_PC)
79 AC_SUBST(BLKID_WIPING)
80 AC_SUBST(BUILD_CMIRRORD)
81 @@ -1684,6 +1699,7 @@
82 AC_SUBST(SALCK_CFLAGS)
83 AC_SUBST(SALCK_LIBS)
84 AC_SUBST(SELINUX_LIBS)
85 +AC_SUBST(SELINUX_STATIC_LIBS)
86 AC_SUBST(SELINUX_PC)
87 AC_SUBST(SNAPSHOTS)
88 AC_SUBST(STATICDIR)
89 @@ -1695,6 +1711,7 @@
90 AC_SUBST(THIN_DUMP_CMD)
91 AC_SUBST(THIN_REPAIR_CMD)
92 AC_SUBST(UDEV_LIBS)
93 +AC_SUBST(UDEV_STATIC_LIBS)
94 AC_SUBST(UDEV_PC)
95 AC_SUBST(UDEV_RULES)
96 AC_SUBST(UDEV_SYNC)
97 diff -Nuar LVM2.2.02.105.orig/make.tmpl.in LVM2.2.02.105/make.tmpl.in
98 --- LVM2.2.02.105.orig/make.tmpl.in 2014-02-01 14:52:26.779050860 -0800
99 +++ LVM2.2.02.105/make.tmpl.in 2014-02-01 14:57:45.642834111 -0800
100 @@ -44,7 +44,7 @@
101
102 LIBS = @LIBS@
103 # Extra libraries always linked with static binaries
104 -STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
105 +STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS)
106 DEFS += @DEFS@
107 # FIXME set this only where it's needed, not globally?
108 CFLAGS += @CFLAGS@ @UDEV_CFLAGS@
109 @@ -59,8 +59,11 @@
110 PTHREAD_LIBS = @PTHREAD_LIBS@
111 READLINE_LIBS = @READLINE_LIBS@
112 SELINUX_LIBS = @SELINUX_LIBS@
113 +SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@
114 UDEV_LIBS = @UDEV_LIBS@
115 +UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@
116 BLKID_LIBS=@BLKID_LIBS@
117 +BLKID_STATIC_LIBS=@BLKID_STATIC_LIBS@
118 TESTING = @TESTING@
119
120 # Setup directory variables
121
122
123
124 1.1 sys-fs/lvm2/files/lvmetad.initd-2.02.105
125
126 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvmetad.initd-2.02.105?rev=1.1&view=markup
127 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvmetad.initd-2.02.105?rev=1.1&content-type=text/plain
128
129 Index: lvmetad.initd-2.02.105
130 ===================================================================
131 #!/sbin/runscript
132 # Copyright 1999-2014 Gentoo Foundation
133 # Distributed under the terms of the GNU General Public License v2
134 # $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvmetad.initd-2.02.105,v 1.1 2014/02/02 05:52:01 robbat2 Exp $
135
136 pidfile="/var/run/lvmetad.pid"
137 command="/sbin/lvmetad"
138 command_args="${LVMETAD_OPTS:=--pidfile ${pidfile}}"
139 start_stop_daemon_args="--pidfile ${pidfile}"
140
141 depend() {
142 :
143 }
144
145
146
147 1.1 sys-fs/lvm2/files/lvm2-2.02.105-pthread-pkgconfig.patch
148
149 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.105-pthread-pkgconfig.patch?rev=1.1&view=markup
150 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.105-pthread-pkgconfig.patch?rev=1.1&content-type=text/plain
151
152 Index: lvm2-2.02.105-pthread-pkgconfig.patch
153 ===================================================================
154 diff -Nuar LVM2.2.02.105.orig/libdm/libdevmapper.pc.in LVM2.2.02.105/libdm/libdevmapper.pc.in
155 --- LVM2.2.02.105.orig/libdm/libdevmapper.pc.in 2014-01-20 11:25:30.000000000 -0800
156 +++ LVM2.2.02.105/libdm/libdevmapper.pc.in 2014-02-01 14:50:58.805455421 -0800
157 @@ -8,4 +8,5 @@
158 Version: @DM_LIB_PATCHLEVEL@
159 Cflags: -I${includedir}
160 Libs: -L${libdir} -ldevmapper
161 +Libs.private: -L${libdir} @PTHREAD_LIBS@
162 Requires.private: @SELINUX_PC@ @UDEV_PC@
163
164
165
166 1.1 sys-fs/lvm2/files/lvm.rc-2.02.105
167
168 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm.rc-2.02.105?rev=1.1&view=markup
169 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm.rc-2.02.105?rev=1.1&content-type=text/plain
170
171 Index: lvm.rc-2.02.105
172 ===================================================================
173 #!/sbin/runscript
174 # Copyright 1999-2014 Gentoo Foundation
175 # Distributed under the terms of the GNU General Public License v2
176 # $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/files/lvm.rc-2.02.105,v 1.1 2014/02/02 05:52:01 robbat2 Exp $
177
178 depend() {
179 before checkfs fsck
180 after modules device-mapper
181 need lvmetad
182 }
183
184 config='global { locking_dir = "/run/lock/lvm" }'
185
186 dm_in_proc() {
187 local retval=0
188 for x in devices misc ; do
189 grep -qs 'device-mapper' /proc/${x}
190 retval=$((${retval} + $?))
191 done
192 return ${retval}
193 }
194
195 start() {
196 # LVM support for /usr, /home, /opt ....
197 # This should be done *before* checking local
198 # volumes, or they never get checked.
199
200 # NOTE: Add needed modules for LVM or RAID, etc
201 # to /etc/modules.autoload if needed
202 for lvm_path in /bin/lvm /sbin/lvm ; do
203 [ -x "$lvm_path" ] && break
204 done
205 if [ ! -x "$lvm_path" ]; then
206 eerror "Cannot find lvm binary in /sbin or /bin!"
207 return 1
208 fi
209 if [ -z "${CDBOOT}" ] ; then
210 if [ -e /proc/modules ] && ! dm_in_proc ; then
211 modprobe dm-mod 2>/dev/null
212 fi
213 if [ -d /proc/lvm ] || dm_in_proc ; then
214 ebegin "Setting up the Logical Volume Manager"
215 #still echo stderr for debugging
216 lvm_commands="#! ${lvm_path} --config '${config}'\n"
217 # Extra PV find pass because some devices might not have been available until very recently
218 lvm_commands="${lvm_commands}pvscan\n"
219 # Now make the nodes
220 lvm_commands="${lvm_commands}vgscan --mknodes\n"
221 # And turn them on!
222 lvm_commands="${lvm_commands}vgchange --sysinit -a ly\n"
223 # Order of this is important, have to work around dash and LVM readline
224 printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
225 eend $? "Failed to setup the LVM"
226 fi
227 fi
228 }
229
230 stop() {
231 for lvm_path in /bin/lvm /sbin/lvm ; do
232 [ -x "$lvm_path" ] && break
233 done
234 if [ ! -x "$lvm_path" ]; then
235 eerror "Cannot find lvm binary in /sbin or /bin!"
236 return 1
237 fi
238 # Stop LVM2
239 if [ -x /sbin/vgs ] && \
240 [ -x /sbin/vgchange ] && \
241 [ -x /sbin/lvchange ] && \
242 [ -f /etc/lvmtab -o -d /etc/lvm ] && \
243 [ -d /proc/lvm -o "`grep device-mapper /proc/misc 2>/dev/null`" ]
244 then
245 einfo "Shutting down the Logical Volume Manager"
246
247
248 VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)
249
250 if [ "$VGS" ]
251 then
252 ebegin " Shutting Down LVs & VGs"
253 #still echo stderr for debugging
254 lvm_commands="#! ${lvm_path} --config '${config}'\n"
255 # Extra PV find pass because some devices might not have been available until very recently
256 lvm_commands="${lvm_commands}lvchange --sysinit -a ln ${VGS}\n"
257 # Now make the nodes
258 lvm_commands="${lvm_commands}vgchange --sysinit -a ln ${VGS}\n"
259 # Order of this is important, have to work around dash and LVM readline
260 printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null
261 eend $? "Failed"
262 fi
263
264 einfo "Finished Shutting down the Logical Volume Manager"
265 fi
266 }
267
268 # vim:ts=4