Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15247 closed bug (fixed)

Package repositories non-functional in minimum image

Reported by: simonsouth Owned by: nobody
Priority: normal Milestone: R1/beta2
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Building a new minimum image (i.e. jam -q j2 @minimum-raw) for x86_64 from the latest code in git (hrev53369), booting into it via QEMU and trying to refresh the package repository with "pkgman repository" at the terminal fails with

Fetching repository checksum from https://eu.hpkg.haiku-os.org/haiku-master/x86_64/current...
*** failed! General system error

This is the case even after applying the workaround described in ticket #15230, i.e.

mkdir ~/config/cache/package-repositories
cp /system/cache/package-repositories/* ~/config/cache/package-repositories 

Installing packages fails in a similar way: pkgman tries to refresh each repository, which fails with "General system error", then offers to install the package anyway but after entering "yes" at the prompt this fails with (e.g.)

*** Failed to download package jam: General system error

Basically, package repositories seem completely unusable in fresh builds.

Change History (8)

comment:1 by waddlesplash, 5 years ago

This is only a problem in minimum builds, nightly builds work fine: OpenSSL isn't included in minimum builds. That pkgman returns a generic error instead of the "Unsupported" message the Network Kit is returning is a separate bug.

comment:2 by simonsouth, 5 years ago

Should the minimum builds include OpenSSL then? I get the idea is to omit as many non-essential packages as possible, but producing an image that includes software that can't be used sounds really broken to me.

Or is the idea to keep the minimum builds as small as possible and expect the builder to add any additional packages he wants via UserBuildConfig? In that case, I wonder if perhaps pkgman should be omitted, since there's little point in including it if it's guaranteed not to work.

Alternatively, is this another BuildFeature-type situation, where OpenSSL should be specified as a dependency for pkgman but currently isn't?

comment:3 by waddlesplash, 5 years ago

In this case I think the build feature is not enabled at all, so then BSecureSocket will not be built against OpenSSL and just return "not supported" for everything. Pretty annoying those error codes arent propagating correctly.

At this point we should probably put OpenSSL in the minimum image indeed. It is too much of a requirement to use the internet at all these days.

comment:4 by simonsouth, 5 years ago

I'll make this change, but adding OpenSSL to the minimum image (via AddHaikuImagePackages in UserBuildConfig) doesn't actually change the behaviour. pkgman still fails with "General system error".

Can you think of what else pkgman might be dependent on? Otherwise I'll try to divine this from the code.

comment:5 by waddlesplash, 5 years ago

UserBuildConfig changes don't add packages because of a bug that I don't have a bookmark to at the moment. We should just add it globally at this point anyway.

comment:6 by simonsouth, 5 years ago

Tiny patch uploaded here for review: https://review.haiku-os.org/c/haiku/+/1715

In this case I think the one-line change to DefaultBuildProfiles is appropriate (I did consider other options). But I'm open to feedback.

I've tested this on x86_64 and it works fine: pkgman is usable within the image built with "jam -q @minimum-raw".

comment:7 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed

Fixed merged in hrev53371. Thanks!

comment:8 by nielx, 5 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.