Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial gentoo support #255

Merged
merged 7 commits into from
Feb 17, 2022
Merged

Conversation

guyosi
Copy link
Contributor

@guyosi guyosi commented Nov 29, 2021

This is initial support for Gentoo Linux to quickget,it does download and boot.

guyosi and others added 6 commits November 28, 2021 18:06
This code is for adding gentoo support, its not complete yet
Some tweaks towards getting the latest release iso
@daPhipz
Copy link
Member

daPhipz commented Dec 1, 2021

When running quickget gentoo latest, I get

dirname: fehlender Operand
„dirname --help“ liefert weitere Informationen.
ERROR! Failed to download /20211128T170532Z/install-amd64-minimal-20211128T170532Z.iso. Try running 'quickget' again.

which roughly translates to

dirname: missing operand
„dirname --help“ for further information.
ERROR! Failed to download /20211128T170532Z/install-amd64-minimal-20211128T170532Z.iso. Try running 'quickget' again.

https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/${RELEASE}-iso.txt looks like this as of 2021-12-01 11:10 German time:

# Latest as of Wed, 01 Dec 2021 07:00:01 +0000
# ts=1638342001
20211128T170532Z/admincd-amd64-20211128T170532Z.iso 648019968
20211128T170532Z/install-amd64-minimal-20211128T170532Z.iso 457179136

My first guess is that grep fails, since there is no string "Location" anywhere in the file above.
Will investigate further!

@philclifford
Copy link
Contributor

philclifford commented Dec 2, 2021

My first guess is that grep fails, since there is no string "Location" anywhere in the file above. Will investigate further!
It should find "Location" in the stderr from wgeting.
It's worked reliably for me and the following still does

eval $( wget  -O/tmp/gentoolatest https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/${RELEASE}-iso.txt 2`>&1 |grep Location | awk '{print "LOCAT="$2}' )
    LOCAT=$(dirname ${LOCAT})
    eval $( awk '/admincd-amd64/ {print "ADMIN="$1}; /install-amd64-minimal/ {print "INSTALLMIN="$1}' /tmp/gentoolatest )
    URL="${LOCAT}/${INSTALLMIN}"
    ISO=$(basename "${INSTALLMIN}" )

Might need to quote the grep expression and also add something to catch absence (or oddness) in the ${RELEASE}-iso.txt
And maybe quietly remove /tmp/gentoolatest at the end.

However - the "Location" is wget saying it has been redirected to .... so for you it is I guess speaking German, so LOCAT remains ""

This function need to set LC_ environments temporarily to not get internationlized OR some horrendous i18n fun will ensue.
@daPhipz could you provide a neat solution ?

-- update: tried setting LC_* to de_DE and whilst dategave nice german output, stderr from the wget was still "^Location: " for the redirect ... 🤷‍♂️

@philclifford
Copy link
Contributor

Heads-up icon wizards

@philclifford
Copy link
Contributor

@guyosi you'll need to do a little merging and conflict resolution to get this PR to be mergeable again (this is normal - we all step on each others toes at merge time ). Maybe worth setting this to draft until it is re-tested and confirmed working again once it has no conflicts.

@flexiondotorg note I may have added a bug to this that "works for me" but not @daPhipz - see the comment a couple above.

@guyosi
Copy link
Contributor Author

guyosi commented Dec 30, 2021

Finished squashing the bugs, there shouldn't be any conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants