Re: LilyDevOS, a LilyDev container + full VM image

2017-07-26 Thread Federico Bruni


Il giorno lun 17 lug 2017 alle 17:58, Federico Bruni 
 ha scritto:


You can use an alias and forget the special command.
Add this line to ~/.bashrc:

# Let gitk work on host display
alias gitk="DISPLAY=:0 gitk"

As .bashrc is the same for container and full VM, I won't add this 
configuration.

I'll add only a suggestion in the README.



Actually, with version of git >=2.13.0 (as in LilyDevOS), you don't 
really need gitk, as the information is visible in the log.


git log by default has now `--decorate` enabled:
https://github.com/git/git/commit/d9758cf81cd8af42a7ab55dc3c1a889d9ddd3f81

Example:

$ git log
commit 68dbc841e3401f14b900f6750ebb49b406caf357 (HEAD -> staging, 
origin/staging)

Author: Federico Bruni <...>
Date:   Thu Jul 20 21:23:57 2017 +0100

   Doc: CG, explain other git prompt variables

   The use of these environment variables is documented within the
   git source code: git/contrib/completion/git-prompt.sh

commit 54a35cdc574e4088ea8a0aa81b7df0789de758bc (origin/master, 
origin/HEAD)

Author: James Lowe <...>
Date:   Thu Jul 20 13:16:41 2017 +0100

   Web: Authors.itexi update

   Issue 5159

   From October 2016 until
   July 2017 Based on all
   those contributors for
   2.18.x and current 2.19.x.





___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-25 Thread Federico Bruni



Il giorno ven 21 lug 2017 alle 20:29, Paul  ha 
scritto:

On 07/17/2017 04:58 AM, Federico Bruni wrote:

A suggestion: it might be worth clarifying the steps for first setup 
vs repeat use of the container?  I think the main (only?) difference 
is that you don't need to run the setup script after you've already 
done it.




Ok, I've added a comment and a quick note on how to shutdown the 
container.





Also, the authentication in git-cl opens a web page in a browser so 
I'm not sure how that will work from the container?


w3m and elinks accept cookies by default, so login to google is easy 
and saved across different sessions.


I just need to check if the redirect from 
/get-access-token?port=8001 works.


I want to avoid installing a regular browser, as it would add some 
dependencies and increase the final size of the container.


Cool, glad there's a good solution for this.



Actually not.
It seems that git-cl relies on some server stuff redirect 
(http//localhost:8000/) which modern browsers support, but apparently 
not the text browsers. I've had no time to investigate.



BTW, let me know if the password is working. I'm not sure I've 
uploaded the correct version..


It wasn't working for me (e.g. when I tried to install guile-devel).


If it doesn't, use this command as root:

 echo 'dev:lilypond'|chpasswd


This fixed it for me.  And I was able to install guile-devel.  (GNU 
Guile 2.0.14)




It worked fine for me on a fresh build of the container.
I guess I uploaded some older version before the fix.
Next release will be ok.


Thanks again.  It's coming together well!




Thanks :-)




___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-21 Thread Paul

On 07/17/2017 04:58 AM, Federico Bruni wrote:


$ sudo systemd-nspawn -bD lilydevos-0.1
sudo: unable to resolve host t440s


This is not causing any problem, right?
Anyway, here you can find some hints on how to fix it:
https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none 



Thanks, I've seen this for awhile, but everything has seemed to work 
fine.  I've now fixed it with the info in that link.  (My machine name 
in /etc/hosts was off.)


Spawning container lilydevos-0.1 on 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1.

Press ^] three times within 1s to kill container.
Failed to create directory 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1/sys/fs/selinux: 
Read-only file system
Failed to create directory 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1/sys/fs/selinux: 
Read-only file system


I think you can safely ignore it.

This may happen when selinux is disabled, according to this:
https://github.com/systemd/systemd/issues/3711

But I have selinux disabled and I'm not getting those messages...

# sestatus
SELinux status: disabled


Huh, odd.  I'll just ignore it for now.

[gitk] can work also from the guest if you use the correct DISPLAY 
environment variable.

Find it in your host with this command:

$ echo $DISPLAY
:0

Then launch gitk from the container with:

$ DISPLAY=:0 gitk 



You can use an alias and forget the special command.
Add this line to ~/.bashrc:

# Let gitk work on host display
alias gitk="DISPLAY=:0 gitk"

As .bashrc is the same for container and full VM, I won't add this 
configuration.
I'll add only a suggestion in the README. 


Great!  This is working for me now.  Same display value of `:0`


I've now updated the instructions about the container.

I've also added instructions on setting up the virtual machine in 
libvirt (i.e. also GNOME Boxes and virt-manager) with a single command.


Looks good.  Nice additions about libvirt use.

