# Symlinking issues

**URL:** https://discourse.chef.io/t/symlinking-issues/5023
**Category:** Chef Infra (archive)
**Created:** [February 13, 2014, 9:23pm UTC](https://discourse.chef.io/t/symlinking-issues/5023 "2014-02-13T21:23:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Jasna\_Bencic](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@Jasna\_Bencic](https://discourse.chef.io/u/Jasna_Bencic)
#### Post date: [February 13, 2014, 9:23pm UTC](https://discourse.chef.io/t/symlinking-issues/5023/1 "2014-02-13T21:23:00Z")

</div>

Ohai,

I got problems with symlink\_before\_migrate part - it is connected with  
deploying ruby applications on a server from GitHub repository.

So, below is the snippet of code I am using

deploy “application\_name” do  
repo application[‘git’][‘repository’]  
branch application[‘git’][‘branch’]  
user "ruby"  
group "ruby"  
deploy\_to application[‘approot’]  
action :deploy  
ssh\_wrapper "#{application[‘approot’]}/wrap-ssh4git.sh"  
symlink\_before\_migrate  
({  
“config/database.yml” =\> “config/database.yml”,  
“config/something\_else.yml” =\> “config/something\_else.yml”  
})

I get perfectly nice symlink in “current/config” directory, database.yml  
points to it’s double created in “shared/config”

What bothers me and I can’t figure it out why o why is database under  
current/config empty? It is full under /shared/config and that’s just  
because I have filled it before deployment with embedded ruby template.  
Since deployment does symlinking with current/config directory file should  
be full in apps root directory and it is not.

Could you please enlighten me what am I doing wrong. Everytime I get  
symlink looking like example below I know it is going to be empty on one  
side.

database.yml -\> /path/to/application\_name/shared/config/database.yml

symlink should look like:

database.yml -\> /path/to/application\_name/shared/config/database.yml

Or am I wrong? I really don’t understand what part with  
symlink\_before\_migrate did I fail so I get file empty on one side and full  
on the other side

---

<div class="post-metadata">

### Author: ![Jasna\_Bencic](https://avatars.discourse-cdn.com/v4/letter/j/7993a0/32.png) [@Jasna\_Bencic](https://discourse.chef.io/u/Jasna_Bencic)
#### Post date: [February 14, 2014, 5:32pm UTC](https://discourse.chef.io/t/symlinking-issues/5023/2 "2014-02-14T17:32:14Z")

</div>

forget my question, it is resolved ..... I got just a N00b tip for you: if  
you are looking into cookbooks too long you will start to read code by  
memory as I did. So I got a review from an experienced Chef. I have created  
files in wrong directories and that's why I got broken symlink.

On Thu, Feb 13, 2014 at 10:23 PM, Jasna Benčić [jasna.bencic@teamsnap.com](mailto:jasna.bencic@teamsnap.com)wrote:

> Ohai,
> 
> I got problems with symlink\_before\_migrate part - it is connected with  
> deploying ruby applications on a server from GitHub repository.
> 
> So, below is the snippet of code I am using
> 
> deploy "application\_name" do  
> repo application['git']['repository']  
> branch application['git']['branch']  
> user "ruby"  
> group "ruby"  
> deploy\_to application['approot']  
> action :deploy  
> ssh\_wrapper "#{application['approot']}/wrap-ssh4git.sh"  
> symlink\_before\_migrate  
> ({  
> "config/database.yml" =\> "config/database.yml",  
> "config/something\_else.yml" =\> "config/something\_else.yml"  
> })
> 
> I get perfectly nice symlink in "current/config" directory, database.yml  
> points to it's double created in "shared/config"
> 
> What bothers me and I can't figure it out why o why is database under  
> current/config empty? It is full under /shared/config and that's just  
> because I have filled it before deployment with embedded ruby template.  
> Since deployment does symlinking with current/config directory file should  
> be full in apps root directory and it is not.
> 
> Could you please enlighten me what am I doing wrong. Everytime I get  
> symlink looking like example below I know it is going to be empty on one  
> side.
> 
> database.yml -\> /path/to/application\_name/shared/config/database.yml
> 
> symlink should look like:
> 
> database.yml -\> /path/to/application\_name/shared/config/database.yml
> 
> Or am I wrong? I really don't understand what part with  
> symlink\_before\_migrate did I fail so I get file empty on one side and full  
> on the other side

---

<div class="post-metadata">

### Author: ![Ross\_Mohan](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Ross\_Mohan](https://discourse.chef.io/u/Ross_Mohan)
#### Post date: [February 14, 2014, 5:59pm UTC](https://discourse.chef.io/t/symlinking-issues/5023/3 "2014-02-14T17:59:46Z")

</div>

Wise Chefs and other sword swallowers,

Rank beginner question, feel free to delete now and move on.

(Is there a chef newbie list – call it sous-chef? – I’d like to know about it…)

It’s about building OSX version of Chef-Server, so involves homebrew (brew) as much as chef…

But…now that you’ve been fairly warned: here’s the deal:

1. Trying to roll my own on an i5 Sandybridge Macbook Air, Maverick 10.9
2. hundreds of things go well and no problem using Opscode’s generous Chef server hosting, running knife, adding nodes, etc
3. yet, cannot roll my own local chef-server from source because…cannot make erlang.
4. cannot make (brew) erlang because – no matter what I do – I get an otp\_build error on line 372 for autoconf.
5. Yes, autoconf is there, up-to-date (fresh Xcode v5 tools!), and yes it works.

The error:

==\> ./otp\_build autoconf

* * *

* * *

=== running autoconf in lib

./otp\_build: line 372: autoconf: command not found

Autoconf is fine:

$ autoconf --version

autoconf (GNU Autoconf) 2.69

Copyright © 2012 Free Software Foundation, Inc.???

Ideas welcomed…

Thanks,

Ross

---

<div class="post-metadata">

### Author: ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)
#### Post date: [February 14, 2014, 6:05pm UTC](https://discourse.chef.io/t/symlinking-issues/5023/4 "2014-02-14T18:05:27Z")

</div>

Did you find anything relevant in the github issues for the various homebrew repos?

This one looks a lot like what you reported: [https://github.com/Homebrew/homebrew-versions/issues/276](https://github.com/Homebrew/homebrew-versions/issues/276)

Good luck,

--  
Daniel DeLeo

On Friday, February 14, 2014 at 9:59 AM, Ross Mohan wrote:

> Wise Chefs and other sword swallowers,
> 
> Rank beginner question, feel free to delete now and move on.
> 
> (Is there a chef newbie list -- call it sous-chef? -- I'd like to know about it....)
> 
> It's about building OSX version of Chef-Server, so involves homebrew (brew) as much as chef...
> 
> But...now that you've been fairly warned: here's the deal:
> 
> 1. Trying to roll my own on an i5 Sandybridge Macbook Air, Maverick 10.9
> 2. hundreds of things go well and no problem using Opscode's generous Chef server hosting, running knife, adding nodes, etc
> 3. yet, cannot roll my own local chef-server from source because...cannot make erlang.
> 4. cannot make (brew) erlang because -- no matter what I do -- I get an otp\_build error on line 372 for autoconf.
> 5. Yes, autoconf is there, up-to-date (fresh Xcode v5 tools!), and yes it works.
> 
> The error:
> 
> > > ==\> ./otp\_build autoconf
> > 
> > > * * *
> > 
> > > * * *
> > 
> > > 
> > 
> > > === running autoconf in lib
> > 
> > > ./otp\_build: line 372: autoconf: command not found
> 
> Autoconf is fine:
> 
> > > $ autoconf --version
> > 
> > > autoconf (GNU Autoconf) 2.69
> 
> > > Copyright (C) 2012 Free Software Foundation, Inc.​​​
> 
> Ideas welcomed...
> 
> Thanks,
> 
> Ross

---

<div class="post-metadata">

### Author: ![Ross\_Mohan](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Ross\_Mohan](https://discourse.chef.io/u/Ross_Mohan)
#### Post date: [February 14, 2014, 7:02pm UTC](https://discourse.chef.io/t/symlinking-issues/5023/5 "2014-02-14T19:02:07Z")

</div>

Daniel,

This works. Erlang now brews well beyond the autoconf issue. (Nice to give the Air a nice compile work out. I almost never hear the fan go on…)

I now have a “…missing sql.h…” in odbcserver.c issue I have to chase, but that’s what my github account’s for. :-))

Thanks a ton. If you’re ever around DC, come and collect your free cuppa coffee.

Appreciate the help.

-Ross

* * *

From: Daniel DeLeo [ddeleo@kallistec.com](mailto:ddeleo@kallistec.com) on behalf of Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com)  
Sent: Friday, February 14, 2014 1:05 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Newbie glitch w/autoconf on OSX Chef Server build

Did you find anything relevant in the github issues for the various homebrew repos?

This one looks a lot like what you reported: [https://github.com/Homebrew/homebrew-versions/issues/276](https://github.com/Homebrew/homebrew-versions/issues/276)

Good luck,

–  
Daniel DeLeo

On Friday, February 14, 2014 at 9:59 AM, Ross Mohan wrote:

Wise Chefs and other sword swallowers,

Rank beginner question, feel free to delete now and move on.

(Is there a chef newbie list – call it sous-chef? – I’d like to know about it…)

It’s about building OSX version of Chef-Server, so involves homebrew (brew) as much as chef…

But…now that you’ve been fairly warned: here’s the deal:

1. Trying to roll my own on an i5 Sandybridge Macbook Air, Maverick 10.9
2. hundreds of things go well and no problem using Opscode’s generous Chef server hosting, running knife, adding nodes, etc
3. yet, cannot roll my own local chef-server from source because…cannot make erlang.
4. cannot make (brew) erlang because – no matter what I do – I get an otp\_build error on line 372 for autoconf.
5. Yes, autoconf is there, up-to-date (fresh Xcode v5 tools!), and yes it works.

The error:

==\> ./otp\_build autoconf

* * *

* * *

=== running autoconf in lib

./otp\_build: line 372: autoconf: command not found

Autoconf is fine:

$ autoconf --version

autoconf (GNU Autoconf) 2.69

Copyright © 2012 Free Software Foundation, Inc.???

Ideas welcomed…

Thanks,

Ross

---

<div class="post-metadata">

### Author: ![Ross\_Mohan](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Ross\_Mohan](https://discourse.chef.io/u/Ross_Mohan)
#### Post date: [February 14, 2014, 8:29pm UTC](https://discourse.chef.io/t/symlinking-issues/5023/6 "2014-02-14T20:29:20Z")

</div>

🙂

==\> Summary

? /usr/local/Cellar/erlang/R15B03-1: 7019 files, 272M, built in 17.1 minutes

That’s a whole lotta compile…

* * *

From: Ross Mohan [mohanr@five9group.com](mailto:mohanr@five9group.com)  
Sent: Friday, February 14, 2014 2:02 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] RE: Re: Newbie glitch w/autoconf on OSX Chef Server build

