unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Run .deb or .rpm packages
@ 2021-12-08 15:30 André A. Gomes
  2021-12-08 16:46 ` Gary Johnson
  0 siblings, 1 reply; 11+ messages in thread
From: André A. Gomes @ 2021-12-08 15:30 UTC (permalink / raw)
  To: help-guix

Hi Guix,

I'm wondering if it's possible to install .deb or .rpm packages on the
Guix system.

For context, my government only provides me these solutions to install a
authentication plugin that I use with my ID (smart) card.

Thanks.


-- 
André A. Gomes
"Free Thought, Free World"


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

* Re: Run .deb or .rpm packages
  2021-12-08 15:30 Run .deb or .rpm packages André A. Gomes
@ 2021-12-08 16:46 ` Gary Johnson
  2021-12-08 19:46   ` André A. Gomes
  0 siblings, 1 reply; 11+ messages in thread
From: Gary Johnson @ 2021-12-08 16:46 UTC (permalink / raw)
  To: André A. Gomes; +Cc: help-guix

André A. Gomes <andremegafone@gmail.com> writes:

> Hi Guix,
>
> I'm wondering if it's possible to install .deb or .rpm packages on the
> Guix system.
>
> For context, my government only provides me these solutions to install a
> authentication plugin that I use with my ID (smart) card.
>
> Thanks.

Hi André,

You can install the `dpkg` package with `guix package -i dpkg`. Hope
that helps.

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


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

* Re: Run .deb or .rpm packages
  2021-12-08 16:46 ` Gary Johnson
@ 2021-12-08 19:46   ` André A. Gomes
  2021-12-08 20:05     ` Julien Lepiller
  0 siblings, 1 reply; 11+ messages in thread
From: André A. Gomes @ 2021-12-08 19:46 UTC (permalink / raw)
  To: Gary Johnson; +Cc: help-guix

Gary Johnson <lambdatronic@disroot.org> writes:

> André A. Gomes <andremegafone@gmail.com> writes:
>
>> Hi Guix,
>>
>> I'm wondering if it's possible to install .deb or .rpm packages on the
>> Guix system.
>>
>> For context, my government only provides me these solutions to install a
>> authentication plugin that I use with my ID (smart) card.
>>
>> Thanks.
>
> Hi André,
>
> You can install the `dpkg` package with `guix package -i dpkg`. Hope
> that helps.

Indeed.  I should have said that I did that, and then encountered the
following issue:

--8<---------------cut here---------------start------------->8---
$ sudo dpkg -i foo-package.deb 
dpkg: error: unable to access the dpkg database directory /gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: Read-only file system
--8<---------------cut here---------------end--------------->8---

Any ideas?  I don't know much about .deb or .rpm.

Thank you Gary.


-- 
André A. Gomes
"Free Thought, Free World"


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

* Re: Run .deb or .rpm packages
  2021-12-08 19:46   ` André A. Gomes
@ 2021-12-08 20:05     ` Julien Lepiller
  2021-12-08 20:10       ` André A. Gomes
  2021-12-10  9:30       ` Hartmut Goebel
  0 siblings, 2 replies; 11+ messages in thread
From: Julien Lepiller @ 2021-12-08 20:05 UTC (permalink / raw)
  To: help-guix, André A. Gomes, Gary Johnson

I don't think it's a good idea to use a .deb or .rpm with guix, as they contain precompiled software. Even considering free software, they are compiled with a giver system (probably ubuntu and fedora, respectively) that make them incompatible with guix. Even if you successfuly installed them, I'm afraid you'd get a confusing "file not found" anyway.

You should ask your government for the source code, and compile it for the guix system. Sorry that this is my best answer, it's probably not what you wanted to hear :/ 

Le 8 décembre 2021 14:46:24 GMT-05:00, "André A. Gomes" <andremegafone@gmail.com> a écrit :
>Gary Johnson <lambdatronic@disroot.org> writes:
>
>> André A. Gomes <andremegafone@gmail.com> writes:
>>
>>> Hi Guix,
>>>
>>> I'm wondering if it's possible to install .deb or .rpm packages on the
>>> Guix system.
>>>
>>> For context, my government only provides me these solutions to install a
>>> authentication plugin that I use with my ID (smart) card.
>>>
>>> Thanks.
>>
>> Hi André,
>>
>> You can install the `dpkg` package with `guix package -i dpkg`. Hope
>> that helps.
>
>Indeed.  I should have said that I did that, and then encountered the
>following issue:
>
>--8<---------------cut here---------------start------------->8---
>$ sudo dpkg -i foo-package.deb 
>dpkg: error: unable to access the dpkg database directory /gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: Read-only file system
>--8<---------------cut here---------------end--------------->8---
>
>Any ideas?  I don't know much about .deb or .rpm.
>
>Thank you Gary.
>
>
>-- 
>André A. Gomes
>"Free Thought, Free World"
>

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

* Re: Run .deb or .rpm packages
  2021-12-08 20:05     ` Julien Lepiller
@ 2021-12-08 20:10       ` André A. Gomes
  2021-12-08 20:46         ` Remco
  2021-12-22  4:13         ` Timmy Douglas
  2021-12-10  9:30       ` Hartmut Goebel
  1 sibling, 2 replies; 11+ messages in thread
From: André A. Gomes @ 2021-12-08 20:10 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: help-guix

Julien Lepiller <julien@lepiller.eu> writes:

> I don't think it's a good idea to use a .deb or .rpm with guix, as
> they contain precompiled software. Even considering free software,
> they are compiled with a giver system (probably ubuntu and fedora,
> respectively) that make them incompatible with guix. Even if you
> successfuly installed them, I'm afraid you'd get a confusing "file not
> found" anyway.
>
> You should ask your government for the source code, and compile it for
> the guix system. Sorry that this is my best answer, it's probably not
> what you wanted to hear :/

I totally agree with you.  I actually made that request, but I was told
that I have no right to access the sources :)

I was wondering if it was technically possible, though.  But I
understand your comment that I'd get a "file not found" anyway.

From a freedom perspective, what are my options?  Running a virtual
machine with ubuntu/fedora for this sole purpose?  Thank you Julien.


-- 
André A. Gomes
"Free Thought, Free World"


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

* Re: Run .deb or .rpm packages
  2021-12-08 20:10       ` André A. Gomes
@ 2021-12-08 20:46         ` Remco
  2021-12-21 23:27           ` André A. Gomes
  2021-12-22  4:13         ` Timmy Douglas
  1 sibling, 1 reply; 11+ messages in thread
From: Remco @ 2021-12-08 20:46 UTC (permalink / raw)
  To: André A. Gomes; +Cc: help-guix

2021/12/08 20:10, André A. Gomes:

> From a freedom perspective, what are my options?  Running a virtual
> machine with ubuntu/fedora for this sole purpose?

I've had some success running debian packages from a chroot environment
on my guix installation.  There's a debootstrap package which allows you
to create a chroot environment.

Something like:

  guix shell debootstrap -- debootstrap --arch=amd64 bullseye my-bullseye-install

and then:

  mount -t proc proc my-bullseye-install/proc
  mount -t devpts devpts my-bullseye-install/dev/pts
  chroot my-bullseye-install /bin/bash --login

You'll probably need to run all these as root.

Remco


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

* Re: Run .deb or .rpm packages
  2021-12-08 20:05     ` Julien Lepiller
  2021-12-08 20:10       ` André A. Gomes
@ 2021-12-10  9:30       ` Hartmut Goebel
  2021-12-12  9:24         ` Efraim Flashner
  1 sibling, 1 reply; 11+ messages in thread
From: Hartmut Goebel @ 2021-12-10  9:30 UTC (permalink / raw)
  To: Julien Lepiller, help-guix, André A. Gomes, Gary Johnson

Hi,

Le 8 décembre 2021 14:46:24 GMT-05:00, "André A. Gomes"<andremegafone@gmail.com>  a écrit :

> --8<---------------cut here---------------start------------->8---
> $ sudo dpkg -i foo-package.deb
> dpkg: error: unable to access the dpkg database directory /gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: Read-only file system
> --8<---------------cut here---------------end--------------->8---
>
> Any ideas?  I don't know much about .deb or .rpm.

Beside Julien's objections: There might be legitimate use of installing 
.deb or .rpm packages and they might even work. E.g. i one wants to 
install free software provided as a .deb only and at the moment does not 
have the time to create a package definition for it.

So, "dpkg" and "rpm" should at least work :-)

Regarding the error show above: One would need to add 
"--localstatedir=/var" to the config flags (not sure whether this would 
build, then, since most probably "make install" will try to create 
"/var/lib/dpkg" which will fail in the build container.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          |h.goebel@crazy-compilers.com                |
|www.crazy-compilers.com  | compilers which you thought are impossible |

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

* Re: Run .deb or .rpm packages
  2021-12-10  9:30       ` Hartmut Goebel
