Pijul

Newbie feedback

#1

Hi all,
After reading a linuxfr article I decided to give a try to pijul for home project :slight_smile:.
Please see here my first feedback on instalation and first patch record.
As a complete newbie I had issue installing pijul on debian:
First I needed to install nix-env, go to nix website execute the fairly easy command:
curl https://nixos.org/nix/install | sh
The main issue I encountered was an error at the end of process install:
nix error: cloning builder process: Operation not permitted
I had to create a /etc/sysctl.d/nix.conf
kernel.unprivileged_userns_clone=1

Then nix get installed.

After that I tried to execute:
nix-env command not found... . .profile
-> better, I don’t understand why Konsole is not loading .profile :confused:

$nix-env -iA nixos.pijul
error: attribute ‘nixos’ in selection path ‘nixos.pijul’ not found
:confused:

After several test I tried:
$nix-env upgrade (not sure this one is mandatory)
$nix-env -i pijul
which installed version 0.11

Not so bad!

Perhaps you could update the doc with sysctl trick?
Did I miss something with nixos.pijul?
I think from a newbie point of view that the step I had to do could be put in the docs, because I was near abandon :smile: , and so will do newcomers not used to nix-env.

Now I tried to play pijul, and so far I find it very EASY to use, compared to say git.

The only missing feature so far is that I don’t find in the doc of to deal with ignoring some file in my repos.
Is there such feature in pijul, like .ignore file?
Perhaps I missed a command line option like pijul ignore?

Hope this feedback will help you.
I’m keeping testing :wink:

1 Like
#2

Welcome @nekopep!

Because Pijul is such a young project it is not available in all distributions. It is surprising that Nix on Debian is so hard to install. Nix is an independent package manager (although there’s an entire Linux distribution base on this). If you like it you could provide feedback in there GitHub repo.

Now regarding Pijul itself: yes, you can ignore files by creating an .ignore or .pijulignore file in the root of your project. The syntax is the one used by Git.

I wrote a tutorial for Git users that covers ignoring files. If you have feedback on it I would be super happy to address it.

1 Like
#3

Hi tae,

Ok I pushed a bug report to nix.
Regarding pijul, where shoudl I propose improvements?

As a newcomers I’ve seen small things that could be improved:
1/So far I’m using $echo “myfile.cpp” >> .ignore
It is error prone :), perhaps a pijul ignore blahblah could be added to command line?
2/When working a lot and forgetting to commit, pijul status display all the file but the result is not sorted, could be easier to have it displayed in a sorted way (just alphabetically for example).
3/pijul status could also display ignored files (with --ignored for example) it could very interesting

Can you point me out where to propose this?

#4

Hi @nekopep!

You can propose changes (even better if they come in the form of a patch) to https://nest.pijul.com/pijul_org/pijul/discussions.

You can push a patch to a discussion by doing pijul push nekopep@nest.pijul.com:pijul_org/pijul --to-branch #2345 (if the discussion has number 2345).

#5

Bonjour pierre,
After 4 h of rust fight I got my first ugly patch. Not to say traits and all were hard to understand…
Sadly my patch is ready but
pijul push nekopep@nest.pijul.com:pijul_org/pijul --to-branch :392

Pushing to branch :392
Password for “nest.pijul.com”:

nest is not recognizing my password ;_;
Any hint?

#6

Congrats! I can’t wait to review it.
I need to implement password authentication on the Nest. Meanwhile you can use your SSH key by uploading your public key to your profile page.

#7

Pierre,
I’ve created my key as usual: ssh-keygen -b 4096 -t rsa -f id_rsa_pijul
Then I copied it to the nest , go to my profile and copied it to my ssh public key.
I don’t think it is a format issue since, if I remove something, nest put the key in red.

After that, I do:
ssh-add ~/.ssh/id_rsa_pijul
pijul push nekopep@nest.pijul.com:pijul_org/pijul --to-branch :392

But I still get a question about pasword.
Any hints?

#8

Also tried with rsa length 2048 and ed25519 length 2048

#9

Finally I managed to push…
I did two things:
1/pijul key gen --signing-id laurent@neko-labs.eu
2/pijul key gen
I then found ~/.pijulconfig/id_ed25519.pub
(Don’t know which one of the two commands did the file)
And copied it to SSH public keys, not signing key.

#10

Pierre, please find below my notes on all my walkthrougt on pijul discovery.
I think it is important, because it will show you all the pitfall I had to workaround before being able to play with pijul. ie, thinks to be updated in the doc.
Last part is in french, I will translate it but later if needed :slight_smile:
Hope it will help you lower the entry level for newcomers.

First I gone to online manual that is a very good start point.
(Note I said that for later point when one want to later develop, see below after installation part)

Installation:

Installation via nix not easy on debian:
#curl https://nixos.org/nix/install | sh
The main issue I encountered was an error at the end of process install:
nix error: cloning builder process: Operation not permitted

I had to create a /etc/sysctl.d/nix.conf
kernel.unprivileged_userns_clone=1

(-> created a bug report on nixos https://github.com/NixOS/nixpkgs/issues/61271)

Still we should add a note on the manual I think.

Then:
$nix-env -iA nixos.pijul
error: attribute ‘nixos’ in selection path ‘nixos.pijul’ not found

;_;

$nix-env upgrade (not sure this one is mandatory)
$nix-env -i pijul
which installed version 0.11

Note that I did not intall nixos.pijul but pijul -> should be updated in the doc.

Installation via CARGO not easy because of missing libraires to be able to compile not explained in the doc:
On debian be sure to install needed libraries:
sudo apt install libsodium-dev libsodium-dev libclang-dev libclang clang
(not sure libclang and/or libclang-dev is needed)

Add these requirement in the doc

Next I wanted to develop.
I did not found any info in the manual :confused:
What to do to make a patch or just develop for pijull ???
I was completely lost…
Hopefully , I don’t know why, I had the idea to a cat README on my terminal, all the info was there. -> Excellent, but keep in mind as a dumb user I was refering to the excellent online manual.

Perhaps add a link in the online manual: Want to send a patch? -> got see README

---------- Part below in french I’m too lazy to translate it ----------------------

Compliqué pour un premier patch:

  • procédure pour uploader pas a jour
  • ne supporte pas ssh-agent (pas un problème mais il faudrais expliquer alors le mécanisme de pijul pur les gens habitués a mercurial par exemple qui ont leurs habitudes.)

Dans la doc on nous dit que pour signer par exemple un patch il faut lancer une commande.
En vérité, tant que l’on a pas uploadé notre public ssh key, rien n’est fonctionel car pas l’on ne peut pas accéder au nest en ligne de commande.

En fait la doc assume que l’on a déjà uploadé notre public key sans expliquer comment l’uploder.
Erreur typique, j’ai moi meme généré ma clef avec ssh-keygen + chargé en mémoire avec ssh-add mais cela ne fonctionne pas
Ce qui est normal mais il faudrais expliquer la bonne manière.

D’ailleurs je ne suis pas sûr de la bonne procédure en fait… :confused:


BUG:
When we clone pijul there is a bug in log.rs.

.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
debug!(“hash: {:?}”, hash_ext.to_base58());
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Probleme/BUG:
Une fois cloné, la command pijul log --last fonctionne bizarrement, je ne comprends pas comment elle fonctionne…
Pourquoi n’ai je pas les dernier patch dont :
Fixing the detection of zombie lines in record by pmeunier, created on April 25, 2019

Qui devrait résoudre le bug cité plus haut.

pijul log --last 5

Hash: 7Vew9h1cjBSqcQzqt8ULjqvQFcrvMHFyAYYL6hJswWDXJ4GifhR8xDMrccrAGeDLYva3Y5p372a9N7xfZcPPooTa
Internal id: CWZi2Tk6AUX
Authors: lthms contact@thomasletan.fr
Timestamp: 2019-04-01 05:44:43.949449599 UTC

merge: Fix conflicts in pijul-push

Hash: 7U1AdXJ6JJiQ3ozkHD14U42e98dvf4jxYkLuA2Sc2mm2d9bsAedYUq9zp7E3gP3euhskseFi9zNgnRgsAxWo82XE
Internal id: CGkWxLK2fvf
Authors: Pierre-Étienne Meunier pe@pijul.org
Timestamp: 2019-04-01 12:36:36.153673909 UTC

Removing the "challenge" file (not used anymore)

Hash: A9rzRfceJWTQyasxG5JsyUFzQB1FCnko4xrGjVj57cT1oaTYX8baPSaPvCcxRq9ZS5hqMvusPT4N1ChmYGKxzSpH
Internal id: akfcXg4v6dj
Authors: Pierre-Étienne Meunier pe@pijul.org
Timestamp: 2019-04-25 11:05:13.474931272 UTC

Emacs VC mode: now displaying the last patch that touched the file!

Hash: 9KmHRe9q1Upuub5ei69mh2ion9kjeg5FGmNymVU7L8DK3iDZTh8Yixsk3k58z11wjkLtvddZeRuEVj5SWScXTUk3
Internal id: TpGwv78wPkY
Authors: Pierre-Étienne Meunier pe@pijul.org
Timestamp: 2019-04-14 13:09:10.690101826 UTC

Save global configuration only if it didn't exist already

Hash: AGU7LTcFFWwKbg53oWTxPr1rTcpfHud4EJNn2mHwhVkQKKBTGR6eu9Nmwb11ZUELqkH7XxmG38h7ZU49bcfZxeqZ
Internal id: bhvnVEksVfZ
Authors: Pierre-Étienne Meunier pe@pijul.org
Timestamp: 2019-04-22 16:27:49.967258657 UTC

Fixing an old conflict (this time for real)

pijul log --last 1

Hash: 7Vew9h1cjBSqcQzqt8ULjqvQFcrvMHFyAYYL6hJswWDXJ4GifhR8xDMrccrAGeDLYva3Y5p372a9N7xfZcPPooTa
Internal id: CWZi2Tk6AUX
Authors: lthms contact@thomasletan.fr
Timestamp: 2019-04-01 05:44:43.949449599 UTC

merge: Fix conflicts in pijul-push

But why last patch is older than one in -n 5 ??? where is patch Fixing the detection of zombie lines in record?

1 Like
#11

Merci pour le feed-back! Au fait le manuel est aussi dans un dépôt Pijul: nest.pijul.com/pijul_org/manual

Pijul supporte les agents SSH, essaie de faire RUST_LOG=“pijul=debug” pijul pull …