Public Guide
For anyone who wants to look at a Folio site or install software from it. You need no account.
A Folio site builds Devuan packages from projects that live on a forge (a
website for git repositories), and offers them in two ways: as web pages
you can read, and as an apt archive your computer can install from.
These pages use https://dur.example.org for the site; write your
site's own address instead.
Looking around
| To see | Go to |
|---|---|
| every package | Packages, All packages in the menu, or the search box at the top (if the site has one). The list is the AUR's: the most popular first, and on a site with the search, criteria to search by name, keyword or person, to show only packages flagged out of date (or not) or without a maintainer (Orphans), sorted by any heading and in pages |
| what a package is, who looks after it, where its source lives | the package's own page |
| whether it was built, and the full log of each build | Packages, Builds |
| what is waiting for a second pair of eyes | Packages, Waiting for review |
| what people asked to be done with packages | Packages, Requests |
| projects found on the forge that nobody has let in yet (and, when there are none, why) | Packages, Found on the forge |
| who takes part | Community, People |
| the newest 300 changes, and who made them | Community, Changes |
| copies of the site kept elsewhere | Community, Mirrors |
| the guides, with this site's own addresses | Help, Guides (if the site has them) |
| how to get an account | Help, Taking part |
The Theme menu changes the colours. Your choice is kept in one cookie. Nothing else is stored about you, and no page runs any code.
There are also two files for programs, linked at the bottom of every
page: Data (JSON) (packages.json, every package) and News feed
(feed.xml, the newest uploads, for a news reader).
Installing with apt
apt is the program that installs packages on Devuan. It only trusts places it has been told about, so first tell it about the site. You do this once per computer.
1. Add the site to apt
The site offers a short script, setup.sh, that does this for you.
-
Fetch the script:
curl --proto '=https' -fsSLO https://dur.example.org/apt/setup.shcurldownloads a file.-fmakes it stop on an error instead of saving an error page.-sSkeeps it quiet but still shows errors.-Lfollows a redirect.-Osaves the file under its own name,setup.sh. You should see nothing: no output means it worked. -
Read it if you like:
less setup.sh. It is short. Then compare it with what the site's owner gave you another way (in person, in a signed mail, on another site of theirs):sha256sum setup.sh grep '^FINGERPRINT=' setup.shThe first shows the script's checksum, which the site's home page shows too, under "Install"; the second the fingerprint of the site's key, which the script checks the key against before apt uses it. The home page, the script and the key all come from the same server, so they can only vouch for each other: whoever controls that server, or the way between you and it, can change all three together. A checksum and a fingerprint the owner gave you another way cannot be changed with them. If they differ, do not run the script; ask the owner.
-
Run it:
sudo sh setup.shIt does five things, and numbers them as it goes:
Fetching the site's key: it fetches the site's public key, checks that its fingerprint is the one written into the script, and printskey fingerprint: .... It keeps the key in/etc/apt/keyrings/for a few moments.Telling apt where the site is: it writes one file that tells apt the site's address, your release, the parts you chose, and to check the site with that key only. (Built packages only: the archive holds no source packages. A package's source is a download on its page.)Reading the package lists: it runsapt-get update.Installing the site's keyring package: it installs the site's own packageWORD-archive-keyring(for exampledur-archive-keyring), which holds the same key in/usr/share/keyrings/. It installs exactly the version the site's archive serves, as apt read it in step 3 (going back down from a higher version, which only someone with a stolen signing key could have made), and takes it only if the key file it installs is byte for byte the key of step 1. It saysapt checks the site with /usr/share/keyrings/folio-WORD-archive-keyring.gpg from now on,points the file of step 2 at that key, and removes the key of step 1.Reading the package lists again:apt-get updateonce more.
At the end you should see
Done. Install a package with: sudo apt install PACKAGE.Why a keyring package. The site changes its signing key now and then, and its owner renews it before it runs out (a signing key lasts a year unless the site sets another lifetime). Each time, the site publishes a new version of the keyring package, and your
sudo apt upgradeinstalls it like any other update. That is how your computer learns of the site's new signing keys, and stops trusting old ones, without runningsetup.shagain. Upgrade at least every two weeks or so: a new signing key is published two weeks (unless the site sets another time) before it starts to sign. Do not remove the keyring package by hand; apt could no longer check the site.The files it writes are named after the site, so that two such sites can be used side by side. The list in
/etc/apt/sources.list.d/starts with# Added by setup.sh ofand the site's address, and a line with the site's key, which mark it as written by this site's script. If the site changed its short name or its address since you last ran the script, it first removes the files it wrote then, so that apt does not list the site twice, and says so:removed /etc/apt/sources.list.d/folio-OLD.list, which an earlier setup.sh of this site wrote. With such a file goes the key it named, ifsetup.shwrote that key. It touches no other file. It installscurlandca-certificatesifcurlis missing.It finds out which release your computer is: first the one your own apt fetches your system from (in
/etc/apt/sources.listand/etc/apt/sources.list.d/;unstablecounts assidon Debian andcereson Devuan,testingas the testing release's name), then the name in/etc/os-release, and takes the first of these the site builds for. Both are needed because they can differ: Debian unstable calls itselfforkyin/etc/os-release, and Devuan's testing and unstable both sayfreia ceres. It prints the one it took (release: ceres). If the site builds for none of them, it stops before it changes anything:setup: this site does not build for this computer's release, or the script cannot tell which it is (apt's sources and /etc/os-release name: bookworm; the site builds for: daedalus excalibur freia ceres). If you know it is one of those: sudo sh setup.sh --release NAME.--release NAMEnames it yourself (one the site builds for).If the keyring package cannot be installed, the script says
The keyring package could not be installed.and still ends withDone.: apt then checks the site with the key of step 1, which nothing keeps up to date. Run the script again later.If the keyring package's key file is not the site's key, the script says
REFUSED: /usr/share/keyrings/folio-WORD-archive-keyring.gpg, which the keyring package VERSION installed,is not byte for byte the site's key fetched in step 1, so it is not used.and ends withsetup: the site's keyring package does not hold the site's key; apt checks the site with /etc/apt/keyrings/folio-WORD-setup.gpg for now (see above). A mirror that has not caught up yet does this (try again later, or without--from); otherwise the archive you reached is not the site's: tell the site's owner.After the site's signing key was stolen. For a while (90 days at most) the site signs its archive with the stolen key too, beside the new one, so that
sudo apt updateandsudo apt upgradebring your computer the keyring package that revokes the stolen key, by themselves. If your computer did not upgrade in that time, apt says the archive's signature cannot be checked (NO_PUBKEY): runsetup.shonce more, as above.The check of the key needs
gpg. Without it the script stops before it changes anything:setup: gpg is not installed, so the site's key cannot be checked; nothing was changed. Install it (sudo apt install gnupg), then run this again.It then names the command that goes on without the check, with the parts you asked for. Install it (sudo apt install gnupg) and run the script again. Only if you cannot,sudo sh setup.sh --no-checktakes the key unchecked; it then sayskey NOT checked (--no-check)and prints the fingerprint the key should have, so that you can compare it yourself later (gpg --show-keys /usr/share/keyrings/folio-*-archive-keyring.gpg).
This adds the reviewed part of the site (main): packages one of the
site's administrators or its owner made or looked at and approved. The
owner's own packages are the owner's to approve: what an administrator
uploads to one of them waits until the owner has approved it.
To also get the packages nobody has reviewed yet (the part unsafe):
sudo sh setup.sh main unsafe
Only do that if you are ready to judge those packages yourself. Running
the script again with other parts replaces the earlier choice. (main is
always added, even to sudo sh setup.sh unsafe: the keyring package is
there. apt still takes nothing from it unless you ask by name.)
When to run it again. Only if the site tells you to, or if apt says it
cannot check the site's signature (NO_PUBKEY). That happens after the
site's signing key was stolen and revoked: your computer must fetch the
site's key anew, and the script does that, checking it again. Run it the
same way as the first time.
2. Install
sudo apt install PACKAGE
Each package's page shows its exact commands, and says so if the
package is in the unreviewed part. A package can be installed once one
of its builds is marked published on that page. Updates arrive with
your normal sudo apt upgrade.
If Devuan has a package of the same name, apt keeps taking Devuan's
unless you ask for the site's by its version
(sudo apt install PACKAGE=VERSION). The site marks its archive that way
on purpose: adding it never replaces what you already have.
3. Installing from a mirror
A mirror is a copy of the site's archive kept on another server. If the site lists mirrors, its Mirrors page shows the command for each, for example:
sudo sh setup.sh --from https://mirror.example.net/apt
The packages then come from the mirror, but the key still comes from the site itself, and apt checks every list of packages against it. A mirror cannot change what you install.
4. Leaving again
sudo sh setup.sh --remove
This takes the site out of apt's sources, removes the keyring package and the site's key, and the files an earlier run wrote under an older short name or address of the site. It ends with:
The site is no longer in apt's sources, and its key is gone. What you
installed from it stays; remove a package with: apt remove PACKAGE
Downloading a package directly
Some people prefer to fetch a .deb file themselves. There are up to
three places, depending on how the site was set up.
| Where | How |
|---|---|
| The site's archive | open https://dur.example.org/apt/pool/, then the part (main or unsafe), then the package's first letter (for a name starting with lib, the first four letters, such as libf), then the package's folder |
| The forge's package list, if the site fills it | on the forge, the Packages tab of the site's account (https://forge.example.org/you/-/packages); each package has a page with its files |
| The site's repository on the forge, if it publishes one | the repository named after the site's short name and -site (for example dur-site), folder apt/pool/. Its front page is a table of every package |
Install a downloaded file with:
sudo apt install ./PACKAGE_VERSION_amd64.deb
The ./ tells apt it is a file, not a package name. apt fetches
whatever else it needs.
A file downloaded this way does not update by itself, and apt has not checked its signature. Installing with apt from the site (above) does both.
How do I know the packages are what the site built?
- Every list of packages the site offers is signed with the site's own key. apt checks that signature on every update and refuses anything that was changed on the way. The home page shows the key's fingerprint, the signing key that signs now and when it runs out.
- Each package's page says where its source lives, shows exactly what was built from it, and links to the full log of every build.
- On a site that verifies its builds, each build is built a second time by a different build node and the two results are compared. The Builds page shows "verified" when they are byte for byte the same, and "not reproducible" when they are not. Whether a build that did not match is still published is the site's choice.
- What people decide on the site (accounts, packages, votes, comments,
settings) is listed on the Changes page with who did it. Each change
is a commit in the site's record, signed with the site's key, and a
change a person asked for keeps their own request in it, signed with
their GPG key. The site's owner can check them all, and so can anyone
with a copy of the record: a site that publishes to a forge offers it
there as a repository (for example
dur-record). The site's public key, to check against, ishttps://dur.example.org/apt/archive-keyring.asc. The programfolio-auditdoes the whole check on your own computer, by the same rules the site keeps, and says plainly when the key it checks with is not the one the record names (see Auditing a Site). The copy on the forge is sent there only to a forge server whose SSH host key an administrator confirmed. The owner can take something out of that history; when that happens, the Changes page says so, with the reason.
Getting the source
Each package's page says where the project lives ("Lives at"). That is its own repository on a forge; clone it from there. The site itself hosts no repositories.
The same page also links to the files of the newest version ("look at
the files") and to a download of its source as one .tar.gz file.
Taking part
You need an account, which someone already there has to vouch for. See the Member Guide.
Taking part goes over SSH. The first time, ssh asks whether to trust the server's key. The site publishes its keys on its pages, so you can check them before you answer:
curl -fsS --proto '=https' https://dur.example.org/ssh-host-keys | ssh-keygen -l -f -
shows their fingerprints (the home page shows the same, under "Take
part"). Answer yes only if the one ssh shows is among them. Or add the
keys to the ones ssh knows, and ssh asks nothing:
curl -fsS --proto '=https' https://dur.example.org/ssh-host-keys >> ~/.ssh/known_hosts.
See Checking the site's key.
Plain ssh can only look. Every change (a vote, a comment, a flag) goes
with the folio command, from the package folio-client, which signs it
with your own GPG key, or with the Desktop Program,
which does the same. The Member Guide
says how to set it up.
Using a site
Setting one up
Running one
- Owner and Administrator Guide
- Backup and Restore
- Settings Reference
- Command Reference
- Troubleshooting
Checking one