Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Carlo Zancanaro
I've had a problem like this before, when I was trying to build 
the Shepherd from git.


On Wed, Apr 11 2018, Pierre Neidhardt wrote:

./configure: line 3350: config.log: Permission denied


I'm pretty sure this is what I had, and it was a problem of trying 
to build in a directory that was already built. I think the daemon 
copies the files, but the permissions aren't right, so it can't 
write over the file that my user had created. From memory I solved 
it by doing `make distclean` before running the build with Guix.


Carlo


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Chris Marusich
Hi Pierre,

Pierre Neidhardt  writes:

> Chris Marusich  writes:
>
>> Can you share the package definition?
>
> Let's start from the most straight-forward:
>
> (define-public emacs-dev
>   (package
>(inherit emacs)
>(name "emacs-dev")
>(version "26.0.91")
>(source
>  (local-file "/home/ambrevar/projects/emacs-build" #:recursive? #t

I took this definition and adapted it as shown in the attached file.  I
then did the following things:

* Save the file at /tmp/emacs.scm.

* Clone Emacs' Git repository into /tmp/emacs at commit
  93678bffe6427b9d83dae032c56a4e480539a4a7.

* Get an environment with the necessary dependencies, and run autogen.sh:

guix environment emacs

  You could try with --pure to see if the emacs inputs are actually
  enough to bootstrap Emacs' Git repository.  I doubt they are.  You can
  experiment with adding dependencies by using the --ad-hoc option.
  Once you figure out what dependencies are required to run autogen.sh,
  you can add them to your custom package definition if you want
  (although they won't be required for building Emacs once you've built
  the "configure" script).

  I happen to have various tools, such as Autoconf, installed in my
  profile (mainly so I can browse the manuals locally).  I'm pretty sure
  that's why the next step succeeded for me.

* Run autogen.sh to create the "configure" script:

./autogen.sh

* Now that the "configure" script has been created, build Emacs:

guix build -f /tmp/emacs.scm

For me, the build proceeded but then failed during the "check" phase:

--8<---cut here---start->8---
SUMMARY OF TEST RESULTS
---
Files examined: 195
Ran 2767 tests, 2619 results as expected, 24 unexpected, 124 skipped
7 files contained unexpected results:
  src/process-tests.log
  lisp/progmodes/xref-tests.log
  lisp/progmodes/flymake-tests.log
  lisp/files-tests.log
  lisp/eshell/em-ls-tests.log
  lisp/calendar/todo-mode-tests.log
  lisp/net/tramp-tests.log
make[2]: *** [Makefile:280: check-doit] Error 1
make[2]: Leaving directory '/tmp/guix-build-emacs-dev-26.0.91.drv-0/build/test'
make[1]: *** [Makefile:255: check] Error 2
make[1]: Leaving directory '/tmp/guix-build-emacs-dev-26.0.91.drv-0/build/test'
make: *** [Makefile:945: check] Error 2
phase `check' failed after 104.0 seconds
builder for `/gnu/store/dshw12bj2486lcfv65g04g9rznxgfrwp-emacs-dev-26.0.91.drv' 
failed with exit code 1
@ build-failed 
/gnu/store/dshw12bj2486lcfv65g04g9rznxgfrwp-emacs-dev-26.0.91.drv - 1 builder 
for `/gnu/store/dshw12bj2486lcfv65g04g9rznxgfrwp-emacs-dev-26.0.91.drv' failed 
with exit code 1
guix build: error: build failed: build of 
`/gnu/store/dshw12bj2486lcfv65g04g9rznxgfrwp-emacs-dev-26.0.91.drv' failed
--8<---cut here---end--->8---

I don't know much about the test failures, but this is a success as far
as I'm concerned: If you get this far, it means the local-file
declaration in your package definition is working as intended.

Hope that helps!

-- 
Chris


emacs.scm
Description: Binary data


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Ricardo Wurmus

Hi Pierre,

> Chris Marusich  writes:
>
>> Can you share the package definition?
>
> Let's start from the most straight-forward:
>
> (define-public emacs-dev
>   (package
>(inherit emacs)
>(name "emacs-dev")
>(version "26.0.91")
>(source
>  (local-file "/home/ambrevar/projects/emacs-build" #:recursive? #t

Here’s mine:

--8<---cut here---start->8---
(define-public my/emacs
  (package (inherit emacs)
(name "my-emacs")
(version "26.0.91")
(source (origin
  (method url-fetch)
  (uri (string-append "http://alpha.gnu.org/gnu/emacs/;
  "pretest/emacs-" version ".tar.xz"))
  (sha256
   (base32
"1841hcqvwnh812gircpv2g9fqarlirh7ixv007hkglqk7qsvpxii"
(arguments
 (substitute-keyword-arguments
 ;; NOTE: I don’t know if the tests pass in this version; this
 ;; is for a much older version.
 (append '(#:tests? #f ; tests fail in this development version
   #:configure-flags '("--with-xwidgets=yes"))
 (package-arguments emacs
(inputs
 `(("libxcomposite" ,libxcomposite)
   ("webkitgtk+" ,webkitgtk)
   ;; These two are needed to get HTTPS support in Webkit.
   ("glib-networking" ,glib-networking)
   ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
   ,@(package-inputs emacs)))
;; This is only needed when building from a git checkout.
(native-inputs
 `(("autoconf" ,autoconf)
   ("automake" ,automake)
   ,@(package-native-inputs emacs)
--8<---cut here---end--->8---

Since I don’t know what the source code looks like, I can only guess
that maybe you need to bootstrap the build system first.

--
Ricardo





Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> Here’s mine:
>
> --8<---cut here---start->8---
> (define-public my/emacs
>   (package (inherit emacs)
> (name "my-emacs")
> (version "26.0.91")
> [...]
> --8<---cut here---end--->8---

Note that RC1 is out.

> Since I don’t know what the source code looks like, I can only guess
> that maybe you need to bootstrap the build system first.

No, my local folder has all the files, including the "configure" file.
The whole point of working over a directory instead of an archive or a
git reference is that all files are re-used as-is.

-- 
Pierre Neidhardt

When in doubt, tell the truth.
-- Mark Twain


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Pierre Neidhardt

Chris Marusich  writes:

> Can you share the package definition?

Let's start from the most straight-forward:

(define-public emacs-dev
  (package
   (inherit emacs)
   (name "emacs-dev")
   (version "26.0.91")
   (source
 (local-file "/home/ambrevar/projects/emacs-build" #:recursive? #t

-- 
Pierre Neidhardt

Must I hold a candle to my shames?
-- William Shakespeare, "The Merchant of Venice"


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Pierre Neidhardt

Chris Marusich  writes:

> Pierre Neidhardt  writes:
>
>> Is there a good reason not to allow local paths in git URLs?
>
> You might find the "local-file" procedure to be helpful here.  You can
> pass a local-file as the source of a package, which should allow you to
> define packages that use a local file path as the source.  See (guix)
> G-Expressions in the manual for details.

Thank you for this suggestion.  Mathieu Lirzin already mentioned it in
another branch of this thread and after trying it I ran into strange issues.
Do you have experience with local-file?

-- 
Pierre Neidhardt

job Placement, n.:
Telling your boss what he can do with your job.


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Chris Marusich
Pierre Neidhardt  writes:

> Mathieu Lirzin  writes:
>
>> With the ‘#:recursive?’ keyword option set to #t, ‘local-file’ should
>> work for directories.
>
> Indeed, thanks for pointing out.
>
> I tried and it failed with
>
>   starting phase `configure'
>   source directory: "/tmp/guix-build-emacs-dev-26.0.91.drv-0/source" 
> (relative from build: ".")
>   build directory: "/tmp/guix-build-emacs-dev-26.0.91.drv-0/source"
>   configure flags:
> ("CONFIG_SHELL=/gnu/store/icz3hd36aqpjz5slyp4hhr8wsfbgiml1-bash-minimal-4.4.12/bin/bash"
> "SHELL=/gnu/store/icz3hd36aqpjz5slyp4hhr8wsfbgiml1-bash-minimal-4.4.12/bin/bash"
> "--prefix=/gnu/store/iaipasvi8dys79ms3y0axvwwdfnd31dq-emacs-dev-26.0.91"
> "--enable-fast-install" "--build=x86_64-unknown-linux-gnu")
>   configure: WARNING: unrecognized options: --enable-fast-install
>   ./configure: line 3350: config.log: Permission denied
>   ./configure: line 3360: config.log: Permission denied
>   phase `configure' failed after 0.1 seconds
>
> I inspected the content of
> "/tmp/guix-build-emacs-dev-26.0.91.drv-0/source": many files are
> missing, among others "configure".
>
> I am very confused...

Can you share the package definition?

-- 
Chris


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Chris Marusich
Pierre Neidhardt  writes:

> Is there a good reason not to allow local paths in git URLs?

You might find the "local-file" procedure to be helpful here.  You can
pass a local-file as the source of a package, which should allow you to
define packages that use a local file path as the source.  See (guix)
G-Expressions in the manual for details.

-- 
Chris


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-12 Thread Pierre Neidhardt

For now I'll stick to Emacs 26 RC1.  I've adapted the package
declaration from "emacs" with the following changes:
- Disable the scheme patch.
- Disable tests.

Find the declaration attached.

-- 
Pierre Neidhardt

When you get your PH.D. will you get able to work at BURGER KING?


emacs.scm
Description: Binary data


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-11 Thread Pierre Neidhardt

Oleg Pykhalov  writes:

> Pierre Neidhardt  writes:
>
>> I tried reusing your package snippet from
>> http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html by
>> setting
>>
>>(url "git://localhost/~ambrevar/projects/emacs")
>
> I'm sorry for probably an obvious question.  Does ‘git clone
> git://localhost/~ambrevar/projects/emacs’ work?
>
> […]
>
>> I'm not very familiar with the "git" protocol: does it require some
>> special configuration?
>
> It does, see 
> https://www.gnu.org/software/guix/manual/html_node/Version-Control-Services.html
>
> Be sure ‘user-path’ is setted correctly.
>
>> I also tried specifying a local path:
>>
>>(url "/home/ambrevar/projects/emacs")
>> 
>> […]
>> 
>> I think this is a bug: if git clone accepts local paths, then so should
>> git-reference.
>
> It would be a useful feature, but I don't know all pitfalls.
>
> We can do ‘guix pull --url=$PWD’ in “Guix checkout” though.

Thank you for the hint.  That said, I really don't want to set up a git
server for so little.

Is there a good reason not to allow local paths in git URLs?

-- 
Pierre Neidhardt

Every solution breeds new problems.


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-11 Thread Pierre Neidhardt

Oleg Pykhalov  writes:

>>> In case of ‘emacs’ package recipe, ‘--with-source’ doesn't work for a
>>> snapshot of the ‘master’ branch.
>>
>> Why?  Because you’d need to run ‘autoreconf’ and the like?
>
> To run everything in ‘(arguments …)’ except ‘#:parallel-build? #t’.
>
> From http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html
> --8<---cut here---start->8---
>   (arguments
>(substitute-keyword-arguments
>`(#:parallel-build? #t
>#:tests? #f
>,@(package-arguments emacs))
>  ((#:phases phases)
>   `(modify-phases ,phases
>  (add-after 'unpack 'autogen
>(lambda _
>  (zero? (system* "sh" "autogen.sh"
>  (delete 'reset-gzip-timestamps)
> --8<---cut here---end--->8---

What do you mean?  That parallel-build has to be turned off for the
master branch?

I actually noticed that running `make -j5` locally, the build fails at
the `temacs` step.  The build succeeds with `make`.

That said, I tried running

guix build --keep-failed 
--with-source=ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-26.1-rc1.tar.xz emacs

It fails with

starting phase `check'
make -C lib all
make info-real info-dir
You do not seem to have the test/ directory.
Maybe you are using a release tarfile, rather than a repository 
checkout.
make: *** [Makefile:937: have-tests] Error 1
make: *** Waiting for unfinished jobs

Why should it fail if it's a tarball?  The error message seems that it
understands precisely what we are trying to do.

-- 
Pierre Neidhardt

 Being overloaded is the sign of a true Debian maintainer.


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-11 Thread Pierre Neidhardt

Mathieu Lirzin  writes:

> With the ‘#:recursive?’ keyword option set to #t, ‘local-file’ should
> work for directories.

Indeed, thanks for pointing out.

I tried and it failed with

starting phase `configure'
source directory: "/tmp/guix-build-emacs-dev-26.0.91.drv-0/source" 
(relative from build: ".")
build directory: "/tmp/guix-build-emacs-dev-26.0.91.drv-0/source"
configure flags: 
("CONFIG_SHELL=/gnu/store/icz3hd36aqpjz5slyp4hhr8wsfbgiml1-bash-minimal-4.4.12/bin/bash"
 
"SHELL=/gnu/store/icz3hd36aqpjz5slyp4hhr8wsfbgiml1-bash-minimal-4.4.12/bin/bash"
 "--prefix=/gnu/store/iaipasvi8dys79ms3y0axvwwdfnd31dq-emacs-dev-26.0.91" 
"--enable-fast-install" "--build=x86_64-unknown-linux-gnu")
configure: WARNING: unrecognized options: --enable-fast-install
./configure: line 3350: config.log: Permission denied
./configure: line 3360: config.log: Permission denied
phase `configure' failed after 0.1 seconds

I inspected the content of
"/tmp/guix-build-emacs-dev-26.0.91.drv-0/source": many files are
missing, among others "configure".

I am very confused...

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-04-05 Thread Jorge
March 27, 2018 6:51 AM, l...@gnu.org wrote:
> Pierre Neidhardt  skribis:
> 
>> Considering the importance of Emacs in this community, I think it would
>> make sense to provide a cutting-edge version.
> 
> Do you mean a snapshot of the ‘master’ branch?
> 
> We don’t do that usually, and I would instead suggest using
> ‘--with-source’ for people who would like that.
> 
> What do people think?
I am sorry for having taken this long to reply.  I (the original poster) was
thinking not of ‘master’ branch snapshots.  GNU Emacs has already branched the
upcoming Emacs 26, and the ‘master’ branch has been opened for the development
of what will be Emacs 27.  I was thinking of the latest official pretest version
of the almost-released branch (currently Emacs 26.0.91).  In my experience so
far, these pretest versions are reliable enough for daily usage.

Providing Emacs pretest versions would enable a larger audience to test them,
thus helping the GNU project.  It would also enable more people to
get Emacs from Guix; I need Emacs 26 for its better proxy support (so I can
install ELPA packages from my work desktop) and I really like its many other
features, so if Guix only has 25.3, I will continue to compile 26.0.9x manually
(and miss the Guix features).

I think it would be clearly beneficial to package 26.0.9x, unless Guix lacks the
manpower.  I unfortunately don't think I'll be able to help much, beyond testing
and filing bug reports.

Regards

- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android: https://f-droid.org/
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]



Re: How to install prerelease package versions (particularly Emacs)

2018-04-01 Thread Oleg Pykhalov
Pierre Neidhardt  writes:

> I tried reusing your package snippet from
> http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html by
> setting
>
>(url "git://localhost/~ambrevar/projects/emacs")

I'm sorry for probably an obvious question.  Does ‘git clone
git://localhost/~ambrevar/projects/emacs’ work?

[…]

> I'm not very familiar with the "git" protocol: does it require some
> special configuration?

It does, see 
https://www.gnu.org/software/guix/manual/html_node/Version-Control-Services.html

Be sure ‘user-path’ is setted correctly.

> I also tried specifying a local path:
>
>(url "/home/ambrevar/projects/emacs")
> 
> […]
> 
> I think this is a bug: if git clone accepts local paths, then so should
> git-reference.

It would be a useful feature, but I don't know all pitfalls.

We can do ‘guix pull --url=$PWD’ in “Guix checkout” though.


Oleg.


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-30 Thread Mathieu Lirzin
Pierre Neidhardt  writes:

> Oleg, I tried reusing your package snippet from
> http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html
> by setting
>
>(url "git://localhost/~ambrevar/projects/emacs")
>
> but it fails for me:
[...]
> I'm not very familiar with the "git" protocol: does it require some
> special configuration?
>
> I also tried specifying a local path:
>
>(url "/home/ambrevar/projects/emacs")
>
> but it seems that Guix' `git-reference` does not like it:

I think you have to use the ‘local-file’ procedure in place of ‘origin’
in the ‘source’ field.

Unless I am not up-to-date with current Guix practices, it is still not
convenient since you still need to manually filter git related files and
build results with the ‘#:select’ keyword argument of ‘local-file’.

HTH,

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37



Re: How to install prerelease package versions (particularly Emacs)

2018-03-27 Thread Ludovic Courtès
Oleg Pykhalov  skribis:

> l...@gnu.org (Ludovic Courtès) writes:
>
>> Pierre Neidhardt  skribis:
>>
>>> Considering the importance of Emacs in this community, I think it would
>>> make sense to provide a cutting-edge version.
>>
>> Do you mean a snapshot of the ‘master’ branch?
>>
>> We don’t do that usually, and I would instead suggest using
>> ‘--with-source’ for people who would like that.
>>
>> What do people think?
>
> In case of ‘emacs’ package recipe, ‘--with-source’ doesn't work for a
> snapshot of the ‘master’ branch.

Why?  Because you’d need to run ‘autoreconf’ and the like?

Ludo’.



Re: How to install prerelease package versions (particularly Emacs)

2018-03-27 Thread Marius Bakke
Oleg Pykhalov  writes:

> l...@gnu.org (Ludovic Courtès) writes:
>
>> Pierre Neidhardt  skribis:
>>
>>> Considering the importance of Emacs in this community, I think it would
>>> make sense to provide a cutting-edge version.
>>
>> Do you mean a snapshot of the ‘master’ branch?
>>
>> We don’t do that usually, and I would instead suggest using
>> ‘--with-source’ for people who would like that.
>>
>> What do people think?
>
> In case of ‘emacs’ package recipe, ‘--with-source’ doesn't work for a
> snapshot of the ‘master’ branch.
>
> To build the ‘master’ branch you need to write a new package recipe.  I
> think it's not acceptable for a non-contributor in Guix.  WDYT?

This sounds like a job for the mythical "channel" facility.  In the mean
time, sharing package recipes for sticking in GUIX_PACKAGE_PATH like you
did upthread seems like a reasonable workaround.


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-27 Thread Oleg Pykhalov
l...@gnu.org (Ludovic Courtès) writes:

> Pierre Neidhardt  skribis:
>
>> Considering the importance of Emacs in this community, I think it would
>> make sense to provide a cutting-edge version.
>
> Do you mean a snapshot of the ‘master’ branch?
>
> We don’t do that usually, and I would instead suggest using
> ‘--with-source’ for people who would like that.
>
> What do people think?

In case of ‘emacs’ package recipe, ‘--with-source’ doesn't work for a
snapshot of the ‘master’ branch.

To build the ‘master’ branch you need to write a new package recipe.  I
think it's not acceptable for a non-contributor in Guix.  WDYT?

Oleg.


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-27 Thread Ludovic Courtès
Hello,

Pierre Neidhardt  skribis:

> Considering the importance of Emacs in this community, I think it would
> make sense to provide a cutting-edge version.

Do you mean a snapshot of the ‘master’ branch?

We don’t do that usually, and I would instead suggest using
‘--with-source’ for people who would like that.

What do people think?

Ludo’.



Re: How to install prerelease package versions (particularly Emacs)

2018-03-26 Thread Pierre Neidhardt

Considering the importance of Emacs in this community, I think it would
make sense to provide a cutting-edge version.

Is anyone willing to accept this?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-18 Thread Chris Marusich
Oleg Pykhalov  writes:

> Hello Jorge,
>
> "Jorge"  writes:
>
>> I would prefer to get Emacs 26 from Guix, which would be more
>> automatic and would come configured to work with Guix-installed Emacs
>> packages.
>
> Guix package collection provides only stable package releases for the
> most part.

There is no reason why we cannot also provide cutting-edge versions.
We do this already for some packages.  For example, see any of the
following packages:

  guix package --search=. | recsel -e 'name ~ "-(git|next|dev|devel|cvs|svn)$"'

Generally, it seems the trend is that we provide such development
versions as separate packages.

-- 
Chris


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-03 Thread Jorge
March 3, 2018 7:24 AM, "Oleg Pykhalov"  wrote:
> Guix package collection provides only stable package releases for the
> most part.
That's a pity.

> You could write a package recipe with a new version based on original
> recipe, see [1].
> 
> Also you could try ‘--with-source’ [2], but in Emacs case the package
> recipe should be tweaked a little bit, so it will probably not work.
> 
> [1] http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html
> [2]
> https://www.gnu.org/software/guix/manual/html_node/Package-Transformation-Options.html#Package-Trans
> ormation-Options
Thank you for your tips!  For now I’ll keep building Emacs manually, but
when I become more knowledgeable about Guix I intend to follow your
instructions.

Regards

- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android: https://f-droid.org/
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]



Re: How to install prerelease package versions (particularly Emacs)

2018-03-03 Thread Oleg Pykhalov
Hello Jorge,

"Jorge"  writes:

> I would prefer to get Emacs 26 from Guix, which would be more
> automatic and would come configured to work with Guix-installed Emacs
> packages.

Guix package collection provides only stable package releases for the
most part.

> So is Emacs 26 available from Guix?  Unfortunately ~guix package
> --show=emacs~ only reports version 25.3, but maybe there is a non
> intuitive way to get Emacs 26.

You could write a package recipe with a new version based on original
recipe, see [1].

Also you could try ‘--with-source’ [2], but in Emacs case the package
recipe should be tweaked a little bit, so it will probably not work.

[1]  http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html
[2]  
https://www.gnu.org/software/guix/manual/html_node/Package-Transformation-Options.html#Package-Transformation-Options

Oleg.


signature.asc
Description: PGP signature