Re: Capturing a Cygwin instance from another PC

2024-01-14 Thread Andrey Repin via Cygwin
Greetings, Brian Inglis via Cygwin!

>> That will lose the information about which packages were installed by
>> explicit user request vs. installed as a dependency.

> What that means is the complete information is only available in:

> /etc/setup/installed.db

> which has header:

> INSTALLED.DB 3

> then a list of installed packages in which each line specifies 3 fields:

> NAME NAME-VERSION-RELEASE.tar.bz2 MANUALLY_PICKED_FLAG

> in that 2nd field .tar.bz2 is the historically available download format
> but only VERSION-RELEASE is now significant, and the only packages you
> should be selecting to install are those which have a 3rd field manually
> picked flag == 1 as the others with 0 are automatically installed 
> dependencies e.g.

> $ awk '1 < FNR && /1/ == $3 { printf( "%s ", $1) }; END { printf( "\n" ) }' \
> ~/cygwin-64t/etc/setup/installed.db | wc
>1  52 686
> $ grep -c '\s0$' ~/cygwin-64t/etc/setup/installed.db
> 364
> $ awk '1 < FNR && /1/ == $3 { printf( "%s ", $1) }; END { printf( "\n" ) }' \
> ~/cygwin-64/etc/setup/installed.db | wc
>1 884   12124
> $ grep -c '\s0$' ~/cygwin-64/etc/setup/installed.db
> 1638

Been struck by the same situation (though, in a less distributed environment -
I've had to move Cygwin installation from one partition to another), I went
with a simple sed script:

>> sed -Ee '/ 1$/s/^([^[:space:]]+) [^[:space:]]+?(\.tar[^[:space:]]+ 1)$/\1 
>> \1-0\2/; t; d;' < installed.db

In essence:
  - for each line that ends with "1" (for packages, that were manually
installed), replace version string with "0";
  - if replacement was successful, go to next line;
  - delete line.

Once I made sure the script is right, I just appended its output to the end of
installed.db on target partition. Then run setup.exe and everything happened
according to plan.

This works for v3 database, so to be on a safe side, run setup once on the
source machine to update installation and database to the latest version.


-- 
With best regards,
Andrey Repin
Sunday, January 14, 2024 22:15:59

Sorry for my terrible english...


-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-12-07 Thread Andrew Schulman via Cygwin
> I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I 
> have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc 
> to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from cygwin.com 
> to the win11 PC. I ran it and chose "Install from Local Directory" and only 
> one shortcut for "Cygwin64 Terminal" was created on the desktop. No Cygwin 
> nor Cygwin-X folders were created on the Start menu. The original cygwin from 
> the Win10 PC had X installed also. 
> 
> Any idea how to get this done automatically? I know I can go and create 
> folders manually, etc., but it kind of a pain. Any help would be greatly 
> appreciated. Thanks.

https://stackoverflow.com/a/7366200/937392


-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-29 Thread Jose Isaias Cabrera via Cygwin
On Monday, November 27, 2023 12:43 PM, Brian Inglis expressed:
> Cc: Brian Inglis 
>
> On 2023-11-27 01:24, ASSI via Cygwin wrote:
> > Chris Wagner via Cygwin writes:
> >> If you just want to duplicate the package selection this trick is all
> >> you need.
> >> 1. Get the current list: cygcheck -cd |perl -ane '$\=","; print $F[0]'
> >> 2. Ignore the "Cygwin,Package" at the front.
> >> 3. Copy all that and put it as the command line argument to setup.exe -P
>
[clip]

> so from 2-7 times as many packages as manually picked could be dependencies
> automatically installed.

Thank you for all the responses on this thread, but, I went with Backwoods BC's 
method who wrote:

>I'll also add my vote for "this should be easier." I've done it a half
>a dozen times over the years and I found that the fastest method was
>to take several screen shots of Cygwin setup showing what I have
>installed, take those to the new machine, and manually go down the
>list selecting the same things. It's stupidly low tech, but it's
>actually quite fast (~ 5 minutes) and I know that it will always work
>without annoying glitches.

Which worked by me. I ran setup and by choosing "Picked" in the "View" choice 
in the machine that I wanted to clone, which I only had one screen. I know this 
is not asked often, but I have done this multiple times through my many years 
of my cygwin life, and I am sure many others have done it. If it was available, 
it would be used much frequently. So, here is my input on this (Perhaps a 9 
step process):
1. Run setup on the machine to be cloned (MachineA)
2. Click on the "Create File For Cloning" checkbox (NEW)
3. Click next (This will create a file that will be used for cloning) (NEW)
4. Place the file created on step 3 on the machine which will use the Cygwin 
close (MachineB)
5. Run setup on MachineB
6. Click on the "Use Clone File" (NEW)
7. Browse to choose the cloning file (NEW)
8. Read the cloning file (NEW)
9. Click Next and continue normal setup, but now, the packages will be chosen.

This will be a nice and easy way of cloning.

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-27 Thread Brian Inglis via Cygwin

On 2023-11-27 01:24, ASSI via Cygwin wrote:

Chris Wagner via Cygwin writes:

If you just want to duplicate the package selection this trick is all
you need.
1. Get the current list: cygcheck -cd |perl -ane '$\=","; print $F[0]'
2. Ignore the "Cygwin,Package" at the front.
3. Copy all that and put it as the command line argument to setup.exe -P



That will lose the information about which packages were installed by
explicit user request vs. installed as a dependency.


What that means is the complete information is only available in:

/etc/setup/installed.db

which has header:

INSTALLED.DB 3

then a list of installed packages in which each line specifies 3 fields:

NAME NAME-VERSION-RELEASE.tar.bz2 MANUALLY_PICKED_FLAG

in that 2nd field .tar.bz2 is the historically available download format but 
only VERSION-RELEASE is now significant, and the only packages you should be 
selecting to install are those which have a 3rd field manually picked flag == 1 
as the others with 0 are automatically installed dependencies e.g.


$ awk '1 < FNR && /1/ == $3 { printf( "%s ", $1) }; END { printf( "\n" ) }' \
~/cygwin-64t/etc/setup/installed.db | wc
  1  52 686
$ grep -c '\s0$' ~/cygwin-64t/etc/setup/installed.db
364
$ awk '1 < FNR && /1/ == $3 { printf( "%s ", $1) }; END { printf( "\n" ) }' \
~/cygwin-64/etc/setup/installed.db | wc
  1 884   12124
$ grep -c '\s0$' ~/cygwin-64/etc/setup/installed.db
1638

so from 2-7 times as many packages as manually picked could be dependencies 
automatically installed.


--
Take care. Thanks, Brian Inglis  Calgary, Alberta, Canada

La perfection est atteinte   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry

--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-27 Thread ASSI via Cygwin
Chris Wagner via Cygwin writes:
> If you just want to duplicate the package selection this trick is all
> you need.
>
> 1. Get the current list: cygcheck -cd |perl -ane '$\=","; print $F[0]'
> 2. Ignore the "Cygwin,Package" at the front.
> 3. Copy all that and put it as the command line argument to setup.exe -P

That will lose the information about which packages were installed by
explicit user request vs. installed as a dependency.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC (CORRECTION)

2023-11-26 Thread Chris Wagner via Cygwin

*** CORRECTION

On 2023-11-22 9:53 am, Jose Isaias Cabrera via Cygwin wrote:
I have a new Win11 PC, and I wanted to capture the same Cygwin setup 
that I have in another Win10 PC. I copied the C:\cygwin64 folder from 
the Win10 pc to the Win11 pc, then I downloaded a fresh 
setup-x86_64.exe from cygwin.com to the win11 PC. I ran it and chose 
"Install from Local Directory" and only one shortcut for "Cygwin64 
Terminal" was created on the desktop. No Cygwin nor Cygwin-X folders 
were created on the Start menu. The original cygwin from the Win10 PC 
had X installed also.


Any idea how to get this done automatically? I know I can go and create 
folders manually, etc., but it kind of a pain. Any help would be 
greatly appreciated. Thanks.


josé


Unfortunately you can't "just copy it" because Cygwin sets up file 
permissions and creates symlinks in very particular ways.  Even using 
WinRAR in Admin mode with all the capturing things turned on won't give 
you an exact copy.


To create a snapshot of a Cygwin installation you have to do it within 
Cygwin itself and then unpack it in another Cygwin environment.  The 
best option is this:


1. On the source: tar -vczf /cygwin64.tgz /etc /sbin /usr /var
2. Install only the *** Base category *** on the new machine using 
setup.exe

3. Unpack on the new machine: cd /; tar -vxzf /cygwin64.tgz


If you just want to duplicate the package selection this trick is all 
you need.


1. Get the current list: cygcheck -cd |perl -ane '$\=","; print $F[0]'
2. Ignore the "Cygwin,Package" at the front.
3. Copy all that and put it as the command line argument to setup.exe -P

You can see setup options with setup.exe -h.


HTH, thanks.



--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-26 Thread Chris Wagner via Cygwin

On 2023-11-22 9:53 am, Jose Isaias Cabrera via Cygwin wrote:
I have a new Win11 PC, and I wanted to capture the same Cygwin setup 
that I have in another Win10 PC. I copied the C:\cygwin64 folder from 
the Win10 pc to the Win11 pc, then I downloaded a fresh 
setup-x86_64.exe from cygwin.com to the win11 PC. I ran it and chose 
"Install from Local Directory" and only one shortcut for "Cygwin64 
Terminal" was created on the desktop. No Cygwin nor Cygwin-X folders 
were created on the Start menu. The original cygwin from the Win10 PC 
had X installed also.


Any idea how to get this done automatically? I know I can go and create 
folders manually, etc., but it kind of a pain. Any help would be 
greatly appreciated. Thanks.


josé


Unfortunately you can't "just copy it" because Cygwin sets up file 
permissions and creates symlinks in very particular ways.  Even using 
WinRAR in Admin mode with all the capturing things turned on won't give 
you an exact copy.


To create a snapshot of a Cygwin installation you have to do it within 
Cygwin itself and then unpack it in another Cygwin environment.  The 
best option is this:


1. On the source: tar -vczf /cygwin64.tgz /etc /sbin /usr /var
2. Install only base-cygwin on the new machine using setup.exe
3. Unpack on the new machine: cd /; tar -vxzf /cygwin64.tgz


If you just want to duplicate the package selection this trick is all 
you need.


1. Get the current list: cygcheck -cd |perl -ane '$\=","; print $F[0]'
2. Ignore the "Cygwin,Package" at the front.
3. Copy all that and put it as the command line argument to setup.exe -P

You can see setup options with setup.exe -h.


HTH, thanks.



--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-23 Thread Doug Henderson via Cygwin
> Jose Isaias Cabrera via Cygwin writes:
> > I have a new Win11 PC, and I wanted to capture the same Cygwin setup
> > that I have in another Win10 PC. I copied the C:\cygwin64 folder from
> > the Win10 pc to the Win11 pc,

I use the attached script (rename it to remove the .txt extension) to
clone my cygwin installation.

You can use the generated script to
1. perform a clean reinstall with the same set of packages as a
current  instance.
2. clone an existing install to another instance on this or another machine.

USE AT YOUR OWN RISK.

You must change the variables in the configuration section to your requirements.

You can also edit the generated script, which is created in the same
folder as the cygwin setup executable.


HTH
Doug
-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com
#!/usr/bin/bash -e
# djh-reinstall.sh
# created by Doug Henderson
# inspired by similar code posted on stackoverflow and the cygwin mailing list
# updated 2020-05-26 by Doug Henderson
# updated 2023-11-23 by Doug Henderson

# *** USE AT YOUR OWN RISK ***

# djh-reinstall.sh determines a minimal set of packages which will reinstall
# an existing cygwin instance.
#
# You can use the generated script to
# 1. perform clean reinstall with the same set of packages as a current
#instance.
# 2. clone an existing install to another instance on this or another
#machine.
#
# It uses the cygcheck-dep script from the cygcheck-dep package to
# determine a set of packages which have no dependent packages.
# It relies on cygwin setup to compute all dependencies.
# You must change the variables in the configuration section to your 
requirements.


arch=$( uname -m)
if [ $arch = "x86"] ; then
bits=32
elif [ $arch = "x86_64" ] ; then
bits=64
else
echo "Failed to determine bits for $arch"
exit 1
fi


# start of configuration section
# You must change the variables in this section to your requirements.

# SETUP_DIR contains the Cygwin setup executable
# This where you saved the installer from https://www/cygwin.com
SETUP_DIR_W="D:\\Users\\Doug\\Down_Loads\\cygwin"

# ROOT is the windows directory which will be the cygwin root directory.
# All of cygwin is installed below this directory.
# Select the 1st following line to install to same dir.
# select the  2nd following line for the recommended root directory.
# I recommend C:\cygwin32 and C:\cygwin64 for 32 bit and 64 bit installs.
# ROOT_W="$( cygpath -wa / )"
  ROOT_W="C:\\cygwin${bits}"

# CACHE is the windows directory containing the local package cache
# You can use one directory, or one for each architecture.
# It is strongly recommended that you use one for each architecture.
# This folder must not be under the ROOT folder.
  CACHE_W="D:\\Users\\Doug\\Down_Loads\\cygwin${bits}cache"

# MIRROR is the URL of a Cygwin mirror site. Pick your favourite, or fastest.
# Use the same one as you select when running the installer: setup_*.exe
  MIRROR="http://mirrors.kernel.org/sourceware/cygwin/;

# end of configuration section
##

# remove scatch files
rm -f /tmp/djh-check.*

USAGE="Usage: $0 [--incomplete | -I] [--long | -L] [--overlay DIR | -O DIR] 
[--pause | -P]
--incomplete, -I  - reinstall incomplete packages only
--long, -L- use setup's long instead of short form options
--overlay DIR, -O DIR - use DIR as an overlay package server
--pause, -P   - add a pause at end of command script
--verbose, -v - verbose, show some extra info
--debug, -D   - debug, show lots of extra info
--help, -h- display usage message and exit

WARNING: reinstalling incomplete python packages will downgrade
those python packages that were upgraded by using 'pip install -U PKG'.
"

INCOMPLETE=
LONG=
OVERLAY=
PAUSE=
VERBOSE=
VERSION=
DEBUG=

die() { echo "$*" >&2 ; exit 2 ; }  # complain to STDERR and exit with error
needs_arg() { if [ -z "$OPTARG" ] ; then die "No arg for --$OPT option" ; fi ; }

while getopts "hvDILO:PV-:" OPT ; do
# echo "*1st: OPT=$OPT OPTIND=$OPTIND NAME=$NAME OPTARG=$OPTARG"
if [ "$OPT" = "-" ]; then # long option: reformulate OPT and OPTARG
OPT="${OPTARG%%=*}"   # extract long option name
OPTARG="${OPTARG#$OPT}"   # extract long option argument (may 
be empty)
OPTARG="${OPTARG#=}"  # if long option argument, remove 
assigning `=`
# echo "*2nd: OPT=$OPT OPTIND=$OPTIND NAME=$NAME OPTARG=$OPTARG"
fi
case $OPT in
h | help )  echo "$USAGE" ; exit 0 ;;
v | verbose )   VERBOSE=true ;;
D | debug ) DEBUG=true ;;
I | incomplete )INCOMPLETE=true ;;
L | long )  LONG=true ;;
O | overlay )   needs_arg; OVERLAY=$OPTARG ;;
P | pause ) 

Re: Capturing a Cygwin instance from another PC

2023-11-23 Thread ASSI via Cygwin
Jose Isaias Cabrera via Cygwin writes:
> I have a new Win11 PC, and I wanted to capture the same Cygwin setup
> that I have in another Win10 PC. I copied the C:\cygwin64 folder from
> the Win10 pc to the Win11 pc,

This doesn't really work unless both machines are domain joined and all
SID for the installation are identical on both machines plus you'd need
to ensure that symlinks and stuff make it to the new machine unharmed.
It's actually easier to re-install from scratch and don't worry about
all those things.

>  then I downloaded a fresh
> setup-x86_64.exe from cygwin.com to the win11 PC. I ran it and chose
> "Install from Local Directory" and only one shortcut for "Cygwin64
> Terminal" was created on the desktop. No Cygwin nor Cygwin-X folders
> were created on the Start menu. The original cygwin from the Win10 PC
> had X installed also.
>
> Any idea how to get this done automatically? I know I can go and
> create folders manually, etc., but it kind of a pain. Any help would
> be greatly appreciated. Thanks.

Do a base install on the new machine, then copy over the
/etc/setup/installed.db from the old machine.  Then reset all the
version/release numbers in that file to zero:

sed -re 's/^(.+) (\1)-[0-9].+(\.bz2)/\1 \1-0-0\3/' -i.bak 
/etc/setup/installed.db

Close the Cygwin shell and run setup again and it will re-install
everything you've had installed on your old machine, thus ensuring that
all postinstall scripts will execute in the correct order.

If you've changed any system-wide configuration files like
/etc/nsswitch.conf or /etc/fstab, compare those to the new files just
installed and decide which version to keep.  Take note if you've used
the "desc" schema for user mapping and re-apply those to the SAM for
local accounts.  If you've had an SSH server running on the old machine
you will of course need to create new host keys and install the
services, again that's easier to do from scratch IMHO.

Once the system is set up to your satisfaction, copy any home
directories you want to keep on the new machine.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-23 Thread Corinna Vinschen via Cygwin
On Nov 22 23:44, Cedric Blancher via Cygwin wrote:
> On Wed, 22 Nov 2023 at 17:15, Eliot Moss via Cygwin  wrote:
> >
> > On 11/22/2023 10:43 AM, Bill Stewart via Cygwin wrote:
> > > On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:
> > >
> > > I have a new Win11 PC, and I wanted to capture the same Cygwin setup that 
> > > I
> > >> have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 
> > >> pc
> > >> to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from
> > >> cygwin.com to the win11 PC. I ran it and chose "Install from Local
> > >> Directory" and only one shortcut for "Cygwin64 Terminal" was created on 
> > >> the
> > >> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. 
> > >> The
> > >> original cygwin from the Win10 PC had X installed also.
> > >>
> > >
> > > I don't think "Install from Local Directory" means "reproduce same cygwin
> > > installation on a separate computer".
> >
> > In fact, it means to install using the package files in some local 
> > directory,
> > i.e., "assume the packages are already downloaded".
> >
> > It would be reasonable to copy over downloaded packages.
> >
> > I believe there are commands / techniques that would then make it fairly
> > easy to install that specific set of packages "from scratch" (but from
> > the local copy of the packages).  Copying *installed* file hierarchies
> > is trickier because of permission / ownership concerns.
> 
> Does Cygwin have a way to dump the list of installed packages, and
> feed that list back to Cygwin setup.exe?

You just call `cygcheck -cd' and create a tiny script massaging the output
into a comma-separated list.

This you can feed into a setup-x86-64.exe -P call.


Corinna

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-23 Thread Backwoods BC via Cygwin
On Thu, Nov 23, 2023 at 12:39 AM Eliot Moss via Cygwin
 wrote:
> On 11/22/2023 4:38 PM, Jose Isaias Cabrera wrote:
> > On Wednesday, November 22, 2023 11:15 AM, Eliot Moss expressed:
> >>
> >> On 11/22/2023 10:43 AM, Bill Stewart via Cygwin wrote:
> >> > On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:
> > [clip]
> >> >> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. 
> >> >> The
> >> >> original cygwin from the Win10 PC had X installed also.
> >> >>
> >> >
> >> > I don't think "Install from Local Directory" means "reproduce same cygwin
> >> > installation on a separate computer".
> >>
> >> In fact, it means to install using the package files in some local 
> >> directory,
> >> i.e., "assume the packages are already downloaded".
> >>
> >> It would be reasonable to copy over downloaded packages.
> >>
> >> I believe there are commands / techniques that would then make it fairly
> >> easy to install that specific set of packages "from scratch" (but from
> >> the local copy of the packages).  Copying *installed* file hierarchies
> >> is trickier because of permission / ownership concerns.
> >
> > Thanks, Eliot. Hmmm... I would have thought that by now this process would 
> > have been thought of.
>
> Not saying it hasn't, but since I don't have a ready answer to your
> question I was leaving that to other, more knowledgeable, folks to
> jump in and ill the gap :-) ...

I'll also add my vote for "this should be easier." I've done it a half
a dozen times over the years and I found that the fastest method was
to take several screen shots of Cygwin setup showing what I have
installed, take those to the new machine, and manually go down the
list selecting the same things. It's stupidly low tech, but it's
actually quite fast (~ 5 minutes) and I know that it will always work
without annoying glitches.

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-23 Thread Eliot Moss via Cygwin

On 11/22/2023 4:38 PM, Jose Isaias Cabrera wrote:

On Wednesday, November 22, 2023 11:15 AM, Eliot Moss expressed:


On 11/22/2023 10:43 AM, Bill Stewart via Cygwin wrote:
> On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:

[clip]

>> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. The
>> original cygwin from the Win10 PC had X installed also.
>>
>
> I don't think "Install from Local Directory" means "reproduce same cygwin
> installation on a separate computer".

In fact, it means to install using the package files in some local directory,
i.e., "assume the packages are already downloaded".

It would be reasonable to copy over downloaded packages.

I believe there are commands / techniques that would then make it fairly
easy to install that specific set of packages "from scratch" (but from
the local copy of the packages).  Copying *installed* file hierarchies
is trickier because of permission / ownership concerns.


Thanks, Eliot. Hmmm... I would have thought that by now this process would have 
been thought of.


Not saying it hasn't, but since I don't have a ready answer to your
question I was leaving that to other, more knowledgeable, folks to
jump in and ill the gap :-) ...

EM

--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


RE: EXTERNAL SENDER: Capturing a Cygwin instance from another PC

2023-11-22 Thread Dale Lobb (Sys Admin) via Cygwin
> -Original Message-
> From: Cygwin 
> On Behalf Of Jose Isaias Cabrera via Cygwin
> Sent: Wednesday, November 22, 2023 8:53 AM
> To: cygwin List 
> Subject: EXTERNAL SENDER: Capturing a Cygwin instance from another PC
>
>
> Greetings!
>
> I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I
> have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc
> to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from
> cygwin.com to the win11 PC. I ran it and chose "Install from Local Directory"
> and only one shortcut for "Cygwin64 Terminal" was created on the desktop.
> No Cygwin nor Cygwin-X folders were created on the Start menu. The
> original cygwin from the Win10 PC had X installed also.
>
> Any idea how to get this done automatically? I know I can go and create
> folders manually, etc., but it kind of a pain. Any help would be greatly
> appreciated. Thanks.
>
> josé
>
> --


  I've had some success doing this in the past (pre Cygwin64 days), but I did 
it using rsync from inside a Cygwin shell on the original machine, copying to a 
windows mapped drive pointing to the "C$" admin share of the target machine.  
Note: You will need admin privs on the target machine to use the C$ share.  You 
also will have to have the default mount setting in /etc/fstab to NOT include 
"noacl" (which it doesn’t by default) so that Cygwin file protection masks get 
copied, and you need to use a set of options for rsync that copy the file privs 
and dates.  I believe I used "rsync -av /cygdrive/c/cygwin64 /cygdrive/https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-22 Thread Cedric Blancher via Cygwin
On Wed, 22 Nov 2023 at 17:15, Eliot Moss via Cygwin  wrote:
>
> On 11/22/2023 10:43 AM, Bill Stewart via Cygwin wrote:
> > On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:
> >
> > I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I
> >> have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc
> >> to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from
> >> cygwin.com to the win11 PC. I ran it and chose "Install from Local
> >> Directory" and only one shortcut for "Cygwin64 Terminal" was created on the
> >> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. The
> >> original cygwin from the Win10 PC had X installed also.
> >>
> >
> > I don't think "Install from Local Directory" means "reproduce same cygwin
> > installation on a separate computer".
>
> In fact, it means to install using the package files in some local directory,
> i.e., "assume the packages are already downloaded".
>
> It would be reasonable to copy over downloaded packages.
>
> I believe there are commands / techniques that would then make it fairly
> easy to install that specific set of packages "from scratch" (but from
> the local copy of the packages).  Copying *installed* file hierarchies
> is trickier because of permission / ownership concerns.

Does Cygwin have a way to dump the list of installed packages, and
feed that list back to Cygwin setup.exe?

Ced
-- 
Cedric Blancher 
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-22 Thread Eliot Moss via Cygwin

On 11/22/2023 10:43 AM, Bill Stewart via Cygwin wrote:

On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:

I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I

have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc
to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from
cygwin.com to the win11 PC. I ran it and chose "Install from Local
Directory" and only one shortcut for "Cygwin64 Terminal" was created on the
desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. The
original cygwin from the Win10 PC had X installed also.



I don't think "Install from Local Directory" means "reproduce same cygwin
installation on a separate computer".


In fact, it means to install using the package files in some local directory,
i.e., "assume the packages are already downloaded".

It would be reasonable to copy over downloaded packages.

I believe there are commands / techniques that would then make it fairly
easy to install that specific set of packages "from scratch" (but from
the local copy of the packages).  Copying *installed* file hierarchies
is trickier because of permission / ownership concerns.

Best - EM

--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-22 Thread Ken Brown via Cygwin

On 11/22/2023 4:38 PM, Jose Isaias Cabrera via Cygwin wrote:

Thanks, Eliot. Hmmm... I would have thought that by now this process would have 
been thought of.


It has been:

  https://cygwin.com/pipermail/cygwin/2020-June/245384.html

Ken

--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: EXTERNAL SENDER: Capturing a Cygwin instance from another PC

2023-11-22 Thread Jose Isaias Cabrera via Cygwin
On Wednesday, November 22, 2023 11:20 AM, Dale Lobb (Sys Admin) expressed:
> Cc: cygwin@cygwin.com 
> 
>
> I've had some success doing this in the past (pre Cygwin64 days), but I did 
> it using rsync [clip]
>
Thanks, Dale. Too much work. ;-)

Interestingly enough, after running setup pointing locally, and then running 
setup pointing to "Install from Internet", it found some updates. But, still no 
X icons. I know what I need to do, but I just thought it would be as easy as 
what I thought would be logically thinking. :-)

Perhaps, this is a feature that should be added to setup. Just thinking 
out-loud. :-)

josé

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-22 Thread Jose Isaias Cabrera via Cygwin
On Wednesday, November 22, 2023 11:15 AM, Eliot Moss expressed:
>
> On 11/22/2023 10:43 AM, Bill Stewart via Cygwin wrote:
> > On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:
[clip]
> >> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. The
> >> original cygwin from the Win10 PC had X installed also.
> >>
> >
> > I don't think "Install from Local Directory" means "reproduce same cygwin
> > installation on a separate computer".
>
> In fact, it means to install using the package files in some local directory,
> i.e., "assume the packages are already downloaded".
>
> It would be reasonable to copy over downloaded packages.
>
> I believe there are commands / techniques that would then make it fairly
> easy to install that specific set of packages "from scratch" (but from
> the local copy of the packages).  Copying *installed* file hierarchies
> is trickier because of permission / ownership concerns.

Thanks, Eliot. Hmmm... I would have thought that by now this process would have 
been thought of.

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Capturing a Cygwin instance from another PC

2023-11-22 Thread Bill Stewart via Cygwin
On Wed, Nov 22, 2023 at 7:53 AM Jose Isaias Cabrera wrote:

I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I
> have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc
> to the Win11 pc, then I downloaded a fresh setup-x86_64.exe from
> cygwin.com to the win11 PC. I ran it and chose "Install from Local
> Directory" and only one shortcut for "Cygwin64 Terminal" was created on the
> desktop. No Cygwin nor Cygwin-X folders were created on the Start menu. The
> original cygwin from the Win10 PC had X installed also.
>

I don't think "Install from Local Directory" means "reproduce same cygwin
installation on a separate computer".

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Capturing a Cygwin instance from another PC

2023-11-22 Thread Jose Isaias Cabrera via Cygwin


Greetings!

I have a new Win11 PC, and I wanted to capture the same Cygwin setup that I 
have in another Win10 PC. I copied the C:\cygwin64 folder from the Win10 pc to 
the Win11 pc, then I downloaded a fresh setup-x86_64.exe from cygwin.com to the 
win11 PC. I ran it and chose "Install from Local Directory" and only one 
shortcut for "Cygwin64 Terminal" was created on the desktop. No Cygwin nor 
Cygwin-X folders were created on the Start menu. The original cygwin from the 
Win10 PC had X installed also. 

Any idea how to get this done automatically? I know I can go and create folders 
manually, etc., but it kind of a pain. Any help would be greatly appreciated. 
Thanks.

josé

-- 
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple