Skip to content

Instantly share code, notes, and snippets.

@arvati
Last active May 8, 2023 16:43
Show Gist options
  • Select an option

  • Save arvati/58926345cb8cb9e0953066468ed659b1 to your computer and use it in GitHub Desktop.

Select an option

Save arvati/58926345cb8cb9e0953066468ed659b1 to your computer and use it in GitHub Desktop.
Install pacman into git-bash manually

Instalar 7zip para windows
Abrir teminal com direitos de administrador
lista de pacotes disponiveis

cd ~/Downloads/
curl -O https://repo.msys2.org/msys/x86_64/xz-5.2.5-1-x86_64.pkg.tar.xz
curl -O https://repo.msys2.org/msys/x86_64/xz-5.2.6-1-x86_64.pkg.tar.zst
curl -O https://repo.msys2.org/msys/x86_64/liblzma-5.2.5-1-x86_64.pkg.tar.xz
curl -O https://repo.msys2.org/msys/x86_64/liblzma-5.2.6-1-x86_64.pkg.tar.zst
curl -O https://repo.msys2.org/msys/x86_64/zstd-1.4.7-1-x86_64.pkg.tar.xz
curl -O https://repo.msys2.org/msys/x86_64/zstd-1.5.2-2-x86_64.pkg.tar.zst
curl -O https://repo.msys2.org/msys/x86_64/libzstd-1.5.2-2-x86_64.pkg.tar.zst
curl -O https://repo.msys2.org/msys/x86_64/msys2-keyring-1~20220623-1-any.pkg.tar.zst
curl -O https://repo.msys2.org/msys/x86_64/pacman-mirrors-20220205-1-any.pkg.tar.zst
curl -O https://repo.msys2.org/msys/x86_64/pacman-6.0.1-9-x86_64.pkg.tar.zst

"/c/Program Files/7-Zip"/7z.exe x xz-5.2.5-1-x86_64.pkg.tar.xz
"/c/Program Files/7-Zip"/7z.exe x liblzma-5.2.5-1-x86_64.pkg.tar.xz

cd "/c/Program Files/Git/"
tar -xvf ~/Downloads/xz-5.2.5-1-x86_64.pkg.tar
tar -xvf ~/Downloads/liblzma-5.2.5-1-x86_64.pkg.tar
tar -I xz -xvf ~/Downloads/zstd-1.4.7-1-x86_64.pkg.tar.xz
tar -I zstd -xvf ~/Downloads/zstd-1.5.2-2-x86_64.pkg.tar.zst
tar -I zstd -xvf ~/Downloads/libzstd-1.5.2-2-x86_64.pkg.tar.zst
tar -I zstd -xvf ~/Downloads/xz-5.2.6-1-x86_64.pkg.tar.zst
tar -I zstd -xvf ~/Downloads/liblzma-5.2.6-1-x86_64.pkg.tar.zst
tar -I zstd -xvf ~/Downloads/msys2-keyring-1~20220623-1-any.pkg.tar.zst
tar -I zstd -xvf ~/Downloads/pacman-mirrors-20220205-1-any.pkg.tar.zst
tar -I zstd -xvf ~/Downloads/pacman-6.0.1-9-x86_64.pkg.tar.zst

curl --location https://gist.githubusercontent.com/arvati/58926345cb8cb9e0953066468ed659b1/raw/7d06a761af288d8fb22bbec987894ec47668a0c5/pacman.conf  > /etc/pacman.conf
#curl --location https://raw.githubusercontent.com/git-for-windows/git-sdk-64/main/etc/pacman.conf > /etc/pacman.conf
pacman-key --init
curl --location https://raw.githubusercontent.com/git-for-windows/build-extra/main/git-for-windows-keyring/git-for-windows.gpg | pacman-key --add - 

pacman-key --lsign-key A0AA7F57
pacman-key --lsign-key 5F92EFC1A47D45A1
pacman-key --lsign-key BB3AA74136C569BB
pacman-key --lsign-key 5F944B027F7FE2091985AA2EFA11531AA0AA7F57
pacman-key --lsign-key 5F92EFC1A47D45A1

# reduce time required to install packages by disabling pacman's disk space checking
sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf
pacman -Sy ansible --overwrite '*'
pacman -Sy --nodeps liblz4 libzstd libxxhash rsync --overwrite '*'
pacman -Sy --nodeps tree pass --overwrite '*'
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
HoldPkg = pacman
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg = bsdcpio bsdtar libarchive libserf libssh2 rsync libsasl mingw-w64-i686-libssh2 mingw-w64-x86_64-libssh2 mingw-w64-x86_64-osslsigncode mingw-w64-i686-python mingw-w64-i686-ruby mingw-w64-x86_64-python mingw-w64-x86_64-ruby
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 5
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Never
#SigLevel = Required
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
# Staging packages: enable at your own risk
# [staging]
# Server = https://repo.msys2.org/staging/
# SigLevel = Never
[clangarm64]
Include = /etc/pacman.d/mirrorlist.mingw
[git-for-windows]
Server = https://wingit.blob.core.windows.net/x86-64
[git-for-windows-mingw32]
Server = https://wingit.blob.core.windows.net/i686
[mingw32]
Include = /etc/pacman.d/mirrorlist.mingw
[mingw64]
Include = /etc/pacman.d/mirrorlist.mingw
[ucrt64]
Include = /etc/pacman.d/mirrorlist.mingw
[clang32]
Include = /etc/pacman.d/mirrorlist.mingw
[clang64]
Include = /etc/pacman.d/mirrorlist.mingw
[msys]
Include = /etc/pacman.d/mirrorlist.msys
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
@arvati
Copy link
Copy Markdown
Author

arvati commented Aug 14, 2022

@narvati
Copy link
Copy Markdown

narvati commented May 7, 2023

curl -L https://raw.githubusercontent.com/git-for-windows/build-extra/HEAD/git-for-windows-keyring/git-for-windows.gpg |
pacman-key --add - &&
pacman-key --lsign-key E8325679DFFF09668AD8D7B67115A57376871B1C &&
pacman-key --lsign-key 3B6D86A1BA7701CD0F23AED888138B9E1A9F3986

pacman -S mingw-w64-x86_64-python3
pacman -S mingw-w64-x86_64-python-pyopenssl --overwrite "*"
https://slproweb.com/products/Win32OpenSSL.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment