Delayed installation of downloaded packages on another computer with CMake - cmake

Is it possible to delay the installation of downloaded packages on another computer with CMake?
I know it is possible to download and install a package with CMake (ExternalProjectAdd function) on the same computer. I would like to know if it is possible to download a package on a computer and install it on another one.
I need to do this to be able to download dependencies of a software on a personal computer (internet connexion, root privilege) and then move to a cluster (no internet connexion, no root privilege) to install the software and its dependencies.
EDIT: here is an example of my problem.
CMake is used to generate a code X. This code depends on a library Y available on the Internet. I want to generate X on a cluster with no Internet connexion and no root privilege. Therefore, I cannot download Y from this cluster (no Internet connexion) and I cannot install it from a package manager (no root privilege). I need to download Y from another computer (personal computer).
My question is "How could I download Y from a personal computer and then generate X on this cluster with CMake?".

Related

Pip , npm on offline servers

If you are developing Python web services for local network (servers is totally offline from the web) and the only way to add files to the server is through Flash drivers so using pip for Python packages or npm for node packages is such a headache and gets in a lot of dependencies issues and build issues .. so what is the proper way of dealing with such environment so development and deployment would be easier?
there are 2 approaches which you can take:
download all your dependencies locally and ship them to the remote server. this includes all the pip and npm packages. pay attention to the python\nodejs\operating system versions and architecture.
use docker to create an image, which packs everything. then ship the image to the remote server and finally spin-up a container based on that image.
You can use Pypicache to run your own pip servers and let it to cache your dependencies wherever you have an internet connection (where you are developing the application).
Then you can copy the whole pypicache folder on your flash drive and run the server wherever you want and use the cached packages inside it. the good point is in some environments that you can get a network connection for a limited time, having a pypicache is useful because it can download whatever all of the dependencies that your python applications need, and each instance would download and install the dependencies from the offline pip server by providing a simple switch in the command line. Here is an example:
pip install -i http://localhost:8080/simple somepackage
More Information - pypicache

What is the best way to remotely edit a file using VS code?

Currently, I have two machines, one with Ubuntu in the company and one with Mac OS at home. Sometimes I would like to work at home while accessing the Ubuntu machine in the company. I can ssh into the Ubuntu machine and navigate and compile there. However, when I actually want to edit some cpp source codes, I realize that the editor (VS code) is actually opened in the Ubuntu machine, so I cannot view it from Mac. What should I do if want to edit files remotely on my Mac through VS code?
Though many of the answers mention using version control tools like git, it can be hard to use in my specific case. The problem is that the building environment of my company is Linux, so most of the building tools I have can only run on Linux. This means that I can only compile my source codes in Linux. If I use git, then every time I want to compile and debug my codes, I have to commit and push with my Mac, and then pull and test on Linux. This can be time consuming if want to incrementally modify, test and debug my codes.
Use some version control system like git. Then you might edit and compile at home (provided your code is portable between Linux & MacOSX, e.g. because it is POSIX compliant).
You could install some X11 server on your Mac and use ssh -X to access the remote Ubuntu machine (then run a GUI or editor remotely, e.g. ssh -X remotelinuxhost.company.com emacs). However, that requires good bandwidth and latency between your home computer and the remote one.
BTW, you might use some other source code editor, like emacs (it is capable of remote editing) or vim.
Since Linux and MacOSX are both POSIX systems, it is usually (but not always) easy to port source code from Linux to MacOSX and write source code compilable on both systems. BTW, many Linux frameworks (e.g. Qt, GTK, POCO, Boost, etc...) and build systems are usable and ported to MacOSX. Some Linux system calls (listed in syscalls(2)) are not available on MacOSX (e.g. signalfd(2)...)
Of course you could install Linux (perhaps inside some VM) on your Apple laptop.

Setting up desktop environment on NetBSD 6.1.5

I have installed NetBSD 6.1.5 with full installation setting. However, when I run startx it says no screens could be found. So i tried "X -configure" and then "X -config ~/xconfig.conf.new" and I was brought to a very generic screen with a black x crosshair, but I was unable to exit this using the suggested ctrl+alt+backspace, so I had to force power off and check if my keyboard was recognized in the conf file generated, which it was. I have installed xdm, xterm, Xorg, and other X programs.
I am not familiar with setting up desktop environments from scratch. I am a newb who is used to Ubuntu esque installers doing that stuff for me.
Would someone be able to walk me though the installation or point me to a link which explains a step by step process?
What happens if you rename your xorg.conf.new to /etc/X11/xorg.conf? Does startx or xdm work then?
Are you running this inside a VirtualBox or other emulator?
I have NetBSD on a Thinkpad T420 which I occasionally boot into Windows, and I've setup VirtualBox to be able to run the same NetBSD install when I'm in Windows. The key difference in the xorg.conf file is in the Device section:
Section "Device"
Driver "vesa"
EndSection
Also I've found the free version of http://mobaxterm.mobatek.net/ very handy - I use it to ssh into the virtual NetBSD box and then run X apps and have them display on the Windows desktop.
Final note - you might want to look out for the NetBSD-7 RC1 which should be out 'Real Soon Now', as there are some very handy improvements, including better support for most modern display hardware :)
I found that running startx from any directory with a .xinitrc file gives strange behavior in amd64 6.1.5 and 6.1.4. Delete (or rename) any .xinitrc files and try
xinit /path/to/windowmanager
Please read Chapter 9 of NetBSD Guide:
http://www.netbsd.org/docs/guide/en/chap-x.html
Section 9.9 discusses installing various Desktop Managers/Environments.
It turns out that I could run "X -config xorg.conf.new" as root on host and then ssh using putty to manually launch windows.

Creating a Mono binary install package for CentOS 5.2

I'm new to Linux but have to port a asp.net app to Linux platform. (CentOS 5.2)
I downloaded the mono source files and manually build them on my dev box, because there's no aviable Binary package for CentOS 5.2 (almost the same as RedHat), the app works well on the dev box.
The next step is to setup the production server, which has minimal libraries installed.
My question is... how to make the Mono binary files into a install package so I don't need to download and build them in the production server.
(My dev box is the same configuration as the production one)
I have tried to copy all mono related files into the server, but with no luck... May I missed some files or some settings...
You can still get binary RPMS here
EDIT:
Recently, Mono announced support for RHEL/CentOS. You can get packages from them here.

Automate CentOS installation with VMware for testing

Is is possible to automate the installation of an OS using VMware or any other virtualization product?
One of our products consists of a customized version of CentOS that installs the OS and our application on a server. It's much like any CentOS/RHEL installation where you choose a mode that corresponds to different kickstart options, and then you choose your keyboard type. The rest of the installation is automatic.
What I'd like to have is an automated system that will create a new guest VM, boot it with the ISO image of our product, start the installation (including choosing the keyboard), wait for the reboot, and then launch a set of automated tests.
I know that there are plenty of ways to automate the creation of new VM guests from existing templates/images, and I know you can use the VIX API to interact with virtual machines, but the VIX API seems to require that VMware tools is already running (which won't be the case when you're booting from the CentOS install disk).
This answer (Automating VMWare or VirtualPC) indicates that you can script VMware to boot from an ISO that does an unattended installation, but I would really like to test the same process that our customers will be using.
Another option might be to use Xen's fully-virtualized mode and see if scripting it over the serial port will work.
TIA,
Jason
I have a very very similar question, it is on superuser:
https://superuser.com/questions/36047/moving-vmware-os-image-as-primary-os-on-a-system
You can also use VirtualBox instead of VMWare. The VirtualBox SDK allows you to directly control the keyboard, the mouse the serial port and the parallel port of the guest without the virtualbox guest tools installed.
Unfortunately it doesn't offer a text console interface but the serial port can be connected to a local pipe file and that can probably be worked with just as well.
This may not be exactly what you need:
I have done something similar with a Ubuntu-based install. We used preseeding (Debian's form of kickstart), to answer all the questions during the install - providing the preseed file and the installer via tftp.
In addition to the official Ubuntu mirror we added the apt-server with our own packages in the preseed file. We put a .deb version of vmware-tools on the apt-server and added it to the packages to be installed.
The .deb of vmware tools just contained the .tar.gz and a postinstall script that would extract it to /tmp and run the vmware install script (which has a switch to be run unnattended, so it does not ask any questions).
So after the reboot vmware-tools were up and running and we could use vix to script the rest (which was not very reliable).
If you should encounter problems with running vmware-config.pl during boot, you could make a custom package that just extracts the tools and an init script that installs them on first boot, disables itself and reboots.
Maybe you can use this strategy (replacing apt by yum, preseed by kickstart and tftp by a remastered iso). If you really need to test that your users choose a keyboard in the installer (which is not very different from kickstart) this would obviously not work for you..