Comments (3)
Sounds good! I haven't investigated if and why pacman was really falling back to downloading the entire file when the .sig
file is missing, but either way, with the newest release, Flexo caches .sig
files just like normal package files, so this should not be a problem anymore.
Just to reiterate: If you want pacman to directly fetch existing files from the file system instead of downloading them via HTTP and storing a redundant copy, modify your /etc/pacman.conf
to use multiple CacheDir
entries, for example:
CacheDir = /var/cache/pacman/pkg
CacheDir = /var/cache/flexo/pkg/community/os/x86_64
CacheDir = /var/cache/flexo/pkg/core/os/x86_64
CacheDir = /var/cache/flexo/pkg/extra/os/x86_64
CacheDir = /var/cache/flexo/pkg/multilib/os/x86_64
If you use any additional repositories, you need to add more CacheDir
entries.
You might also want to replace the first CacheDir
entry with:
CacheDir = /tmp/pacman_cache
to avoid redundant package files: /tmp
is usually mounted as tmpfs
, so the files disappear after reboot, which is fine since the files are still stored inside /var/cache/flexo
.
from flexo.
So far, I've dealt with this problem by setting the CacheDir
of pacman to /tmp/pacman_cache
. This means files are still stored redundantly, but are removed after each reboot due to /tmp
being mounted as tmpfs. Also, it's all stored in RAM, so you don't have any additional wear-and-tear on your SSD. But I understand that this is not ideal if you don't have enough RAM to waste.
It might be possible to solve this problem without making any changes to Flexo: according to man 5 pacman.conf
, it's possible to set multiple directories as CacheDir
:
Multiple cache directories can be specified, and they are tried in the order they are listed in the config file.
However, currently it does not work to just set something like:
CacheDir = /tmp/pacman_cache /var/cache/flexo/pkg/community/os/x86_64 /var/cache/flexo/pkg/core/os/x86_64 /var/cache/flexo/pkg/extra/os/x86_64 /var/cache/flexo/pkg/multilib/os/x86_64
But this seems to be due to the fact that Flexo currently does not cache .sig
files. So, if pacman doesn't find the .sig
files (along with the actual package file) in the local file system, it fetches both the .sig
file and the package file via HTTP.
I've created a separate issue for this (#65). As soon as Flexo caches .sig
files, I'll have a closer look at this.
from flexo.
Thanks for the reply!
Firstly I learned something new today, didn't knew I could specify multiple cache directories in pacman.conf
.
You wrote:
However, currently it does not work to just set something like:
CacheDir = /tmp/pacman_cache /var/cache/flexo/pkg/community/os/x86_64 /var/cache/flexo/pkg/core/os/x86_64 /var/cache/flexo/pkg/extra/os/x86_64 /var/cache/flexo/pkg/multilib/os/x86_64
I found out that using it as:
CacheDir = /tmp/pacman_cache
CacheDir = /var/cache/flexo/pkg/core/os/x86_64
CacheDir = /var/cache/flexo/pkg/extra/os/x86_64
... etc ...
Is actually a valid solution for the local pacman.. !
I've tested it with a single package that I've downloaded from remote machine that used Flexo as its mirror, and then tried to install that same package on the Flexo server, it worked thus it did not seem that .sig
was required...
Although I've seen in /var/cache/pacman
that only some packages are being fetched with .sig
files alongside, which makes me wonder whether you are right about pacman falling-back to downloading when it will not find a .sig
alongside a particular package.
from flexo.
Related Issues (20)
- add liveness/readyness enpoints HOT 3
- Feature Request: Object Storage (S3) HOT 3
- [Potential Bug] DemarshallError(Error("unknown variant `ftp`, expected one of `http`, `https`, `rsync`", line: 1, column: 227697)) HOT 3
- [Potential Bug] JSON fallback is not used
- Docker `latest` tag not updated HOT 1
- Flexo docker fails to start: "No such file or directory", then "Unable to fetch mirrors remotely" HOT 2
- [feature request] Prefetch HOT 4
- [Potential Bug] High CPU useage due to stuck fetch cycle HOT 5
- serving databases (core.db, extra.db, community.db, ...) HOT 7
- IO Error using Linux 5.16.12 and ZFS 2.1.2 HOT 2
- Improve validation for GET request path
- Is Flexo expected to be run with a reverse proxy? HOT 1
- [Question] Can you listen on multiple ip addresses? HOT 1
- signature from <package> is invalid HOT 23
- Listen to multiple IPs HOT 1
- ARM cache issues HOT 1
- Panic on nonexistent `latency_test_results.json` due to invalid status.json format HOT 1
- Implement support for Manjaro
- Flexo stops working from time to time HOT 2
- Different mirrors serving the same package with different size HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexo.