Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upArchlinux template fails to build #2565
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Jan 9, 2017
Member
|
On Mon, Jan 09, 2017 at 08:20:59AM -0800, hThoreau wrote:
## Qubes OS version R3.2
Fedora-23 VM, building Archlinux
---
## Expected behavior:
Running `make template` succeeds.
## Actual behavior:
```
***@***.*** qubes-builder]$ make template
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/vmm-xen/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/vmm-xen/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/core-vchan-xen/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/core-vchan-xen/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/core-qubesdb/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/core-qubesdb/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/linux-utils/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/linux-utils/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/core-agent-linux/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/core-agent-linux/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/gui-common/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/gui-common/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/gui-agent-linux/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/gui-agent-linux/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
mkdir -p /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs
for arch_build_dir in archlinux; do\
pkgnames=`cat qubes-src/app-linux-split-gpg/$arch_build_dir/PKGBUILD | grep pkgname | cut -d "=" -f 2 | tr -d '()"'`;\
for pkgname in $pkgnames; do\
ln -f qubes-src/app-linux-split-gpg/pkgs/$pkgname-*.pkg.tar.xz /home/user/qubes-builder/qubes-src/linux-template-builder/pkgs-for-template/archlinux/pkgs/;\
done;\
done;\
ln: failed to access ‘qubes-src/app-linux-split-gpg/pkgs/qubes-split-*.pkg.tar.xz’: No such file or directory
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:156: recipe for target 'update-repo' failed
make[1]: *** [update-repo] Error 1
Makefile:297: recipe for target 'template-local-archlinux' failed
make: *** [template-local-archlinux] Error 1
```
Steps to reproduce the behavior:
1. Follow instructions provided in the documentation (https://www.qubes-os.org/doc/templates/archlinux/);
2. Execute fix described here (#2557) when make qubes-vm fails;
3. build the following components (`make core-agent-linux-vm`, `make gui-common-vm` and `make gui-agent-linux-vm` individually).
4. $ make template
## General notes:
I'm a Graphic Designer by trade, I'm as familiar to CLI as my grandma is to GUI, meaning, I couldn't code even if my life depended on it. XD I'm more than grateful for any aid provided, but please, try to didatic with me.
Thanks in advance.
It seems you have not built app-linux-split-gpg?
Try 'make app-linux-split-gpg-vm'
Then 'make template'
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hThoreau
Jan 9, 2017
I've edited the original post after reading the comment from Marek Marczykowski-Górecki recommending to run make qubes-qv again instead of building the dependencies separately, as they weren't all listed in the OP.
After doing that the error message I've gotten, referenced in the log, was slightly different from the one you've quoted, even though I've stopped at the same step of the procedure.
Still, I've tried your recommendation. The return I've had was the following:
[user@archlinux qubes-builder]$ make app-linux-split-gpg-vm
Currently installed dependencies:
git-2.5.5-1.fc23.x86_64
rpmdevtools-8.9-1.fc23.noarch
rpm-build-4.13.0-0.rc1.13.fc23.x86_64
createrepo-0.10.3-3.fc21.noarch
debootstrap-1.0.87-1.fc23.noarch
dpkg-dev-1.17.27-1.fc23.noarch
python-sh-1.11-1.fc23.noarch
dialog-1.3-4.20160424.fc23.x86_64
--> Archlinux dist-prepare-chroot (makefile):
--> Checking mounting of dev/proc/sys on build chroot...
--> sudo mount --bind /dev/pts /home/user/qubes-builder/chroot-archlinux/dev/pts;
--> Synchronize resolv.conf, in case it changed since last run...
cp: cannot stat ‘/etc/resolv.conf’: No such file or directory
/home/user/qubes-builder/qubes-src/builder-archlinux/Makefile.archlinux:65: recipe for target 'dist-prepare-chroot' failed
make[1]: *** [dist-prepare-chroot] Error 1
Makefile:209: recipe for target 'app-linux-split-gpg-vm' failed
make: *** [app-linux-split-gpg-vm] Error 1
hThoreau
commented
Jan 9, 2017
•
|
I've edited the original post after reading the comment from Marek Marczykowski-Górecki recommending to run After doing that the error message I've gotten, referenced in the log, was slightly different from the one you've quoted, even though I've stopped at the same step of the procedure. Still, I've tried your recommendation. The return I've had was the following:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cryptix
Jan 9, 2017
Hey @hThoreau!
I just completed the steps in the documentation and got a working rpm-file to install the template, create one and boot it.
I first hit step 2 (the missing init) myself. Did you use rdhammond workaround or the one marmarek linked to?
cryptix
commented
Jan 9, 2017
|
Hey @hThoreau! I just completed the steps in the documentation and got a working rpm-file to install the template, create one and boot it. I first hit step 2 (the missing init) myself. Did you use rdhammond workaround or the one marmarek linked to? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hThoreau
Jan 9, 2017
Hello @cryptix,
By "rdhammond workaround" you refer to this post, am I correct? In that case, yes, I've used it. By "the one marmarek linked to", you refer to this piece of code? I've found that the files in the qubes-builder were already rectified for that error.
hThoreau
commented
Jan 9, 2017
•
|
Hello @cryptix, By "rdhammond workaround" you refer to this post, am I correct? In that case, yes, I've used it. By "the one marmarek linked to", you refer to this piece of code? I've found that the files in the qubes-builder were already rectified for that error. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cryptix
Jan 9, 2017
uhm.. both no, actually. The problem I ran into and fix I used are documented here.
I suggest you clean up and start over fresh with a new clone of the qubes-builder (step 4), if you haven't already, to make sure you don't have strange side-effects of (potential partial) fixes that don't work well together. I only had to add the init from
I looked into the template-archlinux.txt you attached in the initial post. The failed umount on line 1485 makes me think some process blocked the packaging of the rpm. (This could be a terminal window, where you did manual investigation in the builder chroot. A running terminal shell (like bash or zsh) always has a working directory. If it is located inside a directory that you want to un-mount, the umount will fail with target is busy.)
cryptix
commented
Jan 9, 2017
|
uhm.. both no, actually. The problem I ran into and fix I used are documented here. I suggest you clean up and start over fresh with a new clone of the qubes-builder (step 4), if you haven't already, to make sure you don't have strange side-effects of (potential partial) fixes that don't work well together. I only had to add the init from I looked into the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hThoreau
Jan 9, 2017
@cryptix
Where did you get the "init" from? As for the umount, you think an open text editor might have caused that?
hThoreau
commented
Jan 9, 2017
|
@cryptix |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cryptix
Jan 9, 2017
Okay, just make sure make qubes-vm works without many modifications. I only had to add the init to the PKGBUILD, nothing else.
As for the umount, you think an open text editor might have caused that?
Text editor: unlikely, they usually only hold files open while they save or read files.
What I meant in general is this :
- open your terminal (like gnome-terminal)
- insert a usb key and mount it or network share.
- go into that location
cd /media/usbkey/... - try to unmount the usb drive (it will result in a
target is busyerror)
This is pretty arcane phenomena and can be hard to catch.
In this special case the build system should know how to cleanly unmount, I think.
cryptix
commented
Jan 9, 2017
•
|
Okay, just make sure
Text editor: unlikely, they usually only hold files open while they save or read files. What I meant in general is this :
This is pretty arcane phenomena and can be hard to catch. In this special case the build system should know how to cleanly unmount, I think. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
hThoreau
Jan 10, 2017
Thank you @cryptix,
I manage to build the template! I performed the following substitutions in order to do so:
Changed
> # FIXME: do a source code move vm-systemd/*.sh to init/
> # since those scripts are shared between sysvinit and systemd.
> install -m 0755 init/*.sh vm-systemd/*.sh $(DESTDIR)$(LIBDIR)/qubes/init/
> install -m 0644 init/functions $(DESTDIR)$(LIBDIR)/qubes/init/
for
# FIXME: do a source code move vm-systemd/*.sh to init/
# since those scripts are shared between sysvinit and systemd.
install -m 0755 /home/user/qubes-src/core-agent-linux/init/*.sh vm-systemd/*.sh $(DESTDIR)$(LIBDIR)/qubes/init/
install -m 0644 /home/user/qubes-src/core-agent-linux/init/functions $(DESTDIR)$(LIBDIR)/qubes/init/
in the document
/qubes-builder/qubes-src/core-agent-linux/Makefile
Also, I've changed the first line of the document
/qubes-builder/qubes-src/app-linux-split-gpg/doc/Makefile
to
PANDOC=/bin/true
Finally, I've did what you suggested, so maybe those first two modifications where just overkill. XD
Now I'm stuck in the next step (yay!) getting denied permission to transfer the template to the dom0. I've to figure that one now... is there something wrong with the following line of command?
sudo qvm-run --pass-io archlinux 'cat /home/user/qubes-builder/qubes-src/linux-template-builder/rpm/install-templates.sh' > install-templates.sh
it returns
bash: install-templates.sh: Permission denied
hThoreau
commented
Jan 10, 2017
•
|
Thank you @cryptix, Changed
for
in the document Also, I've changed the first line of the document Finally, I've did what you suggested, so maybe those first two modifications where just overkill. XD Now I'm stuck in the next step (yay!) getting denied permission to transfer the template to the dom0. I've to figure that one now... is there something wrong with the following line of command? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cryptix
Jan 10, 2017
Nice that you got the template!!
bash: install-templates.sh Permission denied
Hm.. yea. that script seemed unnecessary to me.
Try to fetch the .rpm from the noarch directory (like explained in copy to dom0) and then run sudo dnf install xxx.rpm and delete it afterwards. That's everything the script does, notice that only the dnf install needs sudo.
hope that helps.
cryptix
commented
Jan 10, 2017
|
Nice that you got the template!!
Hm.. yea. that script seemed unnecessary to me. Try to fetch the .rpm from the hope that helps. |
andrewdavidwong
added
the
duplicate
label
Jan 10, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Jan 10, 2017
Member
I'm glad you've able to help each other and make progress on this on your own. :)
For issue tracking purposes, this is obviously a duplicate of #2557 (as I'm sure you know, having cited that issue yourself), so I'm marking and closing it as a duplicate for organizational purposes. But please feel free, of course, to finish your discussion here, if it's helping. (In the future, you may find the MLs more appropriate as a medium for this type of exchange.)
|
I'm glad you've able to help each other and make progress on this on your own. :) For issue tracking purposes, this is obviously a duplicate of #2557 (as I'm sure you know, having cited that issue yourself), so I'm marking and closing it as a duplicate for organizational purposes. But please feel free, of course, to finish your discussion here, if it's helping. (In the future, you may find the MLs more appropriate as a medium for this type of exchange.) |
hThoreau commentedJan 9, 2017
•
edited
Edited 1 time
-
hThoreau
edited Jan 9, 2017 (most recent)
Qubes OS version R3.2
Fedora-23 Standalone appVM, building Archlinux
Expected behavior:
Running
make templatesucceeds.Actual behavior:
Steps to reproduce the behavior:
make qubes-vmfails;make qubes-vmmake templateGeneral notes:
I've also attached the log that was returned to me bellow.
template-archlinux.txt
I'm a Graphic Designer by trade, I'm as familiar to CLI as my grandma is to GUI, meaning, I couldn't code even if my life depended on it. XD I'm more than grateful for any aid provided, but please, try to didatic with me.
Thanks in advance.