How can I create a local ebuild repository along with source tarballs? - repo

Is it possible to tell ebuild inside the .ebuild file that the SRC_URI file actually points to a file on the filesystem instead of a website? I tried putting in just the raw pathname but it tried to connect to some website and download the package instead of look locally. I tried with file:// prefix too and it didn't work. Is this even possible or nah? Will I have to actually publish the .tgz file somewhere so that portage can download it?

Related

How do i formulate file path for testsettings on the Runsettings file parameter <SettingsFile>

Whats the proper way to form relative file path/ or file path for the runsettings parameter
<SettingsFile>xxxxxAutomation.testsettings</SettingsFile>
In my local environment this works but when i push it to build release agents it fails since
its looking for the file in a different directory which is my release folder
but instead its looking for this file in what appears to be in a folder directory.
This is the directory its looking at E:\Agent_work\r10\a\xxxxxxxxx.testsettings,
here is my current way i have it set
<SettingsFile>xxxxxAutomation.testsettings</SettingsFile>
here is the error message
Error: The test settings file E:\Agent_work\r10\a\xxxxxxxxxx.testsettings, specified in the MSTestAdapter settings, is not available. Either access to the file is denied or the file does not exist. Ensure that the test settings file is available and try again.
instead of
E:\Agent_work\r10\a_XXXXX CI Build\drop\XXXXX_Automation_Test\bin\Release\xxxxxxxxx.testsettings
There is no documentation that states how to formulate the file path on msdn and didn't see
anything online.
I suggest you can add a Copy Files task to copy the missing file from .../bin/release folder(Use the browse option) to default working directory:
I suggest you resolve this issue via modifying your pipeline instead of settings file, so that you can also work well locally with the unchanged runsettings file.
In addition: Clean Target Folder input should be disabled(unchecked) cause our target folder is the default working folder. Deleting all files in that folder would cause unexpected issues.

Untar file in specific directory

I try to download a tar.gz file and uncompress it on /tmp/apps.
However i don't want to uncompress it if the directory already exists.
If the file exists or even doesn't exist it is downloaded and uncompressed.
I cant find my code is missing a parameters on my exec block or if I made a mistake somewhere else.
I'm using Puppet 3.8.
Gist file of my puppet
Use the puppet/archive module, https://forge.puppet.com/puppet/archive. It will download the archive, check for existing files and even tidy up after itself.

Binary File from script after Tar Issue

I was copying a folder from a Debian computer (university specific distro) to a Windows computer. I used tar to make a gunzipped tarball containing the folder. I transferred the file using MobaXterm, which used SFTP. I accidentally removed the original file, but I still had the tarball, so I used that to restore.
However, when I looked back in the directory to edit the file heatmap_get.py (which was marked executable), it was a bunch of unreadable information. When I tried to execute the script, it stated:
-bash: ./heatmap_gen.py: cannot execute binary file
I have tried executing strings on the file, but it is not helpful. This tarball contained multiple files, but this was the only one that was effected. I really need this file; any help is appreciated.
Update:
If I copied heatmap_gen.py to heatmap_gen.tar.gz, and undid the tarball, it yielded an exact copy of the directory it was in except it did not have the heatmap_gen.py file.
It looks like the original tarball was not archived correctly as pointed out by l'L'l. It appears that the tarball contained a copy of itself within the file heatmap_gen.py.

NodeJS archive manager

I need to get the content of archives and then I want to uncompress the selected one - but I dont want to uncompress the archives to know what's in it. I'd like to list and uncompress at least zip and rar, but (if that's possible) I don't want to be limited to only these two.
Can you advise good npm modules or other projects to achieve this?
Here's what I came up with:
zip
I found node-zip can only unzip files, but not list archive content.
rar
The best solution seems node-rar, but I can't install it on Windows.
node-uncompress This does what it says: It's an "Command-line wrapper for uncompressing various file types." So there is again no possibility to list archive content.
Currently I try to get node-uncompress to list files and hopefully it must never run cross-platform.
Solution:
I am now using 7zip with the node module node-7z instead of trying to get every archive working on its own. The corresponding site is: https://www.npmjs.com/package/node-7z
This library uses the OS independent archive manager 7zip. On Windows 7za is used. "7za.exe (a = alone) is a standalone version of 7-Zip". I've tested it on Windows and Ubuntu and it works great.
Update:
At Windows: Somehow I just got it working by adding 7za to the Path variables - not by adding 7za.exe to the "the same directory of your package.json file." like the description says.
Update 2:
On Windows 7za, that's referred in the node-7z post, cannot handle .rar-archives. So I'm using the "casual" 7-zip instead of 7za.exe. I just renamed the commanline 7z.exe to 7za.exe and added the 7-zip folder to the Path Variables.

Downloading snort rules

I have downloaded snort rules from the website but instead of getting a zipped folder, I get a single file which cannot be opened by windows. I also tried using 7zip to extract the file regardless its a single file but it just replicates itself.
anyone know how I can resolve this or a get snort rules zipped folder?
It's a gunzipped tar ball (tar.gz) (reference). You need to unzip it first, you can use 7-zip on windows just right click on it then > 7-zip > Open Archive. The archive will have a .tar file (community-rules.tar) just right click on this and hit Open. This should create a folder "community-rules" with a few files inside. The rules file is the one called "community.rules", all of the rules are in this file. If you open it with wordpad you should be able to see all of the rules.
If you're on linux/unix/mac you can just run the command:
tar xzvf community-rules.tar.gz

Resources