A suggestion: it might be worth clarifying the steps for first setup vs 
repeat use of the container?  I think the main (only?) difference is 
that you don't need to run the setup script after you've already done it.



Also, the authentication in git-cl opens a web page in a browser so 
I'm not sure how that will work from the container?


w3m and elinks accept cookies by default, so login to google is easy 
and saved across different sessions.


I just need to check if the redirect from /get-access-token?port=8001 
works.


I want to avoid installing a regular browser, as it would add some 
dependencies and increase the final size of the container.


Cool, glad there's a good solution for this.

BTW, let me know if the password is working. I'm not sure I've 
uploaded the correct version..


It wasn't working for me (e.g. when I tried to install guile-devel).


If it doesn't, use this command as root:

 echo 'dev:lilypond'|chpasswd


This fixed it for me.  And I was able to install guile-devel.  (GNU 
Guile 2.0.14)


Thanks again.  It's coming together well!

-Paul


___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-19 Thread Federico Bruni



Il giorno lun 17 lug 2017 alle 16:58, Federico Bruni 
 ha scritto:


Good point. I don't think that there's even any browser in the 
container now.
Perhaps I may install a text browser and set the BROWSER environment 
variable.

I have a small patch to send, I'll let you know how it works.







I've tried lynx, but it's not working correctly.
It ends up with this link: 
https://codereview.appspot.com/get-access-token?port=8001

but does not go beyond this and I have to cancel with Ctrl+C.

If you want to give it a try:

sudo dnf install lynx



Don't give it a try.
w3m and elinks accept cookies by default, so login to google is easy 
and saved across different sessions.


I just need to check if the redirect from /get-access-token?port=8001 
works.


I want to avoid installing a regular browser, as it would add some 
dependencies and increase the final size of the container.





___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-19 Thread Federico Bruni
Il giorno lun 17 lug 2017 alle 9:58, Federico Bruni 
 ha scritto:

Thanks Paul, I'll update the README.


I've now updated the instructions about the container.

I've also added instructions on setting up the virtual machine in 
libvirt (i.e. also GNOME Boxes and virt-manager) with a single command.





___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-17 Thread Federico Bruni



Il giorno lun 17 lug 2017 alle 10:58, Federico Bruni 
 ha scritto:



Il giorno sab 15 lug 2017 alle 20:43, Paul  ha 
scritto:




And I was able to successfully build lilypond in the container. 
(Look mom, no VM!)


So this is really nice.  I can edit files using my usual desktop 
environment and text editor, then just do git and git-cl via the 
command line in the container.


One other minor thing is I noticed that trying to run gitk in the 
container doesn't work:


$ gitk
application-specific initialization failed: no display name and no 
$DISPLAY environment variable
Error in startup script: no display name and no $DISPLAY environment 
variable

while executing
"load /usr/lib64/libtk8.6.so Tk"
("package ifneeded Tk 8.6.6" script)
invoked from within
"package require Tk"
(file "/usr/bin/gitk" line 10)

But, it works to run it from a terminal in the host account.



It can work also from the guest if you use the correct DISPLAY 
environment variable.

Find it in your host with this command:

$ echo $DISPLAY
:0

Then launch gitk from the container with:

$ DISPLAY=:0 gitk



You can use an alias and forget the special command.
Add this line to ~/.bashrc:

# Let gitk work on host display
alias gitk="DISPLAY=:0 gitk"

As .bashrc is the same for container and full VM, I won't add this 
configuration.

I'll add only a suggestion in the README.




Also, the authentication in git-cl opens a web page in a browser so 
I'm not sure how that will work from the container?




Good point. I don't think that there's even any browser in the 
container now.
Perhaps I may install a text browser and set the BROWSER environment 
variable.

I have a small patch to send, I'll let you know how it works.







I've tried lynx, but it's not working correctly.
It ends up with this link: 
https://codereview.appspot.com/get-access-token?port=8001

but does not go beyond this and I have to cancel with Ctrl+C.

If you want to give it a try:

sudo dnf install lynx

BTW, let me know if the password is working. I'm not sure I've uploaded 
the correct version..

If it doesn't, use this command as root:

 echo 'dev:lilypond'|chpasswd


Create ~/.lynxrc and add these lines:

ACCEPT_ALL_COOKIES=TRUE
PERSISTENT_COOKIES=TRUE
COOKIE_FILE=/home/dev/.lynx_cookies
COOKIE_SAVE_FILE=/home/dev/.lynx_cookies
FORCE_SSL_COOKIES_SECURE=FALSE
AUTO_SESSION=TRUE
SESSION_FILE=/home/dev/.lynx_session





___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-17 Thread Federico Bruni



Il giorno sab 15 lug 2017 alle 20:43, Paul  ha 
scritto:

