From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Paul Schmidt Subject: Re: General Question: Execution of binaries not built for GuixSD Date: Wed, 22 Jun 2016 15:27:58 +0200 Message-ID: <576A925E.20107@gmx.net> References: <576A6D73.3070104@gmx.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CLS2L9CRlleimMd2oJE6l75NMGgKD8SNT" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFiCR-0006sX-Qv for help-guix@gnu.org; Wed, 22 Jun 2016 09:28:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFiCL-00087r-LP for help-guix@gnu.org; Wed, 22 Jun 2016 09:28:10 -0400 Received: from mout.gmx.net ([212.227.17.21]:61145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFiCL-00087l-9g for help-guix@gnu.org; Wed, 22 Jun 2016 09:28:05 -0400 Received: from [192.168.1.241] ([77.8.40.204]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LsOsW-1bMHmd29zE-0123iY for ; Wed, 22 Jun 2016 15:28:03 +0200 In-Reply-To: <576A6D73.3070104@gmx.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CLS2L9CRlleimMd2oJE6l75NMGgKD8SNT Content-Type: multipart/mixed; boundary="LSACioTN1JsmmB6i9ktKa3Wi4W70dqFjn" From: Florian Paul Schmidt To: help-guix@gnu.org Message-ID: <576A925E.20107@gmx.net> Subject: Re: General Question: Execution of binaries not built for GuixSD References: <576A6D73.3070104@gmx.net> In-Reply-To: <576A6D73.3070104@gmx.net> --LSACioTN1JsmmB6i9ktKa3Wi4W70dqFjn Content-Type: multipart/mixed; boundary="------------020203050906070405090307" This is a multi-part message in MIME format. --------------020203050906070405090307 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable See the attached file for reference. Put it into a guix checkout under nonfree/packages/ Does that help as a starting point? Regards, Flo On 06/22/2016 12:50 PM, Florian Paul Schmidt wrote: >=20 >=20 > On 22.06.2016 01:21, christoph vogelsberg wrote: >> Hello >> >> I have a fresh installation of GuixSD and I'm keen of learning more. I= >> struggle with a concept and don't know how to circumvent best: >> >> Binaries built for ordinary Linux's (as, in my case, Firefox Developer= >> Edition) expect libraries on certain standard pathes which doesn't >> exist on GuixSD. I found three possibilities that might work: >> >> * use fakechroot to make my user profile a pseudo root (disadvantage: >> I have no experience, it seams there is no package for that) >> * create symbolic links (disadvantage: new builts get a new path with >> a hash value and must be re-linked properly) >> * install a minimal Linux and use Guix instead of GuixSD >> (disadvantage: this would the point where I had capitulated) >> >> My question: is there an already elabored way, documentation and so >> on, for this specific problem? >=20 > There's a tool that you can use to hack library paths in ELF binaries. = I > once packaged the binary releases of firefox and thunderbird using that= > way, but I took the repos containing the package definitions offline du= e > to licensing issues. You could use those as a starting point. If you > wish I can dig out my local copies of the repos once I get home.. >=20 > Regards, > Flo >=20 --=20 https://fps.io --------------020203050906070405090307 Content-Type: text/x-scheme; name="mozilla.scm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mozilla.scm" (define-module (nonfree packages mozilla) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system trivial) #:use-module (guix licenses) #:use-module (gnu packages base) #:use-module (gnu packages xorg) #:use-module (gnu packages elf) #:use-module (gnu packages gcc) #:use-module (gnu packages linux) =20 #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages bash)) (define-public firefox (let* ((archive-base-name "firefox-42.0") (archive-name (string-append archive-base-name ".tar.bz2")) (archive-uri (string-append "https://download-installer.cdn.mozilla.net/pub/fi= refox/releases/42.0/linux-x86_64/en-US/" archive-name))) (package (name "firefox") (version "42.0") (source (origin (method url-fetch) (uri archive-uri) (sha256 (base32 "1mrghfdkzyxpainnqgl76m08cs6cwy4l89iamnn58q94malpq1z3")))) (supported-systems '("x86_64-linux")) (inputs `(("tar" ,tar) ("bzip2" ,bzip2) ("coreutils" ,coreutils) ("glibc" ,glibc) ("gcc" ,gcc-4.9 ,"lib") ("libstdc++" ,libstdc++-4.9) ("libx11" ,libx11) ("libxext" ,libxext) ("libxdamage" ,libxdamage) ("libxfixes" ,libxfixes) ("libxcomposite" ,libxcomposite) ("libxrender" ,libxrender) ("libxt" ,libxt) ("alsa-lib" ,alsa-lib) ("freetype" ,freetype) ("fontconfig" ,fontconfig) ("dbus-glib" ,dbus-glib) ("glib" ,glib) ("gtk+" ,gtk+-2) ("atk" ,atk) ("pango" ,pango) ("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf) ("dbus" ,dbus) ("patchelf" ,patchelf))) (build-system trivial-build-system) (arguments '(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((out (assoc-ref %outputs "out")) (source (assoc-ref %build-inputs "source")) (tar (string-append (assoc-ref %build-inputs "tar") "/bin= /tar")) (patchelf (string-append (assoc-ref %build-inputs "patche= lf") "/bin/patchelf")) (ld (string-append (assoc-ref %build-inputs "glibc") "/li= b/")) (PATH (string-append (assoc-ref %build-inputs "bzip2") "/bin" ":" (assoc-ref %build-inputs "tar") "/bin" )) (RPATH (string-append (assoc-ref %build-inputs "freetype") "/lib" ":" (assoc-ref %build-inputs "fontconfig") "/lib" ":" (assoc-ref %build-inputs "libx11") "/lib" ":" (assoc-ref %build-inputs "libxrender") "/lib" ":" (assoc-ref %build-inputs "libxext") "/lib" ":" (assoc-ref %build-inputs "libxdamage") "/lib" ":" (assoc-ref %build-inputs "libxfixes") "/lib" ":" (assoc-ref %build-inputs "libxt") "/lib" ":" (assoc-ref %build-inputs "libxcomposite") "/lib" ":" (assoc-ref %build-inputs "alsa-lib") "/lib" ":" (assoc-ref %build-inputs "dbus-glib") "/lib" ":" (assoc-ref %build-inputs "glib") "/lib" ":" (assoc-ref %build-inputs "gtk+") "/lib" ":" (assoc-ref %build-inputs "atk") "/lib" ":" (assoc-ref %build-inputs "pango") "/lib" ":" (assoc-ref %build-inputs "cairo") "/lib" ":" (assoc-ref %build-inputs "gdk-pixbuf") "/lib" ":" (assoc-ref %build-inputs "dbus") "/lib" ":" (assoc-ref %build-inputs "libstdc++") "/lib" ":" (assoc-ref %build-inputs "glibc") "/lib" ":" (assoc-ref %build-inputs "gcc") "/lib")) (ln (string-append (assoc-ref %build-inputs "coreutils") = "/bin/ln"))) (mkdir-p out) (mkdir-p (string-append out "/bin")) (with-directory-excursion out (setenv "PATH" PATH) (system* tar "xf" source) (system* patchelf "--set-interpreter" (string-append ld "/= ld-linux-x86-64.so.2") (string-append out "/firefox/firefox")) (system* patchelf "--set-rpath" RPATH (string-append out "= /firefox/firefox")) (system* patchelf "--set-rpath" RPATH (string-append out "= /firefox/libxul.so")) (system* ln "-s" (string-append out "/firefox/firefox") (s= tring-append out "/bin/firefox"))))))) (synopsis "Firefox") (description "Pretty cool") (home-page "http://mozilla.com/firefox") (license "somewhat shaky")))) (define-public thunderbird (let* ((archive-base-name "thunderbird-38.4.0") (archive-name (string-append archive-base-name ".tar.bz2")) (archive-uri (string-append "http://download.cdn.mozilla.net/pub/thunderbird/r= eleases/38.4.0/linux-x86_64/en-US/" archive-name))) (package (name "thunderbird") (version "38.4.0") (source (origin (method url-fetch) (uri archive-uri) (sha256 (base32 "10bpvajf4r7588pgzh7kalzanwsxcmp10wk3xkpr3nx66was7ng8")))) (supported-systems '("x86_64-linux")) (inputs `(("tar" ,tar) ("bzip2" ,bzip2) ("coreutils" ,coreutils) ("glibc" ,glibc) ("gcc" ,gcc-4.9 ,"lib") ("libstdc++" ,libstdc++-4.9) ("libx11" ,libx11) ("libxext" ,libxext) ("libxdamage" ,libxdamage) ("libxfixes" ,libxfixes) ("libxcomposite" ,libxcomposite) ("libxrender" ,libxrender) ("libxt" ,libxt) ("alsa-lib" ,alsa-lib) ("freetype" ,freetype) ("fontconfig" ,fontconfig) ("dbus-glib" ,dbus-glib) ("glib" ,glib) ("gtk+" ,gtk+-2) ("atk" ,atk) ("pango" ,pango) ("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf) ("dbus" ,dbus) ("patchelf" ,patchelf))) (build-system trivial-build-system) (arguments '(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((out (assoc-ref %outputs "out")) (source (assoc-ref %build-inputs "source")) (tar (string-append (assoc-ref %build-inputs "tar") "/bin= /tar")) (patchelf (string-append (assoc-ref %build-inputs "patche= lf") "/bin/patchelf")) (ld (string-append (assoc-ref %build-inputs "glibc") "/li= b/")) (PATH (string-append (assoc-ref %build-inputs "bzip2") "/bin" ":" (assoc-ref %build-inputs "tar") "/bin" )) (RPATH (string-append (assoc-ref %build-inputs "freetype") "/lib" ":" (assoc-ref %build-inputs "fontconfig") "/lib" ":" (assoc-ref %build-inputs "libx11") "/lib" ":" (assoc-ref %build-inputs "libxrender") "/lib" ":" (assoc-ref %build-inputs "libxext") "/lib" ":" (assoc-ref %build-inputs "libxdamage") "/lib" ":" (assoc-ref %build-inputs "libxfixes") "/lib" ":" (assoc-ref %build-inputs "libxt") "/lib" ":" (assoc-ref %build-inputs "libxcomposite") "/lib" ":" (assoc-ref %build-inputs "alsa-lib") "/lib" ":" (assoc-ref %build-inputs "dbus-glib") "/lib" ":" (assoc-ref %build-inputs "glib") "/lib" ":" (assoc-ref %build-inputs "gtk+") "/lib" ":" (assoc-ref %build-inputs "atk") "/lib" ":" (assoc-ref %build-inputs "pango") "/lib" ":" (assoc-ref %build-inputs "cairo") "/lib" ":" (assoc-ref %build-inputs "gdk-pixbuf") "/lib" ":" (assoc-ref %build-inputs "dbus") "/lib" ":" (assoc-ref %build-inputs "libstdc++") "/lib" ":" (assoc-ref %build-inputs "glibc") "/lib" ":" (assoc-ref %build-inputs "gcc") "/lib")) (ln (string-append (assoc-ref %build-inputs "coreutils") = "/bin/ln"))) (mkdir-p out) (mkdir-p (string-append out "/bin")) (with-directory-excursion out (setenv "PATH" PATH) (system* tar "xf" source) (system* patchelf "--set-interpreter" (string-append ld "/= ld-linux-x86-64.so.2") (string-append out "/thunderbird/thunderbird")) (system* patchelf "--set-rpath" RPATH (string-append out "= /thunderbird/thunderbird")) (system* patchelf "--set-rpath" RPATH (string-append out "= /thunderbird/libxul.so")) (system* ln "-s" (string-append out "/thunderbird/thunderb= ird") (string-append out "/bin/thunderbird"))))))) (synopsis "Thunderbird") (description "Pretty cool") (home-page "http://mozilla.com/thunderbird") (license "somewhat shaky")))) --------------020203050906070405090307-- --LSACioTN1JsmmB6i9ktKa3Wi4W70dqFjn-- --CLS2L9CRlleimMd2oJE6l75NMGgKD8SNT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXapJeAAoJEA5f4Coltk8ZaVkIALG9kuwmddi12EM3hYPiGrB/ TgCf+06zXMVEb/D62VimJjhbEEvDwbOul6wQ+VV4VDdNEByIfjFZFmmLkbSGwXbn t7kxIH3rBUXQu0V9ts1KWRZmU/WG06bRrkpRztFDRAaABYxU4oFkwlntRPIlDmJM cfwW7biu5W+lb5xJusseqpPlzu3HLDdtGAyN5HUMYZk0xigZGugnIRJpzjr3w+Qh 9Hey+u89Np2mPQnDjxamZ/ozsdctU937tRfLPPEuosIkdgTyYMAtts4E4VmEHv4J 5ANUuVPKAVApEUVh2NCmfDO6vO/9BwY03/202610eRWAI3VGefZNn93WU17LtuU= =FmVa -----END PGP SIGNATURE----- --CLS2L9CRlleimMd2oJE6l75NMGgKD8SNT--