All AUR packages..after builded by makepkg .. necessarily create an *.pkg.tar.xz file? - archlinux

Well .. this question came from another one closed question that i posted here. I installed android using yaourt.. and that was ok.. it worked fine.
But, before that i was trying doing manually.. using makepkg. But it seems that it did not create any package named *.pkg.tar.xz .
After a search.. and some question for my friends.. they told me that maybe the make process had problems and, it had some silent problem that not created the *.pkg.tar.xz.
So.. what do you think.. all AUR packages necessarily create *.pkg.tar.xz file and it was a problem when i was trying to build. Or has certain packages , as android , that do not create such *.pkg.tar.xz files?

An AUR package is a PKGBUILD file with instructions to makepkg to build a package (which is a .pkg.tar.xz file), so yes, unless there is any error on the build process, all AUR packages create a .pkg.tar.xz file.
You could try downloading the PKGBUILD file and running the makepkg -si manually to check any build error. Here's an example to build and install the android-sdk package, adjust accordingly to your desired package. This should create a android-sdk-*-x86_64.pkg.tar.xz file.
cd $(mktemp -d)
wget https://aur.archlinux.org/packages/an/android-sdk/android-sdk.tar.gz
tar xzvf android-sdk.tar.gz
cd android-sdk/
makepkg -si
Used arguments to makepkg:
-s, --syncdeps Install missing dependencies with pacman
-i, --install Install package after successful build

Related

Environment variables (zsh terminal) installed through npm on MacOS 12.4 Monterey - SOLVED

Background:
Dear Stackoverflow community. I recently switched from Windows to MacOS and am at a loss how to configure environment variables. Many of the previous questions asked here are about bash instead of zsh.
Goal:
I am trying to install an npm package globally. For instance:
npm install -g vercel
or any other package, and use it in my Visual Studio Code terminal (also zsh). If I want to deploy code I have to use 'npx vercel deploy' every time. I want to be able to use "vercel deploy" but instead I get:
zsh: command not found: vercel
What I tried so far:
Installing the package in zsh and visual studio code terminals (didn't work)
Setting the path equal on both VS and terminal: export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I learned that you need to add environment variabels to a .zshrc file. I don't seem to have a zshrc file. When I do:
sudo ~/.zshrc
Password: XXXXXX
sudo: /Users/vincent/.zshrc: command not found
I am getting another error.
I read in the zsh man file that you should use $HOME/.zshrc instead. Again I am getting the same errors:
vincent#Vincents-MacBook-Air-2 ~ % $HOME/.zshrc
zsh: permission denied: /Users/vincent/.zshrc
vincent#Vincents-MacBook-Air-2 ~ % sudo $HOME/.zshrc
sudo: /Users/vincent/.zshrc: command not found
Update 1:
#slebetman Thank you for your explanation. When I open the terminal I go to home via "cd $HOME" which puts me in in the home directory. However there is no way for me to create a .zshrc file in that directory. Neither via touch or vs code. I am getting the following error: "Unable to write file '/home/.zshrc' (Unknown (FileSystemError): Error: ENOTSUP: operation not supported on socket, open '/home/.zshrc')"
Update 2:
I did manage to find the .zshrc file in visual studio code under /etc. I hope this will work. I was able to overwrite the file with Sudo and add environment variables to it.
Add this to the file .zshrc file under /etc and force overwrite it:
export vercel=/Users/vincent/.npm-global/bin/vercel
Screenshots below for those who will try in the future:
Image with .zshrc file layout
Final remarks:
I don't understand how it is so difficult to add environment variables on Mac while everything else is so easy.
I have read many different questions on stackoverflow, and I can't seem to solve it. Also since I am a newbie I am not allowed to comment on there so I post here in the hope that anyone can help me :)
Best,
Vincent
Note that when you do:
npx vercel deploy
Npm will execute vercel for you without installing it. It does that by temporarily downloading vercel. If you want to run vercel directly without using npx then simply don't use npx. Install it instead:
npm install -g vercel
The -g flag installs the module globally and if the module has a CLI it will be available globally as well (note that depending on your setup you may need admin/sudo privileges to use the -g flag). Now you can run vercel by simply typing:
vercel deploy
This works in all operating systems supported by node.js and npm. That means you can even do this in Windows. In fact I use npm to distribute my tools in a simple cross-platform way so I don't have to support multiple package managers like chocolatey (Windows), homebrew (Mac OS), deb (Debian based distros), rpm (Redhat based distros) etc. (npm does not require your software to be written in node.js - I have published packages on npm written in tcl and bash).

Why can't I run my node packages from the terminal?

Good evening,
I tried installing sails, yo, gulp & bower via the usual methods of npm i -g yo gulp bower etc but each time I open the terminal to run the command I always get the -bash: sails: command not found error.
I listed all my folders at the root of my folder and found the following:
The contents of the .npm-global/bin/ is actually all the packages I'm trying to use at the command line.
I decided to manual add the bin folder to the .bash_profile so it's contents was the following:
# Setting PATH for Python 3.7
# The original version is saved in su
export PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH="/.npm-global/bin:${PATH}"
but that didn't work either.
Here's where I think the problem first arose - I think that the python install overrode all the previous paths in the file (or moved them somewhere perhaps?) so that all previous terminal commands now don't work.
The usual global install for node packages (/usr/local/lib/node_modules/npm/bin) contains the following:
What am I misunderstanding here & how can I fix this?

CMake error not providing FindGnuradio.cmake

Getting the following error when running cmake and am unsure how to fix it. It seems like it's telling me exactly what to do, but not very familiar with Linux.
CMake Error at CMakeLists.txt:153 (find_package):
By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Gnuradio",
but CMake did not find one.
Could not find a package configuration file provided by "Gnuradio"
(requested version 3.7.3) with any of the following names:
GnuradioConfig.cmake
gnuradio-config.cmake
Add the installation prefix of "Gnuradio" to CMAKE_PREFIX_PATH or set
"Gnuradio_DIR" to a directory contaning one of the above files. If
"Gnuradio" provides a separate development package or SDK, be sure it has
been installed.
EDIT: So I've located something called FindGnuradioRuntime.cmake but am still unsure what to do with it. The error message makes me think it was looking for something named "FindGnuradio.cmake" when it was actually called "FindGnuradioRuntime.cmake"
Commands that were run on a fresh Ubuntu install:
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../ (here is where I ran into a the problem above)
Install / build GNU Radio.
Remove the CMakeCache.txt
When you call cmake .. you can pass arguments. Add the path to the parent directory of GnuradioConfig.cmake or FindGnuRadio.cmake as in
cmake -DCMAKE_PREFIX_PATH=/gnu/radio/path ..
Making my somewhat hidden response an actual answer:
Just found out that the install script provided on GNURadio's website not only installs GNURadio, but also the RTL SDR requirements as well, so I wiped my VM and started over and was successful. It takes a few hours, but it is complete and automated so definitely the best way to install GNURadio. Script is here http://www.sbrac.org/files/build-gnuradio
As previous answers noted you didn't describe where you ran into this problem. I'm going to assume it happened when creating an Out Of Tree (OOT) module.
On the OOT Module Page, see the "Notes" Section. They note that you need to install gr-dev. That package will install GnuradioConfig.cmake. You can find it in the standard yum repos, and install it with sudo yum install gnuradio-devel.

How to save php files as .phar or edit source code saved as .phar?

I have downloaded Codeception source code (in .phar format), but I need to add same changes there. So, I want to edit this .phar file, but cannot find a solution, how to do this.
You can build your own phar by using Robo tool.
It is documented in http://codeception.com/install
Clone from GitHub:
git clone git#github.com:Codeception/Codeception.git
Install dependencies with Composer
cd Codeception
curl -s http://getcomposer.org/installer | php
php composer.phar install
Make your changes
Install Robo
wget http://robo.li/robo.phar
Build package
php robo.phar build:phar
Use one of the tools listed in http://cweiske.de/tagebuch/php-phar-files.htm#tools to extract and then re-add the file you want to edit.
The phar executable shipped with PHP is able to extract files and you can add the modified file afterwards.

Where are makepkg outputs packages built?

I'm trying to install a AUR package.
It seems easy, and I follow the Wiki description for it.
I downloaded the tarball, did makepkg -S to download the source and build it.
Apparently no error messages at output.
The process created some tar.gz files, that I tried to target when I use pacman -U
But none of them is the file expected by this command,
'missing metadata package in' ....
I did a research on web. I found that the place that makepkg output the package for Pacman is set in makepkg.conf, using PKGDEST item.
I changed that in /etc/makepkg.conf. It didn't create any file in that place when I tried to make that AUR package again (makepkg -S -f).
How to find the package for Pacman? Did the build go wrong and have no obvious message?
--Well .. after hours of search.. i give up and installed yaourt.. using that this to insall my package
According to https://wiki.archlinux.org/index.php/Makepkg and my firsthand experience, they are put into the working directory by default:
Next, one can configure where source files and packages should be placed and identify themselves as the packager. This step is optional; packages will be created in the working directory where makepkg is run by default.