Re: Some manual @ref @xref @pxref fail when untranslated

2019-05-22 Thread Meiyo Peng
Hi Florian,

pelzflorian (Florian Pelz) writes:

> Meiyo Peng reports at 
> <https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00275.html>
>
> On Tue, May 14, 2019 at 10:29:35AM +0800, Meiyo Peng wrote:
>> I just find out that the @pxref{Packages with Multiple Outputs} in
>> doc/contributing.texi has to be translated.  Or I will get an error
>> while running make:
>>
>> #+begin_example
>>   doc/contributing.zh_CN.texi:567: @pxref reference to nonexistent node 
>> `Packages with Multiple Outputs'
>> #+end_example
>>
>> I guess it's because the node name is in doc/guix.texi (another file
>> than doc/contributing.texi).  Any idea?
>>
>
> The reason appears to be that when not translating (using the first
> attached patch that reverts back to @pxref{Packages with Multiple
> Outputs}), po4a-translate transforms
>
> @item
> Take a look at the profile reported by @command{guix size}
> (@pxref{Invoking guix size}).  This will allow you to notice references
> to other packages unwillingly retained.  It may also help determine
> whether to split the package (@pxref{Packages with Multiple Outputs}),
> and which optional dependencies should be used.  In particular, avoid adding
> @code{texlive} as a dependency: because of its extreme size, use
> @code{texlive-tiny} or @code{texlive-union} instead.
>
> to
>
> @item
> 看一下@command{guix size}(@pxref{Invoking guix
> size})的分析报告。这会让你注意到对其它软件包无意中的引用。它也可以帮助决定是否要把一个软件包分割成几个输出(@pxref{Packages
> with Multiple
> Outputs}),以及需要使用哪些可选的依赖。特别地,避免把@code{texlive}添加为依赖:因为它太大了,请使用@code{texlive-tiny}或@code{texlive-union}代替它。
>
> with the pxref split over three lines because the surrounding context
> has no space characters.  doc/local.mk’s xref_command can only deal
> with two lines however.

There is no space separator for Chinese words.  Typesetting of CJK
languages is always a headache for FLOSS developers.

> The second attached patch makes xref_command grep three-line
> references too, so it finds the translation, *however* I cannot get
> this multiline sed to actually insert the translation into three line
> references.  Perhaps it would be better to just replace this complex
> xref_command with Guile code?  I will not do it however.

Thank you for the work.  I have found only one such case in the Guix
manual, so that's fine.  I can manually translate this @pxref.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: guix package --search slow ?

2019-05-14 Thread Meiyo Peng
Hi zimoun,

zimoun writes:

> When searching packages with `guix search`, it appears to me slow;
> especially compared to `aptitude` of Debian.
> ...
> What should be done to improve the search speed?

I remember "guix package --search" has always been pretty fast since
this patch series of Ludovic is merged into guix:
https://lists.gnu.org/archive/html/guix-patches/2019-01/msg00254.html.

Before that, "guix package --search" is slow.

Please check your guix's version.  If you are not using an old Guix.  I
am not sure why your experience is different from us.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Translation of the Guix manual & node names

2019-05-13 Thread Meiyo Peng
Hi Julien,

Julien Lepiller writes:

> Le 24 avril 2019 09:08:34 GMT+02:00, Meiyo Peng  a écrit :
>>Hi Julien,
>>
>>Julien Lepiller writes:
>>
>>> No, we have a small script that takes care of this. As long as the
>>node
>>> name is translated somewhere near the beginning of the file, it is
>>also
>>> automatically translated in the rest of the file. So that shouldn't
>>> cause an issue. Maybe there's an error in the script?
>>>
>>> Look at xref_command in doc/local.mk
>>
>>The xref_command is too complex for me to understand.  Do you mean we
>>don't need to translate all the reference strings in @ref{}, @xref{}
>>and
>>@pxref{} as long as the target node name after "@node" is translated?
>>That will be a good news.
>
> Yes exactly! What this command does is to look for any ref, xref and pxref 
> command and look for the translation of its content in the po file for the 
> language.

I just find out that the @pxref{Packages with Multiple Outputs} in
doc/contributing.texi has to be translated.  Or I will get an error
while running make:

#+begin_example
  doc/contributing.zh_CN.texi:567: @pxref reference to nonexistent node 
`Packages with Multiple Outputs'
#+end_example

I guess it's because the node name is in doc/guix.texi (another file
than doc/contributing.texi).  Any idea?


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: GNU Guix 1.0.0 released

2019-05-02 Thread Meiyo Peng
Hello everyone,

Ludovic Courtès writes:

> We are thrilled to announce the release of GNU Guix 1.0.0!

This is awesome!  Thanks to everyone who makes this happen.  Let's
celebrate!


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: User shell: state or config?

2019-04-27 Thread Meiyo Peng
Hi Ludovic,

Ludovic Courtès writes:

> All in all, I’m in favor of switching back to the previous behavior:
> considering user shells as system config.  That’s a one-line change in
> (gnu build accounts).
>
> Thoughts?

I support this change.  You have listed very good reasons.

Last month, I installed Guix system on my computer with a minimal Guix
config and then reconfigure the system with a more complete Guix config.
I was surprised that my login shell is still bash while the user's shell
slot in Guix config has been changed to fish.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Translation of the Guix manual & node names

2019-04-24 Thread Meiyo Peng
Hi Julien,

Julien Lepiller writes:

> No, we have a small script that takes care of this. As long as the node
> name is translated somewhere near the beginning of the file, it is also
> automatically translated in the rest of the file. So that shouldn't
> cause an issue. Maybe there's an error in the script?
>
> Look at xref_command in doc/local.mk

The xref_command is too complex for me to understand.  Do you mean we
don't need to translate all the reference strings in @ref{}, @xref{} and
@pxref{} as long as the target node name after "@node" is translated?
That will be a good news.

> Also look at fr.po, I haven't translated most of the node names.

By saying "most of the node names" have not been translated, do you mean
some of the reference strings in @ref{}, @xref{} and @pxref{} should be
translated?


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Translation of the Guix manual & node names

2019-04-23 Thread Meiyo Peng
Hi Ludovic,

Ludovic Courtès writes:

> Hello Miguel & Meiyo,
>
> Thanks a lot for your translations of the Guix manual!
>
> I found an issue with the translations that prevents us from including
> them:
>
>   https://translationproject.org/latest/guix-manual/es.po
>   https://translationproject.org/latest/guix-manual/zh_CN.po
>
> If we look at these, you both translated, for example, the “Packaging
> Guidelines” string.  However, you also left, in your translations,
> things like “@pxref{Packaging Guidelines}”.
>
> Texinfo has a notion of “node” (roughly a node is a chapter, section, or
> sub-section.)  Each node has a name that can be used in cross-references
> commands @ref, @xref, or @pxref.  However, Texinfo errors out when a
> cross-reference command refers to a non-existent node name.
>
> What happens in your case is that there is no “Packaging Guidelines”
> node—instead, it’s called “Guías de empaquetamiento” or “打包指导”.
> Thus, Texinfo fails to build the translated manual.

The zh_CN version guix manual that I uploaded earlier is a test with the
TranslationProject.org robot.  It's not supposed to be used as a
suitable translation.  I should have notified you in the mailing list.

I will improve the manual gradually.  As I said before, I have no
experience with i18n.  I only learned the usage of @ref, @xref and
@pxref until yesterday.  And there are still many new things to learn.

> Could you please translate all the node names, and make sure that all
> the cross-reference commands use the same names?  (The plan is to
> release Guix 1.0 in one week, so it would be great if you could send an
> updated PO file by then!)
>
> I’m attaching the complete list of node names below; “Top” is an
> exception, it must _not_ be translated.

OK.  I will do my best.  However, my translation progress will be slow.
It's 02:00 in China now and I am still in my office working on my job!
I won't have much time recently, but I will do as much as I can.

I feel excited for the Guix 1.0 release and also regret that I cannot
translate the Guix manual before that date.  The translation work can be
finished in two or three months, I guess.  It's extremely difficult to
translate technical English manuals into Chinese.  Many technical
English words has no suitable Chinese translation.  Besides, I have
never ever used a Chinese version GNU/Linux distro or ever read the
Chinese version manuals, so I am unfamiliar with the corresponding
Chinese words.  This makes the translation work even harder for me.
However, I am sure a bundled Chinese manual in the Guix 1.0 release
tarball or ISO file won't matter much.  We can release an updated
Chinese manual on our website later.  The web version will be what most
people will use.

Thank you for your understanding.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Let’s translate!

2019-04-13 Thread Meiyo Peng
Hi pelzflorian,

pelzflorian (Florian Pelz) writes:

> On Sat, Apr 13, 2019 at 09:56:31AM +0800, Meiyo Peng wrote:
>> I have no previous experience with i18n.  What should I know in order to
>> translate the Guix manual?  How do I edit the ".pot" file?  Is there an
>> emacs package for the job?
>>
>
> emacs’ po-mode is part of gettext.
>
> You will also need to join the Translation Project:
>
> https://translationproject.org/team/index.html
>
>
>
> You need to put your translations in a .po file, not in the .pot file.
> This is what I did back then (once there is a po file it is no longer
> this complicated).  I am not sure if there are easier ways to test an
> initial po file.
>
> On Sat, Oct 27, 2018 at 02:55:10AM +0200, pelzflorian (Florian Pelz) wrote:
>> I’m not sure what doc/htmlxref.cnf is for, but I did this to my copy
>> of Guix to get the PO going, now that Julien Lepiller has paved the
>> way by adding PO4A:
>>
>> cd ~/git/guix
>> guix environment guix --ad-hoc po4a
>>
>
> Then I did this but it was not the right command:
>
>> # if you do not have a po file yet:
>> msginit -i po/doc/guix-manual.pot -o po/doc/guix-manual.de.po -l de_DE
>
> You should not need to do this msginit.  You should instead use the po
> file at the Translation Project if they have one for your language
> team.  If not, then you should not use po/doc/guix-manual.pot as I did
> but use the .pot file at
> https://translationproject.org/domain/guix-manual.html or else the
> Translation Project will not accept the po.
>
> Then:
>
>> # (in the newly created po file, adjust the version.texi to be
>> #  version-de.texi, contributing.texi to be contributing-de.texi and 
>> translate
>> #  the table of contents)
>> # (adjust doc/htmlxref.cnf doc/local.mk po/doc/local.mk to list your
>> #  language next to the existing translations, in lexicographic order)
>>
>> # then:
>> po4a-translate -f texinfo -m doc/guix.texi -p po/doc/guix-manual.de.po \
>>-M UTF-8 -k 0 -l doc/guix.de.texi # ignore outdated warning
>> po4a-translate -f texinfo -m doc/contributing.texi -p 
>> po/doc/guix-manual.de.po \
>>-M UTF-8 -k 0 -l doc/contributing.de.texi # ignore warning
>> ./bootstrap
>> ./configure
>> make # only needs to run past MAKEINFO; probably some of the GEN 
>> doc/os-config…
>>  # and po4a steps do the right thing
>> ./bootstrap # only now bootstrap will detect that it needs guix.de.info
>> ./configure
>>
>> make doc-pot-update # if desired
>> make po/doc/guix-manual.de.po
>>
>> rm doc/guix.de.texi
>> rm doc/contributing.de.texi
>> make doc/guix.de.info
>>
>
> You should check if you get a working manual before submitting the po
> file to the Translation Project robot’s e-mail.
>
> Regards,
> Florian

I am still not clear of the procedures.  But thank you anyway!  I will
start the work as soon as possible.

--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Let’s translate!

2019-04-13 Thread Meiyo Peng
Hi Julien,

Julien Lepiller writes:

