我想从git仓库安装自定义源,但是要使用我的包管理器(出现是为了移植)。
我已经使用Sakaki的教程使用EFI安装了Gentoo ,所以我已经出现了dev-vcs/git
。
我想要的软件包用于安装Canonical的Snapd(来自Ars Technica的背景资料),其说明如下:
Gentoo
安装snap-confine.ebuild和snapd.ebuild
'#启用对齐的systemd服务:
sudo systemctl enable --now snapd.service
首先,我试图通过将必备的git .ebuilds添加到存储库中/etc/portage/repos.conf/
(两个单独的条目)来将它们添加为存储库。我将在此处发布一个示例:
[zyga-snap-confine]
# Snapd build dependency #1
# Maintainer: obscured
location = /usr/local/portage/zyga-snap-confine
sync-type = git
sync-uri = https://github.com/zyga/snap-confine-gentoo.git
priority = 60
auto-sync = yes
我同步了回购,emaint sync --repo zyga-snap-confine
。然后,我尝试通过emerge --search
和来查找所需的软件包eix
。没有运气。
它丢掉了有关缺少布局的错误,一个主= gentoo条目...我意识到缺少元数据,但是我寄予了很高的期望。
我终于找到了有关如何使用ebuild的参考。在官方的Gentoo Wiki和此处的其他文章(从源代码安装Git,Curl和Expat)以及此处(如何在Funtoo / Gentoo中打包软件?)中,我决定:
root@Gentoo ~ # cd /opt
root@Gentoo opt # git clone https://github.com/zyga/snap-confine-gentoo.git
root@Gentoo opt # cd snap-confine-gentoo
root@Gentoo snap-confine-gentoo # ebuild snap-confine-1.0.32.ebuild manifest clean merge
但是,它返回错误:
Appending / to PORTDIR_OVERLAY...
!!! Repository 'x-' is missing masters attribute in '/metadata/layout.conf'
!!! Set 'masters = gentoo' in this file for future compatibility
ebuild: /opt/snap-confine-gentoo/snap-confine-1.0.32.ebuild: does not seem to have a valid PORTDIR structure
我是Gentoo的新手,并且在Linux上自学,并且在Gentoo论坛上找不到关于回购维护的教程(有开发人员指南,但需要很多知识)。一个理想的答案将同时提供cli方法(我假设使用git clone
...和./configure
?)以及程序包管理器版本。
即使必须创建自己的git存储库以添加缺少的元数据和布局文件,我还是希望以这种方式管理快照安装。
基于上面的@likewhoa注释,需要对ebuild的结构进行按摩。创建者在创建其git存储库时没有考虑到最新的可移植结构。
(不包括搬运目录结构一个ebuild)
在/usr/local/portage/
我决定扣局限下类别属于sys-apps
在bash根目录提示符下:
cd /usr/local/portage
git clone https://github.com/zyga/snap-confine-gentoo.git
cd snap-confine-gentoo
mkdir -pv sys-apps/snap-confine
# the Manifest file will be recreated later
rm -v Manifest
mv -v snap-confine-1.0.32.ebuild sys-apps/snap-confine/
# to avoid errors, you need your masters = gentoo reference
mkdir -v metadata
echo 'masters = gentoo' > metadata/layout.conf
cd sys-apps/snap-confine
ebuild snap-confine-1.0.32.ebuild manifest clean merge
事实证明,.ebuild的格式不正确,但具有正确的依存关系,但是我认为这些步骤提供了一个很好的教程-基于:
基于其他Gentoo存储库,我建议开发人员创建一个单独的存储库,其中包含分别位于package类别和之下的snap-confine和snapd ebuild 。sys-apps
app-emulation
然后,我们创建了一个元数据/layout.conf文件,其中包含masters = gentoo
该文件以避免移植兼容性投诉。开发人员指南还要求我们有一个profile / repo_name文件,其中标识了回购的名称。在每个软件包的文件夹中,我们创建了一个metadata.xml文件,然后运行repoman manifest
以生成清单文件。
最后,用户需要在中创建一个条目/etc/portage/repos.conf/
,sakaki-tools github repo上对此条目的说明进行了详细的说明。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句