All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe-core] Prefix in rpms packages
@ 2012-05-07 10:30 Giuseppe Condorelli
  2012-05-07 17:43 ` Mark Hatle
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Condorelli @ 2012-05-07 10:30 UTC (permalink / raw)
  To: openembedded-devel

Hi All,

after having built my own image, I've looked at the resultant rpms under
the deploy directory and I saw
no relocation is possible (rpm -qpli <package>). This because Prefix is not
set during spec file creation
(package_rpm.bbclass).
As far as you know, is it possible to set Prefix somehow?

Please let me know.
Thanks,
Giuseppe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core] Prefix in rpms packages
  2012-05-07 10:30 [oe-core] Prefix in rpms packages Giuseppe Condorelli
@ 2012-05-07 17:43 ` Mark Hatle
  2012-05-08  8:02   ` Giuseppe Condorelli
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2012-05-07 17:43 UTC (permalink / raw)
  To: openembedded-devel

On 5/7/12 5:30 AM, Giuseppe Condorelli wrote:
> Hi All,
>
> after having built my own image, I've looked at the resultant rpms under
> the deploy directory and I saw
> no relocation is possible (rpm -qpli<package>). This because Prefix is not
> set during spec file creation
> (package_rpm.bbclass).
> As far as you know, is it possible to set Prefix somehow?

What type of packages are you trying to relocate?

For target packages I don't expect that it would ever work.  The items built by 
the build system often have internal paths and expectations.

For SDK packages (i.e. things that run on the host), it might be possible to 
make them relocatable, but it would be specific to those style packages.  (Any 
relocatable package has to have the inbuilt knowledge to move and change 
configuration files as necessary.  Also you have to have the right set of 
packages to install into the environment and such.  I don't believe we use RPM 
to install any native/SDK packages today.)

--Mark

> Please let me know.
> Thanks,
> Giuseppe
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core] Prefix in rpms packages
  2012-05-07 17:43 ` Mark Hatle
@ 2012-05-08  8:02   ` Giuseppe Condorelli
  2012-05-08 12:59     ` Mark Hatle
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Condorelli @ 2012-05-08  8:02 UTC (permalink / raw)
  To: openembedded-devel

Hi Mark, All,
thanks for your reply.
What I need is to manually install target rpms locating them in my own
directory.
With no relocation available I should install them starting from / and this
is not good if I need to install on host.
What I need (in other words) is the possibility to set Prefix during spec
file creation to have a relocation.
Am I wrong?

Cheers,
Giuseppe

2012/5/7 Mark Hatle <mark.hatle@windriver.com>

> On 5/7/12 5:30 AM, Giuseppe Condorelli wrote:
>
>> Hi All,
>>
>> after having built my own image, I've looked at the resultant rpms under
>> the deploy directory and I saw
>> no relocation is possible (rpm -qpli<package>). This because Prefix is not
>> set during spec file creation
>> (package_rpm.bbclass).
>> As far as you know, is it possible to set Prefix somehow?
>>
>
> What type of packages are you trying to relocate?
>
> For target packages I don't expect that it would ever work.  The items
> built by the build system often have internal paths and expectations.
>
> For SDK packages (i.e. things that run on the host), it might be possible
> to make them relocatable, but it would be specific to those style packages.
>  (Any relocatable package has to have the inbuilt knowledge to move and
> change configuration files as necessary.  Also you have to have the right
> set of packages to install into the environment and such.  I don't believe
> we use RPM to install any native/SDK packages today.)
>
> --Mark
>
>  Please let me know.
>> Thanks,
>> Giuseppe
>> ______________________________**_________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.**openembedded.org<Openembedded-devel@lists.openembedded.org>
>> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**
>> openembedded-devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>>
>
>
> ______________________________**_________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.**openembedded.org<Openembedded-devel@lists.openembedded.org>
> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**openembedded-devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core] Prefix in rpms packages
  2012-05-08  8:02   ` Giuseppe Condorelli
@ 2012-05-08 12:59     ` Mark Hatle
  2012-05-08 14:20       ` Giuseppe Condorelli
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2012-05-08 12:59 UTC (permalink / raw)
  To: openembedded-devel

On 5/8/12 3:02 AM, Giuseppe Condorelli wrote:
> Hi Mark, All,
> thanks for your reply.
> What I need is to manually install target rpms locating them in my own
> directory.
> With no relocation available I should install them starting from / and this
> is not good if I need to install on host.
> What I need (in other words) is the possibility to set Prefix during spec
> file creation to have a relocation.
> Am I wrong?

You should not be installing target RPMs onto your host system directly.  This 
will contaminate your host RPM database and produce a system with invalid 
entries, causing programs like yum, smart or zypper to fail when attempting to 
update.

When you install target packages into your host environment for development you 
should be using a chroot and with the RPM database located within that chroot. 
This is how the build system does it, and really is the only safe way to do the 
install.  (If you need the update-alternatives and other pre/post-install 
scriptlets to run.. then this requires even more advanced knowledge..)

(I'm going to assume you don't need the scriptlets to run...) As your regular 
non-privileged user id, you can run pseudo to enable root-like fake chroot and 
other privileged operations..  and then inside of the pseudo environment use the 
version of RPM we built:  rpm --root=<your install path> -Uhv  --noscripts 
--dbpath=/var/lib/rpm <list of package>

(the above is from memory, so verify this before running it)

Look at meta/classes/rootfs_rpm.bbclass and meta/classes/package_rpm.bbclass for 
more details of exactly how the system constructs root filesystems.

--Mark

> Cheers,
> Giuseppe
>
> 2012/5/7 Mark Hatle<mark.hatle@windriver.com>
>
>> On 5/7/12 5:30 AM, Giuseppe Condorelli wrote:
>>
>>> Hi All,
>>>
>>> after having built my own image, I've looked at the resultant rpms under
>>> the deploy directory and I saw
>>> no relocation is possible (rpm -qpli<package>). This because Prefix is not
>>> set during spec file creation
>>> (package_rpm.bbclass).
>>> As far as you know, is it possible to set Prefix somehow?
>>>
>>
>> What type of packages are you trying to relocate?
>>
>> For target packages I don't expect that it would ever work.  The items
>> built by the build system often have internal paths and expectations.
>>
>> For SDK packages (i.e. things that run on the host), it might be possible
>> to make them relocatable, but it would be specific to those style packages.
>>   (Any relocatable package has to have the inbuilt knowledge to move and
>> change configuration files as necessary.  Also you have to have the right
>> set of packages to install into the environment and such.  I don't believe
>> we use RPM to install any native/SDK packages today.)
>>
>> --Mark
>>
>>   Please let me know.
>>> Thanks,
>>> Giuseppe
>>> ______________________________**_________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel@lists.**openembedded.org<Openembedded-devel@lists.openembedded.org>
>>> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**
>>> openembedded-devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>>>
>>
>>
>> ______________________________**_________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.**openembedded.org<Openembedded-devel@lists.openembedded.org>
>> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**openembedded-devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [oe-core] Prefix in rpms packages
  2012-05-08 12:59     ` Mark Hatle
@ 2012-05-08 14:20       ` Giuseppe Condorelli
  0 siblings, 0 replies; 5+ messages in thread
From: Giuseppe Condorelli @ 2012-05-08 14:20 UTC (permalink / raw)
  To: openembedded-devel

Many many thanks for clarification, Mark!

2012/5/8 Mark Hatle <mark.hatle@windriver.com>

> On 5/8/12 3:02 AM, Giuseppe Condorelli wrote:
>
>> Hi Mark, All,
>> thanks for your reply.
>> What I need is to manually install target rpms locating them in my own
>> directory.
>> With no relocation available I should install them starting from / and
>> this
>> is not good if I need to install on host.
>> What I need (in other words) is the possibility to set Prefix during spec
>> file creation to have a relocation.
>> Am I wrong?
>>
>
> You should not be installing target RPMs onto your host system directly.
>  This will contaminate your host RPM database and produce a system with
> invalid entries, causing programs like yum, smart or zypper to fail when
> attempting to update.
>
> When you install target packages into your host environment for
> development you should be using a chroot and with the RPM database located
> within that chroot. This is how the build system does it, and really is the
> only safe way to do the install.  (If you need the update-alternatives and
> other pre/post-install scriptlets to run.. then this requires even more
> advanced knowledge..)
>
> (I'm going to assume you don't need the scriptlets to run...) As your
> regular non-privileged user id, you can run pseudo to enable root-like fake
> chroot and other privileged operations..  and then inside of the pseudo
> environment use the version of RPM we built:  rpm --root=<your install
> path> -Uhv  --noscripts --dbpath=/var/lib/rpm <list of package>
>
> (the above is from memory, so verify this before running it)
>
> Look at meta/classes/rootfs_rpm.**bbclass and meta/classes/package_rpm.**bbclass
> for more details of exactly how the system constructs root filesystems.
>
> --Mark
>
>  Cheers,
>> Giuseppe
>>
>> 2012/5/7 Mark Hatle<mark.hatle@windriver.com**>
>>
>>  On 5/7/12 5:30 AM, Giuseppe Condorelli wrote:
>>>
>>>  Hi All,
>>>>
>>>> after having built my own image, I've looked at the resultant rpms under
>>>> the deploy directory and I saw
>>>> no relocation is possible (rpm -qpli<package>). This because Prefix is
>>>> not
>>>> set during spec file creation
>>>> (package_rpm.bbclass).
>>>> As far as you know, is it possible to set Prefix somehow?
>>>>
>>>>
>>> What type of packages are you trying to relocate?
>>>
>>> For target packages I don't expect that it would ever work.  The items
>>> built by the build system often have internal paths and expectations.
>>>
>>> For SDK packages (i.e. things that run on the host), it might be possible
>>> to make them relocatable, but it would be specific to those style
>>> packages.
>>>  (Any relocatable package has to have the inbuilt knowledge to move and
>>> change configuration files as necessary.  Also you have to have the right
>>> set of packages to install into the environment and such.  I don't
>>> believe
>>> we use RPM to install any native/SDK packages today.)
>>>
>>> --Mark
>>>
>>>  Please let me know.
>>>
>>>> Thanks,
>>>> Giuseppe
>>>> ______________________________****_________________
>>>> Openembedded-devel mailing list
>>>> Openembedded-devel@lists.**ope**nembedded.org <http://openembedded.org>
>>>> <Openembedded-**devel@lists.openembedded.org<Openembedded-devel@lists.openembedded.org>
>>>> >
>>>> http://lists.linuxtogo.org/****cgi-bin/mailman/listinfo/**<http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**>
>>>> openembedded-devel<http://**lists.linuxtogo.org/cgi-bin/**
>>>> mailman/listinfo/openembedded-**devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>>>> >
>>>>
>>>>
>>>
>>> ______________________________****_________________
>>> Openembedded-devel mailing list
>>> Openembedded-devel@lists.**ope**nembedded.org <http://openembedded.org><
>>> Openembedded-**devel@lists.openembedded.org<Openembedded-devel@lists.openembedded.org>
>>> >
>>> http://lists.linuxtogo.org/****cgi-bin/mailman/listinfo/****
>>> openembedded-devel<http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**openembedded-devel>
>>> <http://**lists.linuxtogo.org/cgi-bin/**mailman/listinfo/openembedded-**
>>> devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>>> >
>>>
>>>  ______________________________**_________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.**openembedded.org<Openembedded-devel@lists.openembedded.org>
>> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**
>> openembedded-devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>>
>
>
> ______________________________**_________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.**openembedded.org<Openembedded-devel@lists.openembedded.org>
> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**openembedded-devel<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-08 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 10:30 [oe-core] Prefix in rpms packages Giuseppe Condorelli
2012-05-07 17:43 ` Mark Hatle
2012-05-08  8:02   ` Giuseppe Condorelli
2012-05-08 12:59     ` Mark Hatle
2012-05-08 14:20       ` Giuseppe Condorelli

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.