jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.16k stars 1.07k forks source link

fpm not installing the dependencies #1891

Open uday-projectn opened 2 years ago

uday-projectn commented 2 years ago

Trying to install pyenv as part of --before-install. For that, some predefined packages are required.

yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel

So, kept all of them under dependency section of fpm with -d one by one, But they are not getting installed with the rpm generated.

My python script for that.

assert Popen([
            'fpm', '-f', '-s', 'dir', '-t', 'rpm', '-n', product, '-v', version,
            '-d', 'openssl-devel', '-d', 'git', '-d', 'rsync', '-d', 'zip',
            '-d', 'gcc', '-d', 'zlib-devel','-d', 'bzip2', '-d', 'bzip2-devel', 
            '-d', 'readline-devel', '-d', 'sqlite', '-d', 'sqlite-devel', '-d', 'tk-devel', '-d', 'libffi-devel', '-d', 'xz-devel',
            '--before-install', join('..', '.build', 'control', 'preinst'),
            '--after-install', join('..', '.build', 'control', 'postinst'),
            '--rpm-os', 'linux',
            '../.build/linux/=/'
        ], cwd=Paths.dist).wait() == 0
        # rename output packages to our standard package naming scheme
        bashCmd = [
            '/bin/bash', '-c',
            f'cd dist && for f in *\-*; do mv "$f" {product}-{self.customer_id}-{version}.x86_64.rpm; done'
        ]
        Popen(bashCmd, stdout=PIPE).wait()
uday-projectn commented 2 years ago

sudo rpm -qvRp rpmfile.rpm This command is giving below output.

pre,interp: /bin/sh
post,interp: /bin/sh
manual: bzip2
manual: bzip2-devel
manual: gcc
manual: git
manual: libffi-devel
manual: openssl-devel
manual: readline-devel
rpmlib: rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
manual: rsync
manual: sqlite
manual: sqlite-devel
manual: tk-devel
manual: xz-devel
manual: zip
manual: zlib-devel