-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add archlinux repo config #27
Conversation
But also - reconsider repository layout - currently there is needlessly deep structure (vm/archlinux/pkgs) - I think at least the last part is not necessary. |
Afaik:
|
Actually @neowutran solution is correct and that what I have done in my failed community repository attempts. You can also install |
Please check the package qubes-vm-keyring that enable trust, first by copying the GPG keys: Then by updating the trust: |
Of course this can be removed from qubes-core-agent-linux afterwards. |
Will the archlinux.qubes-os.org be considered a qubes-contrib repo? Otherwise as @ptitdoc says there is scaffolding in core-agent-linux to bootstrap a qubes archlinux repo. Are we simply moving it over here and adding the Qubes signing keys + repo, or do we want to just add the Qubes signing keys+repo to core-agent-linux? |
Actually it is defined as a sub-package called But it make sense to put it in qubes-meta-packages instead as it allow managing all repositories GPG keys from a single git repository. |
Yes, exactly - since now we have qubes-meta-package repository, it is the right place for such files (it didn't existed at the time when previous attempts at Arch were made). |
Do you need help on this ? I can migrate the repository management code if you want. |
18d453a
to
5e2e25b
Compare
Sorry I through about something: Pacman has no drop-in directory by default for repositories. So we setup the drop-in directory in core-agent-vm: Maybe we should do the same here (using exactly the same markers in pacman.conf to avoid conflicts with core-agent). This way we can really use this package as bootstrap for enabling qubes-repository. |
Ah, I moved the part about placing files in |
I would say keep the dropin support in both. For core agent we need the proxy configuration & all. |
Right, core-agent needs dropin support too. The install logic clears the content between markers, so when added here, it will break proxy on update (until core-agent fixes it). |
If I remember markers are just for enabling droppins in /etc/pacman.d, and even if we clear them every time, we never actually remove them. Adding or removing a config file inside /etc/pacman.d however will have effects. So if we put exactly the same marker, both package will only try to ensure that Ordering of config files is important however because these dropins are just a hack and we need to add repositories only after pacman options, so I used files starting with 99-myrepo.conf for repositories. |
Ah, right, and proxy is setup as a drop-in, not directly in pacman.conf using markers. Then it should be fine. |
Opps we posted at the same time. Please look at my note about using 99-myrepo.conf. |
Based on the files already at the current-testing archlinux.qubes-os.org URL, the repo reference on line 1 of the .conf files would need to be |
I already updated the scripts to rename .db: QubesOS/qubes-linux-repo-archlinux@7ab8bc7 |
This is copied from qubes-core-agent-linux, preserving the same marker.
5e2e25b
to
9482532
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to install a file directly from the PKGBUILD, you have to set the array source=()
with the proper files which will then be available into ${srcdir}
. However archlinux does not allow adding a whole directory (only local file or archives in the same directory than PKGBUILD)
So we have to fake the fact that the source is self contained like that:
for source in repos ; do
# shellcheck disable=SC2154
(ln -s "$srcdir/../$source" "$srcdir/$source")
done
So here is my proposal:
# Frédéric Pierret <[email protected]>
pkgname=(qubes-vm-dependencies qubes-vm-recommended qubes-vm-repo)
pkgver=$(cat version)
pkgrel=1
epoch=
pkgdesc="Meta packages for Qubes-specific components"
arch=("x86_64")
url="http://qubes-os.org/"
license=('GPL')
groups=()
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=('')
backup=()
options=()
install=
changelog=
source=()
noextract=()
md5sums=() #generate with 'makepkg -g'
build() {
for source in repos ; do
# shellcheck disable=SC2154
(ln -s "${srcdir}/../${source}" "${srcdir}/${source}")
done
}
package_qubes-vm-dependencies() {
depends=(qubes-vm-xen qubes-vm-core qubes-vm-qrexec qubes-vm-gui qubes-vm-pulseaudio)
}
package_qubes-vm-recommended() {
depends=(qubes-vm-passwordless-root qubes-vm-networking qubes-gpg-split qubes-usb-proxy)
}
package_qubes-vm-repo() {
replaces=('qubes-vm-keyring')
install=PKGBUILD-repo.install
install -m 0644 -D ${srcdir}/repos/archlinux-qubes-repo-4.1-current.conf "${pkgdir}/etc/pacman.d/90-qubes-4.1-current.conf.disabled"
install -m 0644 -D ${srcdir}/repos/archlinux-qubes-repo-4.1-current-testing.conf "${pkgdir}/etc/pacman.d/90-qubes-4.1-current-testing.conf.disabled"
# Install keyring (will be activated through the .install file)
install -dm755 "${pkgdir}/usr/share/pacman/keyrings/"
install -m0644 ${srcdir}/repos/qubes-repo-archlinux-key.asc "${pkgdir}/usr/share/pacman/keyrings/qubesos-vm.gpg"
install -m0644 ${srcdir}/repos/qubes-repo-archlinux-trusted "${pkgdir}/usr/share/pacman/keyrings/qubesos-vm-trusted"
install -m0644 ${srcdir}/repos/qubes-repo-archlinux-revoked "${pkgdir}/usr/share/pacman/keyrings/qubesos-vm-revoked"
}
# vim:set ts=4 sw=4 et:
archlinux/PKGBUILD
Outdated
|
||
# vim:set ts=2 sw=2 et: | ||
install -m 0644 -D repo/archlinux-qubes-repo-4.1-current.conf "${pkgdir}/etc/pacman.d/90-qubes-4.1-current.conf.disabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build failure as repo is not found.
archlinux/PKGBUILD-repo.install
Outdated
release=$(echo "$1" | cut -d '.' -f 1,2) | ||
|
||
if ! [ -h /etc/pacman.d/90-qubes-${release}-current.conf ] ; then | ||
ln -s qubes-${release}-current.conf.disabled /etc/pacman.d/90-qubes-${release}-current.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to put absolute path there because it may creates an invalid symlink, and prepend with 90-
.
ln -s /etc/pacman.d/90-qubes-${release}-current.conf.disabled /etc/pacman.d/90-qubes-${release}-current.conf
From these fixes, it is building and installing properly. Using the right repository name still need to be fixed (qubes vs qubes-r4.0-current-testing). It tried changing testing repository to Should we care about cleanup ? (removing symlinks, disabling trust ...) |
I'd say it is optional, we don't do that in other distros. |
Thanks for fixes @ptitdoc ! |
PipelineRetry |
I think this needs to be merged into meta-packages/release-4.0 as well? Building R4.0 archlinux fails because builder-archlinux now wants qubes-vm-dependencies in scripts/04_install_qubes.sh and that only exists here in meta-packages/master. builder-archlinux does not have a release-4.0 branch, so all the R4.1/master updates for builder-archlinux have to work for R4.0. Edit: temporary workaround for R4.0
|
Key is included here, but other parts needs adjustment.
TODO:
I haven't quickly found documentation for pacman repository config format. Any help appreciated.