SMART Installing

| No Comments | No TrackBacks

I have decided to give SMART a chance on my openSUSE machine. YaST has been working fine, it is just remarkably slow when it first starts up. It has to load all the dependencies, foreign package source info files, etc, and can take three or four minutes to start up. I suppose I should follow my usual maxim and not try to fix something that isn't broken, because beside the slow start up time, I haven't been able to break YaST, and I'm usually pretty good at breaking application installers. So to complain about a 3 minute startup delay seems to be looking a gift horse in the mouth.

So that makes three package managers available with openSUSE - YaST is the standard one, ZMD is the new "corporate" one and SMART is the third party "better faster smaller" one. Zmd is the ZENworks Management Daemon, introduced as the default installer in 10.1, much to the chagrin of many. It remained the default in 10.2 but it seems in the latest news for 10.3, ZMD will be dropped in favor of getting YaST working better.

At its core, openSUSE uses RPMs as its packages, and these other things are just nice front ends to the remarkably complex flexible RPM command:

$ rpm --help
Usage: rpm [OPTION...]

Query options (with -q or --query):
  -c, --configfiles                list all configuration files
  -d, --docfiles                   list all documentation files
  --dump                           dump basic file information
  -l, --list                       list files in package
  -P, --patches                    list patches or patched files 
  --queryformat=QUERYFORMAT        use the following query format
  -s, --state                      display the states of the listed files
  -a, --all                        query/verify all packages
  -f, --file                       query/verify package(s) owning file
  -g, --group                      query/verify package(s) in group
  -p, --package                    query/verify a package file
  -W, --ftswalk                    query/verify package(s) from TOP file tree
                                   walk
  --pkgid                          query/verify package(s) with package
                                   identifier
  --hdrid                          query/verify package(s) with header
                                   identifier
  --fileid                         query/verify package(s) with file identifier
  --specfile                       query a spec file
  --triggeredby                    query the package(s) triggered by the
                                   package
  --whatrequires                   query/verify the package(s) which require a
                                   dependency
  --whatprovides                   query/verify the package(s) which provide a
                                   dependency
  --nomanifest                     do not process non-package files as
                                   manifests

Verify options (with -V or --verify):
  --nomd5                          don't verify MD5 digest of files
  --nofiles                        don't verify files in package
  --nodeps                         don't verify package dependencies
  --noscript                       don't execute verify script(s)
  -a, --all                        query/verify all packages
  -f, --file                       query/verify package(s) owning file
  -g, --group                      query/verify package(s) in group
  -p, --package                    query/verify a package file
  -W, --ftswalk                    query/verify package(s) from TOP file tree
                                   walk
  --pkgid                          query/verify package(s) with package
                                   identifier
  --hdrid                          query/verify package(s) with header
                                   identifier
  --fileid                         query/verify package(s) with file identifier
  --specfile                       query a spec file
  --triggeredby                    query the package(s) triggered by the
                                   package
  --whatrequires                   query/verify the package(s) which require a
                                   dependency
  --whatprovides                   query/verify the package(s) which provide a
                                   dependency
  --nomanifest                     do not process non-package files as
                                   manifests

File tree walk options (with --ftswalk):
  --comfollow                      FTS_COMFOLLOW: follow command line symlinks
  --logical                        FTS_LOGICAL: logical walk
  --nochdir                        FTS_NOCHDIR: don't change directories
  --nostat                         FTS_NOSTAT: don't get stat info
  --physical                       FTS_PHYSICAL: physical walk
  --seedot                         FTS_SEEDOT: return dot and dot-dot
  --xdev                           FTS_XDEV: don't cross devices
  --whiteout                       FTS_WHITEOUT: return whiteout information

Signature options:
  --addsign                        sign package(s) (identical to --resign)
  -K, --checksig                   verify package signature(s)
  --delsign                        delete package signatures
  --import                         import an armored public key
  --resign                         sign package(s) (identical to --addsign)
  --nodigest                       don't verify package digest(s)
  --nosignature                    don't verify package signature(s)

Database options:
  --initdb                         initialize database
  --rebuilddb                      rebuild database inverted lists from
                                   installed package headers

Install/Upgrade/Erase options:
  --aid                            add suggested packages to transaction
  --allfiles                       install all files, even configurations
                                   which might otherwise be skipped
  --allmatches                     remove all packages which match <package>
                                   (normally an error is generated if
                                   <package> specified multiple packages)
  --badreloc                       relocate files in non-relocatable package
  -e, --erase=<package>+           erase (uninstall) package
  --excludedocs                    do not install documentation
  --excludepath=<path>             skip files with leading component <path> 
  --fileconflicts                  detect file conflicts between packages
  --force                          short hand for --replacepkgs --replacefiles
  -F, --freshen=<packagefile>+     upgrade package(s) if already installed
  -h, --hash                       print hash marks as package installs (good
                                   with -v)
  --ignorearch                     don't verify package architecture
  --ignoreos                       don't verify package operating system
  --ignoresize                     don't check disk space before installing
  -i, --install                    install package(s)
  --justdb                         update the database, but do not modify the
                                   filesystem
  --nodeps                         do not verify package dependencies
  --nomd5                          don't verify MD5 digest of files
  --nocontexts                     don't install file security contexts
  --noorder                        do not reorder package installation to
                                   satisfy dependencies
  --nosuggest                      do not suggest missing dependency
                                   resolution(s)
  --noscripts                      do not execute package scriptlet(s)
  --notriggers                     do not execute any scriptlet(s) triggered
                                   by this package
  --oldpackage                     upgrade to an old version of the package
                                   (--force on upgrades does this
                                   automatically)
  --percent                        print percentages as package installs
  --prefix=<dir>                   relocate the package to <dir>, if
                                   relocatable
  --relocate=<old>=<new>           relocate files from path <old> to <new>
  --repackage                      save erased package files by repackaging
  --replacefiles                   ignore file conflicts between packages
  --replacepkgs                    reinstall if the package is already present
  --test                           don't install, but tell if it would work or
                                   not
  -U, --upgrade=<packagefile>+     upgrade package(s)