> Le 13 avril 2019 03:56:31 GMT+02:00, Meiyo Peng  a écrit :
>>Hi Ludovic,
>>
>>Ludovic Courtès writes:
>>
>>> Hello Guix!
>>>
>>>> A new POT file for textual domain 'guix-manual' has been made
>>available
>>>> to the language teams for translation.  It is archived as:
>>>>
>>>>
>>https://translationproject.org/POT-files/guix-manual-1.0.0-pre1.pot
>>>
>>> Now’s the right time to translate Guix and the manual so that 1.0 is
>>> available in your native language!
>>>
>>>   https://translationproject.org/domain/guix.html
>>>   https://translationproject.org/domain/guix-packages.html
>>>   https://translationproject.org/domain/guix-manual.html
>>
>>I can translate the Guix manual into Chinese if no one else is willing
>>to do so.  But I don't have much time and will probably miss the
>>deadline for Guix 1.0.
>>
>>I have no previous experience with i18n.  What should I know in order
>>to
>>translate the Guix manual?  How do I edit the ".pot" file?  Is there an
>>emacs package for the job?
>>
>>--
>>Meiyo Peng
>>https://www.pengmeiyu.com/
>
> Hi!
>
> I'm glal you're willing to translate to your native language! So get started, 
> you need to register with the translation project for your language. You do 
> not need to sign the waiver form for guix, so it should be rather quick.
>
> To start working on translations, you'll have to download the pot file from 
> the TP. Do not use the one in our repository. Then I know there is an emacs 
> mode for gettext, but I don't know how to use it. You can also use poedit 
> which is easy to use and can import pot files. In any case you'll have to 
> produce a po file, which is very similar to the pot file, except for some 
> headers. I also started developping offlate 
> (https://framagit.org/tyreunom/offlate) that can automate fetching from the 
> TP and sending to them, but it's not as good as I'd want.
>
> Once you have translated, you'll have to send your work to the TP robot. You 
> can do that even if your work is only partial.
>
> I think the priority is to translate the guix domain first, before the 
> manual. Make sure noone is listed as responsible for the translation on the 
> TP and you should be good.
>
> Thank you!

Thank you for your instructions.  I will try it no later than next week.

--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Let’s translate!

2019-04-12 Thread Meiyo Peng
Hi Ludovic,

Ludovic Courtès writes:

> Hello Guix!
>
>> A new POT file for textual domain 'guix-manual' has been made available
>> to the language teams for translation.  It is archived as:
>>
>> https://translationproject.org/POT-files/guix-manual-1.0.0-pre1.pot
>
> Now’s the right time to translate Guix and the manual so that 1.0 is
> available in your native language!
>
>   https://translationproject.org/domain/guix.html
>   https://translationproject.org/domain/guix-packages.html
>   https://translationproject.org/domain/guix-manual.html

I can translate the Guix manual into Chinese if no one else is willing
to do so.  But I don't have much time and will probably miss the
deadline for Guix 1.0.

I have no previous experience with i18n.  What should I know in order to
translate the Guix manual?  How do I edit the ".pot" file?  Is there an
emacs package for the job?

--
Meiyo Peng
https://www.pengmeiyu.com/



Re: XDG_DATA_DIRS issue in execution environment on LTSP

2019-03-28 Thread Meiyo Peng
Hi,

Meiyo Peng writes:

> #+begin_src fish
>   if status is-login || status is-interactive
>   set -gx MY_PROFILE "$HOME/.guix-profile"
>
>   # Guix on foreign distros.
>   # This test is a dirty hack.
>   if test -d /var/guix && ! test -L /run/current-system
>   # Environment
>   set -gx ROOT_PROFILE "/var/guix/profiles/per-user/root/guix-profile"
>   set -gx GUIX_LOCPATH "$ROOT_PROFILE/lib/locale"
>   set -gx SSL_CERT_DIR "$ROOT_PROFILE/etc/ssl/certs"
>   set -gx SSL_CERT_FILE 
> "$ROOT_PROFILE/etc/ssl/certs/ca-certificates.crt"
>
>   # XDG
>   # ==> Look at here! <=
>   # Set $XDG_CONFIG_DIRS and $XDG_DATA_DIRS to their default
>   # values if they are not set.
>   test "$XDG_CONFIG_DIRS" = "" && set -gx XDG_CONFIG_DIRS "/etc/xdg"
>   test "$XDG_DATA_DIRS" = "" && set -gx XDG_DATA_DIRS 
> "/usr/local/share:/usr/share"
>   set -gx XDG_CONFIG_DIRS "$MY_PROFILE/etc/xdg:$XDG_CONFIG_DIRS"
>   set -gx XDG_DATA_DIRS "$MY_PROFILE/share:$XDG_DATA_DIRS"
>   # ==> Look at here! <=
>
>   # Source my etc/profile
>   set -gx GUIX_PROFILE $MY_PROFILE
>   fenv source $MY_PROFILE/etc/profile
>   set -eu GUIX_PROFILE
>
>   # $PATH
>   # add_path is a function defined by me.  It adds the argument
>   # into $PATH
>   add_path $MY_PROFILE/sbin
>   add_path $MY_PROFILE/bin
>   add_path $XDG_CONFIG_HOME/guix/current/bin
>   end
>   end
> #+end_src

I made a minor mistake here.  `set -eu` is invalid fish command.  `set
-eu GUIX_PROFILE` should be `set -e GUIX_PROFILE`.  It means erase the
$GUIX_PROFILE environment variable.

--
Meiyo Peng
https://www.pengmeiyu.com/



Re: XDG_DATA_DIRS issue in execution environment on LTSP

2019-03-28 Thread Meiyo Peng
Hi Giovanni,

Giovanni Biscuolo writes:

>> #+begin_src fish
>>   if status is-login || status is-interactive
>>   set -gx MY_PROFILE "$HOME/.guix-profile"
>>
>>   # Guix on foreign distros.
>>   # This test is a dirty hack.
>>   if test -d /var/guix && ! test -L /run/current-system
>
> This is to distingush if Guix is running natively (which means we do not
> need to "manually" set our env) from Guic on forein distros: right?

Right.  Guix System (the former GuixSD) takes care of all the details
for us.  So we don't need to manually set these environment variables
for Guix System.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: XDG_DATA_DIRS issue in execution environment on LTSP

2019-03-28 Thread Meiyo Peng
nd not from Debian standard folder [2]:
>
> --8<---cut here---start->8---
> openat(AT_FDCWD, 
> "/home/giovanni/.guix-profile/share/glib-2.0/schemas/gschemas.compiled", 
> O_RDONLY) = 12
> --8<---cut here---end--->8---
>
> [1] /usr/share/gnome:/usr/local/share/:/usr/share/ as documented here
> https://www.debian.org/doc/manuals/debian-reference/ch09.en.html#_starting_a_program_from_gui
>
> To fix this issue now I do (in a terminal emulator):
>
> --8<---cut here---start->8---
> unset XDG_DATA_DIRS
> export 
> XDG_DATA_DIRS="${GUIX_PROFILE:-/gnu/store/gvfl5wxrgalxjjmyp7cwgfj48bdd34n4-profile}/share:/usr/share/gnome:/usr/local/share/:/usr/share/"
> --8<---cut here---end--->8---
>
> Now I should just "backport" this fix in my ~/.profile so it will be
> applied to my graphical login session, too
>
> WDYT? Thanks, Gio'

According to the XDG Base Directory Specification [1]:

#+begin_quote
  If $XDG_DATA_DIRS is either not set or empty, a value equal to 
/usr/local/share/:/usr/share/ should be used.
  If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg 
should be used.
#+end_quote

And according to my experience, $XDG_DATA_DIRS and $XDG_CONFIG_DIRS are
not set by default on Debian.  So they should be set to their default
values before adding extra paths to them.

Thus I have this code snippet in my login shell's config (fish rather
than bash).  Fish script is very easy to understand.  I think you can
translate it into bash.

#+begin_src fish
  if status is-login || status is-interactive
  set -gx MY_PROFILE "$HOME/.guix-profile"

  # Guix on foreign distros.
  # This test is a dirty hack.
  if test -d /var/guix && ! test -L /run/current-system
  # Environment
  set -gx ROOT_PROFILE "/var/guix/profiles/per-user/root/guix-profile"
  set -gx GUIX_LOCPATH "$ROOT_PROFILE/lib/locale"
  set -gx SSL_CERT_DIR "$ROOT_PROFILE/etc/ssl/certs"
  set -gx SSL_CERT_FILE 
"$ROOT_PROFILE/etc/ssl/certs/ca-certificates.crt"

  # XDG
  # ==> Look at here! <=
  # Set $XDG_CONFIG_DIRS and $XDG_DATA_DIRS to their default
  # values if they are not set.
  test "$XDG_CONFIG_DIRS" = "" && set -gx XDG_CONFIG_DIRS "/etc/xdg"
  test "$XDG_DATA_DIRS" = "" && set -gx XDG_DATA_DIRS 
"/usr/local/share:/usr/share"
  set -gx XDG_CONFIG_DIRS "$MY_PROFILE/etc/xdg:$XDG_CONFIG_DIRS"
  set -gx XDG_DATA_DIRS "$MY_PROFILE/share:$XDG_DATA_DIRS"
  # ==> Look at here! <=

  # Source my etc/profile
  set -gx GUIX_PROFILE $MY_PROFILE
  fenv source $MY_PROFILE/etc/profile
  set -eu GUIX_PROFILE

  # $PATH
  # add_path is a function defined by me.  It adds the argument
  # into $PATH
  add_path $MY_PROFILE/sbin
  add_path $MY_PROFILE/bin
  add_path $XDG_CONFIG_HOME/guix/current/bin
  end
  end
#+end_src


[1]. XDG Base Directory Specification
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Plan for fish shell in Guix.

2019-01-21 Thread Meiyo Peng
Hi John,

John Soo writes:

> I just have one issue with the patch so far: I can’t seem to unset an
> abbreviation. An old configuration file seems to be “sticking” around
> for lack of better term. Otherwise, good stuff!

This is most likely caused by the transition from fish 2.7 to fish 3.0.
Fish 3.0 automatically migrates your abbreviations to a new storage
format.  Please have a look at the man page of `abbr`.  You should now
manage you abbreviations with:

#+begin_SRC sh
  abbr --show
  abbr --add ec emacsclient
  abbr --erase ec
#+end_SRC

--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Plan for fish shell in Guix.

2019-01-21 Thread Meiyo Peng
Hi John,

John Soo writes:

> I’m trying it now. Everything seems to work pretty well! Thanks so
> much! This has been one major issue for me for a while!

Thank you for your feedback.  I'm glad you like it.


--
Meiyo Peng
https://www.pengmeiyu.com/



Re: Plan for fish shell in Guix.

2019-01-21 Thread Meiyo Peng
Hello everyone,

Thank you for your patience.

I investigated the problem and chose to parse /etc/profile from fish
rather than generate separate configuration files for fish.  I think
this will make the Guix project easier to maintain in the future.

I looked NixOS's solution.  They choose this approach too, but their
patch is more complex.  I implemented my patch in a minimalistic manner.

The patch has been sent to guix-patc...@gnu.org:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34153

I set fish as my login shell and every thing is working well.  Please
try the patch and report bugs if you are interested.

Thanks.


--
Meiyo Peng
https://www.pengmeiyu.com/



Plan for fish shell in Guix.

2019-01-07 Thread Meiyo Peng
Hi,

I plan to make Guix more friendly for fish shell, so that users can set
fish shell as their login shell.  It's not possible to set fish shell as
login shell now in Guix because fish shell cannot load environment
variables from /run/current-system/profile/etc/profile and
~/.guix-profile/etc/profile.

Guix can generate /etc/profile, /run/current-system/profile/etc/profile
for bash, so I think it can do the same for fish.  I suggest we generate
configurations for system profile in
/run/current-system/profile/etc/fish/config.fish, and generate
configurations for user profile in ~/.guix-profile/etc/fish/config.fish.
Or generate configurations for system profile in
/run/current-system/profile/etc/fish/conf.d/00-guix-system.fish, and
generate configurations for user profile in
~/.guix-profile/etc/fish/conf.d/01-guix-user.fish.  If we choose the
former, we should remove etc/fish/config.fish from the fish package to
avoid conflicts.  That file is empty by default and is left for
sysadmins to edit so there will be no big problem.

I will learn how Guix generates /etc/profile, /etc/environment,
/run/current-system/profile/etc/profile, ~/.guix-profile/etc/profile
when I have time.  Don't expect me to finish the work in one week.

As an alternative solution, we can also parse etc/profile from fish.  I
am not sure if this is easier.

Please reply to this email if you have any ideas.


To help other people work on the problem, the following paragraphs
introduce fish shell initialization process. Based on
https://fishshell.com/docs/current/index.html#initialization.

1. $__fish_data_dir/config.fish
   Usually: /usr/share/fish/config.fish
   Guix: /gnu/store/*fish*/share/fish/config.fish

   This file is provided by fish and should not be changed.  It executes the
   following files.

2. $__fish_sysconf_dir/config.fish
   Usually: /etc/fish/config.fish
   Guix: /gnu/store/*fish*/etc/fish/config.fish

   etc/fish/config.fish does nothing by default.  It's left for system-wide fish
   configuration.  In patch #34003, I let it source /etc/fish/config.fish, so we
   can put system-wide configurations for guix in /etc/fish/config.fish.

