bedrocklinux / bedrocklinux-userland

This tracks development for the things such as scripts and (defaults for) config files for Bedrock Linux
https://bedrocklinux.org
GNU General Public License v2.0
617 stars 69 forks source link

Create fedora-rawhide #184

Open Fermats-Last-Account opened 4 years ago

Fermats-Last-Account commented 4 years ago

Added brl fetch support for Fedora Rawhide. I took regular Fedora's bootstrap code and made a few changes in order to have it work for Fedora Rawhide.

Titaniumtown commented 4 years ago

shouldn't it just be another "release" of fedora?

Fermats-Last-Account commented 4 years ago

Ideally that would be the case, however Rawhide has some different links than regular Fedora.

For example, it uses linux/development/rawhide/Everything as opposed to linux/releases/32/Everything.

It also isn't listed in the directory Bedrock uses to find Fedora's releases. https://download-ib01.fedoraproject.org/pub/fedora-secondary/releases/

I wasn't sure how to implement those changes without breaking fetch support for regular Fedora.

Titaniumtown commented 4 years ago

Oh ok.

paradigm commented 4 years ago

I agree with Titaniumtown. This should just be a release of Fedora.

For example, it uses linux/development/rawhide/Everything as opposed to linux/releases/32/Everything.

If this string is used once, just use an if/else check if the version is rawhide and handle both branches accordingly.

If it's read multiple times, populate a variable early on with an if/else and use the variable in the various locations.

It also isn't listed in the directory Bedrock uses to find Fedora's releases. https://download-ib01.fedoraproject.org/pub/fedora-secondary/releases/

Ideal solution would be to find another way to figure out Fedora's releases which would properly handle the hypothetical scenario they drop rawhide. However, I don't foresee them doing that any time soon. It's probably safe enough to hardcode rawhide in the output, in addition to the dynamically fetched values.

Titaniumtown commented 4 years ago

bump, is this going to to be added? Would be a neat feature once added properly in the form of a "release" for the fedora installer.

Titaniumtown commented 4 years ago

Found one issue: when I do dnf update, I get "Failed to set locale, defaulting to C.UTF-8" this doesn't happen with a fedora 32 stratum.

bobbbay commented 4 years ago

@Titaniumtown Interesting, try cat /bedrock/strata/{name-of-strat}/etc/locale.conf

Locale problems generally seem small but have huge impacts on tons of applications.

EDIT also, could send over your bedrock.conf? /bedrock/etc/bedrock.conf cheers!

Titaniumtown commented 4 years ago

Lemme do that right now @Bobbbay Give me a second.

Titaniumtown commented 4 years ago

I was refetching it bc I deleted the stratum, and I got the error:

warning: /target-root/var/cache/dnf/rawhide-2d95c80a1fa0a67d/packages/acl-2.2.53-8.fc33.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 45719a39: NOKEY
Fedora - Rawhide - Developmental packages for the next  0.0  B/s |   0  B     00:00
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-x86_64]
Titaniumtown commented 4 years ago

It fails to fetch. ummmm

bobbbay commented 4 years ago

@Titaniumtown That's better, now it doesn't fetch at all! :))))

Are you sure that's the command that you ran? Try history | grep "brl fetch" to see all of your fetches. I see a --experimental flag in fetch too, but seems unrelated.

Titaniumtown commented 4 years ago

well, I ran:

sudo brl fetch fedora-rawhide -n fedora-rawhide

Imma try w/o the -n fedora-rawhide part.

Titaniumtown commented 4 years ago

same error. hmmmm

bobbbay commented 4 years ago

@Titaniumtown Well then, let's break down the error.

Line one is a warning, let's ignore that for now.

Line two is regular curl output, at 0 bytes

Line 3 is the real deal. Shize, I think I just found it. Typo in the install code, says $releasesever instead of $releaseserver. Give me a sec to find where the install files are stored, and I'll give you a fix.

Titaniumtown commented 4 years ago

Ok, got it. Strange because it worked before, now it fails to fetch :thinking:

bobbbay commented 4 years ago

Yes, now that I think of it that could be wrong.

Seems like this was an actual problem with Fedora at a time, see this, this and this (or just search up "curl error (37)")

I can't seem to find where the file that stores this is, both in this repo or online, @paradigm will know.

bobbbay commented 4 years ago

@Titaniumtown Could you try now? It's been a while, and developer's luck might let us fix that at a later point :laughing:

ghost commented 2 years ago

This PR seems to have been inactive for an year. Also Fedora 35 is not added to brl fetch, maybe adding that will be a reasonable choice.

paradigm commented 2 years ago

This PR seems to have been inactive for an year.

Yes, that happens. Bedrock is a huge project, with tons to do, and no where enough people to get it all done in a timely manner. Given the availability of brl import, expanding brl fetch isn't a particularly high priority. If no one else adds rawhide as a brl fetch fedora release, I'll likely do so myself eventually, but after a very long list of higher priority items.

Also Fedora 35 is not added to brl fetch, maybe adding that will be a reasonable choice.

brl fetch fedora -r 35 works for me. If it is not working for you, please provide more information, such as exactly what happens when you try it.

Apparently the mirror brl fetch fedora -R was using to dynamically determine the current list of Fedora releases is not being maintained. As in our previous discussion, I have a fix in master that will trickle down to the next beta and stable release.

For the time being, open up /bedrock/share/brl-fetch/distros/fedora with root permissions and either manually apply the changes shown here or just outright overwrite the file with the this (make sure to click "Raw").

ghost commented 2 years ago

I've succeeded in installing rawhide with sudo dnf upgrade --refresh;sudo dnf install dnf-plugin-system-upgrade;sudo dnf system-upgrade download --releasever=rawhide;sudo dnf system-upgrade reboot in the fedora stratum and booting the PC with fedora's init system.