Common options for all rpm modes and executables:
  -D, --define='MACRO EXPR'        define MACRO with value EXPR
  -E, --eval='EXPR'                print macro expansion of EXPR
  --macros=<FILE:...>              read <FILE:...> instead of default file(s)
  --nodigest                       don't verify package digest(s)
  --nosignature                    don't verify package signature(s)
  --rcfile=<FILE:...>              read <FILE:...> instead of default file(s)
  -r, --root=ROOT                  use ROOT as top level directory (default:
                                   "/")
  --querytags                      display known query tags
  --showrc                         display final rpmrc and macro configuration
  --quiet                          provide less detailed output
  -v, --verbose                    provide more detailed output
  --version                        print the version of rpm being used

Options implemented via popt alias/exec:
  --scripts                        list install/erase scriptlets from
                                   package(s)
  --setperms                       set permissions of files in a package
  --setugids                       set user/group ownership of files in a
                                   package
  --conflicts                      list capabilities this package conflicts
                                   with
  --obsoletes                      list other packages removed by installing
                                   this package
  --provides                       list capabilities that this package provides
  --requires                       list capabilities required by package(s)
  --suggests                       list capabilities this package suggests
  --recommends                     list capabilities this package recommends
  --enhances                       list capabilities this package enhances
  --supplements                    list capabilities this package supplements
  --basedon                        list packages this patch-rpm is based on
  --info                           list descriptive information from package(s)
  --changelog                      list change logs for this package
  --xml                            list metadata in xml
  --triggers                       list trigger scriptlets from package(s)
  --last                           list package(s) by install time, most
                                   recent first
  --filesbypkg                     list all files from each package
  --fileclass                      list file names with classes
  --filecolor                      list file names with colors
  --filecontext                    list file names with security context from
                                   header
  --fscontext                      list file names with security context from
                                   file system
  --recontext                      list file names with security context from
                                   policy RE
  --fileprovide                    list file names with provides
  --filerequire                    list file names with requires
  --fileclass                      list file names with classes
  --filecolor                      list file names with colors
  --buildpolicy=<policy>           set buildroot <policy> (e.g. compress man
                                   pages)
  --with=<option>                  enable configure <option> for build
  --without=<option>               disable configure <option> for build

Help options:
  -?, --help                       Show this help message
  --usage                          Display brief usage message

SMART promises better package management, always a real trial for every distribution. It gets high marks from many openSUSErs, and I figure I'll give it a go to see what happens.

I actually installed my first non-YaST package the other day. You have to be careful when installing new software, especially using the standard ./configure && make install method, as this circumvents the rpm package stuff and makes the package database obsolete. So you should always use an rpm to install stuff. According to this page, you don't need to necessarily use a "SUSE rpm", that any rpm should work. But you can also use checkinstall to do your work and create an rpm for you. You just replace the make install step with checkinstall, and it creates an rpm for you. From there, you can just do an rpm -i to install it. I did this with Crypto++ library and it worked like a charm.

$ cd cryptopp
$ ./configure
$ su -c checkinstall
checkinstall 1.6.0, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.



**************************************
**** RPM package creation selected ***
**************************************

This package will be built according to these values: 

1 -  Summary: [ libcryptopp, v5.5 ]
2 -  Name:    [ cryptopp ]
3 -  Version: [ 20070510 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ Applications/System ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ cryptopp ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ cryptopp ]

Enter a number to change any of them or press ENTER to continue: 4
Enter new release number: 
>> 5.5

This package will be built according to these values: 

1 -  Summary: [ libcryptopp, v5.5 ]
2 -  Name:    [ cryptopp ]
3 -  Version: [ 20070510 ]
4 -  Release: [ 5.5 ]
5 -  License: [ GPL ]
6 -  Group:   [ Applications/System ]
7 -  Architecture: [ i386 ]
8 -  Source location: [ cryptopp ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ cryptopp ]

Enter a number to change any of them or press ENTER to continue: 

Installing with make install...

========================= Installation results ===========================
mkdir -p /usr/include/crypto /usr/lib /usr/bin
cp *.h /usr/include/crypto
cp *.a /usr/lib
cp *.exe /usr/bin

======================== Installation successful ==========================

Copying documentation directory...
./
./Readme.txt

Copying files to the temporary directory...OK

Compressing man pages...OK

Building file list...OK

Building RPM package...OK

NOTE: The package will not be installed

Erasing temporary files...OK

Writing backup package...OK

Deleting temp dir...OK


**********************************************************************

 Done. The new package has been saved to

 /usr/src/packages/RPMS/i386/cryptopp-20070510-5.5.i386.rpm
 You can install it in your system anytime using: 

      rpm -i cryptopp-20070510-5.5.i386.rpm

**********************************************************************

No TrackBacks

TrackBack URL: http://linux.amazingdev.com/cgi-bin/mt/mt-tb.cgi/408

Leave a comment

About this Entry

This page contains a single entry by Jonathan published on May 10, 2007 6:13 AM.

Keeping the Agent Around was the previous entry in this blog.

More Linux Words is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.