How do I configure cygwin cyg-get mirror sites? - cygwin

I installed cygwin via Chocolatey on Windows, got cyg-get package manager along with it to install packages.
Now that I want to install to packages like openssh, rsync. These are not getting downloaded since mirror site (mirror.kernel.org) is not responding and it's just paused on
downloading setup.bz2
So the question is can I select mirror sites or configure them in cyg-get just like cygwin GUI ?

Assuming that you've installed to the default location you should find the file in the following folder:
C:\ProgramData\Chocolatey\lib\cyg-get_####\tools\
You will want to modify the file cyg-get.ps1
Look for the line containing:
$cygPackages -s ftp://mirrors.kernel.org/sourceware/cygwin -P $package
and modify the URL ftp://mirrors.kernel.org/sourceware/cygwin to your preferred mirror

The newer cyg-get package, released last week, allows you to specify a source if you don't want to use the default.

Not even specifying the site worked for me, so what resolved was to open cygwinSetup executable and choose the mirror once. Then cyg-get auto selects my last mirror.

Related

How do I manually install older versions of unity (2019) for Linux (Arch)

I am aware of this page: https://unity3d.com/get-unity/download/archive but the downloads are only for windows and mac and despite having it installed, the "unity hub" button does nothing. I have found places to download even older versions like 2018 but I need version "2019.2.5f1". Can I download and use the mac version? Is there somewhere I can download this compiled for Linux without using unity hub? Thanks for any help.
The UnityHub link will have a version hash in it which is unique across platforms. With that hash, you can build the Linux version download URL yourself.
In your case, you need 2019.2.5f1, which gives you the UnityHub link unityhub://2019.2.5f1/9dace1eed4cc
You can download the tarball at the following URL:
https://download.unity3d.com/download_unity/9dace1eed4cc/LinuxEditorInstaller/Unity.tar.xz
The unity-editor package is a good one to modify the PKGBUILD file for if you'd like to install an arbitrary version as a proper package.
Clone the project
Tweak the PKGBUILD version and hash to the one you want
Run makepkg -g to generate the checksum for the new tarball
Insert the new checksum into the PKGBUILD
Run makepkg -p PKGBUILD to compile the package
Run sudo pacman -U ./unity-editor-${pkgversion}.pkg.tar to install your newly built package.
If anyone is having this issue and want to download older versions from unityhub, there is solution that worked for me :
Go to unity download archive
Copy redirection link from the green button (you can right click it and select "Open Link in new tab", and then copy it from here)
Once you have the link, open up your terminal and go to location in which you have UnityHub.AppImage
Simply use this command : ./UnityHub.AppImage link where link is what you copied (for example ./UnityHub.AppImage unityhub://2019.3.13f1/d4ddf0d95db9 to download 2019.3.13 version of uinity)
I have two of the hashes:
89d6087839c2 Unity 2019.3.1f1
b9898e2d04a4 unity 2019.2.16f1

Failing to install Sublime Text 3 in Ubuntu 16.04 using apt-get command

I had downloaded sublime previously directly from the browser as tarball and saved it in a folder (and of course extracted it).But this way I wasn't able to make Sublime my default editor and it didn't feature as an application when I tried to open a text file with a right-click.I read somewhere installing sublime text 3 using commands:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
will solve my problem. So I directly deleted the Sublime_text3 folder saved in my Downloads directory and then used the given commands. But when I entered the 3rd command line I got the following error(just writing the error part):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:/var/cache/apt/archives/sublime-text-installer_3126-2~webupd8~1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can anyone explain why this error is coming and suggest a way to solve this problem? Also if anyone can tell how I can set Sublime as my default text editor from the tarball downloaded from the sublime text 3 website. Thanks in advance!
you can try this command to install Sublime Text using Snap Store..
sudo snap install sublime-text --classic
I'm not sure overall how to fix that error or what's going on (I use Slackware and not Ubuntu/Debian), but for a long while there have been official Sublime repositories several different Linux distributions, including Ubuntu/Debian.
It's highly recommended that you use those if you want to go the package route and not use existing solutions such as the one referenced in your question or in the other response here, if for no other reason than only the official repository is guaranteed to contain an unmodified version of Sublime. Additionally the official repositories are always updated on release, which may or may not happen in a timely manner in other repositories.
The links referenced above contain instructions on how to set up and use Sublime from those repositories, and if you have any issues a good place to ask is the forum.
One thing to note which isn't mentioned explicitly in the above pages is that to use the official repositories, you should:
Choose only one of them (stable or dev, noting that you need a license to run a dev version) and not add both repositories or things will not work as expected
Ensure that other repositories that you've added (such as the one in your question) are removed to make sure that the package system definitely pulls the correct package
There are a couple of ways to go if you want to install Sublime from the tarball version. The easiest way would be to extract it, then manually set up launcher shortcuts and so on based on what falls out. How exactly you would register it as a text editor in that case, I'm not entirely sure since I don't use the same distribution as you.
Presuming that the process would be easier if Sublime was installed in a way similar to how the package manager would do it, the tarball comes with a desktop file and icons, so the following steps can be used to (presumably) do what the package installer would do.
The proviso here is that although these steps work on my non-Ubuntu machine, I don't know if all of the referenced tools are installed by default on an Ubuntu system, so so more setup work may be involved.
Note also that the files in the tarball are not entirely self-consistent, which makes this a little bit more work.
First, you need to extract the tarball (replace tarball filename as appropriate for location and build):
cd /opt
sudo tar xvf ~/Downloads/sublime_text_3_build_3176_x64.tar.bz2
This creates the folder /opt/sublime_text_3/ and fills it with the contents of the tarball.
Next, you want to install the icons contained in the tarball. As far as I have been able to tell, the icons in the tarball aren't in the correct directory structure, requiring each to be copied into place individually. We also need to update the icon cache to ensure that the new icon is noticed by the system:
cd /usr/share/icons/hicolor/
sudo cp /opt/sublime_text_3/Icon/16x16/sublime-text.png 16x16/apps/
sudo cp /opt/sublime_text_3/Icon/32x32/sublime-text.png 32x32/apps/
sudo cp /opt/sublime_text_3/Icon/48x48/sublime-text.png 48x48/apps/
sudo cp /opt/sublime_text_3/Icon/128x128/sublime-text.png 128x128/apps/
sudo cp /opt/sublime_text_3/Icon/256x256/sublime-text.png 256x256/apps/
sudo gtk-update-icon-cache -f -t .
Now we want to install the sublime_text.desktop file that is in the tarball. Note however that like the icons, it seems kind of broken; the tarball extracts to sublime_text_3 but the desktop file assumes that the application is actually in /opt/sublime_text instead.
As such, you either need to rename the folder that was extracted to sublime_text to match what is in the desktop file, or edit the desktop file to make the path correct.
The following steps assume that we want to keep the folder the same and rewrite the desktop file. These commands will generate a new file named sublime_text_3.desktop with the changes.
cd /opt/sublime_text_3/
sed -e "s^/sublime_text/^/sublime_text_3/^" sublime_text.desktop | sudo tee sublime_text_3.desktop
Now you can install the desktop file. You do that with desktop-file-install, passing it the name of the desktop file. For accessing Sublime from the command line, you also want to set up a subl link to the installed copy of Sublime.
Adjust the paths as appropriate here if you decided to rename the folder instead of editing the desktop file:
sudo desktop-file-install sublime_text_3.desktop --rebuild-mime-info-cache
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/subl
At this point Sublime should show up as an installed application, or at least it does in my Window Manager; if not, executing sudo update-desktop-database may help refresh it.
You can try this once. i hope it will help
wget https://download.sublimetext.com/files/sublime-text_build-4126_amd64.deb
sudo dpkg -i sublime-text_build-4126_amd64.deb

Using linux mirror to host 3rd party RPMs

I'm trying to do something that seems simple in theory, but I can't find the magic search terms for the Google-machine to get any hits.
Basically, we are building a bunch of servers internally (no internet access) so I've created a VM and set up a mirror of our linux distro (Oracle Linux, which is essentially RHEL). The steps I are here for reference:
http://www.oracle.com/technetwork/articles/servers-storage-admin/yum-repo-setup-1659167.html
This is fine, but I'd also like to have access to a few other RPMs (e.g. Chrome, vsftpd etc) that aren't part of the standard distribution, but have to be separately downloaded.
The question is, is there any way to simply "include" these rpms with the mirror that I've already set up? Or do I have to mirror those repos separately? i.e. is there some place I can just drop an rpm and have it found when someone uses my mirror to do "yum install myprogram"
I hope I've explained this ok.
Thanks in advance.
What I'd do is make a separate folder, download the required packages and make a repository with the createrepo command.
Then you need to create a new repo file in /etc/yum.repos.d for your new repo just like in the referenced howto:
[<channel_label>]
name=<Channel Description>
baseurl=http://<repository_server>/yum/<repository path>
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
enabled=1

Sublime 3 error installing package control

I am trying to install package control in Sublime Text editor 3 on Ubuntu 14.04 . I follow simple instruction from https://sublime.wbond.net/installation.
But I get follow error:
Package Control: Error downloading channel. b'curl: (7) Failed to connect to sublime.wbond.net port 443: Network is unreachable' downloading https://sublime.wbond.net/channel.json.
error: Package Control
Go back to the installation page and follow the instructions in the Manual section:
Click the Preferences > Browse Packages… menu
Browse up a folder and then into the Installed Packages/ folder
Download Package Control.sublime-package and copy it into the Installed Packages/ directory
Restart Sublime Text
This should install Package Control for you without any problems.
EDIT
Please read through this issue here, and follow wbond's instructions to install from git. First, completely quit Sublime, then remove all traces of Package Control - any folders in ~/.config/sublime-text-3/Packages, any files in ~/.config/sublime-text-3/Installed Packages, the folder ~/.config/sublime-text-3/Packages/User/Package Control.cache, and any files in ~/.config/sublime-text-3/Packages/User that start with Package Control.* - Package Control.last-run, Package Control.sublime-settings, Package Control.system-ca-bundle, and anything else you can find.
Next, assuming you have git installed (run sudo apt-get install git if you don't), switch to ~/.config/sublime-text-3/Packages and run
git clone https://github.com/wbond/package_control.git "Package Control"
to clone the master repo (make sure you've completely quit Sublime before running this). Restart Sublime and see if everything installs properly. If not, follow the instructions for creating a debug log, restart Sublime to generate the log, open the Console by selecting View -> Show Console, then copy the entire contents (it'll be a lot) into a new file. Open a new issue and describe exactly what the problem is, including all the details above and the fact that you just installed from the master branch, and paste in the contents of the debug log (make sure you put it in a code block by adding triple backticks ``` before and after). Will Bond (wbond) should get in touch with some suggestions.
Good luck!
Note for users of other operating systems: I'm not sure if this is a Linux-only problem or not, but in case it isn't, Mac users will find Packages and Installed Packages in ~/Library/Application Settings/Sublime Text 3, while Windows users with standard (i.e., non-portable installs) will find them in your user directory under AppData\Roaming\Sublime Text 3. For Windows portable installs, the directories should be in your install directory under Data.
For the sublime text version 3126 onward Package Control is disabled by default. Just go to Preferences > Settings and remove Package Control from the ignored_packages setting.
I was having the same problem on Linux Mint 18.1 (Ubuntu derivative), and after reading a few posts here and there, it occurred to me that something had likely become corrupted, so I: 1) uninstalled sublime; AND then 2) deleted everything related to sublime from "/home/thom/.config/". Step 2 was the real key. Then I reinstalled sublime according to "apt" section HERE. Once reinstalled, package control was able to install without error.

Run time installation directory of debian package contents

I have a debian package that I built that contains a tar ball of the files, a control file, and a postinst file. Its built using dpkg-deb and it installs properly using dpkg.
The modification I would like to make is to have the installation directory of the files be determined at runtime based on an environment variable that will be set when dpkg -i is run on the deb file. I echo out the environment variable in the postinst script and I can see that its set properly.
My questions:
1) Is it possible to dynamically determine the installation directory at runtime?
2) If its possible how would I go about this? I have read about the rules file and the mypackage.install files but I don't know if either of these would allow me to accomplish this.
I could hack it by copying the files to the target location in the posinst script but I would prefer to do it the right way if possible.
Thanks in advance!
So this is what I found out about this problem over the past couple of weeks.
With prepackaged binaries you can't build a debian package with a destination directory dynamicall determined at runtime. I believe that this might be possible if installing a package that is built from source where you can set the install directory using configure. But in this case since these are embedded Ubuntu machines they don't have make so I didn't pursue such an option. I did work out a non traditional method (hack) for installing that did work. Since debian packages simply contain a tar ball relative to / simply build your package relative to a directory under /tmp. In the postinst script you can then determine where to copy the files from the archive into a permanent location.
I expected that after rebooting and the automatic deletion of the subdirectory under /tmp that dpkg might not know that the file package existed. This wasn't a problem. When I ran 'dpkg -l myapp' it showed as still installed. Updating the package using dpkg/apt-get also worked without a hitch.
What I did find is that if you attempted to remove the package using 'dpkg -r myapp' that dpkg would try and remove /tmp which wasn't good. However /tmp isn't easily removed so it never succeeded. Plus in our situation we never remove packages but instead simply upgrade them.
I eventually had to abandon the universal package due to code differences in the sources resulting in having to recompile per platform but I would have left it this way and it did work.
I tried using --instdir to change the install directory of the package and it does relocate the files but dpkg fails since the dpkg file can't be found relative to the new instdir. Using --instdir is sort of like a chroot. I also tried --admindir and --root in various combinations to see if I could use the dpkg system relative to / but install relocate the files but they didn't work. I guess rpm has a relocate option that works but not Ubuntu.
You can also write a script that runs dpkg-deb with a different environment for 6 times, generating 6 different packages. When you make a modification, you simply have to run your script, and all 6 packages gets generated and you can install them on your machines avoiding postinst hacking!
Why not install to a standard location, and simply use a postinst script to create symbolic links to the desired location? This is much cleaner, and shouldn't break anything in dpk -I.

Resources