3. Files ending in .fish, in the following directories.  If there are multiple
   files with the same name in these directories, only the first will be
   executed.  They are executed in order of their filename, sorted in a natural
   order.

   (1) $__fish_config_dir/conf.d
   This is XDG_CONFIG_HOME/fish/conf.d.
   Default: ~/.config/fish/conf.d

   (2) $__fish_sysconf_dir/conf.d
   Usually: /etc/fish/conf.d
   Guix: /gnu/store/*fish*/etc/fish/conf.d

   (3) $__extra_confdir
   Usually: /usr/share/fish/vendor_conf.d
   Guix: (After applying patch #34003)
   | ~/.guix-profile/etc/fish/conf.d  |
   | /run/current-system/profile/etc/fish/conf.d  |
   | ~/.guix-profile/share/fish/vendor_conf.d |
   | /run/current-system/profile/share/fish/vendor_conf.d |
   | /gnu/store/*fish*/share/fish/vendor_conf.d   |

4. $__fish_config_dir/config.fish
   This is XDG_CONFIG_HOME/fish/config.fish.
   Default: ~/.config/fish/config.fish.

--
Meiyo Peng
https://www.pengmeiyu.com/



Re: CDN performance

2018-12-21 Thread Meiyo Peng
Hi Chris,

Thank you for your patience!

Chris Marusich  writes:

> Can you also share what numbers you get when you run measure_get against
> berlin.guixsd.org directly?  Clearly, the connection from you to
> CloudFront is not as performant as it is for others in other parts of
> the world, but I wonder if it's still better than accessing berlin
> directly.  If you could run measure_get against berlin directly and
> share the numbers, we can see if it represents any significant
> improvement for you.

1. Tested today at home. China Unicom home broadband. 50Mb/s.

berlin.guixsd.org:

#+BEGIN_EXAMPLE
  ➜  ~ measure_get 
https://berlin.guixsd.org/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
   54 66.6M   54 36.3M0 0  14981  0  1:17:45  0:42:25  0:35:20 0
  url_effective: 
https://berlin.guixsd.org/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 141.80.181.40
  remote_port: 443
  size_download: 38141765 B
  speed_download: 14981.000 B/s
  time_appconnect: 3.228601 s
  time_connect: 2.213136 s
  time_namelookup: 0.856194 s
  time_pretransfer: 3.228820 s
  time_redirect: 0.00 s
  time_starttransfer: 3.851583 s
  time_total: 2545.889968 s
  curl: (56) GnuTLS recv error (-54): Error in the pull function.

  ➜  ~ measure_get 
https://berlin.guixsd.org/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
  100 66.6M  100 66.6M0 0  20415  0  0:57:03  0:57:03 --:--:-- 25983
  url_effective: 
https://berlin.guixsd.org/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 141.80.181.40
  remote_port: 443
  size_download: 69899433 B
  speed_download: 20415.000 B/s
  time_appconnect: 2.005881 s
  time_connect: 0.785257 s
  time_namelookup: 0.000520 s
  time_pretransfer: 2.006124 s
  time_redirect: 0.00 s
  time_starttransfer: 3.031582 s
  time_total: 3423.813489 s
#+END_EXAMPLE

berlin-mirror.marusich.info:

#+BEGIN_EXAMPLE
  ➜  ~ measure_get 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
  100 66.6M  100 66.6M0 0  1470k  0  0:00:46  0:00:46 --:--:-- 2368k
  url_effective: 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 13.35.20.87
  remote_port: 443
  size_download: 69899433 B
  speed_download: 1505934.000 B/s
  time_appconnect: 3.343496 s
  time_connect: 3.164926 s
  time_namelookup: 3.060655 s
  time_pretransfer: 3.343581 s
  time_redirect: 0.00 s
  time_starttransfer: 5.766543 s
  time_total: 46.416495 s

  ➜  ~ measure_get 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
  100 66.6M  100 66.6M0 0  3182k  0  0:00:21  0:00:21 --:--:-- 4612k
  url_effective: 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 13.35.20.87
  remote_port: 443
  size_download: 69899433 B
  speed_download: 3259170.000 B/s
  time_appconnect: 0.225982 s
  time_connect: 0.070428 s
  time_namelookup: 0.000483 s
  time_pretransfer: 0.226055 s
  time_redirect: 0.00 s
  time_starttransfer: 0.306621 s
  time_total: 21.447966 s
#+END_EXAMPLE


2. Tested today at my office. China Telecom enterprise broadband. 50Mb/s.

berlin.guixsd.org:

#+BEGIN_EXAMPLE
  ➜  ~ measure_get 
https://berlin.guixsd.org/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
  100 66.6M  100 66.6M0 0  3091k  0  0:00:22  0:00:22 --:--:-- 3649k
  url_effective: 
https://berlin.guixsd.org/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 141.80.181.40
  remote_port: 443
  size_download: 69899433 B
  speed_download: 3166021.000 B/s
  time_appconnect: 3.288213 s
  time_connect: 2.733554 s
  time_namelookup: 2.486754 s
  time_pretransfer: 3.288320 s
  time_redirect: 0.00 s
  time_starttransfer: 3.780341 s
  time_total: 22.078489 s

  ➜ 

Re: CDN performance

2018-12-16 Thread Meiyo Peng
Hi Chris,

Chris Marusich  writes:

> Meiyo Peng  writes:
>
>> After careful thought, I realized the new CDN won't benefit China
>> residents as planned. Any popular CDN outside China is significantly
>> throttled by ISP/GFW and the situation is worse every year. A CDN will
>> be a great improvement for western countries but not for many asia
>> countries.
>
> Could you try running the measure_get shell function I included in the
> following email?
>
> https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00192.html
>
> For convenience, here is the definition:
>
> measure_get () {
> curl -L \
>  -o /dev/null \
>  -w "url_effective: %{url_effective}\\n\
> http_code: %{http_code}\\n\
> num_connects: %{num_connects}\\n\
> num_redirects: %{num_redirects}\\n\
> remote_ip: %{remote_ip}\\n\
> remote_port: %{remote_port}\\n\
> size_download: %{size_download} B\\n\
> speed_download: %{speed_download} B/s\\n\
> time_appconnect: %{time_appconnect} s\\n\
> time_connect: %{time_connect} s\\n\
> time_namelookup: %{time_namelookup} s\\n\
> time_pretransfer: %{time_pretransfer} s\\n\
> time_redirect: %{time_redirect} s\\n\
> time_starttransfer: %{time_starttransfer} s\\n\
> time_total: %{time_total} s\\n" \
> "$1"
> }
>
> Specifically, I am curious to know what performance you get when you run
>
>   measure_get 
> https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
>
> from a computer in China.  Please be sure to run it two times in a row,
> to ensure that CloudFront has cached the object.
>
> CloudFront has edge locations in Hong Kong, so I am curious to know what
> performance improvement, if any, you observe.

Sorry for the delay. My computer was reinstalled with Windows and taken
away by my girlfriend. So I have been waiting for my new computer that I
bought online to arrive. Finally, it arrived yesterday and I
successfully installed Guix on it.

I tested your script several times.

1. Tested today at home. China Unicom home broadband. 50Mb/s.

The result is slow as usual. curl failed once.
berlin-mirror.marusich.info is resolved to Seattle, WA, US.

#+BEGIN_EXAMPLE
  ➜  ~ measure_get 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
   55 66.6M   55 36.9M0 0  17926  0  1:04:59  0:36:02  0:28:57 17733
  url_effective: 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 52.85.158.151
  remote_port: 443
  size_download: 38764357 B
  speed_download: 17926.000 B/s
  time_appconnect: 6.078850 s
  time_connect: 3.006821 s
  time_namelookup: 2.659785 s
  time_pretransfer: 6.079097 s
  time_redirect: 0.00 s
  time_starttransfer: 9.626001 s
  time_total: 2162.379211 s
  curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)

  ➜  ~ measure_get 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
  100 66.6M  100 66.6M0 0   109k  0  0:10:25  0:10:25 --:--:--  241k
  url_effective: 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 52.85.158.22
  remote_port: 443
  size_download: 69899433 B
  speed_download: 111816.000 B/s
  time_appconnect: 3.507528 s
  time_connect: 2.650373 s
  time_namelookup: 2.261801 s
  time_pretransfer: 3.507637 s
  time_redirect: 0.00 s
  time_starttransfer: 5.995298 s
  time_total: 625.129571 s

  ➜  ~ measure_get 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
% Total% Received % Xferd  Average Speed   TimeTime Time  
Current
   Dload  Upload   Total   SpentLeft  Speed
  100 66.6M  100 66.6M0 0   109k  0  0:10:23  0:10:23 --:--:--  141k
  url_effective: 
https://berlin-mirror.marusich.info/nar/gzip/1bq783rbkzv9z9zdhivbvfzhsz2s5yac-linux-libre-4.19
  http_code: 200
  num_connects: 1
  num_redirects: 0
  remote_ip: 52.85.158.22
  remote_port: 443
  size_download: 69899433 B
  speed_download: 112187.000 B/s
  time_appconnect: 2.280972 s
  time_connect: 1.407197 s
  time_namelookup: 1.056180 s
  time_pretransfer: 2.281234 s
  time_redirect: 0.00 s
  time_starttransfer: 3.167703 s
  time_total: 623.061584 s
#+END_EXAMPLE


2. Tested 3 days ago at my office. China Telecom enterprise br

Re: CDN performance

2018-12-10 Thread Meiyo Peng
Hi,

Zephyr Waitzman  writes:

> 以前官方的慢死人,最近的话安装靠玄学(找以前邮件列表里的几个 substitude 换着用也就那样吧),偶尔会出一些(感觉不像是网络的)问题。
> 以后有时间再深入学习下。