Daniel,

This works. Erlang now brews well beyond the autoconf issue. (Nice to give the Air a nice compile work out. I almost never hear the fan go on…)

I now have a “…missing sql.h…” in odbcserver.c issue I have to chase, but that’s what my github account’s for. :-))

Thanks a ton. If you’re ever around DC, come and collect your free cuppa coffee.

Appreciate the help.

-Ross

* * *

From: Daniel DeLeo [ddeleo@kallistec.com](mailto:ddeleo@kallistec.com) on behalf of Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com)  
Sent: Friday, February 14, 2014 1:05 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Newbie glitch w/autoconf on OSX Chef Server build

Did you find anything relevant in the github issues for the various homebrew repos?

This one looks a lot like what you reported: [https://github.com/Homebrew/homebrew-versions/issues/276](https://github.com/Homebrew/homebrew-versions/issues/276)

Good luck,

–  
Daniel DeLeo

On Friday, February 14, 2014 at 9:59 AM, Ross Mohan wrote:

Wise Chefs and other sword swallowers,

Rank beginner question, feel free to delete now and move on.

(Is there a chef newbie list – call it sous-chef? – I’d like to know about it…)

It’s about building OSX version of Chef-Server, so involves homebrew (brew) as much as chef…

But…now that you’ve been fairly warned: here’s the deal:

1. Trying to roll my own on an i5 Sandybridge Macbook Air, Maverick 10.9
2. hundreds of things go well and no problem using Opscode’s generous Chef server hosting, running knife, adding nodes, etc
3. yet, cannot roll my own local chef-server from source because…cannot make erlang.
4. cannot make (brew) erlang because – no matter what I do – I get an otp\_build error on line 372 for autoconf.
5. Yes, autoconf is there, up-to-date (fresh Xcode v5 tools!), and yes it works.

The error:

==\> ./otp\_build autoconf

* * *

* * *

=== running autoconf in lib

./otp\_build: line 372: autoconf: command not found

Autoconf is fine:

$ autoconf --version

autoconf (GNU Autoconf) 2.69

Copyright © 2012 Free Software Foundation, Inc.???

Ideas welcomed…

Thanks,

Ross
