0

I'm trying to build a local mirror of the ubuntu repository using aptly and I'm hitting an "operation not permitted" error at the point of publishing. Here is what I'm doing;

I've created 3 mirrors

$ 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

created 3 snapshots

$ 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

merged them

$ aptly snapshot merge snap-merged snap-xenial snap-xenial-updates snap-xenial-security

and now I want to publish, which is where I hit the error

$ 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

My .aptly.conf file looks like this

{
  "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": {}
}

I've looked at the permisions on the directories and they look ok

 $ 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 ..

I'm on ubuntu 16.04 and I am using an external drive with a fat32 partition over thunderbolt3 to store the files. And I know that there is a aplty/aptly typo in the path but I don't believe that is the problem.

I'd really appreciate some pointers on what I'm doing wrong or how else to debug this. Thanks.

rvabdn
  • 235
  • 2
  • 11

1 Answers1

0

aptly is using hard links by default when publishing repositories: it hard links files in the package pool (cache for all the package files) to the location under directory public/.

FAT32 doesn't support hard links, so publishing fails with this error. I would recommend to use some Unix filesystem for best efficiency, but if that is not possible, you can configure another publishing endpoint with copy link method which copies files (so each published repository takes additional space), but it should work on FAT32.