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 upQubes Builder: install-templates.sh wants to install the 'same' image multiple times #1109
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nrgaway
Aug 8, 2015
On 7 August 2015 at 22:23, Patrick Schleizer notifications@github.com
wrote:
Any idea how this can happen? User error or script bug?
#!/bin/bash
Use the following command in DOM0 to retreive this file:
qvm-run --pass-io qubes-build 'cat /home/user/qubes-builder/qubes-src/linux-template-builder/rpm/install-templates.sh' > install-templates.sh
files="
qubes-template-whonix-gw-3.0.3-201508061857.noarch.rpm
qubes-template-whonix-gw-3.0.3-201508071530.noarch.rpm
qubes-template-whonix-gw-3.0.3-201508080112.noarch.rpm
qubes-template-whonix-ws-3.0.3-201508071541.noarch.rpm
qubes-template-whonix-ws-3.0.3-201508080142.noarch.rpm
"path="/home/user/qubes-builder/qubes-src/linux-template-builder/rpm/noarch"
version="-3.0.3"
name="qubes-build"for file in ${files[@]}; do
if [ ! -e ${file} ]; then
echo "Copying ${file} from ${name} to ${PWD}/${file}..."
qvm-run --pass-io ${name} "cat ${path}/${file}" > ${file}
fisudo yum erase $(echo "${file}" | sed -r "s/(${version}).+$//") && { sudo yum install ${file} && { rm -f ${file} } }done
It looks like you built whonix-gw 5 times. The script just adds whatever
is present in the linux-template-builder/rpm/noarch directory. I often
clean up those images once in a while.
nrgaway
commented
Aug 8, 2015
|
On 7 August 2015 at 22:23, Patrick Schleizer notifications@github.com
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adrelanos
Aug 8, 2015
Member
Yes.
Can we make it pass only the most recent images?
Or have only one image in linux-template-builder/rpm/noarch at a time? At least if it's the very same version?
|
Yes. Can we make it pass only the most recent images? Or have only one image in linux-template-builder/rpm/noarch at a time? At least if it's the very same version? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
nrgaway
Aug 8, 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 08/08/2015 07:57 AM, Patrick Schleizer wrote:
Yes. > > Can we make it pass only the most recent images? > > Or have only
one image in linux-template-builder/rpm/noarch at a time? At least if
it's the very same version? > > --- > Reply to this email directly or
view it on GitHub: >
#1109 (comment)
Passing all the most recent images would be really nice IMO. I often
build 8+ templates at a time, then I just add -y to the install.sh to
remove/add the templates in dom0.
You are the shell genius, you want to take a stab at modifying
'create_template_list.sh', or I can add it to my TODO list?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJVxj/AAAoJEELOese9Ajr6BkkP/j6vXkxwtw06VkxhBAwalKk2
TNl4LN9zz2FWhornn3egHDP2b+PwTQJFTf9S+NfBv+ur3zsb+sB1U2nvdMsOwu4L
yFegl6SiiCKjX08XzZ8g+TWiNkMnsCKcADk8L4p72jz4+gEhXdFPUSb8ScpZhWbB
VJPS3nxxVGaqyUKfGsnQk2q+FqRWSKcVy/iZNYOoQ6QsXzsAa/vqBIL3KRrmATXg
Qh5o8EHYwpd1nq2IKiuIEMdTP7y2PpQ7zQqiPQS8qoQxCRl81JNX0cBtoEIKLykr
PdHIAVEZL/vcxXQgOoqk5iIq16tDyCtBxaYC690C4Yh58v1ULRw64T/SOw7n+89H
g3IkYKVofEBGp0uFXiXhjj+lMsbFf6aagalC3DNybbOIhq26iFCzthalK5FKQ8nw
Bl/e/vrXE4GBQ34fY2m3L12Vzu57z1yes7Uw0jutSnLTnqv3DqA/VXuqo0HuLdoA
GopYH1oq6K/CxRsAmCUG0sIqrbjPhASySQhuuiZoBzAKOabNAj32HB9Z4HNA86iM
Cr9jDLblBF2SVl1wP4kXJAiMcC+Ofls3J3R6KANsepRyAtSFnx3n2ed5Wyf10v81
DSRqwNXiPUjxjlXP1bH9YRxrEANIXzfN0X62dx303ww6M96oRk2Y5vaZG1ORXRdl
y0reQGcxjTCTZjA0RsNv
=oPdF
-----END PGP SIGNATURE-----
nrgaway
commented
Aug 8, 2015
|
-----BEGIN PGP SIGNED MESSAGE----- On 08/08/2015 07:57 AM, Patrick Schleizer wrote:
You are the shell genius, you want to take a stab at modifying iQIcBAEBCAAGBQJVxj/AAAoJEELOese9Ajr6BkkP/j6vXkxwtw06VkxhBAwalKk2 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Aug 9, 2015
Member
I think it would be a mistake to restrict the list to the latest builds.
Just because you've built it doesnt mean you want to install it, and if you build multiple templates at the same time you might want to be selective in which versions you install of different templates.
There has to be some user choice - either by moving templates out of rpm/noarch or by commenting the files list in install-templates.sh. (This is what I do.)
A better approach might be to have the full list of available files provided, already commented out, and then have the user select those to be installed.
|
I think it would be a mistake to restrict the list to the latest builds. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adrelanos
Aug 11, 2015
Member
A better approach might be to have the full list of available files provided, already commented out, and then have the user select those to be installed.
Or have all out commented by default with the exception of the most recent 'same' ones?
You are the shell genius, you want to take a stab at modifying 'create_template_list.sh', or I can add it to my TODO list?
I don't mind either way. Whoever gets to work on this first.
Or have all out commented by default with the exception of the most recent 'same' ones?
I don't mind either way. Whoever gets to work on this first. |
marmarek
added this to the Release 3.1 milestone
Sep 2, 2015
marmarek
added
enhancement
C: builder
labels
Sep 2, 2015
added a commit
to adrelanos/qubes-linux-template-builder
that referenced
this issue
Sep 20, 2015
adrelanos
referenced this issue
in marmarek/old-qubes-linux-template-builder
Sep 20, 2015
Merged
- Fixed 'Qubes Builder: install-templates.sh wants to install the 'same' image multiple times'. #10
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Pull request attached. |
adrelanos commentedAug 8, 2015
Any idea how this can happen? User error or script bug?