我正在尝试使用 aptly 构建 ubuntu 存储库的本地镜像,但在发布时遇到了“操作不允许”错误。以下是我所做的;
我创建了 3 个镜像
$ aptly mirror create -with-udebs xenial \
http://archive.ubuntu.com/ubuntu xenial main universe multiverse
$ aptly mirror create -with-udebs xenial-updates \
http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse
$ aptly mirror create -with-udebs xenial-security \
http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse
$ aptly mirror update xenial
$ aptly mirror update xenial-updates
$ aptly mirror update xenial-security
创建了 3 个快照
$ aptly snapshot create snap-xenial from mirror xenial
$ aptly snapshot create snap-xenial-updates from mirror xenial-updates
$ aptly snapshot create snap-xenial-security from mirror xenial-security
合并它们
$ aptly snapshot merge snap-merged snap-xenial snap-xenial-updates snap-xenial-security
现在我想发布,但遇到了错误
$ aptly publish snapshot -distribution=xenial snap-merged
Loading packages...
Generating metadata files and linking package files...
ERROR: unable to publish: unable to process packages: link /media/user/usbdrive/aplty/full/pool/00/6f/a3e766cc601510d78861ac2f15d2_0ad_0.0.20-1_amd64.deb /media/user/usbdrive/aplty/full/public/pool/main/0/0ad/0ad_0.0.20-1_amd64.deb: operation not permitted
我的 .aptly.conf 文件如下所示
{
"rootDir": "/media/user/usbdrive/aplty/full",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": ["amd64"],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"dependencyVerboseResolve": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
"gpgProvider": "gpg",
"downloadSourcePackages": false,
"skipLegacyPool": true,
"ppaDistributorID": "ubuntu",
"ppaCodename": "",
"skipContentsPublishing": false,
"FileSystemPublishEndpoints": {},
"S3PublishEndpoints": {},
"SwiftPublishEndpoints": {}
}
我查看了目录的权限,看起来没问题
$ ls -al /media/user/usbdrive/aplty/full/public/pool/main/0/0ad/
total 64
drwxr-xr-x 2 user user 32768 Aug 19 20:29 .
drwxr-xr-x 3 user user 32768 Aug 19 20:29 ..
我在 ubuntu 16.04 上,使用带有 fat32 分区的外部驱动器通过 thunderbolt3 来存储文件。我知道路径中有一个 aplty/aptly 拼写错误,但我不认为这是问题所在。
非常希望您能指点我哪里做错了,或者如何调试这个问题。谢谢。
答案1
aptly 在发布存储库时默认使用硬链接:它将包池(所有包文件的缓存)中的文件硬链接到目录下的位置public/
。
FAT32 不支持硬链接,因此发布会因此错误而失败。我建议使用某些 Unix 文件系统以获得最佳效率,但如果这不可能,您可以配置另一个发布端点使用copy
复制文件的链接方法(因此每个已发布的存储库都需要额外的空间),但它应该在 FAT32 上运行。