@ 2021-12-12  9:24         ` Efraim Flashner
  2021-12-12 19:34           ` Vagrant Cascadian
  0 siblings, 1 reply; 11+ messages in thread
From: Efraim Flashner @ 2021-12-12  9:24 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: André A. Gomes, help-guix

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

On Fri, Dec 10, 2021 at 10:30:36AM +0100, Hartmut Goebel wrote:
> Hi,
> 
> Le 8 décembre 2021 14:46:24 GMT-05:00, "André A. Gomes"<andremegafone@gmail.com>  a écrit :
> 
> > --8<---------------cut here---------------start------------->8---
> > $ sudo dpkg -i foo-package.deb
> > dpkg: error: unable to access the dpkg database directory /gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: Read-only file system
> > --8<---------------cut here---------------end--------------->8---
> > 
> > Any ideas?  I don't know much about .deb or .rpm.
> 
> Beside Julien's objections: There might be legitimate use of installing .deb
> or .rpm packages and they might even work. E.g. i one wants to install free
> software provided as a .deb only and at the moment does not have the time to
> create a package definition for it.
> 
> So, "dpkg" and "rpm" should at least work :-)
> 
> Regarding the error show above: One would need to add "--localstatedir=/var"
> to the config flags (not sure whether this would build, then, since most
> probably "make install" will try to create "/var/lib/dpkg" which will fail
> in the build container.
> 

When I packaged dpkg I deliberately didn't "fix" the localstatedir or
any other flags since Guix doesn't support installing packages from .deb
archives. Similar to the rpm package it is primarily used for the other
parts of the package.

Vagrant has said in the past though that Guix's dpkg can be used to
install packages on Debian based systems.

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Run .deb or .rpm packages
  2021-12-12  9:24         ` Efraim Flashner
@ 2021-12-12 19:34           ` Vagrant Cascadian
  0 siblings, 0 replies; 11+ messages in thread
From: Vagrant Cascadian @ 2021-12-12 19:34 UTC (permalink / raw)
  To: Efraim Flashner, Hartmut Goebel; +Cc: André A. Gomes, help-guix

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

On 2021-12-12, Efraim Flashner wrote:
> On Fri, Dec 10, 2021 at 10:30:36AM +0100, Hartmut Goebel wrote:
>> Le 8 décembre 2021 14:46:24 GMT-05:00, "André A. Gomes"<andremegafone@gmail.com>  a écrit :
>> 
>> > --8<---------------cut here---------------start------------->8---
>> > $ sudo dpkg -i foo-package.deb
>> > dpkg: error: unable to access the dpkg database directory /gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: Read-only file system
>> > --8<---------------cut here---------------end--------------->8---
>> > 
>> > Any ideas?  I don't know much about .deb or .rpm.
>> 
>> Beside Julien's objections: There might be legitimate use of installing .deb
>> or .rpm packages and they might even work. E.g. i one wants to install free
>> software provided as a .deb only and at the moment does not have the time to
>> create a package definition for it.
>> 
>> So, "dpkg" and "rpm" should at least work :-)
>> 
>> Regarding the error show above: One would need to add "--localstatedir=/var"
>> to the config flags (not sure whether this would build, then, since most
>> probably "make install" will try to create "/var/lib/dpkg" which will fail
>> in the build container.
>> 
>
> When I packaged dpkg I deliberately didn't "fix" the localstatedir or
> any other flags since Guix doesn't support installing packages from .deb
> archives. Similar to the rpm package it is primarily used for the other
> parts of the package.
>
> Vagrant has said in the past though that Guix's dpkg can be used to
> install packages on Debian based systems.

I don't think I would recommend trying that! It *might* technically work
with some changes to the guix dpkg package, it seems a bit risky; you'd
probably have a "native" dpkg available and I'm not sure I see the
benefit then.

I mostly found it useful to extract (dpkg-deb --extract PACKAGE.deb,
dpkg-deb --control PACKAGE.ded) and inspect .deb packages from Guix
System.

Whenever I need a Debian environment on Guix System I usually just use
debootstrap to create a chroot and work from there.


Thanks everyone for Debianing your Guixs and Guixing your Debians!


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* Re: Run .deb or .rpm packages
  2021-12-08 20:46         ` Remco
@ 2021-12-21 23:27           ` André A. Gomes
  0 siblings, 0 replies; 11+ messages in thread
From: André A. Gomes @ 2021-12-21 23:27 UTC (permalink / raw)
  To: Remco; +Cc: help-guix

Remco <me@rwv.io> writes:

> 2021/12/08 20:10, André A. Gomes:
>
>> From a freedom perspective, what are my options?  Running a virtual
>> machine with ubuntu/fedora for this sole purpose?
>
> I've had some success running debian packages from a chroot environment
> on my guix installation.  There's a debootstrap package which allows you
> to create a chroot environment.
>
> Something like:
>
>   guix shell debootstrap -- debootstrap --arch=amd64 bullseye my-bullseye-install
>
> and then:
>
>   mount -t proc proc my-bullseye-install/proc
>   mount -t devpts devpts my-bullseye-install/dev/pts
>   chroot my-bullseye-install /bin/bash --login
>
> You'll probably need to run all these as root.

Thank you for this valuable tip, Remco.


-- 
André A. Gomes
"Free Thought, Free World"


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

* Re: Run .deb or .rpm packages
  2021-12-08 20:10       ` André A. Gomes
  2021-12-08 20:46         ` Remco
@ 2021-12-22  4:13         ` Timmy Douglas
  1 sibling, 0 replies; 11+ messages in thread
From: Timmy Douglas @ 2021-12-22  4:13 UTC (permalink / raw)
  To: André A. Gomes, Julien Lepiller; +Cc: help-guix

André A. Gomes <andremegafone@gmail.com> writes:

> I was wondering if it was technically possible, though.  But I
> understand your comment that I'd get a "file not found" anyway.
>
> From a freedom perspective, what are my options?  Running a virtual
> machine with ubuntu/fedora for this sole purpose?

you might consider containers as another option-- start an ubuntu
docker container and install it in there.


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

end of thread, other threads:[~2021-12-22  4:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 15:30 Run .deb or .rpm packages André A. Gomes
2021-12-08 16:46 ` Gary Johnson
2021-12-08 19:46   ` André A. Gomes
2021-12-08 20:05     ` Julien Lepiller
2021-12-08 20:10       ` André A. Gomes
2021-12-08 20:46         ` Remco
2021-12-21 23:27           ` André A. Gomes
2021-12-22  4:13         ` Timmy Douglas
2021-12-10  9:30       ` Hartmut Goebel
2021-12-12  9:24         ` Efraim Flashner
2021-12-12 19:34           ` Vagrant Cascadian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).