Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o, "Michał Górny" <mgorny@g.o>, "Andreas K. Hüttel" <dilfridge@g.o>, Sam James <sam@g.o>
Cc: binhost@g.o
Subject: Re: [gentoo-dev] New project: binhost
Date: Wed, 24 Feb 2021 10:29:59
Message-Id: d6c7f72d-1368-671e-3851-98937e2ed6a9@gentoo.org
In Reply to: Re: [gentoo-dev] New project: binhost by Zac Medico
1 On 2/23/21 12:33 PM, Zac Medico wrote:
2 > On 2/23/21 12:05 PM, Zac Medico wrote:
3 >> On 2/23/21 11:46 AM, Zac Medico wrote:
4 >>> On 2/20/21 8:17 PM, Zac Medico wrote:
5 >>>> IUSE_RUNTIME will obviously introduce conditionals in binary package
6 >>>> dependencies, but we should welcome these conditionals because they will
7 >>>> provide useful flexibility.
8 >>>>
9 >>>> I think IUSE_RUNTIME will be a very nice feature to have for project
10 >>>> binhost, since it will allow binary package dependencies to behave with
11 >>>> flexibility that more closely resembles the flexibility of ebuild
12 >>>> dependencies.
13 >>>
14 >>> We can borrow paludis's notion of pbins [1] to generate ebuilds which
15 >>> install pre-built content, and the generated ebuilds could have USE
16 >>> flags that behave similarly to IUSE_RUNTIME in the sense that changes to
17 >>> USE flags will result in different builds of pre-built content being
18 >>> installed. A content-hash distfiles layout [2] could serve as a
19 >>> convenient way to store separate builds of pre-built content for
20 >>> multiple combinations of USE flags, and a generated ebuild would index
21 >>> the build by USE flag combination.
22 >>>
23 >>> Also, for the generated ebuilds, we can generate USE flags to include
24 >>> separate SRC_URI downloads for pre-built content to support things like
25 >>> FEATURES=split-debug and FEATURES=install-sources.
26 >>
27 >> Note that all of this can use existing EAPI features, since everything new
28 >> would be implemented in an ebuild generator that generates a single
29 >> ebuild to index pre-built content from multiple binary package builds.
30 >>
31 >>> [1] https://paludis.exherbo.org/overview/pbins.html
32 >>> [2] https://bugs.gentoo.org/756778
33 >>
34 >
35 > For generated ebuilds, we'll have a choice to model things as USE flags
36 > or sub-packages. For example, content from FEATURES=split-debug and
37 > FEATURES=install-sources content might make more sense to model as
38 > sub-packages than USE flags. It makes more sense to generate a
39 > sub-package when there is a need for the sub-package to have USE flags.
40 > For example, a split-debug sub-package can have USE flags which index
41 > pre-built content from builds for multiple USE flag combinations.
42 > Similar USE flags could be useful for an install-sources sub-package if
43 > the source code has patches which are conditional on USE flags.
44
45 Since the generated ebuilds are inspired by pbins, we might call them
46 "ebins". Once we have designed an ebin generation process that we're
47 happy with, we should consider making it part of an EAPI, so that
48 package managers can generate "ebins" on request. The EAPI should
49 include ways to split out files and distribute them separately based on
50 USE flags and/or sub-packages, so that binhost users can easily filter
51 which files are installed based on USE configuration.
52
53 We can automatically map user's splitdebug and installsources FEATURES
54 settings into USE settings, in the same way that FEATURES=test
55 automatically maps to USE=test.
56
57 Each generated ebuild (ebin) will use its SRC_URI metadata to index
58 builds for each USE flag combination for which a build exists. For
59 example, for 3 USE flags, up to 8 combinations will be indexed:
60
61 IUSE="a b c installsources splitdebug"
62 SRC_URI="
63 !a? !b? !c? ( mirror://binhost/24fe6bd377 )
64 !a? !b? c? ( mirror://binhost/fbe14cbb02 )
65 !a? b? !c? ( mirror://binhost/1dfff1f2ac )
66 !a? b? c? ( mirror://binhost/ae60f2940d )
67 a? !b? !c? ( mirror://binhost/2976e1acc0 )
68 a? !b? c? ( mirror://binhost/f4809db70c )
69 a? b? !c? ( mirror://binhost/ecd08466cf )
70 a? b? c? ( mirror://binhost/0c00f33b2e )
71 installsources? (
72 !a? !b? !c? ( mirror://binhost/063a14d6c7 )
73 !a? !b? c? ( mirror://binhost/f67c311625 )
74 !a? b? !c? ( mirror://binhost/1dfff1f2ac )
75 !a? b? c? ( mirror://binhost/17a673e16a )
76 a? !b? !c? ( mirror://binhost/914d1cecfe )
77 a? !b? c? ( mirror://binhost/ca18d86a2b )
78 a? b? !c? ( mirror://binhost/6bce13471a )
79 a? b? c? ( mirror://binhost/3a6bdcd228 )
80 )
81 splitdebug? (
82 !a? !b? !c? ( mirror://binhost/29b2f38c41 )
83 !a? !b? c? ( mirror://binhost/8adc9bef51 )
84 !a? b? !c? ( mirror://binhost/954d2ce484 )
85 !a? b? c? ( mirror://binhost/32a614aaca )
86 a? !b? !c? ( mirror://binhost/3548a2302d )
87 a? !b? c? ( mirror://binhost/e0c02cdc88 )
88 a? b? !c? ( mirror://binhost/f9cbd3c181 )
89 a? b? c? ( mirror://binhost/31d4c03474 )
90 )
91 "
92
93 For installsources, we can automate deduplication, so that we can
94 distribute the same file content for multiple USE combinations when
95 appropriate. If all of the combinations have identical content, then it
96 will look like this:
97
98 installsources? (
99 !a? !b? !c? ( mirror://binhost/063a14d6c7 )
100 !a? !b? c? ( mirror://binhost/063a14d6c7 )
101 !a? b? !c? ( mirror://binhost/063a14d6c7 )
102 !a? b? c? ( mirror://binhost/063a14d6c7 )
103 a? !b? !c? ( mirror://binhost/063a14d6c7 )
104 a? !b? c? ( mirror://binhost/063a14d6c7 )
105 a? b? !c? ( mirror://binhost/063a14d6c7 )
106 a? b? c? ( mirror://binhost/063a14d6c7 )
107 )
108
109 In order to ensure that an ebin is not selected for a USE combination
110 that has not been built yet, combinations for existing builds will be
111 listed in REQUIRED_USE, like this:
112
113 REQUIRED_USE="
114 || (
115 ( !a !b !c )
116 ( !a !b c )
117 ( !a b !c )
118 ( !a b c )
119 ( a !b !c )
120 ( a !b c )
121 ( a b !c )
122 ( a b c )
123 )
124 "
125
126 --
127 Thanks,
128 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] New project: binhost Zac Medico <zmedico@g.o>