On 07/14/2017 05:52 AM, Federico Bruni wrote:

https://github.com/fedelibre/LilyDevOS/releases/tag/v0.1

Hi Federico,

This looks great!  I downloaded the one for linux (I'm on Ubuntu 
16.04 LTS) and gave it a try.  I ran into a few things but got it 
working and successfully built LilyPond in the container.  Details 
below.


One issue was that I had systemd installed, but not 
systemd-container, so I had to install that.  So maybe we should add 
that to the dependencies in the instructions?


$ sudo systemd-nspawn -bD lilydevos-0.1
sudo: unable to resolve host t440s
sudo: systemd-nspawn: command not found

$ systemd-nspawn --help
The program 'systemd-nspawn' is currently not installed. You can 
install it by typing:

sudo apt install systemd-container



Thanks Paul, I'll update the README.
I thought it was included in the systemd package, but it's actually 
separate.

Same package name in Fedora:

$ dnf provides /usr/bin/systemd-nspawn
Last metadata expiration check: 5 days, 0:34:02 ago on Wed Jul 12 
09:42:26 2017.

systemd-container-233-6.fc26.x86_64 : Tools for containers and VMs
Repo: @System




After that, things worked, although I saw some "Failed to..." 
messages, not sure if they are a problem or not:


$ sudo systemd-nspawn -bD lilydevos-0.1
sudo: unable to resolve host t440s


This is not causing any problem, right?
Anyway, here you can find some hints on how to fix it:
https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none

Spawning container lilydevos-0.1 on 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1.

Press ^] three times within 1s to kill container.
Failed to create directory 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1/sys/fs/selinux: 
Read-only file system
Failed to create directory 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1/sys/fs/selinux: 
Read-only file system


I think you can safely ignore it.

This may happen when selinux is disabled, according to this:
https://github.com/systemd/systemd/issues/3711

But I have selinux disabled and I'm not getting those messages...

# sestatus
SELinux status: disabled





Next I found that the uid for the dev user in the container was not 
the same as my host user uid, so I wasn't able to access the files 
from the host user account.  But I was able to use the instructions 
in this blog post to change the dev user uid and that fixed it:

https://muffinresearch.co.uk/linux-changing-uids-and-gids-for-user/



ok

And I was able to successfully build lilypond in the container. (Look 
mom, no VM!)


So this is really nice.  I can edit files using my usual desktop 
environment and text editor, then just do git and git-cl via the 
command line in the container.


One other minor thing is I noticed that trying to run gitk in the 
container doesn't work:


$ gitk
application-specific initialization failed: no display name and no 
$DISPLAY environment variable
Error in startup script: no display name and no $DISPLAY environment 
variable

while executing
"load /usr/lib64/libtk8.6.so Tk"
("package ifneeded Tk 8.6.6" script)
invoked from within
"package require Tk"
(file "/usr/bin/gitk" line 10)

But, it works to run it from a terminal in the host account.



It can work also from the guest if you use the correct DISPLAY 
environment variable.

Find it in your host with this command:

$ echo $DISPLAY
:0

Then launch gitk from the container with:

$ DISPLAY=:0 gitk


Also, the authentication in git-cl opens a web page in a browser so 
I'm not sure how that will work from the container?




Good point. I don't think that there's even any browser in the 
container now.
Perhaps I may install a text browser and set the BROWSER environment 
variable.

I have a small patch to send, I'll let you know how it works.

Anyway, thanks for your work on this!  It will be really nice not to 
have the overhead of a VM.




I'm glad that it's useful. Thanks for the feeedback!




___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-16 Thread Paul

On 07/15/2017 02:43 PM, Paul wrote:

Also, the authentication in git-cl opens a web page in a browser so 
I'm not sure how that will work from the container?


I suppose one could just install git-cl in the host os and use it from 
there, (assuming the two uids match allowing access to the files).


-Paul

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: LilyDevOS, a LilyDev container + full VM image

2017-07-15 Thread Paul

On 07/14/2017 05:52 AM, Federico Bruni wrote:
https://github.com/fedelibre/LilyDevOS/releases/tag/v0.1 


Hi Federico,

This looks great!  I downloaded the one for linux (I'm on Ubuntu 16.04 
LTS) and gave it a try.  I ran into a few things but got it working and 
successfully built LilyPond in the container.  Details below.


One issue was that I had systemd installed, but not systemd-container, 
so I had to install that.  So maybe we should add that to the 
dependencies in the instructions?


$ sudo systemd-nspawn -bD lilydevos-0.1
sudo: unable to resolve host t440s
sudo: systemd-nspawn: command not found

$ systemd-nspawn --help
The program 'systemd-nspawn' is currently not installed. You can install 
it by typing:

sudo apt install systemd-container


