From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:39916) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4x3w-0006IF-Hg for guix-patches@gnu.org; Thu, 20 Feb 2020 20:25:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4x3v-0000CV-63 for guix-patches@gnu.org; Thu, 20 Feb 2020 20:25:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40186) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4x3u-0000Bz-Ln for guix-patches@gnu.org; Thu, 20 Feb 2020 20:25:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4x3u-00072J-FB for guix-patches@gnu.org; Thu, 20 Feb 2020 20:25:02 -0500 Subject: [bug#39647] [PATCH] gnu: Add unoconv. Resent-Message-ID: References: <20200217182509.11993-1-me@tobias.gr> <20200220204728.gzzf7ja4ljmcbkbw@gravity> In-reply-to: <20200220204728.gzzf7ja4ljmcbkbw@gravity> Date: Fri, 21 Feb 2020 02:24:32 +0100 Message-ID: <87imk0ybov.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Cc: 39647@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Jakub! Jakub K=C4=85dzio=C5=82ka =E5=86=99=E9=81=93=EF=BC=9A > unoconv: format=20 > [jw4yj39s84jb4fkvqpsqwq-unoconv-0.9.0/bin/.unoconv-real] is not=20 > known to unoconv. > > I feel like this might be an issue with the packaging. Does it=20 > work for > you? I don't see how this could be related to packaging=E2=80=A6 And it works=20 just fine on my laptop: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable me@lapdog $ guix env --{pure,ad-hoc} unoconv coreutils=C2=B9 grep=C2=B9 \ -- unoconv test-file.odt me@lapdog $ # a pretty .pdf file is born! --=-=-= Content-Type: text/plain; format=flowed But fine, I'll try it on another machine: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable me@server $ guix env --{pure,ad-hoc} unoconv coreutils grep \ -- unoconv test-file.odt =E2=80=A6 --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable =E2=80=94and here's where I must stop to thank you for reporting the=20 BESTEST BUG of 2020. Seriously. This made my day. I laughed! I=20 cried! Let's take another look at your error: --=-=-= Content-Type: text/plain; format=flowed Content-Disposition: inline % unoconv ~/Downloads/scheme-macro-phd.ps -o scheme-macro-phd.pdf unoconv: format [jw4yj39s84jb4fkvqpsqwq-unoconv-0.9.0/bin/.unoconv-real] is not known to unoconv. --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable So=E2=80=A6 it's obvious that unoconv is erroneously parsing argv0 as=20 target format. Indeed, on both my machines, using the explicit=20 =E2=80=98-f =E2=80=99 --=-=-= Content-Type: text/plain; format=flowed Content-Disposition: inline guix@env $ unoconv -f pdf test-file.odt --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable returns success and a .pdf file. So is the long /gnu/store/=E2=80=A6 name overflowing a buffer? Perhaps=20 the wrapper script is to blame? Maybe I should look at the co=E2=80=94 --=-=-= Content-Type: text/plain; format=flowed Content-Disposition: inline ### If no format was specified, probe it or provide it if not self.format: ### Check if the command is in the form odt2pdf l = sys.argv[0].split('2') if len(l) == 2: self.format = l[1] --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Oh. Oh my. I'd like to bet that the character before=20 =E2=80=98jw4yj39s84jb4fkvqpsqwq-unoconv-0.9.0/=E2=80=99 in your store name = is a=20 =E2=80=982=E2=80=99. Because that's what it is on my server. By sheer cha= nce,=20 the store name on my lapdog has TWO 2s, and so unoconv chugs=20 blissfully onward. I'm not sure what kind of fix upstream will accept for this. At=20 least a length limit, surely. In the mean time it's trivial to=20 just substitute* this out, since we won't ship any foo2bar=20 symlinks our this package anyway. >> + (add-after 'unpack 'patch-find_offices > I think that the convention is to replace underscores by dashes=20 > in names > like these. Then I gladly thwart it. > Wouldn't it be simpler to do > > return [Office(...)] > > ? Yep. My reasoning at the time was literally: =E2=80=98well=E2=80=A6 I should cl= osely=20 emulate upstream style [they use ret =3D =E2=80=A6 and append()] because=20 I've never written a Python in my life, and they have, so they=20 obviously know what they're doing.=E2=80=99 Needless to say, I'm currently reconsidering that opinion. Thanks, T G-R [1]: =E2=80=98coreutils=E2=80=99 & =E2=80=98grep=E2=80=99 are undeclared de= pendencies of =E2=80=98soffice=E2=80=99=20 =E2=80=94 will fix, but not relevant here. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl5PMVAACgkQ2Imw8BjF STxoOA//Tsa9ptzeUtvg8GFgaK4ufl4O9ZUW5xWAd+LZ6+4sCltC+RmQQjNM8iEL EE1Q8P2gjuWuo/LLF5VGqp9OkxnZzgF/ibtcpW7i0Dp+vu3HkP3wNd4bCtqlzyvZ e7RQItDRi+6yqdMI2v5/lCFdBOs4Zf71fgPizDKSoacZjfkUWCIlaWFm2eVZ+Exo AVW0xgDRgbetSQp43kHkW4zK1t5w2jmKFVaxoyTdXhoXw+byVqSQvEvfjx+axGP/ 1qaEVLfcMsMeH0CqtqtANtaWOgVCPNUphNZl+53QCxsGXni5GE71mPHMTB6SlfOA A6I5+Aj3d9Yunwnr2WjAoHjbZdIHPnh4kcfZF4klW3bCakMgAnJojDEXBv86xzEi kNRT/LhWgD+6eTkJLQViHIDtaKtByg1xGz9LaHTNUHfSYx5x+yet8XGKKrVA9OHg Ha5ML2HYiwp9J6Lx9fybRx9BYlHLgswlu/xj9+bXOOGP7Q3dtqNIt7D4lb5kTqmQ cBFPr4nDTxtIJFftlXgxB5twMUY3vJD7xf5eCqIsQ3HOM2gfVcvirChovntOqsJ1 3OOwZideDeIxzEu/6VyrQDzPEN4Vq3vXS6N8YA5kwHYl6SBBnuB2PNmarnwI09XX pebY43wYvtkv3wdQ2dd00D0yxeBHO2PjAQTG1glYFYyMxn9qg4I= =if9x -----END PGP SIGNATURE----- --==-=-=--