Blog do Cleuby
Tutorial Swaret (Nivel Básico)
O Swaret, é o sistema de atualização do Slackware, é uma ferramenta muito simples e de muita utilidade, para uma correta atualização do seu sistema Slackware, bem como resolvendo todas as suas dependencias de arquivos, eu uso e recomendo, aqui vai algumas dicas de configuração e utilização do Slackware.
1º Como instalar o Swaret.
Vamos baixar primeiramente o Swaret.
Download do Swaret
Eu optei pela versão de desenvolvimento, mas você pode escolher a que lhe convier. pois as opções são parecidas.
Instalando o Swaret
Éssa é a parte fácil.
Como root:
#installpkg swaret-xxxxxxxx.tgz
Onde xxxx, é a versão do Swaret
Configurando o Swaret
Toda a configuração do Swaret, encontra-se no arquivo /etc/swaret.conf
Partes Importantes do Swaret.conf
Versão do Slackware
VERSION=current
Aqui será especificado a versão do Slackware em uso.
Ex.
Se eu estiver utilizando a versão 11, ficará assim:
VERSION=11.0
Lembrar que para utilizar a versão em desenvolvimento, deverá ser utilizado, assim:
VERSION=current
Repositórios
Local de onde o Slackware irá buscar suas atualizações.
Você poderá inserir mirrors ou deletar, desde que sejam válidos.
#ROOT=file:/mnt/cdrom #ROOT=file:/mnt/dvdrom #ROOT=file:/mnt/usbmemstick ROOT=ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-$VERSION ROOT=http://sunsite.cnlab-switch.ch/ftp/mirror/slackware/slackware-$VERSION ROOT=ftp://ftp.slackware.no/pub/linux/slackware/slackware-$VERSION ROOT=http://www.slackware.no/slackware/slackware-$VERSION ROOT=ftp://ftp.slackware.at/slackware-$VERSION ROOT=http://www.slackware.at/data/slackware-$VERSION ROOT=ftp://ftp.planetmirror.com/pub/slackware/slackware-$VERSION ROOT=http://ftp.planetmirror.com/pub/slackware/slackware-$VERSION #ROOT=rsync://rsync.slackware.no/slackware/slackware-$VERSION #ROOT=rsync://rsync.slackware.at/slackware/slackware-$VERSION #ROOT=file:/pub/slackware #ROOT=file:/mnt/nfsshare/slackware #ROOT=file:/mnt/sambashare/slackware
Exclusões de Pacotes (Lista Negra)
Aqui, você poderá especificar, quais pacotes, não deverão ser atualizados pelo Swaret.
# Basic Exclude # EXCLUDE=kernel EXCLUDE=lilo alsa swaret EXCLUDE=MANIFEST.bz2$ EXCLUDE=.*dl$ .*PACKAGER$ .*MYBUILD$
Checagem de Dependências
1 Liga a verificaçã das dependências, 0 desliga a verificação das dependências.
DEPENDENCY=1
Interfaces de Rede
Se estiver LO, e não funcionar, coloque onde está seu dispositivo de rede.
NIC=eth0
Olhem como está o meu Swaret.
# swaret.conf, Version: 1.6.3test3 # ### /etc/swaret.conf - SWARET EXAMPLE CONFIGURATION FILE ### # # Define a valid Slackware Linux Version. # (Used for Dependency Support and other Features) # # NOTE: If you want to use Slackware Linux Current, # set VERSION to 'current' (VERSION=current). # VERSION=current # # Define the language for status and error messages LANGUAGE=ENGLISH # # ---------------------------------------------------------- # Define Slackware (8.1 or Higher or Current) Linux Mirrors. # (Used for Official Slackware Linux Packages) # (Slackware Linux Mirrors available at http://www.slackware.com) # # Syntax: ROOT=PROTOCOL:URL # # NOTE: swaret will use the order of the specified ROOT URL's. # #ROOT=file:/mnt/cdrom #ROOT=file:/mnt/dvdrom #ROOT=file:/mnt/usbmemstick ROOT=ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-$VERSION ROOT=http://sunsite.cnlab-switch.ch/ftp/mirror/slackware/slackware-$VERSION ROOT=ftp://ftp.slackware.no/pub/linux/slackware/slackware-$VERSION ROOT=http://www.slackware.no/slackware/slackware-$VERSION ROOT=ftp://ftp.slackware.at/slackware-$VERSION ROOT=http://www.slackware.at/data/slackware-$VERSION ROOT=ftp://ftp.planetmirror.com/pub/slackware/slackware-$VERSION ROOT=http://ftp.planetmirror.com/pub/slackware/slackware-$VERSION #ROOT=rsync://rsync.slackware.no/slackware/slackware-$VERSION #ROOT=rsync://rsync.slackware.at/slackware/slackware-$VERSION #ROOT=file:/pub/slackware #ROOT=file:/mnt/nfsshare/slackware #ROOT=file:/mnt/sambashare/slackware # # ----------------------------------------------------------- # Define Repository URL's with Slackware Linux Packages. # (Used for Repository Slackware Linux Packages) # (Repository URL's available at http://swaret.sourceforge.net and # at http://www.linuxpackages.net/mirrors.php) # # NOTE 1: To use a Local Repository or Remote Repository, # be sure it contains the following Files: # - CHECKSUMS.md5 (For MD5 Sum, REQUIRED) # - FILELIST.TXT (For Package Name + Size, REQUIRED) # - PACKAGES.TXT (For Package Description, NOT REQUIRED) # - MANIFEST.bz2 (For Dependency Support, NOT REQUIRED) # NOTE 2: To create your own Repository, use 'swaret-tools'. # You can get 'swaret-tools' at http://swaret.sourceforge.net! # # Syntax: REPOS_ROOT=REPOSITORYNAME%PROTOCOL:URL # # NOTE 1: The REPOSITORY NAME can only be ONE Keyword! # NOTE 2: swaret will use the order of the specified REPOS_ROOT URL's. # #REPOS_ROOT=LinuxPackagesDOTNET%http://www2.linuxpackages.net/packages/Slackware-10.0 # #REPOS_ROOT=My_Slackware_Packages_On_CD-ROM%file:/mnt/cdrom #REPOS_ROOT=My_Slackware_Packages_On_DVD-ROM%file:/mnt/dvdrom #REPOS_ROOT=My_Slackware_Packages_On_USB_Memory_Stick%file:/mnt/usbmemstick #REPOS_ROOT=SomeRemoteRepository%ftp://ftp.someremoterepository.net/slackware/slackware-10.0 #REPOS_ROOT=SomeRemoteRepository%http://www.someremoterepository.net/slackware/slackware-10.0 #REPOS_ROOT=SomeRemoteRepository%rsync://rsync.someremoterepository.net/slackware/slackware-10.0 # # ------------------------------------------------------------ # Define Libraries (8.1 or Higher or Current) List Mirrors. # (Used for Dependency Support) # # NOTE 1: You need to specify a Libraries List Mirror which # contains a 'libraries-VERSION' File. # # NOTE 2: To create the Libraries List, use 'swaret-tools'. # You can get 'swaret-tools' at http://swaret.sourceforge.net! # You can also clear all DEP_ROOT Variable(s) which will # allow swaret to create the Libraries List for you # during Dependency Check using the defined ROOT Variable(s) above. # # Syntax: DEP_ROOT=PROTOCOL:URL # # NOTE: swaret will use the order of the specified DEP_ROOT URL's. # DEP_ROOT=http://swaret.sourceforge.net #DEP_ROOT=file:/mnt/cdrom #DEP_ROOT=file:/mnt/dvdrom #DEP_ROOT=file:/mnt/usbmemstick #DEP_ROOT=file:/pub/swaret #DEP_ROOT=file:/mnt/nfsshare/swaret #DEP_ROOT=file:/mnt/sambashare/swaret # # ---------------------------------------------------------- # General Settings # # Do you want swaret to use Random Slackware Linux Mirrors? # -> 1 for yes, 0 for no. # RANDOMR=0 # # Do you want swaret to back-up your packages when upgradeing? # -> If set to 1, old packages are backed up in $CACH_DIR/rollback. # Normally this is /var/swaret/rollback. ROLLBACKMAX is the number # of "upgrades" that will be backed up before old backups will be # removed. Turning on rollback means upgrading packages takes # longer, but it is more safe. # -> If set to 0, swaret will not back up packages. # ROLLBACK=0 ROLLBACKMAX=3 # # Do you want swaret to parse all the Package Descriptions? # -> If set to 1, swaret will also match Packages whose Description # is matching the Keyword(s) you specify after --ACTION. # NOTE: swaret will parse all the Package Descriptions for this, # and might slow down swaret when using an older System. # -> If set to 0, swaret will not use Package Descriptions # to match one or more Packages. # USEPKGDESC=0 # # If you don't want swaret to Upgrade, Install, Re-Install, Download,... # some Packages, add the KEYWORDS to the EXCLUDE Variable. # To disable Exclude Method: swaret --exclude -off # To enable Exclude Method: swaret --exclude -on # # NOTE: You can add ANY EXTENDED REGEXP (Regular Expression) to the EXCLUDE Variable(s) # # Basic Exclude # EXCLUDE=kernel EXCLUDE=lilo swaret EXCLUDE=MANIFEST.bz2$ EXCLUDE=.*dl$ .*PACKAGER$ .*MYBUILD$ # # Advanced Exclude # Syntax: KEYWORD[DONT_EXCLUDE_ME_KEYWORD1,DONT_EXCLUDE_ME_KEYWORD2,...] # Example: kde-i18n[nl,en_GB] koffice-i18n[nl,en_GB] # #EXCLUDE=kde-i18n[nl,en_GB] koffice-i18n[nl,en_GB] # # Do you want to enable Dependency Check? # -> If set to 1, swaret will start the Dependency Check after # every Upgrade, Install and Re-Install Procedure. # -> If set to 0, swaret will not start the Dependency Check # after any Procedure. # DEPENDENCY=1 # # Do you want swaret to Search for missing Libraries (and Fix) # which could be found on your System, but not tracked by ldconfig? # -> 1 for yes, 0 for no. # DSEARCHLIB=1 # # Set to 1, if you want swaret to use the 'slocate' program # to Search for missing Libraries. # (be sure to issue the 'updatedb' Command regularly!) # If DSEARCHM is set to 0, swaret will use # the 'find' program to locate missing Libraries. # -> 1 for yes, 0 for no. # DSEARCHM=0 # # Start MD5 Check after Fetching Packages, Patches and Sources? # -> 1 for yes, 0 for no. # MD5CHECK=1 # # Start GPG Signature Check after Fetching Packages, Patches and Sources? # # NOTE: Check out F.A.Q. (--faq gpg) how to Import a Public GPG Key which # will be used by the GPG Signature Check. # # -> 1 for yes, 0 for no. # GPGCHECK=0 # # Show Description for Packages during # Upgrade, Install, Re-Install,... Procedures? # -> If set to 0, you will not see a Description. # -> If set to 1, you will see a Description. # DESC=0 # # Cache Directory for (Repository) Packages and Sources. # CACHE_DIR=/var/swaret # # Enable Logging? # -> 1 for yes, 0 for no. # LOG=1 # # swaret Log File # LOG_FILE=/var/log/swaret # # Show Warnings? # -> 1 for yes, 0 for no. # WARNINGS=1 # # Show Information? # -> 1 for yes, 0 for no. # INFORMATION=1 # # ------------------------------------------------------------- # Network Settings # # Network Interface # Use this if you have a Network Interface. # NIC=eth0 # # Local Interface # Use this if you do not have a Network Interface. # # For Example (CD-ROM): # You got a Slackware Linux CD-ROM, # mount the CD-ROM to /mnt/cdrom and # set ROOT to 'file:/mnt/cdrom' in /etc/swaret.conf. # Also, set NIC to 'lo' (Local Loop Device). # # NIC=lo # # Progress # If set to 0, swaret will use the '%' Download Interface. # If set to 1, swaret will use the 'size' Download Interface. # If set to 2, swaret will use the 'wget/rsync' Download Interface. # PROGRESS=0 # # Timeout for wget and/or rsync. # -> Number of seconds for Timeout # TIMEOUT=35 # # Retries for wget and/or rsync. # -> Number of Retries # RETRIES=5 # # Behind a Firewall? Using FTP Mirrors? # -> 1 for yes, 0 for no # PASSIVE_FTP=1 # # If you want HTTP or FTP Proxy Support, # uncomment and Setup the following Variable: # # WGET_PROXY=http://IP or HOST:PORT # # If you want RSYNC Proxy Support, # uncomment and Setup the following Variable: # # RSYNC_PROXY=IP or HOST:PORT #
Longo né, mas não vamos mexer muito nesse arquivo, vamos nos deter, somente na parte de versões.
Como atualizar meu sistema
Para atualizar é muito simples. Somente execute os seguintes comandos:
#swaret –update
Atualiza a lista de arquivos
#swaret –upgrade -a
Atualiza os arquivos, onde -a, não pede confirmação de atualização, você não precisa responder as perguntas, assume yes para todas as perguntas.
Uma atualização do swaret, tem a seguinte forma.
root@cleuby:~# swaret --update swaret 1.7.0test4-1 [ ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current ] ### Fetching CHECKSUMS List File... DONE! ### Fetching FILELIST List File... DONE! ### Fetching PACKAGES List File for Packages... DONE! ### Fetching PACKAGES List File for Extra Packages... DONE! ### Fetching ChangeLog... DONE! => Generating List Files... DONE! root@cleuby:~# swaret --upgrade swaret 1.7.0test4-1 => Creating EXCLUDE List.... [1]+ Stopped swaret --upgrade root@cleuby:~# swaret --upgrade -a swaret 1.7.0test4-1 => Creating EXCLUDE List..... DONE! Listing all available Packages... New: arts-1.4.2-i486-1 (1314 kB) - Installed: arts-1.4.1-i486-1 New: espgs-8.15rc3-i486-2 (5952 kB) - Installed: espgs-8.15rc3-i486-1 New: etc-5.1-noarch-10 (251 kB) - Installed: etc-5.1-noarch-9 New: hotplug-2004_09_23-noarch-4 (46 kB) - Installed: hotplug-2004_09_23-noarch-3 New: jre-1_5_0_04-i586-1 (29926 kB) - Installed: jre-1_5_0_03-i586-1 New: kdeaccessibility-3.4.2-i486-1 (7981 kB) - Installed: kdeaccessibility-3.4.1-i486-1 New: kdeaddons-3.4.2-i486-1 (2213 kB) - Installed: kdeaddons-3.4.1-i486-1 New: kdeadmin-3.4.2-i486-1 (1449 kB) - Installed: kdeadmin-3.4.1-i486-1 New: kdeartwork-3.4.2-i486-2 (17771 kB) - Installed: kdeartwork-3.4.1-i486-2 New: kdebase-3.4.2-i486-1 (27049 kB) - Installed: kdebase-3.4.1-i486-1 New: kdegames-3.4.2-i486-1 (9837 kB) - Installed: kdegames-3.4.1-i486-1 New: kdegraphics-3.4.2-i486-1 (8482 kB) - Installed: kdegraphics-3.4.1-i486-1 New: kde-i18n-pt_BR-3.4.2-noarch-1 (10839 kB) - Installed: kde-i18n-pt_BR-3.4.1-noarch-1 New: kdelibs-3.4.2-i486-1 (18513 kB) - Installed: kdelibs-3.4.1-i486-1 New: kdemultimedia-3.4.2-i486-1 (8116 kB) - Installed: kdemultimedia-3.4.1-i486-1 New: kdenetwork-3.4.2-i486-1 (9659 kB) - Installed: kdenetwork-3.4.1-i486-2 New: kdepim-3.4.2-i486-1 (16743 kB) - Installed: kdepim-3.4.1-i486-1 New: kdetoys-3.4.2-i486-1 (2962 kB) - Installed: kdetoys-3.4.1-i486-1 New: kdeutils-3.4.2-i486-1 (3146 kB) - Installed: kdeutils-3.4.1-i486-1 New: kdewebdev-3.4.2-i486-1 (6248 kB) - Installed: kdewebdev-3.4.1-i486-1 New: links-2.1pre17-i486-2 (1926 kB) - Installed: links-2.1pre17-i486-1 New: mc-4.6.1-i486-1 (1912 kB) - Installed: mc-4.6.0-i486-4 New: pkgtools-10.2.0-i486-4 (179 kB) - Installed: pkgtools-10.2.0-i486-3 New: smartmontools-5.33-i486-1 (216 kB) - Installed: smartmontools-5.30-i486-1 New: tcpip-0.17-i486-33 (773 kB) - Installed: tcpip-0.17-i486-32 New: udev-064-i486-2 (184 kB) - Installed: udev-064-i486-1 [ ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current ] ### Fetching arts-1.4.2-i486-1 (1314 kB)... --- [ ] 0%/100% [TOTAL: 0%/100%] FAILED! [ http://sunsite.cnlab-switch.ch/ftp/mirror/slackware/slackware-current ] ### Fetching arts-1.4.2-i486-1 (1314 kB)... --- [ ] 0%/100% [TOTAL: 0%/100%] FAILED! [ ftp://ftp.slackware.no/pub/linux/slackware/slackware-current ] ### Fetching arts-1.4.2-i486-1 (1314 kB)... --- [********************] 100%/100% [TOTAL: 0%/100%] DONE! => MD5 for Package arts-1.4.2-i486-1 OK! [ ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current ] ### Fetching espgs-8.15rc3-i486-2 (5952 kB)... --- [********************] 100%/100% [TOTAL: 3%/100%] DONE! => MD5 for Package espgs-8.15rc3-i486-2 OK! [ ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current ] ### Fetching etc-5.1-noarch-10 (251 kB)... --- [********************] 100%/100% [TOTAL: 3%/100%] DONE! => MD5 for Package etc-5.1-noarch-10 OK! [ ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current ]
Pronto, agora é só esperar e se divertir, depois de sua atualização do Slackware.
Logo, vou escrever um outro tutorial mais avançado do Swaret, espero que seja de bastante uso esse tutorial.
Abraço a Todos
Cleuby Castilho
- Brasil
- dezembro 8, 2006, 1:42 pm






Nossa muito maneiro o novo visual do seu blog, parabéns Cleuby. O tutorial está muito bom nota 10 muito bom. Segui esse tutorial e meu sistema esta atualizado =). Quando eu tiver mais pacieência eu começo a fazer tutoriais e screencasts heheheh.
Abração