Thank you for your feedback. That means we do need to set up a caching
mirror within China.

--
Meiyo Peng


Re: CDN performance

2018-12-10 Thread Meiyo Peng
Hi,

Zephyr Waitzman  writes:

> 大哥你的镜像速度怎么样?可以蹭网吗?(手动滑稽

My caching mirror is at home and it has an ip address of
192.168.x.x. You may connect to it if you have magic power.

BTW. Nice to see another Chinese here. What's your experience
with the default substitute server?

--
Meiyo Peng


Re: CDN performance

2018-12-10 Thread Meiyo Peng
Hi,

I have changed my mind. I don't care about the domain name of the
default substitute server any more. I am more worried about the network
speed within China. While I am writing this email, my computer is
downloading substitutes from ci.guix.info at an average speed of about
50kB/s.

After careful thought, I realized the new CDN won't benefit China
residents as planned. Any popular CDN outside China is significantly
throttled by ISP/GFW and the situation is worse every year. A CDN will
be a great improvement for western countries but not for many asia
countries.

I have been running a nginx caching mirror at home since the first time
I met guix. My first attempt to install guix took me one afternoon and
one night. Most of the time was wasted on downloading substitutes. After
that, I searched online and found the nginx mirror configuration in
guix/maintenance.git. Then I set up my own caching mirror. It would be
extremely painful for me to play with guix during these months without
this caching mirror. Debian was my favorite GNU/Linux distro before I
discovered Guix. It usually costs me only 30 minutes to install Debian
from scratch. Other GNU/Linux distros are about the same. If guix takes
more than 5 hours to install, most new users will be scared away.

Although now there are only a few Chinese guix users, I still prefer to
set up a caching mirror within China. The user experience improvement
will be significant. Like Hartmut Goebel described, I need information
about "expected storage demand, expected transfer traffic from upstream,
how often updates are published, how long to hold copies" so I can write
a proposal to maintainers of mirrors.ustc.edu.cn to add a new mirror for
guix. I tried the `guix weather` command, but it failed with an error:

#+BEGIN_EXAMPLE
  computing 8,821 package derivations for x86_64-linux...
  guix weather: error: lstat: No such file or directory: 
"/src/config/packages/patches/libjxr-add-cmakelists-file.patch"
#+END_EXAMPLE

Can anyone provide the numbers for me? The numbers of
mirror.hydra.gnu.org would be a good reference.

In addition, I think we should put up a page on guix's website providing
information about available substitute servers including address,
backend build farm, geolocation, maintainer, so users (many asia
residents) can pick the best substitute server for themselves. This will
be necessary until alternative solutions like IPFS or GNUnet are
implemented.

This email only describes the situation in China. I don't intend to
discourage you on the CDN plan. There is no conflicts between my
proposal to set up a caching mirror in China and our plan to set up a
new CDN.

--
Meiyo Peng



Re: First outreachy day :)

2018-12-04 Thread Meiyo Peng
Hi Laura,

Laura Lazzati  writes:

> Today is my first day :) :) :)

Welcome.

> Is it OK if I start working about 9AM every day? (that would be 12 PM UTC)
> I try to adapt my day so that it is not that late to write for you - I
> was going to ask this in my yesterday, but then I realized it was like
> 0:30 in your timezone).

I think we are from everywhere on earth. It's OK to live in a different
timezone. And most hackers tend to prefer working at night. We don't
have a strict time table like a company.



Re: Using a CDN or some other mirror?

2018-12-04 Thread Meiyo Peng
Hi,

l...@gnu.org (Ludovic Courtès) writes:

> As you know, berlin.guixsd.org is hosted at the Max Delbrück Center in
> Berlin, a public research institute.  So in a way, we’re already doing
> that.  We shouldn’t take it for granted that public institutes will
> happily host our stuff and donate hardware: without Ricardo’s work and
> the generosity of the MDC, we wouldn’t have anything there.
>
> I understand the reluctance regarding “Big Corp” hosting, and I actually
> share it to some extent.  However, having put much thought into it (and
> also much sweat in build farm sysadmin…), I think the alternative is:
> commercial hosting, or peer-to-peer.
>
> Florian has been looking at the latter approach with IPFS, and perhaps
> we’ll be able to put it in production in a few months and be happy with
> it (I have good hopes given what Florian already demonstrated.)
>
> In the meantime, we need redundant storage, high bandwidth, and high
> availability.  If you know of non-profit organizations that can provide
> such services, please let us know; if not, we’ll resort to a commercial
> service.  The bottom line is: we cannot reasonably pretend to offer such
> a service ourselves.
>
> (Note that we’re just talking about substitute delivery—I wouldn’t want
> to *build* packages on one of these commercial hosting services.)
>
> I hope this clarifies my position.

When I started to try Guix several months ago, the network speed to
substitute servers from China is very slow (<100kB/s). I don't know what
has changed but recently the network speed is about 1MB/s. Thank you all
for the improments. Hopefully a CDN will make the network even better.
I am not against using a commercial service as long as we only use them
to distribute signed packages rather than building packages.

I like the idea of IPFS. We should try it. It would be great if it works
well.

If at some point we need to setup traditional mirrors like other major
Gnu/Linux distros, I can contact my friends in China to setup mirrors in
several universities. I was a member of LUG@USTC, which provides the
largest FLOSS mirror in China.

--
Meiyo Peng



Re: [PATCH 0/3] Defaulting to ci.guix.info (aka. berlin.guixsd.org)

2018-12-03 Thread Meiyo Peng
Hi Ludo,

Ludovic Courtès  writes:

> For the domain name I initially wanted “ci.guix.gnu.org” but we failed
> to set that up.  Oh well, I think that’s OK.

I don't think ci.guix.info is a suitable name for our default substitute
server. You may think I paranoid, but if I accidentally find out
ci.guix.info is my default substitute server, I will be cautious and
verify it's integrity.

Let's use a subdomain of gnu.org. If you encounter any obstacles while
setting up the system, we'd like to help.

--
Meiyo Peng



Re: guix development

2018-10-30 Thread Meiyo Peng
Hi Ali,

Ali Nourmohammadi  writes:

> thank's for your reply.
> but lxqt is not defined as a service, right?
> so how could i install that?

There is no need to define lxqt as a shepherd service. lxqt should be
started by a display manager, like SLiM or SDDM. If you include
%desktop-services in your config.scm, then you have slim installed by
default. Simply install lxqt and shoose lxqt from your login screen to
start lxqt.

Again. Please CC guix-devel@gnu.org when you reply email.

--
Meiyo Peng



Re: guix development

2018-10-30 Thread Meiyo Peng
Hi Ali,

Ali Nourmohammadi  writes:

> Hi mr.meiyo peng
> Can u tell me how can i install that from local directory. i need to do that.
> thank u

Sorry, I don't understand what you mean by "install that from local
directory". You simply install lxqt as any other package.

- Run `guix pull` to update guix.
- Add lxqt to your config.scm.
- Run `guix system reconfigure config.scm`.

I suggest you to read the guix manual first if you have any question.
And please CC this mailing list when you reply email.

--
Meiyo Peng



Re: guix development

2018-10-29 Thread Meiyo Peng
Hi Ali,

Ali Nourmohammadi  writes:

> Hi there
> I'm working on a project that want to build a guix based operating system.
> For the first issue my job is to run lxqt on guix with openbox window manager.
> After searching alot i failed in my job.
> So my last hope is on you to help me with that.
> As i said i want to build lxqt on guix with openbox so i found this git: 
> https://github.com/Millak/guix/blob/master/gnu/packages/lxqt.scm
> So i copy that and made a scm file called lxqt.scm.
> But when i try to install that with:
> guix package -f lxqt.scm
> it failes with this error:
> : error: invalid field specifier
> So i dont know what to do.
> So please if you are reading this email help me in that. i read all the wiki 
> but i could not find anything.
> So if u just have a link about what to just let me know.
> Thank you so much.

LXQt has recently been added to guix's master branch. Please run `guix
pull` to update your guix. And there is no need to copy lxqt.scm from
elsewhere.

Please note that LXQt in guix is still immature. lxqt-runner is buggy,
and lxqt-panel simply does not work. If you want to help with the
development, have a look at this previous thread:
https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00380.html

--
Meiyo Peng



Re: Package for LXQt. Help wanted.

2018-10-27 Thread Meiyo Peng
Hello Song,

On Fri, Oct 26, 2018 at 2:26 PM 宋文武  wrote:

>   - Correct some licenses, eg: obconf-qt, qps are under GPL2+.

I made a terrible mistake. I assumed that all LXQt apps are licensed
under LGPL2.1+. But in fact only core LXQt apps are licensed under
LGPL2.1+. Several apps are licensed under GPL2+.

GPL2+ apps: pcmanfm-qt, lximage-qt, obconf-qt, pavucontrol-qt, qps,
qtermwidget, qterminal, screengrab.
From 45804407d2c886005f1a9e01eae952ae6aa4a1ac Mon Sep 17 00:00:00 2001
From: Meiyo Peng 
Date: Sat, 27 Oct 2018 15:56:47 +0800
Subject: [PATCH] gnu: lxqt: Correct licenses for several packages.

* gnu/packages/lxqt.scm (lxqt): Correct licenses for several packages.
---
 gnu/packages/lxqt.scm | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index 878998d8f..aeee87b16 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -903,7 +903,7 @@ components to build desktop file managers which belongs to LXDE.")
 (synopsis "File manager and desktop icon manager")
 (description "PCManFM-Qt is the Qt port of PCManFM, the file manager of
 LXDE.")
-(license license:lgpl2.1+)))
+(license license:gpl2+)))
 
 
 ;; Extra
@@ -977,7 +977,7 @@ manager Compton.")
 (synopsis "The image viewer and screenshot tool for lxqt")
 (description "LXImage-Qt is the Qt port of LXImage, a simple and fast
 image viewer.")
-(license license:lgpl2.1+)))
+(license license:gpl2+)))
 
 (define-public obconf-qt
   (package
@@ -1048,7 +1048,7 @@ window manager OpenBox.")
 (synopsis "Pulseaudio mixer in Qt")
 (description "@code{pavucontrol-qt} is the Qt port of volume control
 @code{pavucontrol} of sound server @code{PulseAudio}.")
-(license license:lgpl2.1+)))
+(license license:gpl2+)))
 
 (define-public qps
   (package
@@ -1101,7 +1101,7 @@ processes currently in existence, much like code{top} or code{ps}.")
 (home-page "https://lxqt.org/";)
 (synopsis "The terminal widget for QTerminal")
 (description "QTermWidget is a terminal emulator widget for Qt 5.")
-(license license:lgpl2.1+)))
+(license license:gpl2+)))
 
 (define-public qterminal
   (package
@@ -1131,7 +1131,7 @@ processes currently in existence, much like code{top} or code{ps}.")
 (synopsis "Lightweight Qt-based terminal emulator")
 (description "QTerminal is a lightweight Qt terminal emulator based on
 QTermWidget.")
-(license license:lgpl2.1+)))
+(license license:gpl2+)))
 
 (define-public screengrab
   (package
@@ -1160,7 +1160,7 @@ QTermWidget.")
 (synopsis "Crossplatform tool for fast making screenshots")
 (description "ScreenGrab is a program for fast creating screenshots, and
 easily publishing them on internet image hosting services.")
-(license license:lgpl2.1+)))
+(license license:gpl2+)))
 
 
 ;; The LXQt Desktop Environment
-- 
2.19.1



Re: Package for LXQt. Help wanted.

2018-10-26 Thread Meiyo Peng
Hello Song,

> Hello, thank you again, I have push them!

Thank you.

> - Add comments about the missing translations (disable the
>   PULL_TANSLATIONS), which are in the lxqt-l10n git repository.  I think
>   we can prefetch it as a 'origin', add it to the input of the
>   application, or add a 'lxqt-l10n' package.

I didn't add lxqt-l10n because it is stated as deprecated on it's home
page.

> - Correct some licenses, eg: obconf-qt, qps are under GPL2+.

Sorry about this. I should have been more careful.

> And a "lxqt-build-tools: Dedifen LXQT_*_DIR variables" patch is
> unapplied:
>
>  (build-system cmake-build-system)
>  (arguments
> - `(#:tests? #f)); no tests
> + `(#:tests? #f  ;; no tests
> +   #:configure-flags
> +   `("-DLXQT_DATA_DIR=/run/current-system/profile/share"
> + "-DLXQT_ETC_XDG_DIR=/run/current-system/profile/etc/xdg")))
>
> What are thoses variables used for?  If I install the 'lxqt' package
> into my user profile, should I set them to the directories under my
> profile ($HOME/.guix-profile/share and $HOME/.guix-profile/etc/xdg)?

These variables are used by all LXQt packages during build time. But
there is no big issue if they are not defined here, I guess it is
because XDG_*_DIRS environment variables are set correctly during
runtime. They default to directories within
/gnu/store/*-lxqt-build-tools-*/ like this:
"/gnu/store/86wy8q4yplhalf3yvmzv673naarxn3na-lxqt-build-tools-0.5.0/share"

I defined these variables here to serve an aesthetic purpose, so that
the "Technical Info" tab within lxqt-about can show the values defined
above rather than directories like this:
"/gnu/store/86wy8q4yplhalf3yvmzv673naarxn3na-lxqt-build-tools-0.5.0/share".

--
Meiyo Peng



Re: Package for LXQt. Help wanted.

2018-10-22 Thread Meiyo Peng
Hello, Mr. Song.

Thank you for your reply.

> Some notes to you:
> - Wrap lines under 80 characters if possible.

My emacs automatically wrap lines at exactly 80 characters. Should I set
it to less than 80?

#+BEGIN_SRC emacs-lisp
  (setq-default fill-column 80)  ;; Change this to 70?
#+END_SRC

"宋文武" is a Chinese name. Are you a Chinese? I am a Chinese. My name
is 彭美玉 (Peng Mei Yu in Pinyin).

--
Meiyo Peng



Re: Package for LXQt. Help wanted.

2018-10-22 Thread Meiyo Peng
Hello,

I checked kwindowsystem's package in debian. It seems the plugins
directory in kwindowsystem should be installed to
/run/current-system/profile/lib/qt5/plugins rather than
/run/current-system/profile/lib/plugins. Maybe this is a bug in the
kwindowsystem package.

File list of package libkf5windowsystem5 in stretch of architecture
amd64:

(link: https://packages.debian.org/stretch/amd64/libkf5windowsystem5/filelist)
#+BEGIN_EXAMPLE
  /usr/lib/x86_64-linux-gnu/libKF5WindowSystem.so.5
  /usr/lib/x86_64-linux-gnu/libKF5WindowSystem.so.5.28.0
  
/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemWaylandPlugin.so
  
/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so
  /usr/share/doc/libkf5windowsystem5/changelog.Debian.gz
  /usr/share/doc/libkf5windowsystem5/copyright
#+END_EXAMPLE

File list of kwindowsystem in guix:

#+BEGIN_EXAMPLE
  /gnu/store/snf6dh8fprihac2y0mwspgc5lchv12b6-kwindowsystem-5.49.0/lib
  ├── cmake
  │   └── KF5WindowSystem
  │   ├── KF5WindowSystemConfig.cmake
  │   ├── KF5WindowSystemConfigVersion.cmake
  │   ├── KF5WindowSystemTargets.cmake
  │   └── KF5WindowSystemTargets-relwithdebinfo.cmake
  ├── libKF5WindowSystem.so -> libKF5WindowSystem.so.5
  ├── libKF5WindowSystem.so.5 -> libKF5WindowSystem.so.5.49.0
  ├── libKF5WindowSystem.so.5.49.0
  ├── plugins
  │   └── kf5
  │   └── org.kde.kwindowsystem.platforms
  │   ├── KF5WindowSystemWaylandPlugin.so
  │   └── KF5WindowSystemX11Plugin.so
  └── qt5
  └── mkspecs
  └── modules
  └── qt_KWindowSystem.pri
#+END_EXAMPLE

--
Meiyo Peng



Package for LXQt. Help wanted.

2018-10-21 Thread Meiyo Peng
Hello everyone,

I made a series of packages for LXQt. The code is at:
https://github.com/meiyopeng/guix/tree/lxqt

I did this beacuse I want to run i3 window manager within lxqt
session. Currently most things work great except lxqt-panel. I have two
problems.

1. The $QT_PLUGIN_PATH environment variable points to
/run/current-system/profile/lib/qt5/plugins. I don't know where it's
set. So qtsvg has to be installed into syetem profile, or all the lxqt
applications can not properly display icons. Should I add qtsvg to
lxqt applications' propagated-inputs? If so, should I add qtbase too,
since qtbase also provides lib/qt5/plugins, although lxqt works without
qtbase in system profile but I can never be sure.

2. lxqt-panel complains about "Warning: Could not find any platform
plugin". (lxqt-runner also prints this message but it works.) I found
out this message was printed by kwindowsystem.

The related code in kwindowsystem:
https://github.com/KDE/kwindowsystem/blob/9f88c9a5d25ff7909c25ce399572ca348b5706b1/src/pluginwrapper.cpp#L79

Qt's document (https://doc.qt.io/qt-5/qcoreapplication.html#libraryPaths)
says "entries of the QT_PLUGIN_PATH environment variable are always
added to libraryPaths". So I install kwindowsystem into system profile,
and add /run/current-system/profile/lib/plugins to QT_PLUGIN_PATH. Then
this error message disappear. But lxqt-panel still does not work.

I still have no idea how to fix lxqt-panel. This does not affect me
because I use i3, so lxqt-panel is useless to me. But there may be other
people interested in LXQt and I want to help them get this fixed. Can
anybody help me?

Will anybody help me review the code? I'd appreciate it.

--
Meiyo Peng



Re: move "source /etc/profile" from .zlogin to .zprofile

2018-10-14 Thread Meiyo Peng
Hi Chris,

On Sun, Oct 14, 2018 at 6:30 AM Chris Marusich wrote:

> I haven't tested it, though.  Would you like to test it and
> let me know if it works for you?

Guix is still new to me, and I don't know how to apply the patch and
build guix. But I moved "source /etc/profile" from my .zlogin to
.zprofile and I have no problem.

> I see that zsh also sources files like /etc/zprofile when they exist.  I
> don't have a strong preference for putting this into /etc/zprofile
> vs. putting it into ~/.zprofile (via /etc/skel).  What do you think
> about that?

Usually I prefer to put less dot files in my $HOME directory. But I'm OK
with guix's solution.

> I've always found the relationship between shell start-up scripts to be
> confusing; everyone seems to want to configure them differently.

I agree. So I prefer to use fish shell, which is simpler. But I have to
temporarily switch to zsh until this bug is fixed:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30265


Re: move "source /etc/profile" from .zlogin to .zprofile

2018-10-13 Thread Meiyo Peng
Hi Chris,

/etc/profile should do the preparation work for users settings in .zshrc.
But
since .zlogin is sourced after .zshrc, it will override users settings in
.zshrc. It resets $PATH and many other environment variables. This is
counterintuitive.

You can find what archlinux did here:
https://wiki.archlinux.org/index.php/Zsh

   - /etc/zsh/zprofile Used for executing commands at start, will be
   sourced when starting as a *login shell*. Please note that on Arch
   Linux, by default it contains one line
   

   which source the /etc/profile.
  - /etc/profile This file should be sourced by all Bourne-compatible
  shells upon login: it sets up $PATH and other environment variables
  and application-specific (/etc/profile.d/*.sh) settings upon login.
   - $ZDOTDIR/.zprofile Used for executing user's commands at start, will
   be sourced when starting as a *login shell*.
   - ...
   - $ZDOTDIR/.zshrc Used for setting user's interactive shell
   configuration and executing commands, will be sourced when starting
as an *interactive
   shell*.
   - ...
   - $ZDOTDIR/.zlogin Used for executing user's commands at ending of
   initial progress, will be sourced when starting as a *login shell*.


On Sun, Oct 14, 2018, 09:34 Chris Marusich  wrote:

>
> Is the intended use of .zprofile any different from the intended use of
> .zlogin?  If .zprofile and .zlogin are both meant to serve the same
> purpose, then I'm not sure why one would be preferable over the other.
>
>


move "source /etc/profile" from .zlogin to .zprofile

2018-10-13 Thread Meiyo Peng
Hello,

Guix's default skeletons put "source /etc/profile" into ~/.zlogin. But
/etc/profile resets the PATH environment variable, exports many other
environment variables, and source /etc/bashrc. According to
http://zsh.sourceforge.net/Intro/intro_3.html .zlogin is sourced after
.zshrc and should not be used for alias definitions, options,
environment variable settings, etc. Especially "as a general rule, it
should not change the shell environment at all". I think it's better to
source /etc/profile from ~/.zprofile.

Meiyo Peng