After that, things worked, although I saw some "Failed to..." messages, 
not sure if they are a problem or not:


$ sudo systemd-nspawn -bD lilydevos-0.1
sudo: unable to resolve host t440s
Spawning container lilydevos-0.1 on 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1.

Press ^] three times within 1s to kill container.
Failed to create directory 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1/sys/fs/selinux: 
Read-only file system
Failed to create directory 
/home/paul/lilypond-world/LilyDevOS/lilydevos-0.1/sys/fs/selinux: 
Read-only file system
systemd 233 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR 
+SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 
+SECCOMP +BLKID +ELFUTILS +KMOD +IDN default-hierarchy=hybrid)

Detected virtualization systemd-nspawn.
Detected architecture x86-64.

Welcome to Fedora 26 (Twenty Six)!

Set hostname to .
Initializing machine ID from random generator.
Failed to install release agent, ignoring: File exists
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Process Core Dump Socket.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-getty.slice.
 Mounting Huge Pages File System...
 Mounting FUSE Control File System...
[  OK  ] Reached target Slices.
 Mounting POSIX Message Queue File System...
[  OK  ] Listening on Journal Socket.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
 Starting Rebuild Journal Catalog...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
 Starting Rebuild Dynamic Linker Cache...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Encrypted Volumes.
 Starting Create System Users...
 Starting Journal Service...
[  OK  ] Reached target Remote File Systems.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Huge Pages File System.
[  OK  ] Started Create System Users.
[  OK  ] Started Journal Service.
 Starting Flush Journal to Persistent Storage...
[  OK  ] Started Rebuild Journal Catalog.
[  OK  ] Started Flush Journal to Persistent Storage.
 Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
 Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Rebuild Dynamic Linker Cache.
 Starting Update is Completed...
[  OK  ] Started Update is Completed.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started dnf makecache timer.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
 Starting Permit User Sessions...
[  OK  ] Started D-Bus System Message Bus.
 Starting Login Service...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Login Service.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
 Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Fedora 26 (Twenty Six)
Kernel 4.4.0-83-generic on an x86_64 (console)

lilydev login:


Next I found that the uid for the dev user in the container was not the 
same as my host user uid, so I wasn't able to access the files from the 
host user account.  But I was able to use the instructions in this blog 
post to change the dev user uid and that fixed it:

https://muffinresearch.co.uk/linux-changing-uids-and-gids-for-user/

And I was able to successfully build lilypond in the container. (Look 
mom, no VM!)


So this is really nice.  I can edit files using my usual desktop 
environment and text editor, then just do git and git-cl via the command 
line in the container.


One other 

Re: LilyDevOS, a LilyDev container + full VM image

2017-07-14 Thread Federico Bruni
I've just realized that I forgot to publish the release, so there was 
nothing you could download.


In the meanwhile I've added also an image with a desktop environment, 
which works basically as the old LilyDev. The main difference is that 
there's no installation process. The image is ready to be launched. 
Read the main README on Github for instructions on how to use it.


I've tested it only on Linux host.

https://github.com/fedelibre/LilyDevOS/releases/tag/v0.1



Il giorno gio 6 lug 2017 alle 17:03, Federico Bruni 
 ha scritto:

Hi folks

I've made a LilyDev container which can be run with systemd-nspawn.
You can download v0.1 and find the instructions here:
https://github.com/fedelibre/LilyDevOS

This is only for Linux users at the moment.
I'm not sure if you need a certain version of systemd to run it 
correctly. Probably not.

I've tested it on Fedora 26, systemd version 233.

Let me know if it works for you.
Thanks
Federico


PS
Why working on a new LilyDev?
Since some time I wanted to switch from Debian live-build to 
something else, for several reasons:


- live-build can be run only within a Debian machine (since I moved 
to Fedora almost two years ago, I had to run it in a Debian container)
- live-build is extremely configurable but quite complicated. In the 
last year live-wrapper has replaced it as official Debian image 
builder


Since guile-1.8 was removed from Debian stable, I had one more reason 
to change distro.
At first I thought I'd have used some Fedora tool. Until I read this 
post about mkosi:

http://0pointer.net/blog/mkosi-a-tool-for-generating-os-images.html

It's easy to pick up, the design is very clear and the build 
performance is great.

I like especially the fact that it's distribution-agnostic.
I might build different distro and different versions of each distro 
simply by using a different configuration file. And without changing 
anything on my machine (live-build requires to run Debian stable if 
you want to build Debian stable; run Debian testing if you want to 
build Debian testing; and so on..)


Next step will be creating an image with a full desktop environment, 
like the old LilyDev.
Do you have any preference for the default distro and DE (must be 
lightweight)?

If you don't, I think I'll choose Fedora and LXQT.




___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel



___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel