transcode-open / apt-cyg Goto Github PK
View Code? Open in Web Editor NEWApt-cyg, an apt-get like tool for Cygwin
License: MIT License
Apt-cyg, an apt-get like tool for Cygwin
License: MIT License
Tried doing a fresh install in cygwin x64, I'm seeing this behavior:
[Jeff@Jeff-PC3 ~]$ apt-cyg install wget
Installing wget
md5sum: standard input: no properly formatted MD5 checksum lines found
wget is not installed, using lynx as fallback
md5sum: standard input: no properly formatted MD5 checksum lines found
[Jeff@Jeff-PC3 ~]$ which wget
which: no wget in (/home/Jeff/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/sbin)
[Jeff@Jeff-PC3 ~]$
Will try playing around some more to get some more troubleshooting information.
I've run lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
a couple times now and it takes a long time to get back to the prompt(>3 minutes). I don't know if this is my environment, but I have a solution at least for my setup.
Running directly from Github seems to fix my issues lynx -source https://github.com/transcode-open/apt-cyg/raw/master/apt-cyg > apt-cyg
An enhancement request: it would be awesome if we could install from a package list, so a cygwin install could be easily migrated or rebuilt with:
# dump list of installed packages
apt-cyg list > packages.list
On a new system:
apt-cyg install -f packages.list
I first saw project in Google Code and installed that version. Then I found out the GitHub project (which seems to be more up-to-date). So I had to reinstall it. I think it would be much better if you removed the instructions in the Google Code page and simply redirected people to the GitHub project (at least for the installation instructions).
Thank you for the neat script, by the way.
I'm use the apt-cyg install,the terminal promopt "-bash: /usr/bin/apt-cyg: Permission denied",i can't use it,please tell me the method.thank you.
Every time I run apt-cyg at the end I get an error no such file setup.ini error updating setup.ini, reverting.
apt-cyg fails to work on the latest cygwin x86_64 (and probably x86) branches. This appears to be a repeat of:
https://code.google.com/p/apt-cyg/issues/detail?id=23
A quick Google search reveals this as a patch:
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
sed -e 's%wget -N $mirror/%&x86/%' -i apt-cyg #https://code.google.com/p/apt-cyg/issues/detail?id=23
Fix should be made permanently.
Steps to reproduce are as follows. Install Cygwin...
das@NEX ~
$ lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
das@NEX ~
$ install apt-cyg /bin
das@NEX ~
$ rm apt-cyg
das@NEX ~
$ apt-cyg install nano
wget is not installed, using lynx as fallback
bunzip2: setup.bz2 is not a bzip2 file.
mv: cannot stat `setup': No such file or directory
Updated setup.ini
Installing nano
awk: fatal: cannot open file `setup.ini' for reading (No such file or directory)
Unable to locate package nano
Can't find autocompletion rules for bash
Thanks for writing this package manager... quite nifty.
Is there a way to list installed packages which are outdated and need upgrading? Thanks.
Cheers,
James
to ensure continuity of code...
$ apt-cyg install wget
Installing wget
wget is not installed, using lynx as fallback
md5sum: standard input: no properly formatted MD5 checksum lines found
if no wget, do lynx download wget etc
By including this type of header
#!/bin/bash
#
# Install all tools from debian-server-tools.
#
# VERSION :0.3
# DATE :2014-08-01
# AUTHOR :Viktor Szépe <[email protected]>
# LICENSE :The MIT License (MIT)
# URL :https://github.com/szepeviktor/debian-server-tools
# BASH-VERSION :4.2+
You could use this function
Get_meta() {
# defaults to self
local FILE="${1:-$0}"
# defaults to "VERSION"
local META="${2:-VERSION}"
local VALUE="$(head -n 30 "$FILE" | grep -m 1 "^# ${META}\s*:" | cut -d':' -f 2-)"
if [ -z "$VALUE" ]; then
VALUE="(unknown)"
fi
echo "$VALUE"
}
Get_meta
to get the current version and Get_meta "$0" DATE
to get the release date.
when typing apt-cyg --version
I still see the same thing as was there in apt-cyg
not developed for years:
apt-cyg version 0.59
The MIT License (MIT)
Copyright (c) 2005-9 Stephen Jungels
While the old one is indistinguishable from this:
apt-cyg version 0.59
Written by Stephen Jungels
Copyright (c) 2005-9 Stephen Jungels. Released under the GPL.
Please at least update the years in copyright so users can quickly check whether their tool is something not touched since 2009 or maybe it's actively developed.
I have hit a motivational dead zone with Cygwin and apt-cyg. My issue is that
apt-cyg searchall feature relies on the site
http://cygwin.com/cgi-bin2/package-grep.cgi
which you could safely say is broken. This is a typical experience with the site
$ time cygcheck -p bin/aclocal
cygcheck: unable to contact cygwin.com site, InternetOpenUrl() failed: The
operation timed out
(win32 error 12002)
real 0m31.132s
user 0m0.016s
sys 0m0.031s
As a developer, I cannot deal with a package manager that times out to 50% of
the searches. So while I would love to fix #19 and make further improvements,
until searchall
is fixed I am likely to only accept PRs and make no further
commits. If you wish to support this issue, you can send mail [email protected]
Here are the relevant threads
http://cygwin.com/ml/cygwin/2014-05/msg00462.html
http://cygwin.com/ml/cygwin/2014-06/msg00122.html
Can apt-cyg be installed directly from Cygwin's setup?
Also how does this select mirrors?
Having some strange issue here which I cannot find the reason for, when trying to install any package it dowloads OK but it won't install it.
`+ echo Installing zsh
Installing zsh
It simply stops here with no explanation why, this comes from line 394
tar tf $bn | gzip > /etc/setup/"$pkg".lst.gz
any ideas why or how to debug it further?
Please put/update the installation guide as similar in the google code.
kk@x200 ~
$ apt-cyg update
wget is not installed, using lynx as fallback
Updated setup.ini
kk@x200 ~
$ apt-cyg install wget
Package wget is already installed, skipping
kk@x200 ~
I got the following error when I try to execute it
The program or feature "??\C:\cygwin64\bin\apt-cyg.exe" cannot start or run due to incompatibility with 64-bit version of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available
$ head -2 /etc/setup/setup.rc
last-cache
C:\cygwin64
$ apt-cyg install wget
mkdir: cannot create directory ‘//http%3a%2f%2fmirrors.kernel.org%2fsourceware%2fcygwin%2f’: Read-only file system
/usr/bin/apt-cyg: line 149: cd: //http%3a%2f%2fmirrors.kernel.org%2fsourceware%2fcygwin%2f/x86_64: No such file or directory
Installing wget
[..]
This would allow me to query for whether a package is already installed within cygwin, without grepping the /etc/setup/installed.db repository myself.
Not only would it be a convenience, but it would allow developers to get back a zero return code for installed and a non-zero return code for not installed without knowing that /etc/setup/installed.db exists as an implementation detail.
It would also allow for a developer to write something like:
${pkgMgr} list installed ${pkgName}
This would provide the same exit code, regardless of whether ${pkgMgr}
were set to "yum", for example, on CentOS or RHEL, or set to "apt-cyg" on Cygwin.
Thanks in advance for your consideration.
Example yum output for comparison:
[user@computer ~]# yum list installed wget
Installed Packages
wget.x86_64 1.12-1.4.el6 @anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3
[user@computer ~]# echo $?
0
[user@computer ~]# yum list installed some_unheard_of_package
Error: No matching Packages to list
[user@computer ~]# echo $?
1
Regards,
Mike
I received the following error when trying to install libsndfile-devel
with wget
installed on Windows 7. It looks like the full path isn't being passed to md5sum
.
(As an aside, what are the major drawbacks to using lynx
compared to wget
? Have you considered having the shell script automatically install wget
if it is not installed already?)
$ apt-cyg install libsndfile-devel
Installing libsndfile-devel
--2014-12-30 06:17:46-- http://mirrors.kernel.org/sourceware/cygwin//x86_64/release/libsndfile/libsndfile-devel/libsndfile-devel-1.0.25-1.tar.bz2
Resolving mirrors.kernel.org (mirrors.kernel.org)... 198.145.20.143, 149.20.37.36, 2001:4f8:4:6f:0:1994:3:14, ...
Connecting to mirrors.kernel.org (mirrors.kernel.org)|198.145.20.143|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17007 (17K) [application/octet-stream]
Saving to: ‘sourceware/cygwin/x86_64/release/libsndfile/libsndfile-devel/libsndfdevel-1.0.25-1.tar.bz2’
sourceware/cygwin/x 100%[=====================>] 16.61K --.-KB/s in 0.04s
2014-12-30 06:17:47 (406 KB/s) - ‘sourceware/cygwin/x86_64/release/libsndfile/libsndfile-devel/libsndfile-devel-1.0.25-1.tar.bz2’ saved [17007/17007]
FINISHED --2014-12-30 06:17:47--
Total wall clock time: 0.4s
Downloaded: 1 files, 17K in 0.04s (406 KB/s)
md5sum: x86_64/release/libsndfile/libsndfile-devel/libsndfile-devel-1.0.25-1.tar.bz2: No such file or directory
x86_64/release/libsndfile/libsndfile-devel/libsndfile-devel-1.0.25-1.tar.bz2: FAILED open or read
md5sum: WARNING: 1 listed file could not be read
I have the following error messages using the latest apt-cyg
when installing packages :
apt-cyg: line 468: [: -v : opérateur unaire attendu
apt-cyg: line 495: [: -v : opérateur unaire attendu
Apart from those log lines, everything seems to work fine.
Is there a way to upgrade packages?
e.g. apt-cyg upgrade bash
or apt-cyg upgrade --all
Currently it looks like spaces mess up apt-cyg a little bit:
mkdir: cannot create directory `/cygdrive/c/Users/Kenzie': Permission denied
/usr/bin/apt-cyg: line 149: cd: /cygdrive/c/Users/Kenzie/ftp%3a%2f%2fftp.gtlib.gatech.edu%2fpub%2fcygwin%2f/x86_64: No such file or directory
During installation in cygwin 1.7.32(0.274/5/3) Windows 7:
I have installed apt-cyg by
curl https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -o apt-cyg
install apt-cyg /bin
Error:
apt-cyg install unzip
Installing unzip
--2015-01-02 14:31:46-- ftp://mirrors-uk.go-parts.com/cygwin//x86_64/release/unzip/unzip-6.0-1.tar.bz2
Length: 206350 (202K) [octet/stream]
Saving to: ‘cygwin/x86_64/release/unzip/unzip-6.0-1.tar.bz2’
100%[=====================================================================================================================================================================================================================================>] 206,350 327KB/s in 0.6s
2015-01-02 14:31:47 (327 KB/s) - ‘cygwin/x86_64/release/unzip/unzip-6.0-1.tar.bz2’ saved [206350/206350]
FINISHED --2015-01-02 14:31:47--
Total wall clock time: 1.3s
Downloaded: 1 files, 202K in 0.6s (327 KB/s)
md5sum: x86_64/release/unzip/unzip-6.0-1.tar.bz2: No such file or directory
x86_64/release/unzip/unzip-6.0-1.tar.bz2: FAILED open or read
md5sum: WARNING: 1 listed file could not be read
I have noticed a significant increase in speed when using wget with a user-agent applied, for instance something like:
wget_user_agent="${wget_user_agent:-Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0}"
wget -U "$wget_user_agent"
It will be great if we can have tab completion feature in it
[![Bountysource](https://api.bountysource.com/badge/issue?issue_id=27772962)](https://www.bountysource.com/issues/27772962-tab-completion?utm_source=27772962&utm_medium=shield&utm_campaign=ISSUE_BADGE)Script should check if there any instances working in the background
Does this tool - or will it in the future - support the change of mirrors?
When I use the version hosted in Google Code, apt-cyg show
lists my packages, but when I use the version hosted here, I get the message:
No packages found
Any ideas?
Script should check if package exists before downloading.
I downloaded and installed apt-cyg exactly according to the instructions ('lynx...' & 'install...') and got
/usr/bin/apt-cyg: rad 25: $'\r': command does not exist
/usr/bin/apt-cyg: rad 106: $'\r': command does not exist
/usr/bin/apt-cyg: rad 114: $'\r': command does not exist
/usr/bin/apt-cyg: rad 115: syntax error near unexpected synbol "$'{\r'"
'usr/bin/apt-cyg: rad 115: `function wget {
A dos2unix solved that problem. My mount says
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (text,posix=0,user,noumount,auto)
Great tool I'm using it much
please add -q -nv to the searchall wget command on line 427
427 wget -q -nv -O matches cygwin.com/cgi-bin2/package-grep.cgi?"$qs"
$ apt-cyg searchall dig.exe
bind-utils
rtf2html-htdig
Is there an environment variable or config option I can set to use HTTP for package downloads instead of FTP?
apt-get
will ask for confirmation in certain situations
apt-get sometimes asks for confirmation
however it appears apt-cyg
does not do this. I feel that when apt-cyg
is going to install packages that you didn't specifically want to install, then it should ask for confirmation like apt-get
.
Then this confirmation could be overridden by a command line switch, such as -y
. I am happy to code this if it will be accepted.
My cache directory is D:\Program Files\cygwin64,when I use apt-cyg to install package, it download package cache to D:\Program. I've seen the code of apt-cyg. You use awk print $1, which can only obtain D:\Program before the space. That cause this problem, hope you can fix it. Thank you!
Hi, I see your last commit, regarding the message in README.
-STATUS UPDATE 1-24-2016:
------------------------
+And now back to apt-cyg ;)
-Over the weekend apt-cyg lost it's only active maintainer. Since I am working on other things now,
-this project is basically read-only. That means I won't be responding to bug reports or issues.
-
-If you have a problem with apt-cyg:
-
-1. You might be able to fork it and fix it yourself, if you enjoy BASH programming
-2. Look for forks with an active maintainer, pick one that works for you, vote it up.
-
-And now back to apt-cyg...
Should we consider transcode-open/apt-cyg to be main repo of apt-cyg and continue to report issues/pull reqs here, or should we actively look for another home of apt-cyg?
Do you need volunteers?
What do you propose?
I normally use a regular cygwin mirror as well as a cygports mirror. apt-cyg just looks at the first mirror listed as the last mirror, when my configuration in fact has two. This can cause a failure to find packages that are in whatever happens to not be the first mirror.
Please add support for multiple "last mirror"s
I congratulate return of the apt-cyg. :-)
Welcome a new maintainer of the transcode-open/apt-cyg.
I'm happy to get a chance to merge our code to the trunk line.
But, ...
The original apt-cyg has been licensed under the GPLv2.
In this repository, the apt-cyg was re-published under the MIT license by Stephen Jungels who is the original author of the apt-cyg.
But why do you re-introduce the GPLv2 code into this repository from the original apt-cyg?
It produces serious conflicts of the license.
You can merge our code, but we can't merge your's.
I think that the initial revision to merge forks must be fc54d5c, not the clone from the original apt-cyg on the Google Code (45de191).
And it must be merged back to the original apt-cyg on the Google Code.
It's clean way for the MIT license.
Maybe, any other way remains the affect of the GPLv2.
I'll be happy, if you clean up the license problem.
Thank you.
$ apt-cyg update
mkdir: cannot create directory ‘//http%3a%2f%2fcygwin.mirror.constant.com%2f’: Read-only file system
/usr/bin/apt-cyg: line 149: cd: //http%3a%2f%2fcygwin.mirror.constant.com%2f/x86_64: No such file or directory
--2015-07-01 19:36:55-- http://cygwin.mirror.constant.com//x86_64/setup.bz2
Resolving cygwin.mirror.constant.com (cygwin.mirror.constant.com)... 108.61.5.83
Connecting to cygwin.mirror.constant.com (cygwin.mirror.constant.com)|108.61.5.83|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1417604 (1.4M) [application/octet-stream]
Saving to: ‘setup.bz2’
setup.bz2 100%[=====================>] 1.35M 653KB/s in 2.1s
2015-07-01 19:36:57 (653 KB/s) - ‘setup.bz2’ saved [1417604/1417604]
Updated setup.ini
patch pull 55 #55
I have a company proxy that I need to use in order to dial out. I tried:
export http_proxy=http://proxy.com/
and the same for https_proxy, but no use. Also, can we change the binary directory of the installation of the packages we want to install?
I have a company proxy that I need to use in order to dial out. I tried:
export http_proxy=http://proxy.com/
and the same for https_proxy, but no use. Also, can we change the binary directory of the installation of the packages we want to install?
Could you help me what program creates /etc/setup/last-cache
?
http://cygwin.com/setup-x86.exe ?
Reference code here:
http://superuser.com/questions/570334/remove-unneeded-dependencies-from-cygwin
Could be really nice to have the feature directly in apt-cyg
[![Bountysource](https://api.bountysource.com/badge/issue?issue_id=5682249)](https://www.bountysource.com/issues/5682249-autoremove-feature?utm_source=5682249&utm_medium=shield&utm_campaign=ISSUE_BADGE)You can put this line on README for easy install on windows way (copy paste)
on cygwin terminal (copy-paste):
# curl -L -o $(cygpath -w /bin/apt-cyg) https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
no need chmod
Tested on portableapps.cygwin
I can't remove or install package, file /etc/setup/setup.rc
is exist and readable. here the log
$ apt-cyg install unzip
awk: cmd. line:2: warning: escape sequence `\<' treated as plain `<'
awk: cmd. line:3: fatal: cannot open file `/etc/setup/setup.rc' for reading (No such file or directory)
awk: cmd. line:6: fatal: cannot open file `/etc/setup/setup.rc' for reading (No such file or directory)
mkdir: cannot create directory '//x86': Read-only file system
/usr/bin/apt-cyg: line 158: cd: //x86: No such file or directory
Installing unzip
Unable to locate package unzip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.