Received: from kernel.crashing.org (kernel.crashing.org [76.164.61.194]) by mx.groups.io with SMTP id smtpd.web12.804.1626384500544587127 for ; Thu, 15 Jul 2021 14:28:20 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=permerror, err=syntax error for token: (domain: kernel.crashing.org, ip: 76.164.61.194, mailfrom: mark.hatle@kernel.crashing.org) Received: from Marks-MacBook-Pro-16.local ([76.164.61.198]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 16FLSHns018621 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 15 Jul 2021 16:28:18 -0500 Subject: Re: Image creation using RPM/DNF and adding a third party repository configuration From: "Mark Hatle" To: Patches and discussions about the oe-core layer Cc: jaewon.lee@xilinx.com References: Message-ID: <0495e6e4-7058-571b-d62b-90d2a0010c86@kernel.crashing.org> Date: Thu, 15 Jul 2021 16:28:17 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 7/15/21 4:24 PM, Mark Hatle wrote: > We have the desire to add a 3rd party repository to our standard images > generated by OE image generation. We do this by adding a recipe > (my-external-repo.bb) that creates a package that adds a repository > configuration file to ${sysconfdir}/yum.repos.d/my_external.repo. > > If the package is added to the INSTALL_IMAGE, then when it processes the > IMAGE_FEATURES the system will fail with SSL errors trying to access the new > third party repository. > > What I believe is happening is that the system (first pass) installs all of the > main packages, including this repository configuration. It then starts a second > pass to install -dev, -src or other components. This second pass fails with the > SSL errors (like DNF can't access the SSL certification(s) it needs.) But even > if the SSL issue wasn't really a problem, it does point out that DNF is trying > to access the network and could install something from this third party > repository, which I don't think is desired. > > An alternative could be to add the third party repository via the ROOTFS POST > install actions, but this has the problem that we won't be able to update the > repository if something changes (via a package). > > I'm thinking this MIGHT be a bug in the current implementation, that if someone > injects a config file it can cause the system to use alternative repositories. > So should we be checking the directory between passes and sanitizing it? > > Looking for suggestions... > > Thanks! > --Mark >