unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31907: New users get wrong/old profile path to guix after reconfiguring
@ 2018-06-20  3:18 swedebugia
  2018-06-20 21:35 ` Ludovic Courtès
  2019-01-25  5:46 ` swedebugia
  0 siblings, 2 replies; 5+ messages in thread
From: swedebugia @ 2018-06-20  3:18 UTC (permalink / raw)
  To: Bug-guix

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

Hi

Steps to reproduce:
Install 0.14
Init system with user a
Login root
Guix pull
Make sure it has right paths to .config/guix/current
Reconfigure with new user b
Reboot
Login user b

When logging in slim? populates the dot-files and a  .guix-profile is created with path to old guix. No .config/guix/current exist. 
-- 
Cheers Swedebugia 

[-- Attachment #2: Type: text/html, Size: 409 bytes --]

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

* bug#31907: New users get wrong/old profile path to guix after reconfiguring
  2018-06-20  3:18 bug#31907: New users get wrong/old profile path to guix after reconfiguring swedebugia
@ 2018-06-20 21:35 ` Ludovic Courtès
  2018-06-26 11:06   ` swedebugia
  2019-01-25  5:46 ` swedebugia
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2018-06-20 21:35 UTC (permalink / raw)
  To: swedebugia; +Cc: 31907

Hello swedebugia,

swedebugia <swedebugia@riseup.net> skribis:

> Steps to reproduce:
> Install 0.14
> Init system with user a
> Login root
> Guix pull
> Make sure it has right paths to .config/guix/current
> Reconfigure with new user b
> Reboot
> Login user b
>
> When logging in slim? populates the dot-files and a  .guix-profile is created with path to old guix. No .config/guix/current exist. 

~/.config/guix/current is created by the new ‘guix pull’.  So when
coming from 0.14, you actually need to run it twice: the first run will
give you the new ‘guix pull’, and the second run will actually run the
new code and create ~/.config/guix/current.

Could it be the reason you didn’t see ~/.config/guix/current?

Thanks,
Ludo’.

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

* bug#31907: New users get wrong/old profile path to guix after reconfiguring
  2018-06-20 21:35 ` Ludovic Courtès
@ 2018-06-26 11:06   ` swedebugia
  2018-06-26 11:45     ` Dan Partelly
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2018-06-26 11:06 UTC (permalink / raw)
  To: ludo; +Cc: 31907

On 2018-06-20 23:35, ludo@gnu.org wrote:
> Hello swedebugia,

..snip 
 
> ~/.config/guix/current is created by the new ‘guix pull’.  So when
> coming from 0.14, you actually need to run it twice: the first run will
> give you the new ‘guix pull’, and the second run will actually run the
> new code and create ~/.config/guix/current.

I understand. This is not the problem.

I wrote yesterday on #guix:

<sdb> hi guix
<sdb> I wonder if any of "pull" or "system reconfigure" update the guix
in the system profile?
<sdb> My system profile in sdb1@antelope ~$ ls -l
/run/current-system/profile/bin/guix
<sdb> lrwxrwxrwx 2 root root 75  1 jan  1970
/run/current-system/profile/bin/guix ->
/gnu/store/avg3vnk6p752z8iwld6yzv1wg7ki48vp-guix-0.14.0-13.7af5c2a/bin/guix
<sdb> even though I have pulled and reconfigured multiple times:
<sdb> as root
<sdb> root@antelope /home/sdb1# guix pull -l
<sdb> Generation 1 jun 18 2018 19:26:00
<sdb>   guix b4eae99
<sdb>     repository URL: https://git.savannah.gnu.org/git/guix.git
<sdb>     commit: b4eae997fe5b928f179c34d281e9f2c3eccd3670
<sdb> Generation 2 jun 22 2018 20:48:03 (current)
<sdb>   guix 8edebd3
<sdb>     repository URL: https://git.savannah.gnu.org/git/guix.git
<sdb>     commit: 8edebd3207335aff15081458e895104ac9f45d3d
<sdb> You could ask: why care about the guix version in the system
profile at all? It is not used as soon as you run guix pull or populated
the .config/guix some other way and adjusted the this to preceede in the
PATH.
<sdb> I care because if I create a new user via config.scm they by
default get access to an outdated guix when a newer is available. This
is in my view a bug.

Maybe its me who do not fully understand how system profiles is supposed
to work. I tried looking into the source but it was not clear to me how
it is supposed to work together.

The manual does not mention when/how the system profile gets updated. I
supposed it happens when a new profile derivation is built during
reconfigure. Maybe this is not correct. Maybe guix is supposed to be in
the system profile after all (I dont specify it in my config.scm ATM and
none of the templates do either)

Cheers
sdb

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

* bug#31907: New users get wrong/old profile path to guix after reconfiguring
  2018-06-26 11:06   ` swedebugia
@ 2018-06-26 11:45     ` Dan Partelly
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Partelly @ 2018-06-26 11:45 UTC (permalink / raw)
  To: swedebugia; +Cc: 31907

Well, I wondered myself , and I was palning to test when I arrive home today.

But here is my take:

1. Premise: The system configuration is declarative. The declarative state should be obeyed all times by the system
2. Implication: running a guix pull (or any other form of update) as any user should not do anything to the guix stored in the system profile
3. Implication: updates of binaries in the system profile should never be  triggered by anything else than a guix reconfigure
4. Implication  creating a new user should result in him seeing the base state of the system , as left by guix reconfigure . It should never see any version installed by any other user , root included.

Now the issues:

- Although the system is declarative, once you run guix config / guys reconfigure you do not know the whole state of the system. Arbitrary package versions are installed, and reconfigure will arbitrary update those packages
- the only way I seen to have consistent state is to lock all system packages to a known version, and reconfigure should obey the lock.
-running guix reconfigure is an  issue at the current time.  It is because unless you lock each  package @version (and I did not tried t see if this works , a developer should confirm, or point to some good workarround) adding a user, changing system configuration in some othe small way 
  seems to trigger a rebuild
- there is no guarantee that GuixSD will offer you a substitution instead of building the derivation. Which if you are unfortunate to update a package for which is not prebuilt substitution you will end up looking at compiles wearing out your time. 
-it may cause rebuild of critical system daemons, then, guess what, stop them and reload. You have to be very careful and run dry builds to see if anyone touches your system services, cause you do not want unplanned service outage on a server. 
-it reports success even if it fails to bring the system in the required state. For example for me reconfigure failed to restart 2 services it stopped, but it happily reported all went ok 
- guix is still broken for me: reconfiguring the system results in build errors sometimes. Also results in service errors , like home service not being able to be restarted. 
- guix pull  inflicts all the wrongs of the universe upon its users. No critical system utility should ever update itself from the bleeding edge of a source repository. No matter how genius the developer is, it will always break in too many ways. This is very bad practice.
- guix reconfigure without locked packages does the same offense. will try to update to a version of itself derived directly from development. 

Tools:
  
-  guix still lacks the tools to make sense as a user of what is happening. For example, a guix diff which gives insight what exactly triggered a rebuild. I could not find such a thing. 
-  other tools to keep under control the rebuilding happiness. I have better things to do on my system then looking at walls of compiling , donno for others. I want to add a user , not trigger compiles :P





> On Jun 26, 2018, at 14:06, swedebugia@riseup.net wrote:
> 
> ou could ask: why care about the guix version in the system
> profile at all? It is not used as soon as you run guix pull or populated
> the .config/guix some other way and adjusted the this to preceede in the
> PATH.
> <sdb> I care because if I create a new user via config.scm they by
> default get access to an outdated guix when a newer is available. This
> is in my view a bug.

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

* bug#31907: New users get wrong/old profile path to guix after reconfiguring
  2018-06-20  3:18 bug#31907: New users get wrong/old profile path to guix after reconfiguring swedebugia
  2018-06-20 21:35 ` Ludovic Courtès
@ 2019-01-25  5:46 ` swedebugia
  1 sibling, 0 replies; 5+ messages in thread
From: swedebugia @ 2019-01-25  5:46 UTC (permalink / raw)
  To: 31907-done

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

Closing. 
-- 
Sent from my p≡p for Android.

[-- Attachment #2: Type: text/html, Size: 55 bytes --]

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

end of thread, other threads:[~2019-01-25  5:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20  3:18 bug#31907: New users get wrong/old profile path to guix after reconfiguring swedebugia
2018-06-20 21:35 ` Ludovic Courtès
2018-06-26 11:06   ` swedebugia
2018-06-26 11:45     ` Dan Partelly
2019-01-25  5:46 ` swedebugia

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