brew for linux

Discussion of applications not mentioned above.
Locked
User avatar
Cafsenra
Posts: 18
Joined: 20 Jul 2020, 00:57

brew for linux

Post by Cafsenra »

I managed to install brew for linux on tnas. However I had to mount /mnt/md0/Users/.linuxbrew in /home/linuxbrew/.linuxbrew (default brew location) with the command mount bind. Nevertheless when I restart the server I lose this until I mount again the folder. I tried to setup fstab to do this on system startup but I couldn’t do this due, I suspect, raid limitations. Can anyone assist me on how to make permanent the command mount bind?

the corresponding mtab entry is:
/dev/mapper/vg0-lv0 /home/linuxbrew/.linuxbrew btrfs rw,relatime,space_cache=v2,metadata_ratio=50,subvolid=5,subvol=/User/.linuxbrew 0 0

Thank you! ;)
DevOps Engineer. Software Developer on free time ;)
User avatar
TMA
Posts: 7
Joined: 09 Apr 2021, 10:01

Re: brew for linux

Post by TMA »

Hello! You need to write the mount script in the corresponding configuration file to add the system auto-start item
User avatar
Cafsenra
Posts: 18
Joined: 20 Jul 2020, 00:57

Re: brew for linux

Post by Cafsenra »

Thank you for your reply :)

I guess you are talking about create a script to /etc/init.d or /etc/rc.d directories. I am not very familiar with these startup scripts (think that they should be LSB complient). Any chance to get help on this? The command I want to startup is:
mount --bind /mnt/md0/User/.linuxbrew/ /home/linuxbrew/.linuxbrew/
DevOps Engineer. Software Developer on free time ;)
User avatar
Cafsenra
Posts: 18
Joined: 20 Jul 2020, 00:57

Re: brew for linux

Post by Cafsenra »

I remembered that there is the option to add the command to the crontab with the option @reboot that apparently sove this issue. What I did is to add a new file to cron.d and insert a line @reboot /bin/mount --bind /mnt/md0/User/.linuxbrew/ /home/linuxbrew/.linuxbrew/
It works but not sure if it is the right solution for this case. Any help is welcome ;)
DevOps Engineer. Software Developer on free time ;)
User avatar
Cafsenra
Posts: 18
Joined: 20 Jul 2020, 00:57

Re: brew for linux

Post by Cafsenra »

For all advanced users that might want to have brew on their TNAS the trick is to link (ln -s) the git and the ter_curl to /usr/bin/git and /usr/bin/curl. Mount the default homebrew folder as instructed before (you will have to create the empty folder first). Logged as admin, create a .curlrc with the path to tnas certificate: cacert /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. As admin execute: export HOMEBREW_CURLRC=1; git config --system http.sslCAInfo /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. Finally, as admin run the install brew command script present in homebrew site. Cheers :)
DevOps Engineer. Software Developer on free time ;)
Locked