Downloading MacPorts dependencies without installing - download

The default MacPorts installation downloads each dependency, builds and installs it, then downloads, builds and installs the next dependency, and so on. This means that a constant network connection is required throughout the installation. In my configuration, a constant network connection is not feasible. This means that installation of a large-dependency package can take a very long time.
How do I download all dependencies for a specified MacPorts package at the beginning (while connected to the network) and then build and install each dependency (no network connection required)?

While connected to the network, use:
port fetch rdepof:<packagename> <packagename>
Then, with no network connection required, use:
port clean rdepof:<packagename> <packagename>
port install <packagename>
rdepof: is a recursive list of all of the package's dependencies. The clean command removes any previous builds of the package or its dependencies.

Use port fetch <packagename>.

Related

devspace behind coporate proxy

I am installing devspace in my local windows machine using npm
npm install -g devspace
after installed, it needs to Finish installation of DevSpace CLI, in which the following request is failed
Error requesting URL: https://github.com/devspace-cloud/devspace/releases/download/v5.1.0/devspace-windows-amd64.exe
I think it's because of my machine is using the company's proxy. However, I don't know how to config proxy in devspace (just like git, for example).
DevSpace maintainer here. Instead of using npm, you can also download the release binary manually from GitHub: https://github.com/devspace-cloud/devspace/releases/
You can just do this:
Download the devspace-windows-amd64.exe for a release
Rename the downloaded file to devspace.exe
Save the devspace.exe file in a folder (and add this folder to your PATH environment variable) => You may need to restart after changing the PATH variable
That's basically what the npm installer does as well but it seems like it is unable to download the binary from GitHub. This may be because of a proxy or because of anything related to GitHub (your company may hit the rate limit or something else).

How can I install yum rpm packages without internet connection?

This question has been asked before but mine is a bit different.
I want to install a bunch of rpm packages using sudo yum. I do not have internet connection on the machine I want to install them on. These packages also do not exist on any machine in the network.
Is there a way I can install them without internet connectivity and with them not anywhere on any machine in the network (so cannot use --downloadonly option) ?
if you have the RPM files on your local machine or any machine (not from network but you literally downloaded the .rpm files) then you can run
yum localinstall <path to rpm file>
you can also do
rpm -ivh <rpm file>
Is there a way I can install them without internet connectivity and
with them not anywhere on any machine in the network
No, that is called an air gap. You need to get the RPMs on the machine or network to have them installed.

package Vagrant/Chef build with ALL dependancies

Current setup:
I have a project that builds with Vagrant/Chef (bunch of other tools, docker, bundler etc in play as well but this is the focus) Target is only Ubuntu 14.04 64 bit.
1) Vagrant sets up a ubuntu VM runs Chef with Berkshelf and all the other Ruby build goodies.
2) Chef runs through all the cookbooks:
presumably download any missing dependencies via aptitude, install packages via dpkg
pull/build source from git repos
initialize databases, probably set permissions and create files etc
There are some tools such as https://github.com/phusion/traveling-ruby that claim to effectively "freeze" a ruby application so you can ship it with an interpreter and all the dependencies/gems. This would be fine for a static application if not the last bit: running through cookbooks is actually an important step to deploying the application.
The deploy target will have no or limited bandwidth, is it possible to package a Chef build to locally contain all dependencies so that no remote download is necessary?
My idea so far is to run a clean build and make a copy of the chef cache folder and aptitude cache.

Install python library through closed network

I teach Python in a high school which has an environment closured by Windows Server and denies FTP transactions and the majority of internet-accessing behavior. However, I need to install Pygame in a virtual machine Linux's (Edubuntu) within that network.
When I do: sudo apt-get update it doesn't work, of course. So this way I can't either install software or update it.
Which gateways/IP do I need to ask to the Server Manager to open in order to be able to use repositories in Linux? Even if it's just for the moment of installing through the terminal.
If you dont have access to Internet or FTP then you have to create local repository with all packages. You have to point your apt-get to that local repository.
After that when you do apt-get update it will check in local repository and will update the packages.
If you dont have access to create repository, you have to ask your network manager to create local repo and give url for that.
If you only need some Python packages you can directly use pip for installing packages provided on PyPI. It's possible to create a partial PyPI Mirror using pypi-mirror. This way you don't need a direct connection to the internet.

using jenkins to build RPM packages

I want to use Jenkins for creating RPM packages to deploy code and scripts onto a Linux redhat machine(s)
So the applications are a mix of technologies (no compiling needed) i just need to package up the applications deploy them to the correct location restart apache
Would anybody have some instructions on how to do these steps for a total Newbie:
Some questions:
Do i need to install jenkins on a local linux machine if im going to be creating RPM's that will be deployed on to linux redhat machine (i was hoping to install jenkins on windows)
Does anybody have a example of creating a package out of a local folder (no source control for the moment)
I want to just specify the directory of where to take the code from and specify where to deploy the code to on a machine the rpm is installed on
On the destination machine i want to run something like
yum -install mypackage-version12.rpm
and it will install the code/scripts to the specified directory and restart apache
i need an example of this also.
Thanks
You can install Jenkins on a different machine, but you generally must have a Jenkins "node", "slave", "agent" installed on a machine that can generate RPM packages.
Running each step of the RPM package setup is putting all the steps to build within Jenkins. It works much better if you extend your build system to build the RPM, and have Jenkins do what it does best, manage the build (schedule, etc), not micro-manage the build (do the steps).
Depending on what you currently have as your build system, this might include ant directives to setup the rpm build tree, copy in the .spec file, and a executable call to rpmbuild.
Jenkins can easily call a post-build task to do this, or you might want to configure a mini "fake" project that does the update, depending on tastes.
As an aside, for a yum command to work without using the --localinstall option, you will need to have a web server set up, the new RPM copied to the right folder on the web server, and the indexing files rebuilt (repobuild is the script to do so, if I recall correctly).
On the client machine (where the package will be installed), you will need to have a yum configuration that directs the client machine to include the web server as one of the known yum repositories.
Why not use an Docker images to build the RPM inside it though a dedicated stage ?
Your code needs to provide /rpm/SPEC files and inside the Docker (Jenkins) you can have a Jenkinsfile like :
mkdir -p ./rpm/BUILD && cd ./rpm/ && for f in ./SPECS/*; do rpmbuild --define \"_topdir \$(pwd)/\" --define \"_builddir \$(pwd)/BUILD\" -bb \$f;
And you are done.

Resources