new .go and .yaml file for new OS

1 view
Skip to first unread message

Steven G. Spencer

May 15, 2021, 10:50:14 PMMay 15
to LXC users mailing-list

Rocky Linux is a new Linux variant based on RHEL. I received good instructions from Stéphane Graber on grabbing the centos-http.go or oraclelinux-http.go source files, grabbing an associated .yaml file for these OS,  and simply modifying the sources (repos, download links, names, etc.) to use with the new Distro. Unfortunately, no amount of tweaking those files has come up with an image to install. It seems that there should be, somewhere (and maybe there is and I'm just not finding it) instructions on building the http.go file from scratch. (or the . yaml file, for that mater). Can someone send me in the right direction to get this done?  The OS is currently in release candidate status at the moment, but will very likely be completely released soon, as there have been very few issues. I'd love to have a rocky image that would show on "lxd image list images: | grep rocky" that would be available to install soon after the distro is released. Any help would be appreciated.

Ultimately, I get this error when using distrobuilder and modified source files for rocky:

Error: Error while downloading source: Couldn't get name of iso

I put print statements within the rocky-http.go file (modified centos-http.go) to see what is happening:

func (s *RockyOSHTTP) Run(definition shared.Definition, rootfsDir string) error {
        if strings.HasSuffix(definition.Image.Release, "-Stream") {
                s.majorVersion = strings.ToLower(definition.Image.Release)
        } else {
                s.majorVersion = strings.Split(definition.Image.Release, ".")[0]

        baseURL := fmt.Sprintf("%s/%sisos/%s/", definition.Source.URL,
        fmt.Printf("%+v\n", baseURL)
        s.fname = s.getRelease(definition.Source.URL, definition.Image.Release,
                definition.Source.Variant, definition.Image.ArchitectureMapped)
        fmt.Printf("%+v\n", definition.Source.URL)
        fmt.Printf("%+v\n", definition.Image.Release)
        fmt.Printf("%+v\n", definition.Source.Variant)
        fmt.Printf("%+v\n", definition.Image.ArchitectureMapped)
        if s.fname == "" {
                return fmt.Errorf("Couldn't get name of iso")

And this gets me the following, which shows that the "definition.Image.Release) is what is missing:

Error: Error while downloading source: Couldn't get name of iso

The empty line shows the missing release.

Thanks in advance!

Steven G. Spencer

Reply all
Reply to author
0 new messages