Copying a gz file to a target directory

30 views
Skip to first unread message

Andrew Marks

unread,
Nov 11, 2015, 5:36:44 PM11/11/15
to The Luggage
I am trying to build a make file that has a tar.gz file that needs to be copied to /var/lib/puppet. The file will be called upon by a another script it needed.

I seem to be getting an error when I try to pack the script and use the copy command for a rule I made in puppet.

I am trying to figure out if there is a better way to do this. This seems to error when i run the make file. I am not sure why root is coming in.

cp: /tmp/the_luggage/PuppetFixup/root/var/lib/puppet/fixup_ssl.tar.gz: No such file or directory

I doubled checked my rules and payload . (I suspect i did something wrong with the rule file)

I was hoping another set eyes could help.

so i have in my payload

pack-fixup_ssl.tar.gz 

This is my payload 

pack-remediation_ssl.tar.gz: l_var_lib_puppet
        @sudo ${CP} fixup_ss_ssl.tar.gz ${WORK_D}/var/lib/puppet/rfixup_ss_ssl.tar.gz
        @sudo chown root:wheel ${WORK_D}/var/lib/puppet/remediation_ssl.tar.gz
        @sudo chmod 755 ${WORK_D}/usr/local/bin/remediation_ssl.tar.gz

This is the rule I created in luggage make for private/var/lib/puppet

l_private_var: l_var
        @sudo mkdir -p ${WORK_D}/private/var
        @sudo chown -R root:wheel ${WORK_D}/private/var
        @sudo chmod -R 755 ${WORK_D}/private/var

l_private_var_lib: l_var_lib
        @sudo mkdir -p ${WORK_D}/private/var/lib/
        @sudo chown -R root:wheel ${WORK_D}/private/var/lib/
        @sudo chmod -R 755 ${WORK_D}/private/var/lib/

l_private_var_lib_puppet: l_var_lib_puppet
        @sudo mkdir -p ${WORK_D}/private/var/lib/puppet
        @sudo chown -R root:wheel ${WORK_D}/private/var/lib/puppet
        @sudo chmod -R 755 ${WORK_D}/private/var/lib/puppet

Thanks for any insight

Andrew

Joseph Chilcote

unread,
Nov 11, 2015, 7:21:02 PM11/11/15
to the-l...@googlegroups.com
Couple of things:

Your payload is "pack-fixup_ssl.tar.gz" but the stanza is calling "pack-remediation_ssl.tar.gz"
That stanza has invalid paths (/var/lib/puppet/ should be /private/var/lib/puppet) and two different tarballs referenced.
Since it's a file being copied, you can use {INSTALL} to add the permissions in one line.


Cheers,

--joe


--
You received this message because you are subscribed to the Google Groups "The Luggage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to the-luggage...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages