tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [GSoC2011][STATUS-UPDATE]Add support for FreeBSD package format, RPM and Debian packages(if time allows) to pkgsrc

I updated the documentation:


Added support for RPM packages.
Added support for Debian packages.

I checkout and bootstraped "pkgsrc" (Ubuntu). The name "flavor" is replaced with "pkgformat". 
I've installed the misc/rpm package from pkgsrc native format. I'm using default configuration.
rpm directory added in pkgformats(former flavors). *.mk for required private targets.

I plan to change it the same way as dpkg (see bellow). builddir paths need to be changed for
rpmbuild to work.

At bootstrap there is a check for native dpkg tools. If it is installed, the debian
pkgformat option can be used. I did not include option to use dpkg from pkgsrc. 

Used platforms Ubuntu 11.04 32-bit and 64-bit (i386, x86_64)

= Interface =
Packages are first created, then installed
to build package:
(b)make  PKG_FORMAT=rpm package

To install package:
(b)make  PKG_FORMAT=rpm install

to deinstall package:
(b)make  PKG_FORMAT=rpm deinstall 
This is not working for unprivileged user (su is called but _pkgformat-deinstall is not executed)
It is working for "root" user. I don't know why yet.

== Variables usable at load-time ==

A package system flavor must define the following variables so that they
can be used when loading Makefiles. (That is, no references to undefined

RPMBASE?= /usr/rpm
RPM_DBDIR?= /var/db/rpm

=== Packaging commands ===

pkg_* tools are not changed

== Make targets ==

* package - Implemented
* _pkgformat-check-vulnerable - Not tested
* _pkgformat-deinstall - Does not work for unprivileged user
* _pkgformat-show-depends   - Implemented
* _pkgformat-install-dependencies - Not tested
* _pkgformat-bootstrap-depends - Not tested
* _pkgformat-register     - This looks like pkgsrc-native specific target
* tarup     - This looks like pkgsrc-native specific target
* tarup-pkg     - This looks like pkgsrc-native specific target
* package-install           - Implemented
* _pkgformat-replace - Not tested
* _pkgformat-destdir-replace - Not tested
* _pkgformat-undo-replace - Not tested


* info - Implemented
* check - Not implemented
* list - Implemented
* show-downlevel - Implemented
* show-installed-depends - Implemented
* show-needs-update - Not implemented
* show-needs-update - Not implemented
* show-pkgsrc-dir - Not implemented
* show-depends-options - Implemented
* sid - See show-installed-depends

from - not implemented

The same applies to Debian packages.

Other notable problems:
- copyrights control file for Debian packages:
At the moment it contains generic message. It it should contain license and copyrights information
in Debian format. A license mapping to Debian supported licenses will be useful. 
- changelog control file for Debian packages:
At the moment it contains generic message. It it should contain changelog information in Debian format.
- pre-,post- install/remove scripts.
- generate conffiles, shlibs control files if applicable. 

Used rpm options:
The general form of an rpm query
Used as isInstalled check.
The general form of an rpm erase command
Used for deinstall
This installs a new package.
Use  the file system tree rooted at DIRECTORY for all operations.  Note that this means the database within DIRECTORY will be used for dependency checks and any scriptlet(s) (e.g.
%post if installing, or %prep if building, a package) will be run after a chroot(2) to DIRECTORY.
Used in case of cross-compile.

Same as using --replacepkgs, --replacefiles, and --oldpackage.
Allow an upgrade to replace a newer package with an older one.
Install the packages even if they replace files from other, already installed, packages.
Install the packages even if some of them are already installed on this system.

Don't do a dependency check before installing or upgrading a package
Used for initial testing before implementing dependency checks.
This  upgrades  or installs the package currently installed to a newer version.  This is the same as install, except all other version(s) of the package are removed after the new package
    is installed.
Display package information, including name, version, and description.  This uses the --queryformat if one was specified.
List capabilities on which this package depends.
List files in package.

Used dpkg options:
-l --list package-name-pattern...
List packages matching given pattern.
Used for isInstalled checks
-P -r, --remove, -P, --purge package...|-a|--pending
Remove an installed package. -r or --remove remove everything except conffiles. This may avoid having to reconfigure the package if it is reinstalled later. (Conffiles are config‐
uration  files that are listed in the DEBIAN/conffiles control file). -P or --purge removes everything, including conffiles. If -a or --pending is given instead of a package name,
then all packages unpacked, but marked to be removed or purged in file /var/lib/dpkg/status, are removed or purged, respectively. Note: some configuration files might  be  unknown
to  dpkg  because they are created and handled separately through the configuration scripts. In that case, dpkg won't remove them by itself, but the package's postrm script (which
is called by dpkg), has to take care of their removal during purge. Of course, this only applies to files in system directories, not  configuration  files  written  to  individual
users' home directories.
Used for _pkgformat-deinstall

Build a deb package.
-i --install package_file...
Install the package.
Changing root changes instdir to dir and admindir to dir/var/lib/dpkg.
Used in case of cross-compile.

Force or refuse (no-force and refuse mean the same thing) to do some things. things is a comma separated list of things specified below.  --force-help  displays  a  message
describing them.  Things marked with (*) are forced by default.
Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system.
all: Turns on (or off) all force options.
Used to ignore warnings.

-s  --status package-name...
Report status of specified package.

-L --listfiles package-name...
List files installed to your system from package-name.

Also pkgsrc/mk/pkgformats/ is included. I used this scrip for some simple tests.

Project on :

Home | Main Index | Thread Index | Old Index