Build initial groups

Context needs to be set in conaryrc
This can be done in only one chroot

cd ~/x86_64/f20s1.flnx.org_f/20s

cvc newpkg group-os

cd group-os

cat > group-os.recipe << EOF


class GroupOs(GroupSetRecipe):
    name = 'group-os'
    version = '20'

    def setup(r):
        r.dumpAll()

        repo = r.Repository('f20s1.flnx.org@f:20s', r.flavor)

        latest = repo.latestPackages()
        # We may be able to pare this back further and
        # depend even more on dependency resolution
        standard = latest.findByName('(' + '|'.join((
            'acl',
            'audit',
            'authconfig',
            'avahi-autoipd',
            'basesystem',
            'bash',
            'biosdevname',
            'bzip2',
            'ca-certificates',
            'chkconfig',
            'coreutils',
            'cpio',
            'cracklib',
            'cracklib-dicts',
            'cronie',
            'cronie-anacron',
            'crontabs',
            'curl',
            'dbus',
            'dbus-glib',
            'dbus-python',
            'device-mapper',
            'device-mapper-event',
            'device-mapper-persistent-data',
            'dhclient',
            'dhcp-common',
            'diffutils',
            'dnsmasq',
            'dracut',
            'dracut-config-rescue',
            'dtc',
            'e2fsprogs',
            'ebtables',
            'elfutils-libelf',
            'expat',
            'fedora-logos',
            'fedora-release',
            'file',
            'filesystem',
            'findutils',
            'fipscheck',
            'firewalld',
            'freetype',
            'gawk',
            'gdbm',
            'gettext',
            'glib-networking',
            'glib2',
            'glibc',
            'glibc-common',
            'gmp',
            'gnupg2',
            'gnutls',
            'gobject-introspection',
            'gpgme',
            'grep',
            'groff-base',
            'grub2',
            'grub2-tools',
            'grubby',
            'gsettings-desktop-schemas',
            'gzip',
            'hardlink',
            'hostname',
            'hwdata',
            'info',
            'initscripts',
            'iproute',
            'iptables',
            'iputils',
            'kbd',
            'kbd-legacy',
            'kbd-misc',
            'kernel',
            'kmod',
            'kpartx',
            'less',
            'linux-firmware',
            'lua',
            'lvm2',
            'make',
            'man-db',
            'mozjs17',
            'ncurses',
            'ncurses-base',
            'nettle',
            'newt',
            'newt-python',
            'nspr',
            'nss',
            'nss-softokn',
            'nss-softokn-freebl',
            'nss-sysinit',
            'nss-tools',
            'nss-util',
            'openldap',
            'openssh',
            'openssh-clients',
            'openssh-server',
            'openssl',
            'os-prober',
            'p11-kit',
            'p11-kit-trust',
            'pam',
            'parted',
            'patch',
            'passwd',
            'pcre',
            'pinentry',
            'pkgconfig',
            'plymouth',
            'plymouth-scripts',
            'policycoreutils',
            'polkit',
            'polkit-pkla-compat',
            'popt',
            'ppp',
            'procps-ng',
            'pth',
            'pygobject3-base',
            'pygpgme',
            'pyliblzma',
            'python',
            'python-decorator',
            'python-iniparse',
            'python-pycurl',
            'python-six',
            'python-slip',
            'python-slip-dbus',
            'python-urlgrabber',
            'pyxattr',
            'readline',
            'rootfiles',
            'rpm',
            'rpm-python',
            'sed',
            'selinux-policy',
            'selinux-policy-targeted',
            'setup',
            'shadow-utils',
            'shared-mime-info',
            'slang',
            'sqlite',
            'sudo',
            'systemd',
            'sysvinit-tools',
            'tzdata',
            'uboot-tools',
            'ustr',
            'util-linux',
            'vim-minimal',
            'which',
            'xz',
            'yum',
            'yum-metadata-parser',
            'zlib')) + ')'
        )
        standard += standard.depsNeeded(latest)

        stdGrp = standard.createGroup('group-standard')
        pkgGrp = latest.createGroup('group-packages')
        r.Group(stdGrp + pkgGrp)


