Re: rpm 5.1.9 issues on powerPC architecture

2016-04-12 Thread Rajul Bhavsar
Thanks Jeff.

Please find answers inline.

-Rajul

On Tue, Apr 12, 2016 at 9:58 PM, Jeff Johnson <n3...@mac.com> wrote:

>
> On Apr 11, 2016, at 1:25 PM, Rajul Bhavsar wrote:
>
> Hi,
>
> We are trying to use rpm 5.1.9 on powerPC architecture. But, we see that
> there are issues with basic querying:
>
>
> Hmm why rpm-5.1.9, which was released quite some time ago?
> >>>> Yes, its older version. But that is what current version we had. Will
> like to move to 5.4.14 in near future and that rpm version performs all
> required queries perfectly fine.
>
> $ rpm -qai
> rpm: -qai: unknown option
> $
>
>
> Try a simpler query first: does rpm -qa "work"?
>


> >>>> Yes, -qa works, but --xml or --yaml do not work along with -qpi.
> Also, use of --force give same error in rpm -iv command.
>


> The -i option is contextually dependent with multiple meanings in rpm
> and the processing is painfully complex. Identifying what does and does not
> work will be helpful in finding a fix.
>
> When we try to query custom metadata (implemented using arbitrary tags)
> then also it is failing (giving output as *(none)*). We have proper macro
> file in /usr/lib/rpm-5.1.9/macros and rpm is referring to it.
>
>
> (from memory of a recent patch from Poky/Yocto)
>
> The arbitrary tag values are likely in native endian.
> Did you build and query both on the same machine, or are you
> trying to query a package built on x86_64 on a ppc* machine?
>


> >>>> rpm files are generated on x86_64 machines but querying it on ppc
> machines (arch within rpm is ppc). Inbuilt metadata can be queried using
> --qf but not custom metadata. I guessed that endianness should not have
> impact rpm metadata content. But, even if it has, then it should give
> garbled values and not "(none)" as its result. However, querying custom
> metadata works fine in 5.4.14.
>


> $ rpm --showrc | grep macros
> macrofiles:
> /usr/lib/rpm-5.1.9/macros:/usr/lib/rpm-5.1.9/ppc-linux/macros:/etc/rpm/5.1.9/macros.*:/etc/rpm/5.1.9/macros:/etc/rpm/5.1.9/ppc-linux/macros:~/.rpmmacros-5.1.9
> $
>
> We see that on x86_64 these things work fine. We do not see anything
> specific to architecture in the build of rpm, but only difference is that -
> host's arch is x86_64.
>
> Can anybody tell what is peculiar about rpm on powerPC arch?
>
>
> hth
>
> 73 de Jeff
>
> Thanks,
> Rajul
>
>
>


rpm 5.1.9 issues on powerPC architecture

2016-04-11 Thread Rajul Bhavsar
Hi,

We are trying to use rpm 5.1.9 on powerPC architecture. But, we see that
there are issues with basic querying:

$ rpm -qai
rpm: -qai: unknown option
$

When we try to query custom metadata (implemented using arbitrary tags)
then also it is failing (giving output as *(none)*). We have proper macro
file in /usr/lib/rpm-5.1.9/macros and rpm is referring to it.

$ rpm --showrc | grep macros
macrofiles:
/usr/lib/rpm-5.1.9/macros:/usr/lib/rpm-5.1.9/ppc-linux/macros:/etc/rpm/5.1.9/macros.*:/etc/rpm/5.1.9/macros:/etc/rpm/5.1.9/ppc-linux/macros:~/.rpmmacros-5.1.9
$

We see that on x86_64 these things work fine. We do not see anything
specific to architecture in the build of rpm, but only difference is that -
host's arch is x86_64.

Can anybody tell what is peculiar about rpm on powerPC arch?

Thanks,
Rajul


hard-linked files handling by rpm

2014-01-21 Thread Rajul Bhavsar
Hi,

In my build root directory, I have created a file (say temp.txt) and then I
created a hard-link to it (say temp1.txt). After this, I created rpm out of
build root directory. On installing this rpm I see that i-node numbers of
both files are same; that means rpm is aware of this hard-link and creating
the same on rpm installation.

But, I am not able to understand how rpm has treated this hard-link with a
.rpm file.
For example, I have a file with 5k size. On duplicating it, rpm size
increased by ~2.5k but with hard-link it increased by 1.9k. What is this
1.9k? Is this totally a metadata about hard-link or something else?

Please help me in understanding this hard-link handling.

Thanks,
Rajul


Re: functionality opposite to --excludepath

2014-01-21 Thread Rajul Bhavsar
On Tue, Jan 21, 2014 at 10:10 PM, Jeffrey Johnson n3...@me.com wrote:


 On Jan 21, 2014, at 2:21 AM, Rajul Bhavsar rajulbhav...@gmail.com wrote:

  Hi,
 
  Does rpm5 provides selective installation of files that begins with a
 certain path?
  e.g. I want to install files beginning with /usr/lib. I am not able to
 find option for this functionality.
 

 RPM doesn’t provide —include path because the goal is to manage
 packages, not files.
  But, isn't --excludepath handles files? Also, after finding
 --excludepath only, I looked for --includepath.



 Easiest way to extract some files is likely to use cpio(1) options.

 E.g.
 rpm2cpio somepackage.rpm | cpio -dim
 will extract all files.
  Is this extraction can be specified as part of rpm installation? If it
 is not then it will be of less use for current functionality we are looking
 for, as we want to query rpmdb for various information about installed
 packages.



 hth

 73 de Jeff
  I am aware of --excludepath but the list can become huge in future.
 
  Thanks,
  Rajul

 __
 RPM Package Managerhttp://rpm5.org
 User Communication List rpm-users@rpm5.org



Re: hard-linked files handling by rpm

2014-01-21 Thread Rajul Bhavsar
On Tue, Jan 21, 2014 at 10:23 PM, Jeffrey Johnson n3...@me.com wrote:


 On Jan 21, 2014, at 3:03 AM, Rajul Bhavsar rajulbhav...@gmail.com wrote:

  Hi,
 
  In my build root directory, I have created a file (say temp.txt) and
 then I created a hard-link to it (say temp1.txt). After this, I created rpm
 out of build root directory. On installing this rpm I see that i-node
 numbers of both files are same; that means rpm is aware of this hard-link
 and creating the same on rpm installation.
 
  But, I am not able to understand how rpm has treated this hard-link with
 a .rpm file.
  For example, I have a file with 5k size. On duplicating it, rpm size
 increased by ~2.5k but with hard-link it increased by 1.9k. What is this
 1.9k? Is this totally a metadata about hard-link or something else?
 
  Please help me in understanding this hard-link handling.
 

 The size change is likely in the cpio payload in a *.rpm package because
 rpm doesn’t track hard links directly, uses the inode info to infer hard
 links.
  If hard-links are treated as just another files (for inclusion in
 .rpm) then why difference in size of payload - when same file is duplicated
 and hard-linked?



 You can see all metadata with
 rpm -qp —yaml  somepackage.rpm
 There is also —xml if you prefer the eye-scratchy angle bracket syntax.

 hth

 73 de Jeff
  Thanks,
  Rajul

 __
 RPM Package Managerhttp://rpm5.org
 User Communication List rpm-users@rpm5.org