salt icon indicating copy to clipboard operation
salt copied to clipboard

FreeBSD pkgng fromrepo problem

Open m87carlson opened this issue 11 years ago • 5 comments

There seem to be a few issues, but first, the environment:

uname -a
FreeBSD bup-1.discdrive.bayphoto.com 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #0: Mon Sep 15 14:35:52 UTC 2014     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64

salt --versions-report
           Salt: 2014.7.0
         Python: 2.7.8 (default, Nov  4 2014, 14:04:06)
         Jinja2: 2.7.3
       M2Crypto: 0.22
 msgpack-python: 0.4.2
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
        libnacl: Not Installed
         PyYAML: 3.11
          ioflo: Not Installed
          PyZMQ: 14.3.1
           RAET: Not Installed
            ZMQ: 4.0.4
           Mako: Not Installed

We use packages that we build internally, and the fromrepo argument does not work at all with pkg.install, and actually inserts erroneous opts in pkg.fetch.

pkg.fetch:

# salt-call pkg.fetch bash fromrepo=pkgng
[INFO    ] Executing command '/sbin/zfs help || :' in directory '/root'
[INFO    ] Executing command 'pkg fetch -y r pkgng -r pkgng bash' in directory '/root'
local:
    Updating pkgng repository catalogue...
    pkgng repository is up-to-date.
    Updating FreeBSD repository catalogue...
    FreeBSD repository is up-to-date.
    All repositories are up-to-date.
    pkg: No packages matching 'pkgng' have been found in the repositories
    pkg: No packages matching '-r' have been found in the repositories
    pkg: No packages matching 'pkgng' have been found in the repositories
    The following packages will be fetched:

    New packages to be FETCHED:
        R-3.0.2_3 (96.37% of 32 MB: 31 MB)
        bash-4.3.30_1 (3.63% of 32 MB: 1 MB)

    The process will require 32 MB more space.
    32 MB to be downloaded.
    Fetching R-3.0.2_3.txz... done
    Fetching bash-4.3.30_1.txz... done

pkg.install:


# salt-call pkg.install bash fromrepo=pkgng
[INFO    ] Executing command '/sbin/zfs help || :' in directory '/root'
[INFO    ] Executing command 'pkg info -ao' in directory '/root'
[INFO    ] Executing command 'pkg install  -y bash' in directory '/root'
[INFO    ] Executing command 'pkg info -ao' in directory '/root'
local:
    ----------
    bash:
        ----------
        new:
            4.3.30_1
        old:

    gettext:
        ----------
        new:
            0.19.3
        old:
            0.18.3.1_1
    gettext-runtime:
        ----------
        new:
            0.19.3
        old:

    gettext-tools:
        ----------
        new:
            0.19.3
        old:

# pkg info bash | grep repository
    repository     : FreeBSD

Here is the output of pkg -vv

# pkg -vv
Version                 : 1.3.8
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-10";
HANDLE_RC_SCRIPTS = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "freebsd:10:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://www.vuxml.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;


Repositories:
  FreeBSD: { 
    url             : "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest",
    enabled         : yes,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  pkgng: { 
    url             : "pkg+https://pkgng.discdrive.bayphoto.com/10.0-freebsd-amd64/server/",
    enabled         : yes,
    mirror_type     : "SRV",
    signature_type  : "PUBKEY",
    pubkey          : "/etc/pkg/pkgng.discdrive.bayphoto.com.pub"
  }

m87carlson avatar Dec 09 '14 19:12 m87carlson

Thanks for the report. It is under review

ssgward avatar Dec 11 '14 15:12 ssgward

@m87carlson Do you have a chance to test this? You can check it out from my fork if you want. We don't have a big FreeBSD footprint so we'd love to have some extra eyes on it.

cro avatar Dec 11 '14 22:12 cro

yeah, let me give it a shot!

m87carlson avatar Dec 12 '14 00:12 m87carlson

@cro This works:

pkg.fetch

# salt-call pkg.fetch bash fromrepo=pkgng
[INFO    ] Executing command '/sbin/zfs help || :' in directory '/root'
[INFO    ] Executing command 'pkg fetch -y -g -r pkgng bash' in directory '/root'
local:
    Updating pkgng repository catalogue...
    pkgng repository is up-to-date.
    All repositories are up-to-date.
    The following packages will be fetched:

    New packages to be FETCHED:
        bash-4.3.30_1 (100.00% of 1 MB: 1 MB)

    The process will require 1 MB more space.
    1 MB to be downloaded.
    Fetching bash-4.3.30_1.txz... done

pkg.install

# salt-call pkg.install bash fromrepo=pkgng
[INFO    ] Executing command '/sbin/zfs help || :' in directory '/root'
[INFO    ] Executing command 'pkg info -ao' in directory '/root'
[INFO    ] Executing command 'pkg install -r pkgng -y bash' in directory '/root'
[INFO    ] Executing command 'pkg info -ao' in directory '/root'
local:
    ----------
    bash:
        ----------
        new:
            4.3.30_1
        old:

m87carlson avatar Dec 12 '14 00:12 m87carlson

OK! I will close this.

cro avatar Jan 07 '15 17:01 cro