Source-Changes archive

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

CVS commit: othersrc/external/bsd/set2pkg



Module Name:    othersrc
Committed By:   agc
Date:           Sat Jun 11 03:36:49 UTC 2016

Added Files:
        othersrc/external/bsd/set2pkg: Makefile README set2pkg.1 set2pkg.sh

Log Message:
Add set2pkg to othersrc - a small script to convert an installed set to a
pkgsrc package.

set2pkg allows us to convert from a set-based installation to being
able to use pkgsrc tools to maintain the base system.  This has
nothing to do with syspkgs, which have been around for over 15 years
but have gained little, if any, traction.

Firstly, you can convert a single set, any number of sets, or all sets
using set2pkg:

        % sudo set2pkg -a
        Converting base to netbsd-base-20160610
        Converting comp to netbsd-comp-20160610
        Converting etc to netbsd-etc-20160610
        Converting games to netbsd-games-20160610
        Converting man to netbsd-man-20160610
        Converting misc to netbsd-misc-20160610
        Converting modules to netbsd-modules-20160610
        Converting tests to netbsd-tests-20160610
        Converting text to netbsd-text-20160610
        Converting xbase to netbsd-xbase-20160610
        Converting xcomp to netbsd-xcomp-20160610
        Converting xetc to netbsd-xetc-20160610
        Converting xfont to netbsd-xfont-20160610
        Converting xserver to netbsd-xserver-20160610
        % pkg_info -I netbsd-\*
        netbsd-base-20160610 NetBSD system package for netbsd-base-20160610, created by set2pkg
        netbsd-comp-20160610 NetBSD system package for netbsd-comp-20160610, created by set2pkg
        netbsd-etc-20160610 NetBSD system package for netbsd-etc-20160610, created by set2pkg
        netbsd-games-20160610 NetBSD system package for netbsd-games-20160610, created by set2pkg
        netbsd-man-20160610 NetBSD system package for netbsd-man-20160610, created by set2pkg
        netbsd-misc-20160610 NetBSD system package for netbsd-misc-20160610, created by set2pkg
        netbsd-modules-20160610 NetBSD system package for netbsd-modules-20160610, created by set2pkg
        netbsd-tests-20160610 NetBSD system package for netbsd-tests-20160610, created by set2pkg
        netbsd-text-20160610 NetBSD system package for netbsd-text-20160610, created by set2pkg
        netbsd-xbase-20160610 NetBSD system package for netbsd-xbase-20160610, created by set2pkg
        netbsd-xcomp-20160610 NetBSD system package for netbsd-xcomp-20160610, created by set2pkg
        netbsd-xetc-20160610 NetBSD system package for netbsd-xetc-20160610, created by set2pkg
        netbsd-xfont-20160610 NetBSD system package for netbsd-xfont-20160610, created by set2pkg
        netbsd-xserver-20160610 NetBSD system package for netbsd-xserver-20160610, created by set2pkg
        %

The date in the package name is taken from the mtime on the /etc/mtree
metadata files which describe the installed sets on a machine.

We can now try them out, check entries, etc:

        % pkg_info netbsd-base
        Information for netbsd-base-20160610:

        *** PACKAGE MAY NOT BE DELETED ***
        Comment:
        NetBSD system package for netbsd-base-20160610, created by set2pkg

        Required by:

        Description:
        NetBSD system package for netbsd-base-20160610.

        This was automatically created from the base set
        by the set2pkg utility.

        This package may not be deleted, and has been created to allow
        better manipulation of systems by using the pkgsrc tools.

        More information can be found by browsing the mailing lists at
        the homepage.

        Hompage:
        https://www.NetBSD.org/

        *** PACKAGE MAY NOT BE DELETED ***

        % pkg_info -qL netbsd-base
        /bin/[
        /bin/cat
        /bin/chio
        /bin/chmod
        /bin/cp
        /bin/cpio
        /bin/csh
        /bin/date
        /bin/dd
        /bin/df
        /bin/domainname
        /bin/echo
        /bin/ed
        /bin/expr
        /bin/hostname
        /bin/kill
        /bin/ksh
        /bin/ln
        /bin/ls
        /bin/mkdir
        /bin/mt
        /bin/mv
        /bin/pax
        /bin/ps
        /bin/pwd
        /bin/rcmd
        /bin/rcp
        /bin/rm
        /bin/rmdir
        /bin/rump.dd
        /bin/sh
        /bin/sleep
        /bin/stty
        /bin/sync
        /bin/tar
        /bin/test
        /etc/release
        /etc/mtree/set.base
        ...
        % sudo pkg_admin check netbsd-base
        Password:
        pkg_admin: base: File `//dev/log' is in +CONTENTS but not on filesystem!
        .
        Checked 4870 files from 1 package.
        Done.
        %

Alistair Crooks
Fri Jun 10 18:53:12 PDT 2016


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/set2pkg/Makefile \
    othersrc/external/bsd/set2pkg/README \
    othersrc/external/bsd/set2pkg/set2pkg.1 \
    othersrc/external/bsd/set2pkg/set2pkg.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index