unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* git-fetch recursive error
@ 2023-10-02 13:17 Lucy Coleclough
  2023-10-04 18:05 ` Simon Tournier
  0 siblings, 1 reply; 2+ messages in thread
From: Lucy Coleclough @ 2023-10-02 13:17 UTC (permalink / raw)
  To: help-guix

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

Hi there, my name is fi

I am writing to obtain help with an issue that has been occuring for about
4 days
Upon building a custom package definition which uses the git-fetch source
obtenance method and has the `recursive?` flag set to `#true` the fetch
fails seemingly due to the build environment being unable to find certain
program-s.

A file I have been using to test this is named `test.scm` and the content-s
are found here: https://paste.debian.net/1293802/ `test.scm`
Upon running this file with `guix build -L. test` on my current system, the
following output is produced: https://paste.debian.net/1293803/
`ErrorOutput`

Of note is that this test package did build on the installation system that
I use, before pulling the latest guix and after.
It also sucseeded on the target machine directly after install, it
sucseeded on the target machine after pulling the latest guix, then it
failed after reconfiguring my system using my custom config and ever since
my config is programmatically constructed but a flattened version is as
follows: https://paste.debian.net/1293805/ `FullFlatenedSystem.scm`
I have tried peeling my system definition back to a very bare one to see if
I can find a state where some problamatic element was removed but I had no
luck, all system generation-s posed the same issue
I also tried building these generation-s with solely the channel-s needed
to create them but this did not work
The most minimal system definition i used was this:
https://paste.debian.net/1293806/ `MinimalFlatenedSystem.scm`


The current item that this is blocking for me is packaging the latest glib
commit from main.
The submodule needs to be downloaded or else `meson setup` fails as there
is an empty wrap
I have tried invoking `program-file` in a gexp in a build stage and in the
fetch snippet but both attempt-s leave me unable to include `( guix gexp)`
I have tried including it in `origin`~s `modules` field, I have also tried
( `with-imported-modules` with and without `source-module-closure`) but to
no avail
When I conduct a local build of glib, `meson setup` fetches the submodule-s
then however this does not occur during the configure stage of my meson
build system package

I am unsure how to structure these request-s and I realise someone must
spend their time in order to answer this, I admit, i am flailing baby
Is the issue relating to git-fetch recursive a known issue, I have not seen
it on the issue tracker? but I want to check that I am not doing anything
wrong first
Is it true that one can not use arbitrary function-s in the origin snippet
and in the build stage-s?
Is it true that internet access during build is limited by default to the
fetch component?
And if so is there a method to allow internet access to other component-s?

Thank you for reading

[-- Attachment #2: test.scm --]
[-- Type: text/x-scheme, Size: 1348 bytes --]

( define-module
	( test)
	#:use-module ( gnu packages)
	#:use-module ( gnu packages shellutils)
	#:use-module ( gnu packages base)
	#:use-module ( guix packages)
	#:use-module ( guix build-system copy)
	#:use-module ( guix git-download)
	#:use-module ( guix gexp)
	#:use-module (
		( guix licenses)
		#:prefix license:
	)
)

( define-public
	test
	( let
		(
			( commit "16fec2068ec03bf2420188edd9840eaa241fbcf7")
		)
		( package
			( name "test")
			( version
				"0.0"
			)
			( source
				( origin
					( method git-fetch)
					( uri
						( git-reference
							( commit commit)
							( url "https://github.com/abcdw/rde")
							( recursive? #t) ; naughty line
						)
					)
					; I have tried using import-s here and in the other input-s section but it does not work for mw
					; ( patch-inputs
					; 	( list
					; 		shell-functools
					; 		sed
					; 		coreutils
					; 	)
					; )
					( sha256
						( base32 "0x208rdyvxgww84j6cf4f02zy80ha22x066pfpl91zv8366id0lc")
					)
				)
			)
			; ( inputs
			; 	( list
			; 		shell-functools
			; 		sed
			; 		coreutils
			; 	)
			; )
			( build-system copy-build-system)
			(arguments
				(list
					#:install-plan `( list
						( list
							"doc"
							"/newDoccy"
						)
					)
				)
			)
			( home-page "")
			( synopsis "")
			( description "")
			( license license:mpl2.0)
		)
	)
)

[-- Attachment #3: ErrorOutput --]
[-- Type: application/octet-stream, Size: 4627 bytes --]

~/BACKUP/TT: guix build -L. test                                                                                                                                                                                   10/02/2023 01:43:38 PM
substitute: updating substitutes from 'https://substitutes.nonguix.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivations will be built:
  /gnu/store/f5rjb8lwc3clyi36q8j2d2j41g87azj8-test-0.0.drv
  /gnu/store/0b4s3x9i1g8r59wddmqsnflwvwh4n2m9-git-checkout.drv
0.2 MB will be downloaded:
  /gnu/store/545p6pcj0vjpyikwn7cnggl3ws0hd5rx-module-import-compiled
substituting /gnu/store/545p6pcj0vjpyikwn7cnggl3ws0hd5rx-module-import-compiled...
downloading from https://ci.guix.gnu.org/nar/lzip/545p6pcj0vjpyikwn7cnggl3ws0hd5rx-module-import-compiled ...
 module-import-compiled  176KiB                                                                                                                                                                1.2MiB/s 00:00 ▕██████████████████▏ 100.0%

building /gnu/store/0b4s3x9i1g8r59wddmqsnflwvwh4n2m9-git-checkout.drv...
Initialized empty Git repository in /gnu/store/mds7psmbdy6i70nhr257j6y9fmsb22sf-git-checkout/.git/
From https://github.com/abcdw/rde
 * branch            16fec2068ec03bf2420188edd9840eaa241fbcf7 -> FETCH_HEAD
Note: switching to 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 16fec20 rde: msmtp: Add fastmail records
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule: line 7: basename: command not found
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule: line 7: sed: command not found
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-sh-setup: line 77: basename: command not found
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-sh-setup: line 77: sed: command not found
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-sh-setup: line 292: uname: command not found
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule: line 613: sed: command not found
/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule: line 613: cmd_: command not found
git-fetch: '/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/bin/git submodule update --init --recursive' failed with exit code 127
Trying content-addressed mirror at bordeaux.guix.gnu.org...
Unable to fetch from bordeaux.guix.gnu.org, misc-error: (#f download failed ~S ~S ~S (http://bordeaux.guix.gnu.org/nar/lzip/mds7psmbdy6i70nhr257j6y9fmsb22sf-git-checkout 404 Not Found) #f)
Trying content-addressed mirror at ci.guix.gnu.org...
Unable to fetch from ci.guix.gnu.org, misc-error: (#f download failed ~S ~S ~S (http://ci.guix.gnu.org/nar/lzip/mds7psmbdy6i70nhr257j6y9fmsb22sf-git-checkout 404 Not Found) #f)
Trying content-addressed mirror at bordeaux.guix.gnu.org...
Unable to fetch from bordeaux.guix.gnu.org, misc-error: (#f download failed ~S ~S ~S (http://bordeaux.guix.gnu.org/nar/mds7psmbdy6i70nhr257j6y9fmsb22sf-git-checkout 404 Not Found) #f)
Trying content-addressed mirror at ci.guix.gnu.org...
Unable to fetch from ci.guix.gnu.org, misc-error: (#f download failed ~S ~S ~S (http://ci.guix.gnu.org/nar/mds7psmbdy6i70nhr257j6y9fmsb22sf-git-checkout 404 Not Found) #f)
builder for `/gnu/store/0b4s3x9i1g8r59wddmqsnflwvwh4n2m9-git-checkout.drv' failed to produce output path `/gnu/store/mds7psmbdy6i70nhr257j6y9fmsb22sf-git-checkout'
build of /gnu/store/0b4s3x9i1g8r59wddmqsnflwvwh4n2m9-git-checkout.drv failed
View build log at '/var/log/guix/drvs/0b/4s3x9i1g8r59wddmqsnflwvwh4n2m9-git-checkout.drv.gz'.
cannot build derivation `/gnu/store/f5rjb8lwc3clyi36q8j2d2j41g87azj8-test-0.0.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/f5rjb8lwc3clyi36q8j2d2j41g87azj8-test-0.0.drv' failed

[-- Attachment #4: FullFlatenedSystem.scm --]
[-- Type: text/x-scheme, Size: 5005 bytes --]

( define-module
	( GuixConfig variationAndSource system base)
	#:use-module ( gnu)
	; Apologies for the non free software but I can not use my hardware without it, and I can not buy new hardware either
	#:use-module ( nongnu packages linux)
	#:use-module ( nongnu system linux-initrd)
	#:use-module ( rosenthal packages wm) ; hyprland
	#:use-module ( nongnu packages mozilla) ; firefox
	;
	#:use-module ( gnu services desktop)
	#:use-module ( gnu services)
	#:use-module ( gnu system accounts)
	#:use-module ( gnu system shadow)
 	#:use-module ( gnu services shepherd)
	#:use-module ( gnu services base)
	#:use-module ( gnu services dbus)
	#:use-module ( gnu services avahi)
	#:use-module ( gnu services xorg)
	#:use-module ( gnu services networking)
	#:use-module ( gnu services sound)
	#:use-module (
		( gnu system file-systems)
		#:select (
			%control-groups
			%elogind-file-systems
			file-system
		)
	)
)

( use-service-modules
	cups
	desktop
	networking
	ssh
	xorg
)
( use-package-modules
	vim ; nvim
	wm ; sway shit, waybar, wlogout
	admin ; wlgreet
	terminals ; kitty
	disk ; ranger
	version-control ; git
	certs ; nss-certs
	xdisorg ; wofi
	qt ; qtbase
)

( define-public
	baseOperatingSystem
	( operating-system
		( locale "en_GB.utf8")
		( timezone "Europe/London")
		( keyboard-layout
			( keyboard-layout "gb")
		)
		( host-name "guixSystem")
		( kernel linux)
		( initrd microcode-initrd)
		( firmware
			( list
				linux-firmware
			)
		)

		; root is implicit
		( users
			( cons*
				( user-account
					( name "lucy")
					( comment "lucy")
					( group "users")
					( home-directory "/home/lucy")
					( supplementary-groups
						'(
							"wheel"
							"netdev"
							"audio"
							"video"
						)
					)
				)
				%base-user-accounts
			)
		)

		; System wide packages
		( packages
			( append
				( list
					kitty
					nss-certs
					swayidle
					neovim
					ranger
					hyprland
					xdg-desktop-portal-hyprland
					wlogout
					qtbase
					qtwayland
					wofi
					waybar
					firefox
					wlgreet
				)
				%base-packages
			)
		)

		( services
			( append

				( modify-services
					%desktop-services
					( delete gdm-service-type)
					( delete mingetty-service-type)
					( guix-service-type
						config => ( guix-configuration
							( inherit config)
							( substitute-urls
								( append
									( list "https://substitutes.nonguix.org")
									%default-substitute-urls
								)
							)
							( authorized-keys
								( append
									( list
										( local-file "./signing-key.pub")
									)
									%default-authorized-guix-keys
								)
							)
						)
					)
					( udev-service-type
						config => ( udev-configuration
							( inherit config)
							( rules
								( append
									( list
										( udev-rule
											"99-pixelbook-backlights.rules"
											( load "../../udevRule-s/makeIntelBacklightVideoEditable.scm")
										)
									)
									( udev-configuration-rules config) ; Combine with existing rules
								)
							)
						)
					)
				)
				( list
					( service openssh-service-type)
					( service bluetooth-service-type)
					( service cups-service-type)
					( service
						greetd-service-type
						( greetd-configuration
							( terminals
								( list
									( greetd-terminal-configuration
										( terminal-vt "1")
										( terminal-switch #t)
										( default-session-command
											( greetd-agreety-session
												( command
													( file-append
														hyprland
														"/bin/Hyprland"
													)
												)
												( command-args ( list))
											)
										)
									)
								)
							)
						)
					)
					( service
						mingetty-service-type
						( mingetty-configuration
							( tty "tty2")
						)
					)
					( service
						mingetty-service-type
						( mingetty-configuration
							( tty "tty3")
						)
					)
					( service
						mingetty-service-type
						( mingetty-configuration
							( tty "tty4")
						)
					)
					( service
						mingetty-service-type
						( mingetty-configuration
							( tty "tty5")
						)
					)
					( service
						mingetty-service-type
						( mingetty-configuration
							( tty "tty6")
						)
					)
				)
			)
		)
		( bootloader
			( bootloader-configuration
				( bootloader grub-efi-bootloader)
				( targets
					( list "/boot/efi")
				)
				( keyboard-layout keyboard-layout)
			)
		)
		( initrd-modules
			( append
				'( "mmc_block" "sdhci_pci")
				%base-initrd-modules
			)
		)
		( swap-devices
			( list
				( swap-space
					( target
						( uuid
							"6fe3d146-d233-475d-88bb-6a8e511ca117"
						)
					)
				)
			)
		)

		( file-systems
			( cons*
				( file-system
					( mount-point "/boot/efi")
					( device
						( uuid "60DA-2BE3" 'fat32)
					)
					( type "vfat")
				)
				( file-system
					( mount-point "/")
					( device
						( uuid "f7467d2c-0efa-43bc-9b17-dc4929b8026b" 'btrfs)
					)
					( type "btrfs")
				)
				%base-file-systems
			)
		)
	)
)

[-- Attachment #5: MinimalFlatenedSystem.scm --]
[-- Type: text/x-scheme, Size: 2511 bytes --]

( define-module
	( GuixConfig variationAndSource system base)
	#:use-module ( gnu)
	; Apologies for the non free software but I can not use my hardware without it, and I can not buy new hardware either
	#:use-module ( nongnu packages linux)
	#:use-module ( nongnu system linux-initrd)
	;
	#:use-module ( gnu services desktop)
	#:use-module ( gnu services)
	#:use-module ( gnu system accounts)
	#:use-module ( gnu system shadow)
 	#:use-module ( gnu services shepherd)
	#:use-module ( gnu services base)
	#:use-module ( gnu services dbus)
	#:use-module ( gnu services avahi)
	#:use-module ( gnu services xorg)
	#:use-module ( gnu services networking)
	#:use-module ( gnu services sound)
	#:use-module (
		( gnu system file-systems)
		#:select (
			%control-groups
			%elogind-file-systems
			file-system
		)
	)
)

( use-service-modules
	cups
	desktop
	networking
	ssh
	xorg
)

( define-public
	baseOperatingSystem
	( operating-system
		( locale "en_GB.utf8")
		( timezone "Europe/London")
		( keyboard-layout
			( keyboard-layout "gb")
		)
		( host-name "guixSystem")
		( kernel linux)
		( initrd microcode-initrd)
		( firmware
			( list
				linux-firmware
			)
		)

		; root is implicit
		( users
			( cons*
				( user-account
					( name "lucy")
					( comment "lucy")
					( group "users")
					( home-directory "/home/lucy")
					( supplementary-groups
						'(
							"wheel"
							"netdev"
							"audio"
							"video"
						)
					)
				)
				%base-user-accounts
			)
		)
		( services
			( append
				%base-services
				( list
					polkit-wheel-service
					( service network-manager-service-type)
					( service wpa-supplicant-service-type)
					( service modem-manager-service-type)
					( service openssh-service-type)
				)
			)
		)
		( bootloader
			( bootloader-configuration
				( bootloader grub-efi-bootloader)
				( targets
					( list "/boot/efi")
				)
				( keyboard-layout keyboard-layout)
			)
		)
		( initrd-modules
			( append
				'( "mmc_block" "sdhci_pci")
				%base-initrd-modules
			)
		)
		( swap-devices
			( list
				( swap-space
					( target
						( uuid
							"6fe3d146-d233-475d-88bb-6a8e511ca117"
						)
					)
				)
			)
		)

		( file-systems
			( cons*
				( file-system
					( mount-point "/boot/efi")
					( device
						( uuid "60DA-2BE3" 'fat32)
					)
					( type "vfat")
				)
				( file-system
					( mount-point "/")
					( device
						( uuid "f7467d2c-0efa-43bc-9b17-dc4929b8026b" 'btrfs)
					)
					( type "btrfs")
				)
				%base-file-systems
			)
		)
	)
)

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

* Re: git-fetch recursive error
  2023-10-02 13:17 git-fetch recursive error Lucy Coleclough
@ 2023-10-04 18:05 ` Simon Tournier
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Tournier @ 2023-10-04 18:05 UTC (permalink / raw)
  To: Lucy Coleclough, help-guix

Hi,

Thanks for the report.

On Mon, 02 Oct 2023 at 14:17, Lucy Coleclough <coleclough.lucy@gmail.com> wrote:

> I am writing to obtain help with an issue that has been occuring for about
> 4 days
> Upon building a custom package definition which uses the git-fetch source
> obtenance method and has the `recursive?` flag set to `#true` the fetch
> fails seemingly due to the build environment being unable to find certain
> program-s.

Sorry for the annoyance.

It is tracked by bug#66305:

    bug#66305: Error with recursive git checkout
    Guillaume Le Vaillant <glv@posteo.net>
    Mon, 02 Oct 2023 11:17:16 +0000
    id:87msx1qmvs.fsf@kitej
    https://issues.guix.gnu.org/66305
    https://issues.guix.gnu.org/msgid/87msx1qmvs.fsf@kitej
    https://yhetil.org/guix/87msx1qmvs.fsf@kitej

The root of the issue is:

        bug#65924: git searches coreutils and util-linux commands in PATH
        Maxim Cournoyer <maxim.cournoyer@gmail.com>
        Wed, 13 Sep 2023 14:00:09 -0400
        id:87fs3iuf6e.fsf@gmail.com
        https://issues.guix.gnu.org//65924
        https://issues.guix.gnu.org/msgid/87fs3iuf6e.fsf@gmail.com
        https://yhetil.org/guix/87fs3iuf6e.fsf@gmail.com

which hits the series ba21eeb565..811b249397:

    f651a35969 build: Add dependency on Git.

A patch is floating around and will be merged soon. :-)

Hope that helps,
simon


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

end of thread, other threads:[~2023-10-04 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 13:17 git-fetch recursive error Lucy Coleclough
2023-10-04 18:05 ` Simon Tournier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).