Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 15BFE781A72 for <~alpine/devel@lists.alpinelinux.org>; Mon, 2 Dec 2019 21:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1575320621; bh=UgTA57P8gRXqd6qSLUWqNfwyIHOTMlbu9qhOndLebu0=; h=In-Reply-To:Date:Subject:From:To; b=rb0earxWU97PgGl/0eOC7bba/1kMC7vYbrtsoALSaKflRy0M2388c7iXkqXzr+nYP FqERSlfKC3hz0nllicuCUIyaRfZibCi7Xz9Cd8ugRkUWlUDm4x5CeJor2k65i2UC56 fLly3TkoGyjMaKsNmoQ6rmU7OQyXbj/AFoyaJi/A= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Originaldate: Mon Dec 2, 2019 at 3:09 PM Originalfrom: "Rasmus Thomsen" Original: =?utf-8?q?Hello_list, =0D=0A=0D=0AI'd_like_to_propose_adding_variants_to_a?= =?utf-8?q?pk,_see_further_detail_in_the=0D=0ARFC_I've_attached_below_(I_g?= =?utf-8?q?uess_I_should_make_a_gitlab_issue_for_that=0D=0A(=3F))=0D=0A=0D?= =?utf-8?q?=0A##_Objective=0D=0A=0D=0AIt's_hard_unifying_the_diverse_desir?= =?utf-8?q?es/requirements_of_users_with_one=0D=0Apackage,_as_such_we_have?= =?utf-8?q?_some_packages_twice_in_the_aports_tree,_both=0D=0Abuilt_from_t?= =?utf-8?q?he_same_source_but_with_different_configurations,_e.g.=0D=0A"po?= =?utf-8?q?lkit"_and_"polkit-elogind"._I_propose_instead_of_having_two=0D?= =?utf-8?q?=0Adifferent_packages_built_from_different_APKBUILDs_(each_havi?= =?utf-8?q?ng_to_be=0D=0Amaintained_separately)_having_one_APKBUILD_that_b?= =?utf-8?q?uilds_two_"variants"=0D=0A(or_flavours_or_however_you_want_to_c?= =?utf-8?q?all_it)=0D=0A=0D=0A##_Motivation=0D=0A=0D=0ADifferent_users_hav?= =?utf-8?q?e_different_priorities:_Some_want_completely_minimal=0D=0Apacka?= =?utf-8?q?ges,_others_want_at_least_a_baseline_of_features._This_RFC=0D?= =?utf-8?q?=0Aactually_was_spawned_by_=0D=0Ahttps://gitlab.alpinelinux.org?= =?utf-8?q?/alpine/aports/merge=5Frequests/1051._Some=0D=0Ausers_want_Puls?= =?utf-8?q?eaudio_to_be_enabled_in_FF,_others_strongly_oppose_it.=0D=0AIt'?= =?utf-8?q?d_be_nice_if_we_could_satisfy_both.=0D=0A=0D=0AHaving_variants_?= =?utf-8?q?has_multiple_advantages:=0D=0A*_It's_less_maintenance_effort._I?= =?utf-8?q?nstead_of_having_to_care_about_two=0D=0AAPKBUILDs_which_only_di?= =?utf-8?q?ffer_in_one/a_few_configure=0D=0Aoptions/dependencies_=0D=0Aone?= =?utf-8?q?_only_has_one_APKBUILD_which_can_build_two_packages.=0D=0A*_It'?= =?utf-8?q?s_cleaner:_E.g._the_polkit_&_polkit-elogind_can_be_a_bit_messy?= =?utf-8?q?=0D=0Asince_you_need_replaces&provides_for_it_to_work._Right_no?= =?utf-8?q?w_you=0D=0Acan't_install_polkit-dev_and_polkit-elogind_at_the_s?= =?utf-8?q?ame_time.=0D=0A=0D=0A##_Design_Proposal=0D=0A=0D=0AHave_an_opti?= =?utf-8?q?onal_`build=5Foptions`_(or_similiar,_`options`_is_already=0D=0A?= =?utf-8?q?taken)_field_in_APKBUILDs_where_you_can_specify_build_options_(?= =?utf-8?q?e.g.=0D=0A`pulseaudio`)._Afterwards_you_can_do_`$(option_pulsea?= =?utf-8?q?udio_`),_e.g._`makedepends=3D"..._$(option_pul?= =?utf-8?q?seaudio_pulseaudio-dev)`=0D=0Ato_only_add_pulseaudio_to_makedep?= =?utf-8?q?ends_if_the_option_is_enabled,_or=0D=0A`$(option_pulseaudio_--e?= =?utf-8?q?nable-pulseaudio_--disable-pulseaudio)`_to=0D=0Aenable/disable_?= =?utf-8?q?pulseaudio_in_the_./configure_if_the_option_is=0D=0Aenabled/dis?= =?utf-8?q?abled.=0D=0A=0D=0AThere_are_multiple_ways_to_tackle_the_apk_sid?= =?utf-8?q?e_of_things:=0D=0A=0D=0AA)_Have_an_abuild-only_implementation:?= =?utf-8?q?=0D=0A=0D=0AAbuild_could_automatically_generate_a_`$pkgname-$op?= =?utf-8?q?tionname`_(e.g.=0D=0Afirefox-pulseaudio)_package_from_this_(I_s?= =?utf-8?q?uppose_it'd_need_firefox-=0D=0Apulseaudio-$subpackages[@]_too)_?= =?utf-8?q?and_add_the_`provides`/`replaces`_for=0D=0Athis._This_does_intr?= =?utf-8?q?oduce_some_magic,_but_IMHO_this_is_worth_it_since=0D=0Adoing_th?= =?utf-8?q?is_manually_each_time_is_tedious_and_error_prone.=0D=0A=0D=0AB)?= =?utf-8?q?_Have_integration_with_apk_too.=0D=0A=0D=0AInstead_of_exposing_?= =?utf-8?q?the_fact_that_abuild_generates_multiple_versions=0D=0Aof__the_p?= =?utf-8?q?ackage_to_the_user_via_package_names_we_could_have_some=0D=0Asp?= =?utf-8?q?ecial_syntax_for_it,_e.g._`firefox[pulseaudio]`_instead_of_`fir?= =?utf-8?q?efox-=0D=0Apulseaudio`_and_have_apk_handle_the_`provides`/`repl?= =?utf-8?q?aces`.=0D=0A=0D=0A###_Alternatives_Considered=0D=0AWe_could_kee?= =?utf-8?q?p_going_like_we_currently_do_and_only_expose_a_minimal=0D=0Avar?= =?utf-8?q?iation_of_packages,_but_IMHO_this_usually_leads_to_some_party_b?= =?utf-8?q?eing=0D=0Aunhappy_with_the_direction_a_package_is_going_(too_fe?= =?utf-8?q?ature_packaged_and=0D=0Abloated_vs._too_minimal_etc.)._This_als?= =?utf-8?q?o_needs_less_mirror_space,_but=0D=0AIMHO_we_shouldn't_use_the_v?= =?utf-8?q?ariants_too_often_either_(only_in_cases=0D=0Awhere_we_can't_opt?= =?utf-8?q?ionalise_the_dependency,_e.g._in_firefox_vs_firefox-=0D=0Apulse?= =?utf-8?q?audio,_polkit_vs_polkit-elogind_etc.),_so_I_expect_the_impact_t?= =?utf-8?q?o=0D=0Abe_negligible.=0D=0A=0D=0A=0D=0ARegards,=0D=0A=0D=0ARasm?= =?utf-8?q?us=0D=0A=0D=0A?= In-Reply-To: Date: Mon, 02 Dec 2019 16:03:40 -0500 Subject: Re: [RFC] Package variants (options) in apk From: "Drew DeVault" To: "Rasmus Thomsen" , <~alpine/devel@lists.alpinelinux.org> Message-Id: I don't mean to be a debbie-downer here, but I feel like if this is desirable to you then what you're looking for is Gentoo. I'm NACK on this feature for Alpine/apk. I think maybe a compromise could be APKBUILDs which have build-time configurability, kind of like what we already have for packages which can be bootstrapped (e.g. gcc). But I don't think that would find its way into the binary repos or ever be a mainstream feature, and I'm generally against it becoming a widespread habit in aports.