How extract the package source into the some other directory in buildroot - net-snmp

Here my package is net-snmp.
Here is the task : Addition of Net-SNMP Source directory at path personal/apps/snmp/
Requirement is that it should download from website if there is change in version name and it should patch , configure and build soruce.
Hence, for that we need to configure Config.in and netsnmp.mk files in build/package/netsnmp in order to fulfill this requirement.
By adding following configuration in netsnmp.mk
NETSNMP_VERSION = 5.7.2.1
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
NETSNMP_SITE = http://www.sourceforge.net/projects/net-snmp/files/net-snmp/$(NETSNMP_VERSION)
We can download the latest net-snmp tar ball which will be downloaded in dl/ folder in buildroot.
From here it will untar in build/output/build and will patch configure and build. After that it will build the executable at appropriate location inside target folder.
Here the issue is I want netsnmp source code to be at personal/apps/snmp folder which seems to be problematic and can edit the source in path personal/apps/snmp/ and configure build from here.
Any help and suggestion will be appreciated.

There is already a netsmp package in Buildroot. Why do you want to create another one?
Also, the Buildroot community is going to be much more reactive if you ask questions on the project's mailing list.

Related

FileNotFoundError: [Errno 2] No such file or directory selenium\\webdriver\\remote\\getAttribute.js'

I'm working with selenium. The script is in :
C:\Users\User\Desktop\Data Analytics Arg\Proyectos\datademia\Py_install\py_ejemplo.py . Venv is activated and chromedriver.exe is in C:\Users\User\Desktop\Data Analytics Arg\Proyectos\datademia\Py_install\chromedriver.exe
The script runs perfectly. Then I created an only .exe-file via terminal :
pyinstaller --add-data "chromedriver.exe;." --windowed --onefile py_ejemplo.py
Folders are created correctly (build and dist). The .exe file (py_ejemplo.exe) was created, but when I try to run it, I get this message:
I've been looking and still can't solve it... I've tried these solutions :
filenotfound
but didn't work for me...Could someone help me? I donĀ“t know what's wrong...
Thanks in advance
I got the same problem but I was working with Firefox and geckodriver.
In my case, I copied the selenium folder from the virtual environment to the dist folder and it worked.
There are a few things you should ensure when packing a script with pyinstaller build with selenium web driver.
It may require to add driver executable when building. I.e. chromedriver.exe
It may also require to add some package files related to selenium such as getattributes.js file when building. It was required at my project.
pyinstaller will extract those files to temp folder in AppData for windows users. So in your code, your relative paths may require to be resolved with a sample function as below (if you are running your code in vs code or you are running through pyinstaller executable the paths should be resolved by function).
For item 1 and 2, you can use --add-binary and --add-data features of pyinstaller for each of them. It is also possible to do this in *.spec file with add-files list, following your first running of pyinstaller (see this explanation) I preferred command-line option as below.
pyinstaller ./app.py --onefile --noconsole --add-binary "./driver/chromedriver.exe;./driver" --add-data "C:\Users\YOUR_USER_NAME\.conda\pkgs\selenium-3.141.0-py38h2bbff1b_1000\Lib\site-packages\selenium\webdriver\remote;selenium\webdriver\remote"
For item 3, to resolve relative paths in your source code, you can use below function in related places (for example when accessing chromedriver.exe)
def resource_path(relative_path):
try:
base_path = sys._MEIPASS
except Exception:
base_path = os.path.dirname(__file__)
return os.path.join(base_path, relative_path)
Use above function once you need to access packaged executables and files in your source code. In below example, my chromedriver is inside driver folder in my workspace. But when it is accessed through pyinstaller executable, it will be extracted to temp folder in AppData, yet function will access it through sys._MEIPASS variable set by pyinstaller.
driver = webdriver.Chrome(executable_path = resource_path('./driver/chromedriver.exe'))
Hope it works.

How to store package repository globally?

A FreeBSD update forces me to run Xmonad by cabal-install. After I run "cabal new-update"
I find that it audaciously placed a 636MB file inside the directory "~/.cabal". Having a closer look I noticed that this is the unzipped version of a .tar.gz of 85MB.
Question #1: How can I inhibit to unpack this monster?
Question #2: I am loggin in as two different users. Is there a way to install the zipfile in a global place?
Thanks in advance,
Bertram
You can't inhibit the unpacking of it. Cabal needs it to operate. That said, your solution to how to replace it with a symlink seems fine.

How to setup Flink Local Cluster

I am trying to use Flink local on Linux and Windows, for my bachelor
thesis. I have found these steps for local setup:
https://ci.apache.org/projects/flink/flink-docs-release-1.1/quickstart/setup_quickstart.html#start-a-local-flink-cluster
When I try this I got only errors like this:
-bash: bin/start-local.sh: No such file or directory
When I go to the directory of the start-local.sh file then I got
/flink-1.1.2/flink-dist/src/main/flink-bin/conf/flink-conf.yaml: No such file or directory
Same problem with Windows.
What do I have to change so that it works?
It seems that you have downloaded the sources. It is necessary to download one of binaries from here: https://flink.apache.org/downloads.html#binaries. Then, follow the given instructions for local setup.
Of course if you want to build Flink from sources, use this guide: https://github.com/apache/flink#building-apache-flink-from-source.

ROS package not found after catkin_make

I created a ROS workspace following the Wiki page from ROS. I also created a package using catkin_create_pkg under the workspace I just created.
Then, following the steps in ROS Wiki to build the package using catkin_make, after the package is built, I insert the command rospack find packagename, and my package is not found anymore.
Can anyone help me on this?
Have you followed this basic tutorial? You have to create the package in your workspace and have set properly your Bash file (in your home directory).
To permanently set your system, add these lines
# ROS settings
source <your_workspace_path>/catkin/devel/setup.bash
at the end of your ~/.bashrc. Then, restart the terminal, and retry. Please, be sure to modify these lines with your actual information, where I've put <your_workspace_path> (depends on where you have installed ROS and its workspace on your PC).
If this does not solve the problem, try rospack profile before rospack find <your_package_name>.

Android Studio 0.4.2 Generate Client Libraries failing because of wrong folder name in path

In 0.4.0 and 0.4.2 (1/9/14 build) Generate Client Libraries gives an alert that the endpoints tree cannot be found. Although the libraries are in fact generated they don't get copied into app-endpoints as they should.
This is a bug and can be tracked at :
https://code.google.com/p/android/issues/detail?can=4&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=64537
What is the workaround?
To work around the failure of the automatic copy look for the generated code in app-AppEngine/google_generated like so...
After Generate Client Libraries, the code in
app-AppEngine/google_generated/endpoint/lib-expanded-source//endpoint/
{there are three .java files; endpoint.java, endpointRequest.java, and endpointRequestInitializer.java,
additionally there is a "model" folder with .java and CollectionResponse.java
}
are in fact the client libraries. copy them into
app-endpoints/src/endpoint-src/java/
good to go.

Resources