diff options
author | Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | 2015-08-21 22:38:27 +0530 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-08-31 19:30:55 +0200 |
commit | 5a8bbda588e36a9aba70d67c9caa565b3959cbe7 (patch) | |
tree | ba6d6f3fa1f50ac7b010b2ef4ee79e6bf53cefbf /meta-filesystems | |
parent | dec5c702fa2064217cc87441ed461e088012df0e (diff) | |
download | meta-openembedded-5a8bbda588e36a9aba70d67c9caa565b3959cbe7.tar.gz |
xfsdump: add new recipe
The xfsdump package contains xfsdump, xfsrestore and a
number of other utilities for administering XFS filesystems.
xfsdump examines files in a filesystem, determines which
need to be backed up, and copies those files to a
specified disk, tape or other storage medium.
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-filesystems')
-rw-r--r-- | meta-filesystems/recipes-utils/xfsdump/files/remove-install-as-user.patch | 205 | ||||
-rw-r--r-- | meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb | 36 |
2 files changed, 241 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-utils/xfsdump/files/remove-install-as-user.patch b/meta-filesystems/recipes-utils/xfsdump/files/remove-install-as-user.patch new file mode 100644 index 000000000..e761db371 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/files/remove-install-as-user.patch | |||
@@ -0,0 +1,205 @@ | |||
1 | remove install as user | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration] | ||
4 | |||
5 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
6 | --- | ||
7 | include/buildmacros | 2 +- | ||
8 | include/install-sh | 95 ++++++++--------------------------------------------- | ||
9 | 2 files changed, 14 insertions(+), 83 deletions(-) | ||
10 | |||
11 | diff --git a/include/buildmacros b/include/buildmacros | ||
12 | index 7a01880..0840d55 100644 | ||
13 | --- a/include/buildmacros | ||
14 | +++ b/include/buildmacros | ||
15 | @@ -30,7 +30,7 @@ OBJECTS = $(ASFILES:.s=.o) \ | ||
16 | $(LFILES:.l=.o) \ | ||
17 | $(YFILES:%.y=%.tab.o) | ||
18 | |||
19 | -INSTALL = $(TOPDIR)/install-sh -o $(PKG_USER) -g $(PKG_GROUP) | ||
20 | +INSTALL = $(TOPDIR)/install-sh | ||
21 | |||
22 | IMAGES_DIR = $(TOPDIR)/all-images | ||
23 | DIST_DIR = $(TOPDIR)/dist | ||
24 | diff --git a/include/install-sh b/include/install-sh | ||
25 | index c952a71..b9d66f7 100755 | ||
26 | --- a/include/install-sh | ||
27 | +++ b/include/install-sh | ||
28 | @@ -24,11 +24,11 @@ | ||
29 | # set set | yes yes | ||
30 | # | ||
31 | _usage() { | ||
32 | - echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory" | ||
33 | - echo "or $prog [-D] [-o owner] [-g group] [-m mode] file directory/file" | ||
34 | - echo "or $prog [-o owner] [-g group] [-m mode] file [file ...] directory" | ||
35 | + echo "Usage: $prog [-m mode] -d directory" | ||
36 | + echo "or $prog [-m mode] file directory/file" | ||
37 | + echo "or $prog [-m mode] file [file ...] directory" | ||
38 | echo "or $prog -S file target (creates \"target\" symlink)" | ||
39 | - echo "or $prog -T lt_arg [-o owner] [-g group] [-m mode] libtool.lai directory" | ||
40 | + echo "or $prog -T lt_arg [-m mode] libtool.lai directory" | ||
41 | echo "" | ||
42 | echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the" | ||
43 | echo "behaviour of this command - see comments in the script." | ||
44 | @@ -38,32 +38,6 @@ _usage() { | ||
45 | exit 1 | ||
46 | } | ||
47 | |||
48 | -_chown () | ||
49 | -{ | ||
50 | - _st=255 | ||
51 | - if [ $# -eq 3 ] ; then | ||
52 | - chown $1:$2 $3 | ||
53 | - _st=$? | ||
54 | - if [ $_st -ne 0 ] ; then | ||
55 | - if [ $REAL_UID != '0' ] ; then | ||
56 | - if [ ! -f $DIST_ROOT/.chown.quiet ] ; then | ||
57 | - echo '===============================================' | ||
58 | - echo Ownership of files under ${DIST_ROOT:-/} | ||
59 | - echo cannot be changed | ||
60 | - echo '===============================================' | ||
61 | - if [ -n "$DIST_ROOT" ] ; then | ||
62 | - touch $DIST_ROOT/.chown.quiet | ||
63 | - fi | ||
64 | - fi | ||
65 | - _st=0 | ||
66 | - fi | ||
67 | - fi | ||
68 | - fi | ||
69 | - | ||
70 | - return $_st | ||
71 | -} | ||
72 | - | ||
73 | - | ||
74 | _manifest () | ||
75 | { | ||
76 | echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null} | ||
77 | @@ -77,9 +51,6 @@ Sflag=false | ||
78 | Tflag=false | ||
79 | DIRMODE=755 | ||
80 | FILEMODE=644 | ||
81 | -OWNER=`id -u` | ||
82 | -GROUP=`id -g` | ||
83 | -REAL_UID=$OWNER | ||
84 | |||
85 | # default is to install and don't append manifest | ||
86 | INSTALL=true | ||
87 | @@ -94,24 +65,16 @@ MANIFEST=: | ||
88 | |||
89 | if $INSTALL | ||
90 | then | ||
91 | - CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown | ||
92 | + CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; | ||
93 | else | ||
94 | - CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true | ||
95 | + CP=true; LN=true; MKDIR=true; CHMOD=true; | ||
96 | fi | ||
97 | |||
98 | -[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true | ||
99 | - | ||
100 | -while getopts "Dcm:d:S:o:g:T:" c $* | ||
101 | +while getopts "Dcm:d:S:T:" c $* | ||
102 | do | ||
103 | case $c in | ||
104 | c) | ||
105 | ;; | ||
106 | - g) | ||
107 | - GROUP=$OPTARG | ||
108 | - ;; | ||
109 | - o) | ||
110 | - OWNER=$OPTARG | ||
111 | - ;; | ||
112 | m) | ||
113 | DIRMODE=`expr $OPTARG` | ||
114 | FILEMODE=$DIRMODE | ||
115 | @@ -146,18 +109,7 @@ then | ||
116 | # first usage | ||
117 | # | ||
118 | $MKDIR -p $dir | ||
119 | - status=$? | ||
120 | - if [ $status -eq 0 ] | ||
121 | - then | ||
122 | - $CHMOD $DIRMODE $dir | ||
123 | - status=$? | ||
124 | - fi | ||
125 | - if [ $status -eq 0 ] | ||
126 | - then | ||
127 | - $CHOWN $OWNER $GROUP $dir | ||
128 | - status=$? | ||
129 | - fi | ||
130 | - $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT} | ||
131 | + $MANIFEST d $DIRMODE ${dir#$DIST_ROOT} | ||
132 | elif $Sflag | ||
133 | then | ||
134 | # | ||
135 | @@ -203,7 +155,7 @@ then | ||
136 | install_name=$target/$solib | ||
137 | $CP $solib $install_name | ||
138 | status=$? | ||
139 | - $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT} | ||
140 | + $MANIFEST f $FILEMODE $HERE/$solib ${install_name#$DIST_ROOT} | ||
141 | break | ||
142 | fi | ||
143 | done | ||
144 | @@ -254,7 +206,7 @@ then | ||
145 | install_name=$target/$old_library | ||
146 | $CP $old_library $install_name | ||
147 | status=$? | ||
148 | - $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT} | ||
149 | + $MANIFEST f $FILEMODE $HERE/$old_library ${install_name#$DIST_ROOT} | ||
150 | ;; | ||
151 | *) | ||
152 | echo "$prog: -T $lt_install invalid" | ||
153 | @@ -267,7 +219,6 @@ then | ||
154 | if [ $status -eq 0 ] | ||
155 | then | ||
156 | $CHMOD $FILEMODE $install_name | ||
157 | - $CHOWN $OWNER $GROUP $install_name | ||
158 | fi | ||
159 | ;; | ||
160 | esac | ||
161 | @@ -292,23 +243,10 @@ else | ||
162 | then | ||
163 | if [ -f $dir/$f ] | ||
164 | then | ||
165 | - $CHMOD $FILEMODE $dir/$f | ||
166 | - status=$? | ||
167 | - if [ $status -eq 0 ] | ||
168 | - then | ||
169 | - $CHOWN $OWNER $GROUP $dir/$f | ||
170 | - status=$? | ||
171 | - fi | ||
172 | - $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f | ||
173 | + $MANIFEST f $FILEMODE $HERE/$f ${dir#$DIST_ROOT}/$f | ||
174 | else | ||
175 | $CHMOD $FILEMODE $dir | ||
176 | - status=$? | ||
177 | - if [ $status -eq 0 ] | ||
178 | - then | ||
179 | - $CHOWN $OWNER $GROUP $dir | ||
180 | - status=$? | ||
181 | - fi | ||
182 | - $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT} | ||
183 | + $MANIFEST f $FILEMODE $HERE/$dir ${dir#$DIST_ROOT} | ||
184 | fi | ||
185 | fi | ||
186 | else | ||
187 | @@ -334,14 +272,7 @@ else | ||
188 | status=$? | ||
189 | if [ $status -eq 0 ] | ||
190 | then | ||
191 | - $CHMOD $FILEMODE $dir/$f | ||
192 | - status=$? | ||
193 | - if [ $status -eq 0 ] | ||
194 | - then | ||
195 | - $CHOWN $OWNER $GROUP $dir/$f | ||
196 | - status=$? | ||
197 | - fi | ||
198 | - $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f | ||
199 | + $MANIFEST f $FILEMODE $HERE/$f ${dir#$DIST_ROOT}/$f | ||
200 | fi | ||
201 | [ $status -ne 0 ] && break | ||
202 | done | ||
203 | -- | ||
204 | 1.8.1.2 | ||
205 | |||
diff --git a/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb b/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb new file mode 100644 index 000000000..e053a6ef2 --- /dev/null +++ b/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "XFS Filesystem Dump Utility" | ||
2 | DESCRIPTION = "The xfsdump package contains xfsdump, xfsrestore and a \ | ||
3 | number of other utilities for administering XFS filesystems.\ | ||
4 | xfsdump examines files in a filesystem, determines which \ | ||
5 | need to be backed up, and copies those files to a \ | ||
6 | specified disk, tape or other storage medium." | ||
7 | HOMEPAGE = "http://oss.sgi.com/projects/xfs" | ||
8 | SECTION = "base" | ||
9 | LICENSE = "GPLv2" | ||
10 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc" | ||
11 | DEPENDS = "xfsprogs attr" | ||
12 | |||
13 | SRC_URI = "ftp://oss.sgi.com/projects/xfs/cmd_tars/${BPN}-${PV}.tar.gz \ | ||
14 | file://remove-install-as-user.patch \ | ||
15 | " | ||
16 | SRC_URI[md5sum] = "a8b1761be5feb363131e7b506639ad4c" | ||
17 | SRC_URI[sha256sum] = "570eafd0721515bdd79cb0e295b701d49cdf81e71a0a0ff0df6d4c5cc1960943" | ||
18 | |||
19 | inherit autotools-brokensep | ||
20 | |||
21 | PARALLEL_MAKE = "" | ||
22 | PACKAGECONFIG ??= "" | ||
23 | PACKAGECONFIG[gettext] = "--enable-gettext=yes,--enable-gettext=no,gettext" | ||
24 | |||
25 | EXTRA_OEMAKE += "'LIBTOOL=${HOST_SYS}-libtool' V=1" | ||
26 | |||
27 | do_configure () { | ||
28 | export DEBUG="-DNDEBUG" | ||
29 | oe_runconf | ||
30 | } | ||
31 | |||
32 | do_install () { | ||
33 | export DIST_ROOT=${D} | ||
34 | oe_runmake install | ||
35 | oe_runmake install-dev | ||
36 | } | ||