EOF

cvc ci -m "Initial Commit"

cd ..


cat > cookgroups << EOF
#!/bin/bash

source ./conary_local

time $CVC cook --no-deps --allow-flavor-change 'group-os[is:x86]' 
'group-os[is:x86_64]'
EOF


cat > conary_local << EOF
#!/bin/bash
export CONARY="/home/bsmith/$(arch)/conary/bin/conary"
export CVC="/home/bsmith/$(arch)/conary/bin/cvc"

EOF

./cookgroups

cd ~/x86_64/f20s1.flnx.org_f/20s-c

cvc newpkg group-conary-packages

cd group-conary-packages


cat > group-conary-packages.recipe < EOF

class GroupConaryPackages(GroupSetRecipe):
    name = 'group-conary-packages'
    version = '0'

    imageGroup = False
    checkPathConflicts = True


    plat_label = 'f20s1.flnx.org@f:20s'
    common_label = 'f20s1.flnx.org@f:20s-c'

    def setup(r):
        # DEBUG CODE
        r.dumpAll()

        repo = r.Repository(r.plat_label, r.flavor)
        common = r.Repository(r.common_label, r.flavor)

        # Some things really don't need to be in a subgroup
        packages = common.find(
            'mirrorball',
            'rmake',
            'rpath-xmllib',
            'xobj',
            )

        ## group-superclasses
        groupSuperclasses = common.find(
            'autopackage',
            'baserequires',
            'buildpackage',
            'capsule',
            'cpackage',
            'derived',
            'derivedcapsule',
            'fileset',
            'group',
            'groupinfo',
            'groupset',
            'package',
            'redirect',
            'userinfo',
            ).createGroup('group-superclasses')
        packages += groupSuperclasses.makeOptional()

        ## group-factories
        groupFactories = common.find(
            'capsule-kmod-import',
            'capsule-rpm-import',
            #'factory-capsule-rpm',
            ).createGroup('group-factories')
        packages += groupFactories.makeOptional()


        ## group-tags
        groupTags = common.find(
            'tag-cacheable-font',
            'tag-desktop-file',
            'tag-gdk-pixbuf-loader',
            'tag-gtk-input-method',
            'tag-gtk-update-icon-cache',
            'tag-info-file',
            'tag-initscript',
            'tag-kernel',
            'tag-mime-database',
            'tag-pangomodule',
            'tag-shell',
            'tag-usergroup-info',
            ).createGroup('group-tags')
        packages += groupTags.makeOptional()

        # group-conary-tools
        groupConaryTools = common.find(
            #'distro-policy', ##ADD ONCE FIXED
            'conary',
            'conary-build',
            'conary-policy',
            'conary-repository',
            )
        groupConaryTools = 
r.rmcomps(groupConaryTools).createGroup('group-conary-tools')

        packages += groupConaryTools

        # Check that the group can be dep closed by downstream consumers
        #os = repo.find('group-os')
        # This is slow...
        #packages.flatten().makeInstall().depsNeeded(os)

        r.Group(packages)

    def rmcomps(r, troveset):
        return troveset.makeOptional(troveset.flatten().components('devel', 
'devellib'))


EOF

cvc ci -m "Initial Commit"

cd ..

cat > conary_local << EOF
#!/bin/bash
export CONARY="/home/bsmith/$(arch)/conary/bin/conary"
export CVC="/home/bsmith/$(arch)/conary/bin/cvc"

EOF


cat > cookgroups << EOF
#!/bin/bash

source ./conary_local
time $CVC cook --no-deps --allow-flavor-change 'group-conary-packages[is:x86]' 
'group-conary-packages[is:x86_64]'

EOF

./cookgroups
--

Brett C. Smith
[email protected]
Sr Software Developer
Platform Deployment Technologies
(919)531-6635  -- x16635
_______________________________________________
Foresight-devel mailing list
[email protected]
https://lists.foresightlinux.org/mailman/listinfo/foresight-devel

Reply via email to