unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 27447@debbugs.gnu.org, ng0 <ng0@infotropique.org>
Subject: bug#27447: pelican-quickstart produces files with store path shebangs
Date: Tue, 14 Sep 2021 17:17:21 +0200	[thread overview]
Message-ID: <8635q7tce6.fsf@gmail.com> (raw)
In-Reply-To: <87a6tb3yz0.fsf@netris.org> (Mark H. Weaver's message of "Thu, 14 Jan 2021 18:00:40 -0500")

Hi Mark,

On Thu, 14 Jan 2021 at 18:00, Mark H Weaver <mhw@netris.org> wrote:
> zimoun <zimon.toutoune@gmail.com> writes:

>> --8<---------------cut here---------------start------------->8---
>> $ guix environment -C --ad-hoc pelican coreutils grep
>> [env]$ mkdir foo && cd foo && ls -l
>> total 0
>>
>> [env]$ pelican-quickstart
>> Welcome to pelican-quickstart v4.2.0.
>>
>> This script will help you create a new Pelican-based website.
>>
>> Please answer the following questions so this script can generate the files
>> needed by Pelican.
>>
>>
>>> Where do you want to create your new web site? [.]
>>> What will be the title of this web site? Foo
>>> Who will be the author of this web site? zimoun
>>> What will be the default language of this web site? [en]
>>> Do you want to specify a URL prefix? e.g., https://example.com   (Y/n) n
>>> Do you want to enable article pagination? (Y/n) n
>>> What is your time zone? [Europe/Paris]
>>> Do you want to generate a tasks.py/Makefile to automate generation and publishing? (Y/n) y
>>> Do you want to upload your website using FTP? (y/N) N
>>> Do you want to upload your website using SSH? (y/N) N
>>> Do you want to upload your website using Dropbox? (y/N) N
>>> Do you want to upload your website using S3? (y/N) N
>>> Do you want to upload your website using Rackspace Cloud Files? (y/N) N
>>> Do you want to upload your website using GitHub Pages? (y/N) N
>> Done. Your new project is available at /tmp/bar
>>
>> [env]$ ls
>> Makefile  content  output  pelicanconf.py  publishconf.py  tasks.py
>>
>> [env]$ egrep -nr "store"
>> pelicanconf.py:1:#!/gnu/store/h8jw9qhyfp6fm6nb3cgh4335qhr31wfz-python-wrapper-3.8.2/bin/python
>> publishconf.py:1:#!/gnu/store/h8jw9qhyfp6fm6nb3cgh4335qhr31wfz-python-wrapper-3.8.2/bin/python
>> --8<---------------cut here---------------end--------------->8---
>>
>> Why is it a bug?
>
> It's a bug because these absolute file names will cease to exist after
> the next 'core-updates' merge happens, and more precisely after the
> older system generations (or user profiles) are deleted and 'guix gc'
> subsequently deletes these obsolete store items.
>
> At that point, maybe things will break.  I think that would need to be
> investigated before dismissing this bug report.

I still miss why it is a bug.  The script ’pelican-quickstart’ is an
*helper* to generate this configuration file ’pelicancon.py’.
Therefore, the user should review it, IMHO.

Let consider this scenario:

    1. guix install pelican
    2. pelican-quickstart
    3. guix pull
    4. guix upgrade
    5. guix gc

At step #2, the generated configuration file is in agreement with the
Python interpreter.  Then, I agree that this Python could be gone after
the GC.

However, there is no guarantee that the generated configuration file at
step #2 still works with the potentially upgraded Pelican version (step
#4); independently of the shebang issue we are speaking.

Somehow, it is the responsibility of the user to maintain their
configuration file across the Pelican versions.

Well, considering my previous words [1],

        Why does embed store paths in configuration files is an issue?
        Pelican is a Python application which therefore requires a
        Python interpreter.  Running ’pelican’ against another Python VM
        than the one it was built seems a bad idea.

        And if the point is run “pelican-quickstart” with one Pelican
        version built against one Python VM, and then reuse these
        generated config files with another Pelican version built
        against another Python VM, in this use-case, the bug is upstream
        because it embeds absolute path which does not respect PEP 394
        [2].

I still think the bug is upstream.  Anyway.  The point is to resolve
and close this report. ;-)

First, I am not sure Pelican is a lot run by Guix users.  The version
4.2.0 seems from Oct. 2019 and the last upstream version is 4.6 from
March 2021.  Running,

  $ ./pre-inst-env guix refresh -u pelican
  $ ./pre-inst-env guix environment -C --ad-hoc pelican \
                        -- pelican-quickstart

does not fix the issue. (Maybe I will submit the resulting update,
separately.)


Second, do we patch Pelican to remove?  If yes, these absolute file
names in the generated configuration file should be replaced by what?


Cheers,
simon

1: <http://issues.guix.gnu.org/issue/27447#6>
2: <https://www.python.org/dev/peps/pep-0394/>




  reply	other threads:[~2021-09-14 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 12:35 bug#27447: pelican-quickstart produces files with store path shebangs ng0
2020-12-18 20:10 ` zimoun
2021-01-11 12:59   ` zimoun
2021-01-13 23:37     ` Mark H Weaver
2021-01-14  9:37       ` zimoun
2021-01-14 23:00         ` Mark H Weaver
2021-09-14 15:17           ` zimoun [this message]
2021-10-04 22:06 ` Ben Sturmfels via Bug reports for GNU Guix
2021-10-04 23:06   ` Ben Sturmfels via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8635q7tce6.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=27447@debbugs.gnu.org \
    --cc=mhw@netris.org \
    --cc=ng0@infotropique.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).