All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-filesystems][PATCH] xfsdump: add new recipe
Date: Thu, 20 Aug 2015 18:48:27 +0200	[thread overview]
Message-ID: <20150820164827.GL2446@jama> (raw)
In-Reply-To: <1440088125-1120-1-git-send-email-jkrishnanjanappa@mvista.com>

[-- Attachment #1: Type: text/plain, Size: 9188 bytes --]

On Thu, Aug 20, 2015 at 09:58:45PM +0530, Jagadeesh Krishnanjanappa wrote:
> 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>
> ---
>  .../xfsdump/files/remove-install-as-user.patch     | 205 +++++++++++++++++++++
>  .../recipes-utils/xfsdump/xfsdump_3.1.4.bb         |  37 ++++
>  2 files changed, 242 insertions(+)
>  create mode 100644 meta-filesystems/recipes-utils/xfsdump/files/remove-install-as-user.patch
>  create mode 100644 meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb
> 
> 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 0000000..e761db3
> --- /dev/null
> +++ b/meta-filesystems/recipes-utils/xfsdump/files/remove-install-as-user.patch
> @@ -0,0 +1,205 @@
> +remove install as user
> +
> +Upstream-Status: Inappropriate [configuration]
> +
> +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +---
> + include/buildmacros |  2 +-
> + include/install-sh  | 95 ++++++++---------------------------------------------
> + 2 files changed, 14 insertions(+), 83 deletions(-)
> +
> +diff --git a/include/buildmacros b/include/buildmacros
> +index 7a01880..0840d55 100644
> +--- a/include/buildmacros
> ++++ b/include/buildmacros
> +@@ -30,7 +30,7 @@ OBJECTS = $(ASFILES:.s=.o) \
> + 	  $(LFILES:.l=.o) \
> + 	  $(YFILES:%.y=%.tab.o)
> + 
> +-INSTALL	= $(TOPDIR)/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
> ++INSTALL	= $(TOPDIR)/install-sh
> + 
> + IMAGES_DIR = $(TOPDIR)/all-images
> + DIST_DIR = $(TOPDIR)/dist
> +diff --git a/include/install-sh b/include/install-sh
> +index c952a71..b9d66f7 100755
> +--- a/include/install-sh
> ++++ b/include/install-sh
> +@@ -24,11 +24,11 @@
> + #       set           set      |    yes        yes
> + #
> + _usage() {
> +-    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
> +-    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
> +-    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
> ++    echo "Usage: $prog [-m mode] -d directory"
> ++    echo "or     $prog [-m mode] file directory/file"
> ++    echo "or     $prog [-m mode] file [file ...] directory"
> +     echo "or     $prog -S file target  (creates \"target\" symlink)"
> +-    echo "or     $prog -T lt_arg [-o owner] [-g group] [-m mode] libtool.lai directory"
> ++    echo "or     $prog -T lt_arg [-m mode] libtool.lai directory"
> +     echo ""
> +     echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
> +     echo "behaviour of this command - see comments in the script."
> +@@ -38,32 +38,6 @@ _usage() {
> +     exit 1
> + }
> + 
> +-_chown ()
> +-{
> +-    _st=255
> +-    if [ $# -eq 3 ] ; then
> +-	chown $1:$2 $3
> +-	_st=$?
> +-	if [ $_st -ne 0 ] ; then
> +-	    if [ $REAL_UID != '0' ] ; then
> +-		if [ ! -f $DIST_ROOT/.chown.quiet ] ; then
> +-		    echo '==============================================='
> +-		    echo Ownership of files under ${DIST_ROOT:-/}
> +-		    echo cannot be changed
> +-		    echo '==============================================='
> +-		    if [ -n "$DIST_ROOT" ] ; then
> +-			touch $DIST_ROOT/.chown.quiet
> +-		    fi
> +-		fi
> +-	       _st=0
> +-	    fi     
> +-	fi
> +-    fi
> +-
> +-    return $_st
> +-}
> +-
> +-
> + _manifest ()
> + { 
> +     echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
> +@@ -77,9 +51,6 @@ Sflag=false
> + Tflag=false
> + DIRMODE=755
> + FILEMODE=644
> +-OWNER=`id -u`
> +-GROUP=`id -g`
> +-REAL_UID=$OWNER
> + 
> + # default is to install and don't append manifest
> + INSTALL=true
> +@@ -94,24 +65,16 @@ MANIFEST=:
> + 
> + if $INSTALL
> + then
> +-    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
> ++    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod;
> + else
> +-    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
> ++    CP=true; LN=true; MKDIR=true; CHMOD=true;
> + fi
> + 
> +-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
> +-
> +-while getopts "Dcm:d:S:o:g:T:" c $*
> ++while getopts "Dcm:d:S:T:" c $*
> + do
> +    case $c in
> +    c)
> + 	;;
> +-   g)
> +-	GROUP=$OPTARG
> +-	;;
> +-   o)
> +-	OWNER=$OPTARG
> +-	;;
> +    m)
> + 	DIRMODE=`expr $OPTARG`
> + 	FILEMODE=$DIRMODE
> +@@ -146,18 +109,7 @@ then
> +     # first usage
> +     #
> +     $MKDIR -p $dir 
> +-    status=$?
> +-    if [ $status -eq 0 ]
> +-    then
> +-	$CHMOD $DIRMODE $dir
> +-	status=$?
> +-    fi
> +-    if [ $status -eq 0 ]
> +-    then
> +-	$CHOWN $OWNER $GROUP $dir
> +-	status=$?
> +-    fi
> +-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
> ++    $MANIFEST d $DIRMODE ${dir#$DIST_ROOT}
> + elif $Sflag
> + then
> +     #
> +@@ -203,7 +155,7 @@ then
> + 			install_name=$target/$solib
> + 			$CP $solib $install_name
> + 			status=$?
> +-			$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT}
> ++			$MANIFEST f $FILEMODE $HERE/$solib ${install_name#$DIST_ROOT}
> + 			break
> + 		fi
> + 	done
> +@@ -254,7 +206,7 @@ then
> + 	install_name=$target/$old_library
> + 	$CP $old_library $install_name
> + 	status=$?
> +-	$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT}
> ++	$MANIFEST f $FILEMODE $HERE/$old_library ${install_name#$DIST_ROOT}
> + 	;;
> +     *)
> + 	echo "$prog: -T $lt_install invalid"
> +@@ -267,7 +219,6 @@ then
> + 	if [ $status -eq 0 ]
> + 	then
> + 		$CHMOD $FILEMODE $install_name
> +-		$CHOWN $OWNER $GROUP $install_name
> + 	fi
> + 	;;
> +     esac
> +@@ -292,23 +243,10 @@ else
> + 	then 
> + 	    if [ -f $dir/$f ]
> + 	    then
> +-		$CHMOD $FILEMODE $dir/$f
> +-		status=$?
> +-		if [ $status -eq 0 ]
> +-		then
> +-		    $CHOWN $OWNER $GROUP $dir/$f
> +-		    status=$?
> +-		fi
> +-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
> ++		$MANIFEST f $FILEMODE $HERE/$f ${dir#$DIST_ROOT}/$f
> + 	    else
> + 		$CHMOD $FILEMODE $dir
> +-		status=$?
> +-		if [ $status -eq 0 ]
> +-		then
> +-		    $CHOWN $OWNER $GROUP $dir
> +-		    status=$?
> +-		fi
> +-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
> ++		$MANIFEST f $FILEMODE $HERE/$dir ${dir#$DIST_ROOT}
> + 	    fi
> + 	fi
> +     else
> +@@ -334,14 +272,7 @@ else
> + 	    status=$?
> + 	    if [ $status -eq 0 ]
> + 	    then
> +-		$CHMOD $FILEMODE $dir/$f
> +-		status=$?
> +-		if [ $status -eq 0 ]
> +-		then
> +-		    $CHOWN $OWNER $GROUP $dir/$f
> +-		    status=$?
> +-		fi
> +-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
> ++		$MANIFEST f $FILEMODE $HERE/$f ${dir#$DIST_ROOT}/$f
> + 	    fi
> + 	    [ $status -ne 0 ] && break
> + 	done
> +-- 
> +1.8.1.2
> +
> 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 0000000..4d152b1
> --- /dev/null
> +++ b/meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb
> @@ -0,0 +1,37 @@
> +SUMMARY = "XFS Filesystem Dump Utility"
> +DESCRIPTION = "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."
> +HOMEPAGE = "http://oss.sgi.com/projects/xfs"
> +SECTION = "base"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=15c832894d10ddd00dfcf57bee490ecc"
> +DEPENDS = "xfsprogs attr"
> +
> +SRC_URI = "ftp://oss.sgi.com/projects/xfs/cmd_tars/${BPN}-${PV}.tar.gz \
> +	   file://remove-install-as-user.patch \
> +          "
> +SRC_URI[md5sum] = "a8b1761be5feb363131e7b506639ad4c"
> +SRC_URI[sha256sum] = "570eafd0721515bdd79cb0e295b701d49cdf81e71a0a0ff0df6d4c5cc1960943"
> +
> +inherit autotools
> +B = "${S}"

Why don't you use autotools-brokensep?

The same does apply to dmapi recipe.

> +
> +PARALLEL_MAKE = ""
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[gettext] = "--enable-gettext=yes,--enable-gettext=no,gettext"
> +
> +EXTRA_OEMAKE += "'LIBTOOL=${HOST_SYS}-libtool' V=1"
> +
> +do_configure () {
> +    export DEBUG="-DNDEBUG"
> +    oe_runconf
> +}
> +
> +do_install () {
> +    export DIST_ROOT=${D}
> +    oe_runmake install 
> +    oe_runmake install-dev
> +}
> -- 
> 1.9.1
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

  reply	other threads:[~2015-08-20 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 16:28 [meta-filesystems][PATCH] xfsdump: add new recipe Jagadeesh Krishnanjanappa
2015-08-20 16:48 ` Martin Jansa [this message]
2015-08-21 16:24   ` Jagadeesh Krishnanjanappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150820164827.GL2446@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.