Missing dependencies after building with RPM 4.11.1

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

 



We are currently moving from RHEL6 to RHEL7 so we are moving from rpm 4.8.0 to version 4.11.1.  I’ve downloaded the rpm for 4.11.1 and rebuilt it in our own development environment. It is now installed on our build server and we are using it to build all of our RPMs.

 

What I’ve noticed is I am missing 2 sets of dependencies. The first is when I build perl CPAN packages. For example when I build on my old 4.8.0 build server I get this:

 

[>)]$ rpm -qp --provides perl-HTTP-Daemon-SSL-1.04-0.51580.noarch.rpm

perl(HTTP::Daemon::ClientConn::SSL)

perl(HTTP::Daemon::SSL)

perl(HTTP::Daemon::SSL::DummyDaemon)

perl-HTTP-Daemon-SSL = 1.04-0.51580

 

However on the 4.11.1 build server I get:

[>]$ rpm -qp --provides perl-HTTP-Daemon-SSL-1.04-0.51580.noarch.rpm

perl-HTTP-Daemon-SSL = 1.04-0.51580

 

I’m missing the auto-dependencies for all the perl .pm files. On this one I’ve run the /usr/lib/rpm/perl.prov against the .pm files and the output is as expected. I’ve also run our own proprietary deps script and it outputs as well. It just looks like those files aren’t being run. I’ve renamed them all and run the build and nothing errors out. So it appears to be ignoring them.

 

The 2nd situation is on libraries. Take the ‘rpm’ package I have built. The dependencies I get are:

[>]$rpm -qp --provides rpm-libs-4.11.1-16.el7prerel0.51580.x86_64.rpm               

rpm-libs = 4.11.1-16.el7prerel0.51580

rpm-libs(x86-64) = 4.11.1-16.el7prerel0.51580

 

This is missing all of the dependencies for libraries.

librpm.so.3()(64bit)

librpmio.so.3()(64bit)

 

I’ve looked at this ad-nauseum for 3 days and can’t seem to make any headway. I’ve included my “rpm –showrc” output that may have information that points you to what I’m missing. Any help, answers, debug techniques, or general tomfoolery is appreciated in advance.

 

Thanks

Mike

 

 

 

rpm --showrc

ARCHITECTURE AND OS:

build arch            : x86_64

compatible build archs: x86_64 noarch

build os              : Linux

compatible build os's : linux

install arch          : x86_64

install os            : Linux

compatible archs      : x86_64 amd64 em64t athlon noarch i686 i586 i486 i386 fat

compatible os's       : linux

 

RPMRC VALUES:

archcolor             : 2

optflags              : %{__global_cflags} -m64 -mtune=generic

 

Features supported by rpmlib:

    rpmlib(BuiltinLuaScripts) = 4.2.2-1

    rpmlib(CompressedFileNames) = 3.0.4-1

    rpmlib(ConcurrentAccess) = 4.1-1

    rpmlib(ExplicitPackageProvide) = 4.0-1

    rpmlib(FileCaps) = 4.6.1-1

    rpmlib(FileDigests) = 4.6.0-1

    rpmlib(HeaderLoadSortsTags) = 4.0.1-1

    rpmlib(PartialHardlinkSets) = 4.0.4-1

    rpmlib(PayloadFilesHavePrefix) = 4.0-1

    rpmlib(PayloadIsBzip2) = 3.0.5-1

    rpmlib(PayloadIsLzma) = 4.4.2-1

    rpmlib(PayloadIsXz) = 5.2-1

    rpmlib(ScriptletExpansion) = 4.9.0-1

    rpmlib(ScriptletInterpreterArgs) = 4.0.3-1

    rpmlib(TildeInVersions) = 4.10.0-1

    rpmlib(VersionedDependencies) = 3.0.3-1

 

Macro path: /usr/lib/rpm/macros:/usr/lib/rpm/macros.d/macros.*:/usr/lib/rpm/platform/%{_target}/macros:/usr/lib/rpm/fileattrs/*.attr:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros

 

========================

-14: GNAT_arches        %{ix86} x86_64 ia64 ppc ppc64 alpha

-14: GNUconfigure(MCs:)

  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS;

  LDFLAGS="${LDFLAGS:-%{-s:-s}}"  ; export LDFLAGS;

  %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}}

  dirs="`find %{__mydir} -name configure.in -print`"; export dirs;

    for coin in `echo %{_dirs}`

do

  dr=`dirname %{_coin}`;

if test -f %{_dr}/NO-AUTO-GEN; then

:

else

     macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE((.*)),1,gp' < %{_coin}`;

    ( cd %{_dr};

      aclocalinclude="%{_ACLOCAL_FLAGS}";

      for k in %{_macrodirs}; do

        if test -d %{_k}; then

          aclocalinclude="%{_aclocalinclude} -I ${k}";

        ##else

        ##  echo "**Warning**: No such directory `%{_k}'.  Ignored."

        fi

      done

      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then

        if grep "sed.*POTFILES" configure.in >/dev/null; then

          : do nothing -- we still have an old unmodified configure.in

        else

          test -r %{_dr}/aclocal.m4 || touch ${dr}/aclocal.m4;

          echo "no" | gettextize --force --copy;

          test -r %{_dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4;

        fi

      fi

      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then

        %{__libtoolize} --force --copy;

      fi

      aclocal %{_aclocalinclude};

      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then

        %{__autoheader};

      fi

      echo "Running automake --gnu %{_am_opt} ...";

      %{__automake} --add-missing --gnu %{_am_opt};

      %{__autoconf};

    );

  fi

done

  %{-C:%{__mydir}}%{!-C:.}/configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ;

  %{-C:cd %{__mydir}; unset _mydir}

-14: __7zip     /usr/bin/7za

-14: ___build_args      -e

-14: ___build_cmd       %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}

-14: ___build_post      exit 0

-14: ___build_pre

  RPM_SOURCE_DIR="%{u2p:%{_sourcedir}}"

  RPM_BUILD_DIR="%{u2p:%{_builddir}}"

  RPM_OPT_FLAGS="%{optflags}"

  RPM_LD_FLAGS="%{?__global_ldflags}"

  RPM_ARCH="%{_arch}"

  RPM_OS="%{_os}"

  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS

  RPM_DOC_DIR="%{_docdir}"

  export RPM_DOC_DIR

  RPM_PACKAGE_NAME="%{name}"

  RPM_PACKAGE_VERSION="%{version}"

  RPM_PACKAGE_RELEASE="%{release}"

  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE

  LANG=C

  export LANG

  unset CDPATH DISPLAY ||:

  %{?buildroot:RPM_BUILD_ROOT="%{u2p:%{buildroot}}"

  export RPM_BUILD_ROOT}

  %{?_javaclasspath:CLASSPATH="%{_javaclasspath}"

  export CLASSPATH}

  PKG_CONFIG_PATH="%{_PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig"

  export PKG_CONFIG_PATH

 

  %{verbose:set -x}%{!verbose:exec > /dev/null}

  umask 022

  cd "%{u2p:%{_builddir}}"

-14: ___build_shell     %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}

-14: ___build_template  #!%{___build_shell}

%{___build_pre}

%{nil}

-14: __aclocal  aclocal

-14: __ar       ar

-14: __arch_install_post        %{nil}

-14: __as       as

-14: __autoconf autoconf

-14: __autoheader       autoheader

-14: __automake automake

-14: __awk      gawk

-14: __bzip2    /usr/bin/bzip2

-14: __bzr      /usr/bin/bzr

-14: __cat      /usr/bin/cat

-14: __cc       gcc

-14: __check_files      %{_rpmconfigdir}/check-files %{buildroot}

-14: __chgrp    /usr/bin/chgrp

-14: __chmod    /usr/bin/chmod

-14: __chown    /usr/bin/chown

-14: __collection_font  %{__plugindir}/exec.so /usr/bin/fc-cache

-14: __collection_java  %{__plugindir}/exec.so /usr/bin/rebuild-gcj-db

-14: __collection_sepolicy      %{__plugindir}/sepolicy.so

-14: __collection_sepolicy_flags        1

-14: __cp       /usr/bin/cp

-14: __cpio     /usr/bin/cpio

-14: __cpp      gcc -E

-14: __cxx      g++

-14: __dbi_other        mp_mmapsize=128Mb mp_size=1Mb

-14: __debug_install_post

   %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_include_minidebuginfo:-m} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"

%{nil}

-14: __desktop_path     ^%{_datadir}/applications/.*\.desktop$

-14: __desktop_provides %{_rpmconfigdir}/desktop-file.prov

-14: __docdir_path      %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man

-14: __elf_flags        exeonly

-14: __elf_magic        ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*$

-14: __elf_provides     %{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}

-14: __elf_requires     %{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}

-14: __file     /usr/bin/file

-14: __find_provides    /usr/lib/rpm/redhat/find-provides

-14: __find_requires    /usr/lib/rpm/redhat/find-requires

-14: __font_magic       [Ff]ont?( (program|collection))?( (text|data))

-14: __font_provides    %{_rpmconfigdir}/fontconfig.prov

-14: __font_requires    %{nil}

-14: __git      /usr/bin/git

-14: __global_cflags    -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags} %{_performance_cflags}

-14: __global_ldflags   -Wl,-z,relro %{_hardened_ldflags}

-14: __gpg      %{_bindir}/gpg2

-14: __gpg_check_password_cmd   %{__gpg}

        gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -

-14: __gpg_sign_cmd     %{__gpg}

        gpg --batch --no-verbose --no-armor --passphrase-fd 3

        %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}}

        --no-secmem-warning

        -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}

-14: __grep     /usr/bin/grep

-14: __gstreamer1_path  ^%{_libdir}/gstreamer-1.*/.*.so$

-14: __gstreamer1_provides      %{_rpmconfigdir}/gstreamer1.prov

-14: __gzip     /usr/bin/gzip

-14: __hg       /usr/bin/hg

-14: __id       /usr/bin/id

-14: __id_u     %{__id} -u

-14: __install  /usr/bin/install

-14: __isa      %{__isa_name}-%{__isa_bits}

-14: __isa_bits 64

-14: __isa_name x86

-14: __javadoc_path     ^%{_javadocdir}/.*

-14: __javadoc_requires %{_rpmconfigdir}/javadoc.req

-14: __kabi_path        ^/boot/symvers-.*gz$

-14: __kabi_provides    %{_rpmconfigdir}/kabi.sh

-14: __ld       /usr/bin/ld

-14: __libsymlink_exclude_path  ^.*[[:digit:]]$

-14: __libsymlink_magic ^symbolic link to `.*lib.*.so..*'$

-14: __libsymlink_requires      %{_rpmconfigdir}/elfdeps --provides --soname-only

-14: __libtool_path     ^%{_libdir}/.*.la$

-14: __libtool_provides %{_rpmconfigdir}/libtooldeps.sh --provides %{buildroot} %{name}

-14: __libtool_requires %{_rpmconfigdir}/libtooldeps.sh --requires %{buildroot} %{name}

-14: __libtoolize       libtoolize

-14: __ln_s     ln -s

-14: __lrzip    /usr/bin/lrzip

-14: __lzip     /usr/bin/lzip

-14: __lzma     %__xz --format=lzma

-14: __make     /usr/bin/make

-14: __maven_path       ^%{_mavendepmapfragdir}/.*

-14: __maven_provides   %{_rpmconfigdir}/maven.prov

-14: __maven_requires   %{_rpmconfigdir}/maven.req

-14: __mkdir    /usr/bin/mkdir

-14: __mkdir_p  /usr/bin/mkdir -p

-14: __mono_magic       Mono/.Net assembly

-14: __mono_provides    %{_rpmconfigdir}/mono-find-provides %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir}

-14: __mono_requires    %{_rpmconfigdir}/mono-find-requires %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir}

-14: __mv       /usr/bin/mv

-14: __nm       /usr/bin/nm

-14: __objcopy  /usr/bin/objcopy

-14: __objdump  /usr/bin/objdump

-14: __ocaml_magic      ^(Objective caml|OCaml) .*$

-14: __ocaml_provides   %{_rpmconfigdir}/ocaml-find-provides.sh

-14: __ocaml_requires   %{_rpmconfigdir}/ocaml-find-requires.sh

-14: __os_install_post

    /usr/lib/rpm/redhat/brp-compress

    %{!?__debug_package:

    /usr/lib/rpm/redhat/brp-strip %{__strip}

    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump}

    }

    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip}

    /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build}

    /usr/lib/rpm/redhat/brp-python-hardlink

    %{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars}

%{nil}

-14: __osgi_path        ^(.*\.jar$|((%{_libdir}|%{_datadir}).*/MANIFEST.MF))

-14: __osgi_provides    %{_rpmconfigdir}/osgi.prov

-14: __osgi_requires    %{_rpmconfigdir}/osgi.req

-14: __patch    /usr/bin/patch

-14: __perl     /usr/bin/perl

-14: __perl_check_pre   %{expand:

%{?__spec_check_pre}

pushd %{buildsubdir}

%define perl_br_testdir %{buildroot}%{perl_testdir}/%{cpan_dist_name}

%{__mkdir_p} %{perl_br_testdir}

%{__tar} -cf - %{__perl_test_dirs} | ( cd %{perl_br_testdir} && %{__tar} -xf - )

find . -maxdepth 1 -type f -name '*META*' -exec %{__cp} -vp {} %{perl_br_testdir} ';'

find %{perl_br_testdir} -type f -exec %{__chmod} -c -x {} ';'

T_FILES=`find %{perl_br_testdir} -type f -name '*.t'`

%fix_shbang_line $T_FILES

%{__chmod} +x $T_FILES

%{_fixperms} %{perl_br_testdir}

popd

}

-14: __perl_flags       exeonly

-14: __perl_magic       ^.*[Pp]erl .*$

-14: __perl_provides    %{rpmhelpers_dir}/perlDeps --provides

-14: __perl_requires    %{rpmhelpers_dir}/perlDeps --requires

-14: __perllib_flags    magic_and_path

-14: __perllib_magic    ^Perl[[:digit:]] module source.*

-14: __perllib_path     \.pm$

-14: __perllib_provides %{_rpmconfigdir}/perl.prov

-14: __perllib_requires %{_rpmconfigdir}/perl.req

-14: __pkgconfig_path   ^((%{_libdir}|%{_datadir})/pkgconfig/.*.pc|%{_bindir}/pkg-config)$

-14: __pkgconfig_provides       %{_rpmconfigdir}/pkgconfigdeps.sh --provides

-14: __pkgconfig_requires       %{_rpmconfigdir}/pkgconfigdeps.sh --requires

-14: __plugindir        %{_libdir}/rpm-plugins

-14: __pom_call . /usr/share/java-utils/pom_editor.sh; pom_

-14: __psdriver_magic   ^PPD file.*$

-14: __psdriver_path    ^(/usr/lib/cups/driver/.*|%{_datadir}/cups/drv/.*.drv)$

-14: __psdriver_provides        %{_rpmconfigdir}/postscriptdriver.prov

-14: __python   /usr/bin/python

-14: __python2  /usr/bin/python2

-14: __python_magic     [Pp]ython.*(executable|byte-compiled)

-14: __python_path      ^((/usr/lib(64)?/python[[:digit:]]\.[[:digit:]]/.*\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\.[[:digit:]]))$

-14: __python_provides  %{_rpmconfigdir}/pythondeps.sh --provides

-14: __python_requires  %{_rpmconfigdir}/pythondeps.sh --requires

-14: __quilt    /usr/bin/quilt

-14: __ranlib   ranlib

-14: __remsh    %{__rsh}

-14: __restorecon       /usr/sbin/restorecon

-14: __rm       /usr/bin/rm

-14: __rsh      /usr/bin/rsh

-14: __scm      patch

-14: __scm_apply_bzr(qp:m:)

%{__patch} %{-p:-p%{-p*}} %{-q:-s}

%{__bzr} commit %{-q} -m %{-m*}

-14: __scm_apply_git(qp:m:)

%{__git} apply %{-p:-p%{-p*}} -

%{__git} commit %{-q} -a -m %{-m*} --author "%{__scm_author}"

-14: __scm_apply_hg(qp:m:)

%{__hg} import - %{-p:-p%{-p*}} %{-q} -m %{-m*} --user "%{__scm_author}"

-14: __scm_apply_patch(qp:m:)

%{__patch} %{-p:-p%{-p*}} %{-q:-s}

-14: __scm_apply_quilt(qp:m:)

%{__quilt} import %{-p:-p%{-p*}} %{1} && %{__quilt} push

-14: __scm_author       %{__scm_username} %{__scm_usermail}

-14: __scm_setup_bzr(q)

%{__bzr} init %{-q}

%{__bzr} whoami --branch "%{__scm_author}"

%{__bzr} add .

%{__bzr} commit %{-q} -m "%{name}-%{version} base"

-14: __scm_setup_git(q)

%{__git} init %{-q}

%{__git} config user.name "%{__scm_username}"

%{__git} config user.email "%{__scm_usermail}"

%{__git} add .

%{__git} commit %{-q} -a\

        --author "%{__scm_author}" -m "%{name}-%{version} base"

-14: __scm_setup_hg(q)

%{__hg} init %{-q} .

%{__hg} add %{-q} .

%{__hg} commit %{-q} --user "%{__scm_author}" -m "%{name}-%{version} base"

-14: __scm_setup_patch(q)       %{nil}

-14: __scm_setup_quilt(q)       %{nil}

-14: __scm_usermail     <rpm-build>

-14: __scm_username     rpm-build

-14: __script_flags     exeonly

-14: __script_magic     ^.* script[, ].*$

-14: __script_requires  %{_rpmconfigdir}/script.req

-14: __sed      /usr/bin/sed

-14: __semodule /usr/sbin/semodule

-14: __spec_build_args  %{___build_args}

-14: __spec_build_body  %{___build_body}

-14: __spec_build_cmd   %{___build_cmd}

-14: __spec_build_post  %{___build_post}

-14: __spec_build_pre   %{___build_pre}

-14: __spec_build_shell %{___build_shell}

-14: __spec_build_template      #!%{__spec_build_shell}

%{__spec_build_pre}

%{nil}

-14: __spec_check_args  %{___build_args}

-14: __spec_check_body  %{___build_body}

-14: __spec_check_cmd   %{___build_cmd}

-14: __spec_check_post  %{___build_post}

-14: __spec_check_pre   %{___build_pre}

-14: __spec_check_shell %{___build_shell}

-14: __spec_check_template      #!%{__spec_check_shell}

%{__spec_check_pre}

%{nil}

-14: __spec_clean_args  %{___build_args}

-14: __spec_clean_body  %{___build_body}

-14: __spec_clean_cmd   %{___build_cmd}

-14: __spec_clean_post  %{___build_post}

-14: __spec_clean_pre   %{___build_pre}

-14: __spec_clean_shell %{___build_shell}

-14: __spec_clean_template      #!%{__spec_clean_shell}

%{__spec_clean_pre}

%{nil}

-14: __spec_install_args        %{___build_args}

-14: __spec_install_body        %{___build_body}

-14: __spec_install_cmd %{___build_cmd}

-14: __spec_install_post

    %{?__debug_package:%{__debug_install_post}}

    %{__arch_install_post}

    %{__os_install_post}

%{nil}

-14: __spec_install_pre %{___build_pre}

    [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"

    mkdir -p `dirname "$RPM_BUILD_ROOT"`

    mkdir "$RPM_BUILD_ROOT"

%{nil}

-14: __spec_install_shell       %{___build_shell}

-14: __spec_install_template    #!%{__spec_install_shell}

%{__spec_install_pre}

%{nil}

-14: __spec_prep_args   %{___build_args}

-14: __spec_prep_body   %{___build_body}

-14: __spec_prep_cmd    %{___build_cmd}

-14: __spec_prep_post   %{___build_post}

-14: __spec_prep_pre    %{___build_pre}

-14: __spec_prep_shell  %{___build_shell}

-14: __spec_prep_template       #!%{__spec_prep_shell}

%{__spec_prep_pre}

%{nil}

-14: __spec_rmbuild_args        %{___build_args}

-14: __spec_rmbuild_body        %{___build_body}

-14: __spec_rmbuild_cmd %{___build_cmd}

-14: __spec_rmbuild_post        %{___build_post}

-14: __spec_rmbuild_pre %{___build_pre}

-14: __spec_rmbuild_shell       %{___build_shell}

-14: __spec_rmbuild_template    #!%{__spec_rmbuild_shell}

%{__spec_rmbuild_pre}

%{nil}

-14: __ssh      /usr/bin/ssh

-14: __strip    /usr/bin/strip

-14: __tar      /usr/bin/tar

-14: __unzip    /usr/bin/unzip

-14: __urlhelper_proxyopts      %{?_httpproxy:--proxy %{_httpproxy}%{?_httpport::%{_httpport}}}%{!?_httpproxy:%{nil}}

-14: __urlhelpercmd     /usr/bin/curl

-14: __urlhelperopts    --silent --show-error --fail --location -o

-14: __vsflags  0xf0000

-14: __xz       /usr/bin/xz

-14: _arch      x86_64

-14: _binaries_in_noarch_packages_terminate_build       1

-14: _binary_filedigest_algorithm       8

-14: _binary_payload    w2.xzdio

-14: _bindir    %{_exec_prefix}/bin

-14: _build     %{_host}

-14: _build_alias       %{_host_alias}

-14: _build_arch        x86_64

-14: _build_cpu %{_host_cpu}

-14: _build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

-14: _build_os  %{_host_os}

-14: _build_vendor      %{_host_vendor}

-14: _builddir  %{_topdir}/BUILD

-14: _buildrootdir      %{_topdir}/BUILDROOT

-14: _buildshell        /bin/sh

-14: _bzip2bin  %{__bzip2}

-14: _changelog_trimtime        0

-14: _cmmscolordir      %_colordir/cmms

-14: _colordir  %_datadir/color

-14: _configure ./configure

-14: _datadir   %{_datarootdir}

-14: _datarootdir       %{_prefix}/share

-14: _dbi_config        %{?__dbi_other}

-14: _dbi_config_Packages       %{?_dbi_config} lockdbfd

-14: _dbpath    %{_var}/lib/rpm

-14: _dbpath_rebuild    %{_dbpath}

-14: _default_patch_fuzz        0

-14: _defaultdocdir     %{_prefix}/share/doc

-14: _defaultlicensedir %{_datadir}/licenses

-14: _disable_source_fetch      1

-14: _do_gconf_schema_remove

        if test -f %{_sysconfdir}/gconf/schemas/"$schema".schemas ; then

            export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`

            gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || :

        fi

%{nil}

-14: _dwz_limit %{expand:%%{?%{1}_%{_arch}}%%{!?%{1}_%{_arch}:%%%{1}}}

-14: _dwz_low_mem_die_limit     10000000

-14: _dwz_low_mem_die_limit_armv5tel    4000000

-14: _dwz_low_mem_die_limit_armv7hl     4000000

-14: _dwz_max_die_limit 50000000

-14: _dwz_max_die_limit_armv5tel        10000000

-14: _dwz_max_die_limit_armv7hl 10000000

-14: _dwz_max_die_limit_x86_64  110000000

-14: _enable_debug_packages     1

-14: _enable_pedantic_errors    1

-14: _exec_prefix       %{_prefix}

-14: _fileattrsdir      %{_rpmconfigdir}/fileattrs

-14: _filter_GLIBC_PRIVATE      0

-14: _find_debuginfo_dwz_opts   --run-dwz\

   --dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\

   --dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit}

-14: _fixperms  %{__chmod} -Rf a+rX,u+w,g-w,o-w

-14: _fmoddir   %{_libdir}/gfortran/modules

-14: _gnu       -gnu

-14: _gzipbin   %{__gzip}

-14: _hardened_cflags   %{?_hardened_build:%{_hardening_cflags}}

-14: _hardened_ldflags  %{?_hardened_build:%{_hardening_ldflags}}

-14: _hardening_cflags  -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1

-14: _hardening_ldflags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld

-14: _hkp_keyserver     http://pgp.mit.edu

-14: _hkp_keyserver_query       %{_hkp_keyserver}:11371/pks/lookup?op=get&search=0x

-14: _host      x86_64-redhat-linux-gnu

-14: _host_alias        x86_64-redhat-linux-gnu%{nil}

-14: _host_cpu  x86_64

-14: _host_os   linux

-14: _host_vendor       redhat

-14: _httpd_apxs        /usr/bin/apxs

-14: _httpd_confdir     /etc/httpd/conf.d

-14: _httpd_contentdir  /usr/share/httpd

-14: _httpd_mmn 20120211x8664

-14: _httpd_modconfdir  /etc/httpd/conf.modules.d

-14: _httpd_moddir      /usr/lib64/httpd/modules

-14: _icccolordir       %_colordir/icc

-14: _include_minidebuginfo     1

-14: _includedir        %{_prefix}/include

-14: _infodir   %{_prefix}/share/info

-14: _initddir  %{_sysconfdir}/rc.d/init.d

-14: _initrddir %{_initddir}

-14: _install_langs     all

-14: _install_script_path       /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin

-14: _isa       %{?__isa:(%{__isa})}%{!?__isa:%{nil}}

-14: _javaconfdir       %{_sysconfdir}/java

-14: _javadir   %{_datadir}/java

-14: _javadocdir        %{_datadir}/javadoc

-14: _jnidir    %{_prefix}/lib/java

-14: _journalcatalogdir /usr/lib/systemd/catalog

-14: _jvmcommondatadir  %{_datadir}/jvm-commmon

-14: _jvmcommonlibdir   %{_prefix}/lib/jvm-commmon

-14: _jvmcommonsysconfdir       %{_sysconfdir}/jvm-commmon

-14: _jvmdatadir        %{_datadir}/jvm

-14: _jvmdir    %{_prefix}/lib/jvm

-14: _jvmjardir %{_prefix}/lib/jvm-exports

-14: _jvmlibdir %{_prefix}/lib/jvm

-14: _jvmprivdir        %{_prefix}/lib/jvm-private

-14: _jvmsysconfdir     %{_sysconfdir}/jvm

-14: _keyringpath       %{_dbpath}/pubkeys/

-14: _lib       lib64

-14: _libdir    %{_prefix}/lib64

-14: _libexecdir        %{_exec_prefix}/libexec

-14: _libtool_ppc64le_fix       1

-14: _localstatedir     /var

-14: _mandir    %{_prefix}/share/man

-14: _mavendepmapdir    %{_sysconfdir}/maven

-14: _mavendepmapfragdir        %{_datadir}/maven-fragments

-14: _mavenpomdir       %{_datadir}/maven-poms

-14: _missing_build_ids_terminate_build 1

-14: _missing_doc_files_terminate_build 1

-14: _oldincludedir     /usr/include

-14: _os        linux

-14: _performance_cflags        %{?_performance_build:%{lua:

local tcpu = rpm.expand("%{_target_cpu}")

if string.find(tcpu, "^ppc64") then

    print("-O3")

end}}

-14: _prefix    /usr

-14: _presetdir /usr/lib/systemd/system-preset

-14: _python_bytecompile_errors_terminate_build 1

-14: _query_all_fmt     %%{nvra}

-14: _query_selector_match      default

-14: _repackage_all_erasures    1

-14: _repackage_dir     /var/TKLC/backout/pkg

-14: _rollback_transaction_on_failure   1

-14: _rpmconfigdir      %{getconfdir}

-14: _rpmdir    %{_topdir}/RPMS

-14: _rpmfilename       %{_build_name_fmt}

-14: _rpmlock_path      %{_dbpath}/.rpm.lock

-14: _sbindir   %{_exec_prefix}/sbin

-14: _selinux_policy_version    3.12.1-153.0.1.el7

-14: _settingscolordir  %_colordir/settings

-14: _sharedstatedir    /var/lib

-14: _smp_mflags        %([ -z "$RPM_BUILD_NCPUS" ] \

        && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \

        ncpus_max=%{?_smp_ncpus_max}; \

        if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \

        if [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)

-14: _smp_ncpus_max     16

-14: _source_filedigest_algorithm       8

-14: _sourcedir /scratchpad/workdirs/rudd/build/RPM/SOURCES

-14: _specdir   %{_topdir}/SPECS

-14: _srcrpmdir %{_topdir}/SRPMS

-14: _syscolordir       %_colordir

-14: _sysconfdir        /etc

-14: _sysctldir /usr/lib/sysctl.d

-11: _target    x86_64-linux

-14: _target_alias      %{_host_alias}

-11= _target_cpu        x86_64

-11= _target_os linux

-14: _target_platform   %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}

-14: _target_vendor     %{_host_vendor}

-14: _tmpfilesdir       /usr/lib/tmpfiles.d

-14: _tmppath   /scratchpad/workdirs/rudd/tmp

-14: _topdir    /scratchpad/workdirs/rudd/build/RPM

-14: _transaction_color 3

-14: _udevhwdbdir       /usr/lib/udev/hwdb.d

-14: _udevrulesdir      /usr/lib/udev/rules.d

-14: _unitdir   /usr/lib/systemd/system

-14: _unpackaged_files_terminate_build  1

-14: _unsafe_rollbacks  1420759176

-14: _unzipbin  %{__unzip}

-14: _urlhelper %{__urlhelpercmd} %{?__urlhelper_localopts} %{?__urlhelper_proxyopts} %{__urlhelperopts}

-14: _use_internal_dependency_generator 1

-14: _userunitdir       /usr/lib/systemd/user

-14: _usr       /usr

-14: _usrsrc    %{_usr}/src

-14: _var       /var

-14: _vendor    redhat

-14: _vsflags_build     %{__vsflags}

-14: _vsflags_erase     %{__vsflags}

-14: _vsflags_install   %{__vsflags}

-14: _vsflags_query     %{__vsflags}

-14: _vsflags_rebuilddb 0xc0c00

-14: _vsflags_verify    %{__vsflags}

-14: add_jvm_extension  JAVA_LIBDIR=%{buildroot}%{_javadir} %{_bindir}/jvmjar -l

-14: add_maven_depmap(f:a:v:)

set -e

# default values

%if %# == 0

   _pompart="JPP-%{name}.pom"

   _jarpart="%{name}.jar"

%else

   _pompart="%1"

   _jarpart="%2"

%endif

_filelist=".mfiles%{-f*:-%{-f*}}"

install -dm 755 %{buildroot}%{_mavendepmapfragdir}

for _dir in %{_jnidir} %{_javajnidir} %{_javadir}; do

    if [ -f %{buildroot}$_dir/$_jarpart ]; then

        _jpath="%{buildroot}$_dir/$_jarpart"

    fi

done

python -m /usr/share/java-utils/maven_depmap %{-a} %{-v*:-r %{-v*}} \

          -p "%{_prefix}" -n "%{?scl}" \

          %{buildroot}%{_mavendepmapfragdir}/%{name}%{-f*:-%{-f*}} \

          %{buildroot}%{_mavenpomdir}/$_pompart \

%if %# == 2

          "${_jpath}" \

%endif

%if %# == 0

          "${_jpath}" \

%endif

        >> ${_filelist}

sed -i 's:%{buildroot}::' ${_filelist}

sort -u -o ${_filelist} ${_filelist}

 

%{nil}

-14: add_to_sys

__name=%{1}

%{grep_cmd} -q -P "^%{sys_group}:.*${__name}" /etc/group

if [ $? -ne 0 ]; then

    %log "Add ${__name} user to group %{sys_group}"

    if ! %{usermod_cmd} -a -G %{sys_group} "${__name}"; then

        %err "Could not add user ${__name} into group %{sys_group}!"

        exit 1

    fi

fi

%{nil}

-14: alarmMgr_cmd       /%{plat_bin}/alarmMgr

-14: alarmMgr_dispatcher_dir    %{alarmMgr_etc}/dispatchers

-14: alarmMgr_etc       /%{plat_etc}/alarmMgr

-14: alarmMgr_listener_dir      %{alarmMgr_etc}/listeners

-14: alpha      alpha alphaev56 alphaev6 alphaev67

-14: ant        JAVA_HOME=%{java_home} ant

-14: apply_patch(qp:m:)

%{uncompress:%{1}} | %{expand:%__scm_apply_%{__scm} %{-q} %{-p:-p%{-p*}} %{-m:-m%{-m*}}}

-14: arm        armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l armv7hl armv7hnl

-14: autopatch(vp:)

%{lua:

for i, p in ipairs(patches) do

    print(rpm.expand("%apply_patch -m %{basename:"..p.."}  "..rpm.expand("%{!-v:-q} %{-p:-p%{-p*}} ")..p.."\n"))

end}

-14: autosetup(a:b:cDn:TvNS:p:)

%setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q}

%{-S:%global __scm %{-S*}}

%{-S:%{expand:%__scm_setup_%{-S*} %{!-v:-q}}}

%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}

-14: awk_cmd    /bin/awk

-14: backup_gid 4997

-14: backup_group       TPDbackup

-14: bcond_with %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}

-14: bcond_without      %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}

-14: buildRPMDB_cmd     /%{build_bin}/buildRPMDB

-14: build_base usr/TKLC/build

-14: build_bin  %{build_base}/bin

-14: build_config       %{build_base}/config

-14: build_etc  %{build_base}/etc

-14: build_include      %{build_base}/include

-14: build_kmods_cmd    /%{build_bin}/buildKmods

-14: build_kmodules(nrs:)

mkdir -p "${RPM_BUILD_ROOT}"

export INSTALL_MOD_DIR=extra/%{name}

[ "%{#}" != 0 ] && EXTRA_ARGS="--makeArgs='%{*}'" || :

eval "%{build_kmods_cmd} --buildroot=${RPM_BUILD_ROOT} \

        '--builddir=%{_builddir}/%{name}-%{version}' \

        '--arch=%{_target_cpu}' %{-n:--noFileList} \

        %{-r:--keepBuildRootLib} %{-s:--modsrcDir=%{-s*}} \

        ${EXTRA_ARGS}"

[ ! -z "${TMP_BUILD}" ] && %{rm_cmd} -rf "${TMP_BUILD}" || :

%{nil}

-14: build_lib  %{build_base}/lib

-14: build_make %{build_base}/make

-14: build_man  %{build_base}/man

-14: build_pods %{build_base}/pods

-14: build_samples      %{build_base}/samples

-14: buildroot  %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}

-14: cat_cmd    /bin/cat

-14: chkconfig_cmd      /sbin/chkconfig

-14: chmod_cmd  /bin/chmod

-14: chown_cmd  /bin/chown

-14: conf_edit  /%{pkg_save_dir}/conf_edit.db

-14: configure

  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;

  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;

  FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ;

  FCFLAGS="${FCFLAGS:-%optflags -I%_fmoddir}" ; export FCFLAGS ;

  LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS;

  [ "%_libtool_ppc64le_fix" == 1 ] && [ "%_arch" == ppc64le ] && /usr/lib/rpm/redhat/libtool-handle-ppc64le.sh ;

  for i in $(find . -name config.guess -o -name config.sub) ; do

      [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ;

  done ;

  %{_configure} --build=%{_build} --host=%{_host} \

        --program-prefix=%{?_program_prefix} \

        --disable-dependency-tracking \

        --prefix=%{_prefix} \

        --exec-prefix=%{_exec_prefix} \

        --bindir=%{_bindir} \

        --sbindir=%{_sbindir} \

        --sysconfdir=%{_sysconfdir} \

        --datadir=%{_datadir} \

        --includedir=%{_includedir} \

        --libdir=%{_libdir} \

        --libexecdir=%{_libexecdir} \

        --localstatedir=%{_localstatedir} \

        --sharedstatedir=%{_sharedstatedir} \

        --mandir=%{_mandir} \

        --infodir=%{_infodir}

-14: cp_cmd     /bin/cp

-14: cpan_dist_name     %(eval echo %{name} | %{__sed} -e 's/^perl-//')

-14: date_cmd   /bin/date

-14: debug_package      %{nil}

-14: defined    %{expand:%%{?%{1}:1}%%{!?%{1}:0}}

-14: diff_cmd   /usr/bin/diff

-14: dist       .el7

-14: distribution       TPD

-14: el7        1

-14: epel       %{?rhel}%{!?rhel:7}

-14: err        echo "ERROR: %{name}-%{version}-%{release}:" %* >&2

%{nil}

-14: files_pkg_save_dirs

%defattr(0550,root,root,0550)

%dir /%{pkg_save_dir}

%dir /%{persistent_pkg_save_dir}

-14: filter_from_provides       %{expand:

%global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*'

}

-14: filter_from_requires       %{expand:

%global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*'

}

-14: filter_provides_in(P)      %{expand:

%global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' |

}

-14: filter_requires_in(P)      %{expand:

%global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' |

}

-14: filter_setup       %{expand:

%global _use_internal_dependency_generator 0

%global __deploop() while read FILE; do echo "${FILE}" | /usr/lib/rpm/rpmdeps -%{1}; done | /bin/sort -u

%global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}"

%global __find_requires /bin/sh -c "%{?__filter_req_cmd}  %{__deploop R} %{?__filter_from_req}"

}

-14: find_cmd   /usr/bin/find

-14: find_lang  %{_rpmconfigdir}/find-lang.sh %{buildroot}

-14: fix_shbang_line

TMPHEAD=`mktemp`

TMPBODY=`mktemp`

for file in %* ; do

    head -1 $file > $TMPHEAD

    tail -n +2 $file > $TMPBODY

    %{__perl} -pi -e '$f = /^#!/ ? "" : "#!%{__perl}$/"; $_="$f$_"' $TMPHEAD

    cat $TMPHEAD $TMPBODY > $file

done

%{__perl} -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(qw{%*})"

%{__rm} $TMPHEAD $TMPBODY

%{nil}

-14: fixfiles_cmd       /sbin/fixfiles

-14: gconf_schema_obsolete

for schema in %{*} ; do

    %_do_gconf_schema_remove

done

%{nil}

-14: gconf_schema_prepare

if [ "$1" -gt 1 ] ; then

    rm -rf %{_localstatedir}/lib/rpm-state/gconf/*

    for schema in %{*} ; do

        if test -f %{_sysconfdir}/gconf/schemas/"$schema".schemas ; then

            cp -p %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/ || :

        fi

    done

fi

%{nil}

-14: gconf_schema_remove

if [ "$1" -eq 0 ] ; then

    for schema in %{*} ; do

        %_do_gconf_schema_remove

    done

fi

%{nil}

-14: gconf_schema_upgrade

for schema in %{*} ; do

    if test -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas ; then

        cmp --quiet %{_sysconfdir}/gconf/schemas/"$schema".schemas %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas

        if test $? != 0; then

            export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`

            gconftool-2 --makefile-uninstall-rule %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas > /dev/null || :

            gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || :

        fi

        rm -f %{_localstatedir}/lib/rpm-state/gconf/"$schema".schemas

    else

        export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`

        gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/"$schema".schemas > /dev/null || :

    fi

done

%{nil}

-14: genMethods(d:)

%genMethods_cmd \

    %{?-d:--srcdir=%{-d*}}%{!?-d:--srcdir=${RPM_BUILD_ROOT}/%{plat_lib}} \

    --destdir=${RPM_BUILD_ROOT}%{methods_dir} \

    --pkgfile=%{pkg_file_list} \

    --buildroot=${RPM_BUILD_ROOT}

-14: genMethods_cmd     /usr/TKLC/build/bin/genMethods

-14: gen_kconfig_mods(c:)

/%{build_bin}/kernelConfigDelta --configDir=configs %{-c:%{-c*}}

%{nil}

-14: ghc_arches %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x

-14: ghc_arches_with_ghci       %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel

-14: global     __perl_requires /usr/lib/rpm/perl.req

-14: gpasswd_cmd        /usr/bin/gpasswd

-14: grep_cmd   /bin/grep

-14: groupadd_cmd       /usr/sbin/groupadd

-14: groupdel_cmd       /usr/sbin/groupdel

-14: groupmod_cmd       /usr/sbin/groupmod

-14: inchroot_sema      /inchroot

-14: install    %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}

%%install

%{nil}

-14: installTKLCplatNotifier(d:)

__notifier_mod_sdir="%{-d:%{-d*}}"

[ -z "${__notifier_mod_sdir}" ] &&

    __notifier_mod_sdir=etc/notify

__notifier_mod_bdir="${RPM_BUILD_ROOT}%{plat_notify_dir}"

mkdir -p "${__notifier_mod_bdir}"

cp -r "${__notifier_mod_sdir}"/* "${__notifier_mod_bdir}"

for __notifier_mod in "${__notifier_mod_sdir}"/*

do

    __notifier_n=$(basename $__notifier_mod)

    __notifier_ipath="%{plat_notify_dir}/${__notifier_n}"

    __notifier_bpath="${RPM_BUILD_ROOT}/${__notifier_ipath}"

    echo "%%attr(0444, root, root) ${__notifier_ipath}"     \

        >> "%{pkg_file_list}"

    createPod "${__notifier_mod}" "" "%{pkg_file_list}" "TKLCplat::Notify::"

done

%genMethods -d "${__notifier_mod_bdir}"

%{nil}

-14: install_pkg_save_dirs

mkdir -p "${RPM_BUILD_ROOT}/%{pkg_save_dir}"

mkdir -p "${RPM_BUILD_ROOT}/%{persistent_pkg_save_dir}"

-14: ipm_validate_dir   /usr/TKLC/plat/etc/ipm/validate_app

-14: ix86       i386 i486 i586 i686 pentium3 pentium4 athlon geode

-14: jar        %{java_home}/bin/jar

-14: java       %(. %{_javadir}-utils/java-functions; set_javacmd; echo $JAVACMD)

-14: java_home  %(. %{_javadir}-utils/java-functions; set_jvm; echo $JAVA_HOME)

-14: javac      %{java_home}/bin/javac

-14: javadoc    %{java_home}/bin/javadoc

-14: journal_catalog_update

/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || :

%{nil}

-14: jpackage_script

install -d -m 755 %{buildroot}%{_bindir}

cat > %{buildroot}%{_bindir}/%5 << EOF

#!/bin/sh

#

# %{name} script

# JPackage Project <http://www.jpackage.org/>

 

# Source functions library

_prefer_jre="%{?6}"

. %{_javadir}-utils/java-functions

 

# Source system prefs

if [ -f %{_sysconfdir}/java/%{name}.conf ] ; then

  . %{_sysconfdir}/java/%{name}.conf

fi

 

# Source user prefs

if [ -f \$HOME/.%{name}rc ] ; then

  . \$HOME/.%{name}rc

fi

 

# Configuration

MAIN_CLASS=%1

BASE_FLAGS=%2

BASE_OPTIONS=%3

BASE_JARS="%(echo %4 | sed -e 's,:, ,g')"

 

# Set parameters

set_jvm

set_classpath \$BASE_JARS

set_flags \$BASE_FLAGS

set_options \$BASE_OPTIONS

 

# Let's start

run "\$@"

EOF

chmod 755 %{buildroot}%{_bindir}/%5

%{nil}

-14: kernel_module_package(n:v:r:s:f:xp:)       %{expand:%(

        %global kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool}

        %global kmod_version %{-v*}%{!-v:%{version}}

        %global kmod_release %{-r*}%{!-r:%{release}}

        %global latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\\n' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1)

        %{!?kernel_version:%{expand:%%global kernel_version %{latest_kernel}}}

        %global kverrel %(%{kmodtool} verrel %{?kernel_version} 2>/dev/null)

        flavors="default"

        if [ -z "%*" ]; then

                flavors_to_build=$flavors

        elif [ -z "%{-x}" ]; then

                flavors_to_build="%*"

        else

                flavors_to_build=" $flavors "

                for i in %*

                do

                        flavors_to_build=${flavors_to_build//$i /}

                done

        fi

        echo "%%global flavors_to_build ${flavors_to_build:-%%nil}"

        echo "%%global kernel_source() /usr/src/kernels/%kverrel\$([ %%%%{1} = default ] || echo ".%%%%{1}")"

        echo "%%global kernel_module_package_moddir() extra"

        if [ ! -z "%{-f*}" ]

        then

                filelist="%{-f*}"

        fi

        if [ ! -z "%{-p*}" ]

        then

                preamble="%{-p*}"

        fi

        if [ -z "%{kmodtool_generate_buildreqs}" ]

        then

                nobuildreqs="yes"

        fi

        override_filelist="$filelist" override_preamble="$preamble" nobuildreqs="$nobuildreqs" kmod_version=%kmod_version kmod_release=%kmod_release %{kmodtool} rpmtemplate %{-n*}%{!-n:%name} %{kverrel} $flavors_to_build 2>/dev/null

)}

-14: kernel_module_package_buildreqs    %global kmodtool_generate_buildreqs 1

                                        kernel-devel

-14: kmod_requires

Requires: kmod-%{name}

-14: kspost_script      %{plat_kspost}/%{name}-%{version}-%{release}.sh

-14: ln_cmd     /bin/ln

-14: log        echo "%{name}-%{version}-%{release}:" %*

%{nil}

-14: macroimport        %(sed -e 's/^%%/%%define /' "%{_sourcedir}/%1")

-14: make_install       %{__make} install DESTDIR=%{?buildroot}

-14: makeinstall

  %{__make} \

        prefix=%{?buildroot:%{buildroot}}%{_prefix} \

        exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \

        bindir=%{?buildroot:%{buildroot}}%{_bindir} \

        sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \

        sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \

        datadir=%{?buildroot:%{buildroot}}%{_datadir} \

        includedir=%{?buildroot:%{buildroot}}%{_includedir} \

        libdir=%{?buildroot:%{buildroot}}%{_libdir} \

        libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \

        localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \

        sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \

        mandir=%{?buildroot:%{buildroot}}%{_mandir} \

        infodir=%{?buildroot:%{buildroot}}%{_infodir} \

  install

-14: methods_dir        /%{plat_lib}/Methods

-14: mkdir_cmd  /bin/mkdir

-14: mktemp_cmd /bin/mktemp

-14: mono_arches        %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64

-14: netAdm_cmd /%{plat_bin}/netAdm

-14: nil        %{!?nil}

-14: nodejs_arches      %{ix86} x86_64 %{arm}

-14: ocaml_arches       alpha %{arm} %{ix86} ia64 x86_64 ppc  sparc sparcv9 ppc64

-11: optflags   %{__global_cflags} -m64 -mtune=generic

-14: patches    %{lua: for i, p in ipairs(patches) do print(p.." ") end}

-14: pduAdm_cmd /%{plat_bin}/pduAdm

-14: perl_archlib       %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)

-14: perl_cmd   /usr/bin/perl

-14: perl_default_filter_revision       3

-14: perl_default_subpackage_tests      %perl_subpackage_tests t/

-14: perl_ext_env_unset %{expand:

unset PERL_MM_OPT MODULEBUILDRC PERL5INC

export PERL_AUTOINSTALL="--defaultdeps"

export PERL_MM_USE_DEFAULT=1

}

-14: perl_privlib       %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)

-14: perl_sitearch      %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)

-14: perl_sitelib       %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)

-14: perl_subpackage_tests      %{expand:

%global __perl_package 1

%global __perl_test_dirs %*

%global __spec_check_pre %{expand:%{__perl_check_pre}}

%package tests

Summary: Test suite for package %{name}

Group: Development/Debug

Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

Requires: /usr/bin/prove

%{?__tests_spkg_req:RequiresJMR: %__tests_spkg_req}

%{?__tests_spkg_prov:ProvidesJMR: %__tests_spkg_prov}

AutoReqProv: 0

%description tests

This package provides the test suite for package %{name}.

%files tests

%defattr(-,root,root,-)

%{perl_testdir}

}

-14: perl_testdir       %{_libexecdir}/perl5-tests

-14: perl_vendorarch    %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)

-14: perl_vendorlib     %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)

-14: perl_version       %(eval "`%{__perl} -V:version`"; echo $version)

-14: persistent_conf_edit       /%{persistent_pkg_save_dir}/conf_edit.db

-14: persistent_pkg_save_dir    %{plat_pkg}/%{name}

-14: pid_conf_cmd       /%{plat_bin}/pid_conf

-14: pkg_file_list      %{_builddir}/%{name}-%{version}-%{release}.filelist

-14: pkg_save_dir       %{plat_pkg}/%{name}-%{version}-%{release}

-14: plat_alarms        /%{plat_etc}/alarms

-14: plat_backout       %{plat_var}/backout

-14: plat_backout_pkg   %{plat_backout}/pkg

-14: plat_backout_revert        %{plat_backout}/revert.d

-14: plat_base  %{tklc_apps}/plat

-14: plat_bin   %{plat_base}/bin

-14: plat_doc   %{plat_share}/doc

-14: plat_etc   %{plat_base}/etc

-14: plat_include       %{plat_base}/include

-14: plat_kspost        %{plat_etc}/kspost.d

-14: plat_lib   %{plat_base}/lib

-14: plat_log   %{plat_var}/log

-14: plat_man   %{plat_base}/man

-14: plat_mib_dir       %{plat_snmp}/mib

-14: plat_notify_dir    /%{plat_etc}/notify

-14: plat_pkg   %{plat_var}/pkg

-14: plat_rcs   %{plat_var}/rcs

-14: plat_rpm   %{plat_etc}/rpm.d

-14: plat_run   %{plat_var}/run

-14: plat_sbin  %{plat_base}/sbin

-14: plat_share %{plat_base}/share

-14: plat_snmp  /%{plat_etc}/snmp

-14: plat_statefile_dir %{plat_etc}/statefiles.d

-14: plat_sudo  %{plat_etc}/sudoers.d

-14: plat_tests %{plat_base}/tests

-14: plat_upg   %{plat_etc}/upgrade

-14: plat_upgrade       %{plat_var}/upgrade

-14: plat_var   var/TKLC

-14: platcfgMenuInstall(d:)

#

# Figure out where the modules live in the sources

__platcfg_MODULE_DIR="%{-d:%{-d*}}"

[ -z "${__platcfg_MODULE_DIR}" ] &&

    __platcfg_MODULE_DIR=lib/DynMenu/PlatCfg

#

# Determine where they get installed:

__platcfg_bdir="${RPM_BUILD_ROOT}%{platcfg_menu_dir}"

#

# Make the installation dir exist:

mkdir -p "${__platcfg_bdir}"

#

# Copy the modules into place:

cp "${__platcfg_MODULE_DIR}/"*.pm "${__platcfg_bdir}"

#

# Now do other processing:

for __platcfg_m in "${__platcfg_MODULE_DIR}"/*.pm

do

    __platcfg_n=$(basename $__platcfg_m)

    __platcfg_ipath="%{platcfg_menu_dir}/${__platcfg_n}"

    __platcfg_bpath="${RPM_BUILD_ROOT}/${__platcfg_ipath}"

    echo "%%attr(0440, root, %{platcfg_group}) ${__platcfg_ipath}" >> "%{pkg_file_list}"

    createPod "${__platcfg_m}" "" "%{pkg_file_list}"

done

%genMethods -d "${__platcfg_bdir}"

%{nil}

-14: platcfg_firstdir   /%{plat_lib}/FirstTimeConfig

-14: platcfg_gid        5000

-14: platcfg_group      platcfg

-14: platcfg_menu_dir   /%{plat_lib}/DynMenu/PlatCfg

-14: platcfg_uid        5000

-14: platcfg_user       platcfg

-14: platcfg_userhome   /%{plat_etc}/home.platcfg

-14: platcfg_userskel   /%{plat_etc}/skel.platcfg

-14: platcfgadm_cfg     /%{plat_etc}/platcfg.conf

-14: platcfgadm_cmd     /%{plat_bin}/platcfgadm

-14: pod2man(d:)

for pod in %{pods}%{nil} --done

do

    [ "$pod" = "--done" ] && break || :

    if [ ! -e "$pod" ]

    then

        %err "File $pod does not exist!"

        exit 1

    fi

    if [ -d "$pod" ]

    then

        for pod_file in $(%{find_cmd} $pod -type f)

        do

            createPod "$pod_file" "%{-d:%{-d*}}" "%{pkg_file_list}"

        done

    else

        createPod "$pod" "%{-d:%{-d*}}" "%{pkg_file_list}"

    fi

done

-14: pod2man_cmd        /usr/bin/pod2man

-14: pom_add_dep        %{expand: %{__pom_call}add_dep        %*

}

-14: pom_add_dep_mgmt   %{expand: %{__pom_call}add_dep_mgmt   %*

}

-14: pom_add_parent     %{expand: %{__pom_call}add_parent     %*

}

-14: pom_add_plugin     %{expand: %{__pom_call}add_plugin     %*

}

-14: pom_disable_module %{expand: %{__pom_call}disable_module %*

}

-14: pom_remove_dep     %{expand: %{__pom_call}remove_dep     %*

}

-14: pom_remove_parent  %{expand: %{__pom_call}remove_parent  %*

}

-14: pom_remove_plugin  %{expand: %{__pom_call}remove_plugin  %*

}

-14: pom_set_parent     %{expand: %{__pom_call}set_parent     %*

}

-14: pom_xpath_inject   %{expand: %{__pom_call}xpath_inject   %*

}

-14: pom_xpath_remove   %{expand: %{__pom_call}xpath_remove   %*

}

-14: pom_xpath_replace  %{expand: %{__pom_call}xpath_replace  %*

}

-14: pom_xpath_set      %{expand: %{__pom_call}xpath_set      %*

}

-14: power64    ppc64 ppc64p7

-14: printf_cmd /usr/bin/printf

-14: profile_dir        etc/profile.d

-14: python2_sitearch   %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")

-14: python2_sitelib    %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")

-14: python2_version    %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")

-14: python_sitearch    %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")

-14: python_sitelib     %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")

-14: python_version     %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")

-14: rcscript_dir       etc/rc.d/init.d

-14: rcstool_cmd        /%{plat_bin}/rcstool

-14: requires_eq        %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")

-14: restorecon_cmd     /sbin/restorecon

-14: rhel       7

-14: rm_cmd     /bin/rm

-14: rmdir_cmd  /bin/rmdir

-14: rpm_cmd    /bin/rpm

-14: rpm_parts_dir      /%{plat_rpm}

-14: rpmhelpers_dir     /%{build_etc}/rpmhelpers

-14: secFixFiles(r)

#

# Get parameters

__file=%{1}

__recursive=%{?-r:"-r"}

#

# Relabel. See the log in /var/log/messages for possible errors.

%log "Relabeling: $__recursive $__file"

if ! %restorecon_cmd -i -F $__recursive $__file

then

    %err "Failed to restore context of ${__file}"

    exit 1

fi

%{nil}

-14: secPolicyInstall

#

# Make the policy modules dir

mkdir -p %sepolicy_archive_bdir

 

if [ -e %{selinux_make} ]

then

    #

    # Newer selinux-policy rpm provides development tools necessary for

    # building policies out of type enforment (.te) declarations. This

    # simplifies building process and all we need is Makefile provided

    # just for this purpose and move build policy modules (.pp) wherever

    # we need.

    make -f %{selinux_make}

    mv *.pp %{sepolicy_archive_bdir}/

fi

#

# Add the module to the package file list

echo "%%attr(0600, root, root) %sepolicy_archive_dir"                  \

        >> "%{pkg_file_list}"

%{nil}

-14: secPolicyLoad

#

# Below we will remember all the policy modules being installed.

#

# The '+' char is added before the module name to make out what

# module was newly installed.

# If '+' is present, the module should be removed during backout.

# Otherwise we should not remove the module since during the rpm

# package upgrade the old version has already been replaced by the

# new one.

# (%post of the new/prev package is executed before %postun

#  of the old/curr package)

#

# For this purpose, we are creating the %{tpdsemods_db} file in the

# pkg_save directory which contains N-V-R in its name and thus only

# exists for the life of that particular package.

# When we go to access the file in %postun, it access that NVR's

# particular file.

#

# Get parameters

__pp_names="%*"

if [ -z ${__pp_names} ]; then

     __pp_names=$(cd %{sepolicy_archive_dir}; ls -1 *.pp| %sed_cmd 's/.pp//')

fi

#

# Need to always create the file even though nothing may be in it...

if ! touch %{tpdsemods_db}

then

    %err "Cannot touch the %{tpdsemods_db} file."

    exit 1

fi

for __pp_name in ${__pp_names}; do

    REMOVE_MOD=""

    #

    # Path to the selinux policy module

    __pp_file=%{sepolicy_archive_dir}/${__pp_name}.pp

    #

    # Check if a version of the module has been installed.

    # If not, do not forget to remove the module during backout.

    # Do not remove the tab character at the end of the match string.

    if ! %semodule_cmd -l | %grep_cmd -q "^$__pp_name   "

    then

        REMOVE_MOD="+"

    fi

    #

    # Add __pp_file to list of policy modules to install. We do all of them

    # at once to save time while installing multiple modules.

    __pps="${__pps} ${__pp_file}"

    #

    # Remember the policy module name for later removal

    # Do not create duplicate records regardless the '+' prefix

    if ! %grep_cmd -q "^+\?$__pp_name$" %{tpdsemods_db}

    then

        echo "$REMOVE_MOD$__pp_name" >> %{tpdsemods_db}

    fi

done

#

# Selinux policy modules are incompatible between TPD5 and TPD6

# kernel and they needs to be only updated once new kernel is up and

# running.

if [ "${TPD5TO6_UPGRADE}" == 1 ]

then

    %log "Skipping selinux module installation during major upgrade"

    %log "Will be installed during after upgrade reboot."

else

    #

    # Install policy module

    %log "Installing new selinux policy module(s): $__pps"

    if ! %semodule_cmd -i $__pps

    then

        %err "Failed to install selinux policy module(s) package."

        exit 1

    fi

fi

#

# Fix the file labeling for all the files in the package.

# See the log in /var/log/messages for possible errors.

%log "Fixing package files' context..."

if ! %fixfiles_cmd -F -R %{name} restore

then

    %err "Failed to fix the %{name} rpm package file contexts."

    exit 1

fi

%{nil}

-14: secPolicyRemove(fu)

#

# Get parameters

__force=%{?-f:"-f"}

__upgrade=%{?-u:"-u"}

#

# Check that the db of installed policy modules exists

if [ ! -e %{tpdsemods_db} ]

then

    %err "Missing %{tpdsemods_db}"

    %err "Will not be able to remove selinux policies."

    exit 1

fi

#

# If -u specified, just remove the state file

if [ -z $__upgrade ]

then

    #

    # Remove all policy modules delivered with the package as brand new

    for __mod in `%cat_cmd %{tpdsemods_db}`

    do

        #

        # Remove policy module

        # (only if we force or the line begins with '+')

        # See secPolicyLoad comment related to REMOVE_MOD variable

        if [ -z $__force ] && [ ${__mod:0:1} != '+' ]

        then

            continue

        fi

        __mods="$__mods ${__mod#+}"

    done

    if [ ! -z "$__mods" ]; then

        %log "Removing selinux policy module(s): $__mods"

        if ! %semodule_cmd -r $__mods

        then

            %err "Unable to remove selinux policy module(s): $__mods"

            exit 1

        fi

    fi

    #

    # Fix the file labeling for all the files in the package.

    # See the log in /var/log/messages for possible errors.

    %log "Fixing package files' context..."

    if ! %fixfiles_cmd -F -R %{name} restore

    then

        %err "Failed to fix the %{name} rpm package file contexts."

        exit 1

    fi

fi

#

# Remove the list of policy modules

rm %{tpdsemods_db}

%{nil}

-14: secPolicyRemoveObsolete

#

# Get parameters

__name=%{1}

#

# Remove the module if installed

# Do not remove the tab character at the end of the match string.

if ! %semodule_cmd -l | %grep_cmd -q "^$__name  "

then

    %log "Selinux policy module ${__name} already uninstalled."

else

    %log "Removing obsolete selinux policy module: ${__name}"

    if ! %semodule_cmd -r $__name

    then

        %err "Unable to remove obsolete selinux policy module: $__name"

        exit 1

    fi

    #

    # Fix the file labeling for all the files in the package affected by

    # the policy module.

    # See the log in /var/log/messages for possible errors.

    %log "Fixing package files' context..."

    if ! %fixfiles_cmd -F -R %{name} restore

    then

        %err "Failed to fix the %{name} rpm package file contexts."

        exit 1

    fi

fi

%{nil}

-14: sed_cmd    /bin/sed

-14: selinux_make       /usr/share/selinux/devel/Makefile

-14: semaphore_backout  /%{plat_run}/backout

-14: semaphore_upgrade  /%{plat_run}/upgrade

-14: semodule_cmd       /usr/sbin/semodule

-14: sepolicy_archive_bdir      ${RPM_BUILD_ROOT}/%{plat_etc}/selinux/modules/%{name}

-14: sepolicy_archive_dir       /%{plat_etc}/selinux/modules/%{name}

-14: service_backout(e)

%log "Configuring services..."

while :

do

        #

        # If called with -e use

        # the services_configured_ever_db

        # otherwise use the services_configured_db

        __SCONF_DB=%{!?-e:%{services_configured_db}}%{?-e:%{services_configured_ever_db}}

        #

        # If the file doesnt exist, exit.  This would happen

        # for some services on VMs.

        [ ! -e ${__SCONF_DB} ] && break

        #

        # PR 139253

        # Build the list from the db

        __SCONF_SLIST=$(%cat_cmd "${__SCONF_DB}")

        #

        # Walk through the list and disable any that are

        # still enabled

        #

        # '--done' is used just in case the list is empty

        for __SCONF_SERVICE in $__SCONF_SLIST --done

        do

                [ "${__SCONF_SERVICE}" = '--done' ] && break

                #

                # Is the service configured

                "%{service_conf_cmd}" query $__SCONF_SERVICE rc --quiet || continue

                %log "Unconfiguring ${__SCONF_SERVICE} service"

                %{service_conf_cmd} del $__SCONF_SERVICE rc ||  \

                        %err "Could not unconfigure ${__SCONF_SERVICE}!"

        done

        #

        # Reconfigure services just in case we reverted

        # the service_conf file

        %{service_conf_cmd} reconfig

 

        #

        # PR 139256

        # Update persistent services configured db on backout:

        #

        # set operation: services_configured_ever_db :=

        #     services_configured_ever_db - services_configured_db

        #

        # If used at various places like do_backout()

        # and service_backout called without parametr -e

        if [ -z "%{?-e}" ]

        then

                __TMP_DB=$(mktemp)

                sort "%{services_configured_ever_db}" "%{services_configured_db}" \

                        | uniq -u > "${__TMP_DB}"

                cp "${__TMP_DB}" "%{services_configured_ever_db}"

                rm -f "${__TMP_DB}"

        fi

 

        #

        # PR 139258

        # Delete list file(s) on pure erase,

        # so the package save directory can go...

        # If called as service_backout -e from places like

        # similar to do_erase()

        if [ -n "%{?-e}" ]

        then

                #

                # Delete persistent db

                rm -f "%{services_configured_ever_db}"

                #

                # Delete ALL version specific db(s):

                # /var/TKLC/pkg/<package>-<version>-<release>/services_configured.db

                __PREFIX=$(dirname "%{services_configured_ever_db}")

                rm -f ${__PREFIX}-*-*/services_configured.db

        fi

        #

        # Break out of the loop:

        break

done

%{nil}

-14: service_cmd        /sbin/service

-14: service_commit

#

# Reconfigure service_conf

if ! "%{service_conf_cmd}" reconfig

then

        #

        # Could not add it, lets clean up

        %err "Could not commit service configuration!"

        %service_backout

        exit 1

fi

%{nil}

-14: service_conf_cmd   /%{plat_bin}/service_conf

-14: service_install(o:)

%log "Configuring services..."

__SCONF_SERVICES="%{*}"

__SCONF_OLD_SERVICES=%{?-o:%{-o*}}

#

# Use in pre should fail

if ! [ -d "/%{pkg_save_dir}" -a -d "/%{persistent_pkg_save_dir}" ]

then

        %err "Too early(pre) or late(postun) to call service_install"

        exit 1

fi

#

# Initialize file...need this so its always there

touch "%{services_configured_db}"

touch "%{services_configured_ever_db}"

#

# Walk through services and configure them

for __SCONF_SERVICE in ${__SCONF_SERVICES}

do

        #

        # Build the basic command.

        __cmd="%{service_conf_cmd} add"

 

        #

        # If there is a : in the service, split it as $service contains

        # runlevels

        if [[ "$__SCONF_SERVICE" =~ ":" ]]

        then

                #

                # Get the runlevel first because we will overwrite service.

                __runlevels=$(echo ${__SCONF_SERVICE/*:/})

                __SCONF_SERVICE=$(echo ${__SCONF_SERVICE/:*/})

                __cmd+=" ${__SCONF_SERVICE} rc runlevels=${__runlevels}"

        else

                __cmd+=" ${__SCONF_SERVICE} rc"

        fi

 

        #

        # Is the service configured.  If so go to next one

        "%{service_conf_cmd}" query $__SCONF_SERVICE  rc          \

                --quiet && continue

        #

        # It was not so add it

        %log "Configuring ${__SCONF_SERVICE} service"

        if ! $__cmd

        then

                #

                # Could not add it, lets clean up

                %err "Could not add service ${__SCONF_SERVICE}!"

                for __SCONF_SERVICE  in $__SCONF_CONFIGURED

                do

                        %log "Rolling back service ${__SCONF_SERVICE}"

                        if ! "%{service_conf_cmd}" del $__SCONF_SERVICE rc

                        then

                                %err "Could not rollback service!"

                        fi

                done

                #

                # Zero services configured file...

                > "%{services_configured_db}"

                exit 1

        fi

        #

        # Add service to the list that were enabled for this upgrade

        # so we can disable them later

        echo $__SCONF_SERVICE >> "%{services_configured_db}"

        echo $__SCONF_SERVICE >> "%{services_configured_ever_db}"

done

#

# Remove old rc scripts:

if [ ! -z "${__SCONF_OLD_SERVICES}" ]

then

        for __SCONF_SERVICE in $__SCONF_OLD_SERVICES

        do

                #

                # Is the service configured

                "%{service_conf_cmd}" query $__SCONF_SERVICE  rc --quiet || continue

                #

                # It was so delete it

                %log "Unconfiguring ${__SCONF_SERVICE} service..."

                        "%{service_conf_cmd}" del $__SCONF_SERVICE rc ||   \

                %err "Could not remove service ${__SCONF_SERVICE}!"

        done

fi

%{nil}

-14: service_remove

    __name=%{1}

    %{service_conf_cmd} query ${__name} &> /dev/null

    if [ $? = 0 ]; then

        %log "Deleting ${__name} from service_conf..."

        %{service_conf_cmd} del ${__name} &> /dev/null

    fi

%{nil}

-14: services_configured_db     /%{pkg_save_dir}/services_configured.db

-14: services_configured_ever_db        /%{persistent_pkg_save_dir}/services_configured.db

-14: sources    %{lua: for i, s in ipairs(sources) do print(s.." ") end}

-14: sparc      sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v

-14: stat_cmd   /usr/bin/stat

-14: sudo_cmd   /usr/bin/sudo

-14: sys_group  sys

-14: syscheckAdm_cmd    /%{plat_bin}/syscheckAdm

-14: syscheck_build_modules

mkdir -p "${RPM_BUILD_ROOT}%{syscheck_modules}"

#

# Copy in the files

pushd "lib/Syscheck/modules"

tar cf - * | (cd ${RPM_BUILD_ROOT}%{syscheck_modules}; tar xvf -)

popd

 

#

# Create entries for all the tests in the file list along with dummy files

# for the ghost entries we will create:

manDir="/%{plat_man}/man3"

mkdir -p "${RPM_BUILD_ROOT}${manDir}"

for dir in ${RPM_BUILD_ROOT}%{syscheck_modules}/*/*

do

    sysDir=${dir/#${RPM_BUILD_ROOT}/}

        module=$(basename ${sysDir})

    classDir=$(dirname ${sysDir})

        class=$(basename ${classDir})

        manPage="${manDir}/Syscheck::modules::${class}::${module}.3pm"

    touch $dir/config

    echo "%%ghost ${sysDir}/config" >> "%{pkg_file_list}"

    echo "%%attr(0750,%syscheck_user,%syscheck_user) %%dir ${sysDir}" >> "%{pkg_file_list}"

    echo "%%attr(0640,%syscheck_user,%syscheck_user) ${sysDir}/config.init" >> "%{pkg_file_list}"

    echo "%%attr(0440,%syscheck_user,%syscheck_user) ${sysDir}/Test.pm" >> "%{pkg_file_list}"

    #

    # Check the POD syntax

    # "&& true" is a little hack to override 'exit' in the podchecker script.

    # that causes to exit this function even when the return value is 2, which

    # is acceptable

    podchecker ${RPM_BUILD_ROOT}${sysDir}/Test.pm && true

    RET=$?

    if [ "$RET" -eq "0" ] ; then

        pod2man "--center=SYSCHECK" --name="Syscheck::modules::${class}::${module}" "${RPM_BUILD_ROOT}${sysDir}/Test.pm" > "${RPM_BUILD_ROOT}${manPage}"

        echo "%doc %attr(0444,root,root) ${manPage}" >> "%{pkg_file_list}"

    fi

    if [ "$RET" -eq "1" ] ; then

        echo "%log "POD syntax error in ${RPM_BUILD_ROOT}${sysDir}/Test.pm !""

        exit 1

    fi

 

    #

    # See if the class dir has already been added:

    found=0

    if [ ! -z "${classdirs}" ]

    then

        for checkdir in $classdirs

        do

            [ "${checkdir}" = "${classDir}" ] && found=1

        done

    fi

    if [ "${found}" = 0 ]

    then

        #

        # It hasn't so add the dir entry:

        echo "%attr(0750,%syscheck_user,%syscheck_user) %%dir ${classDir}" >> "%{pkg_file_list}"

        classdirs="${classDir} ${classdirs}"

    fi

done

%{nil}

-14: syscheck_cmd       /%{plat_bin}/syscheck

-14: syscheck_etc       /%{plat_etc}/syscheck

-14: syscheck_etc_procrun       %{syscheck_etc}/procrun.d

-14: syscheck_lib       /%{plat_lib}/Syscheck

-14: syscheck_log_dir   /%{plat_log}/syscheck

-14: syscheck_modules   %{syscheck_lib}/modules

-14: syscheck_user      syscheck

-14: sysctl_cmd /sbin/sysctl

-14: systemd_post

if [ $1 -eq 1 ] ; then

        # Initial installation

        /usr/bin/systemctl preset %{?*} >/dev/null 2>&1 || :

fi

%{nil}

-14: systemd_postun

/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :

%{nil}

-14: systemd_postun_with_restart

/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :

if [ $1 -ge 1 ] ; then

        # Package upgrade, not uninstall

        /usr/bin/systemctl try-restart %{?*} >/dev/null 2>&1 || :

fi

%{nil}

-14: systemd_preun

if [ $1 -eq 0 ] ; then

        # Package removal, not upgrade

        /usr/bin/systemctl --no-reload disable %{?*} > /dev/null 2>&1 || :

        /usr/bin/systemctl stop %{?*} > /dev/null 2>&1 || :

fi

%{nil}

-14: systemd_requires

Requires(post): systemd

Requires(preun): systemd

Requires(postun): systemd

%{nil}

-14: tests_req  %{expand:

BuildRequires: %*

%%tests_subpackage_requires %*

}

-14: tests_subpackage_provides  %{expand:

%global __tests_spkg_prov %{?__tests_spkg_prov} %*

}

-14: tests_subpackage_requires  %{expand:

%global __tests_spkg_req %{?__tests_spkg_req} %*

}

-14: tklc_apps  usr/TKLC

-14: tmpfiles_create

/usr/bin/systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || :

%{nil}

-14: tpdProvdShimInstall(d:l:)

#

# Process options

__tpdProvd_SHIM_SRC_DIR="%{-d:%{-d*}}"

[ -z "${__tpdProvd_SHIM_SRC_DIR}" ] &&

        __tpdProvd_SHIM_SRC_DIR=etc/tpdProvd/shims

__tpdProvd_FILE_LIST="%{-l:%{-l*}}"

[ -z "${__tpdProvd_FILE_LIST}" ] &&

        __tpdProvd_FILE_LIST="%{pkg_file_list}"

#

# Setup TPD Provd Shim and WSDL Build Directory.

# This is the directory on the build root.

__tpdProvd_bdir="${RPM_BUILD_ROOT}%{tpdProvd_shim_dir}"

__tpdProvd_bwsdldir="${RPM_BUILD_ROOT}%{tpdProvd_wsdl_dir}"

#

# Copy the shims into the build dir

mkdir -p "${__tpdProvd_bdir}"

cp "${__tpdProvd_SHIM_SRC_DIR}/"* "${__tpdProvd_bdir}"

#

# Make the WSDL dir:

mkdir -p "${__tpdProvd_bwsdldir}"

#

# Process each SHIM (tpdProvd Module)

for __tpdProvd_m in "${__tpdProvd_SHIM_SRC_DIR}"/*

do

        #

        # Setup various convenience variables

        __tpdProvd_n=$(basename $__tpdProvd_m)

        __tpdProvd_ipath="%{tpdProvd_shim_dir}/${__tpdProvd_n}"

        __tpdProvd_bpath="${RPM_BUILD_ROOT}${__tpdProvd_ipath}"

        __tpdProvd_iwsdlpath="%{tpdProvd_wsdl_dir}/${__tpdProvd_n}"

        __tpdProvd_iwsdlpath="${__tpdProvd_iwsdlpath/%%.pm/.wsdl}"

        __tpdProvd_bwsdlpath="${RPM_BUILD_ROOT}${__tpdProvd_iwsdlpath}"

        __tpdProvd_ixmlpath="%{tpdProvd_wsdl_dir}/${__tpdProvd_n}"

        __tpdProvd_ixmlpath="${__tpdProvd_ixmlpath/%%.pm/.xml}"

        __tpdProvd_bxmlpath="${RPM_BUILD_ROOT}${__tpdProvd_ixmlpath}"

        #

        # Add shim to package file list

        echo "%%attr(0640, root, tpdProvd) ${__tpdProvd_ipath}" \

                >> ${__tpdProvd_FILE_LIST}

        #

        # Create man pages

    createPod "${__tpdProvd_m}" "" ${__tpdProvd_FILE_LIST} "TPD::SOAP::"

        #

        # Generate WSDL:

        %{tpdProvd_wsdlGenCmd}                                  \

                "${__tpdProvd_m}"                                   \

                "${__tpdProvd_bwsdlpath}"                           \

                --buildDir="${RPM_BUILD_ROOT}"                      \

                --libDir=lib                                        \

                --noFaultOnIncompat

        #

        # Add WSDL to package file list if one was generated:

        if [ -e "${__tpdProvd_bwsdlpath}" ]

        then

                %{ln_cmd} -s "${__tpdProvd_iwsdlpath}"              \

                        "${__tpdProvd_bxmlpath}"

                echo "%%attr(0644, root, tpdProvd) ${__tpdProvd_ixmlpath}" \

                        >> ${__tpdProvd_FILE_LIST}

                echo "%%attr(0644, root, tpdProvd) ${__tpdProvd_iwsdlpath}" \

                        >> ${__tpdProvd_FILE_LIST}

        fi

done

#

# Generate methods for shims:

%genMethods -d "${__tpdProvd_bdir}"

%{nil}

-14: tpdProvd_conf_dir  /%{plat_etc}/tpdProvd

-14: tpdProvd_shim_dir  %{tpdProvd_conf_dir}/shims

-14: tpdProvd_wsdlGenCmd        /%{plat_bin}/wsdlGen

-14: tpdProvd_wsdlValidatorCmd  /%{plat_bin}/wsdlValidator

-14: tpdProvd_wsdl_dir  %{tpdProvd_conf_dir}/wsdl

-14: tpdProvd_wsdl_schema_dir   /%{plat_lib}/TPDWSDLValidator/schema

-14: tpd_test_pkg_install

mkdir -p "${RPM_BUILD_ROOT}/%{plat_tests}/%{name}"

if [ "$(ls tests/* 2>/dev/null)" != "" ]

then

        pushd tests

        cp -rp * "${RPM_BUILD_ROOT}/%{plat_tests}/%{name}"

        popd

fi

%{nil}

-14: tpd_test_pkg_preamble

%package tests

Summary:    Test scripts for the %{name} set of tools

Group:      Tekelec/Test

Version:    %{version}

Requires:   %{name} = %{?epoch}%{!?epoch:0}:%{version}-%{release}

%description tests

This rpm provides automated testing scripts for the

executables and libraries provided by %{name}.

 

%files tests

/%{plat_tests}/%{name}/

%{nil}

-14: tpdsemods_db       /%{pkg_save_dir}/tpdsemods.db

-14: udev_hwdb_update

/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || :

%{nil}

-14: udev_rules_update

/usr/bin/udevadm control --reload >/dev/null 2>&1 || :

%{nil}

-14: ugwrap_module_dir  %{upgrade_lib_dir}/UGWrap

-14: undefined  %{expand:%%{?%{1}:0}%%{!?%{1}:1}}

-14: upgrade_app_disable_dir    %{upgrade_prefix}/appDisable

-14: upgrade_app_enable_dir     %{upgrade_prefix}/appEnable

-14: upgrade_etc_dir    %{upgrade_prefix}/etc

-14: upgrade_fs_conf_dir        %{upgrade_etc_dir}/fs.d

-14: upgrade_lib_dir    %{upgrade_prefix}/lib

-14: upgrade_log        %{plat_log}/upgrade

-14: upgrade_platform_dir       %{upgrade_prefix}/platform

-14: upgrade_prefix     /%{tklc_apps}/upgrade

-14: upgrade_pub_keys_dir       %{upgrade_prefix}/pub_keys

-14: upgrade_snapshots_conf_dir %{upgrade_etc_dir}/snapshots

-14: upgrade_validate_dir       %{upgrade_prefix}/.validate

-14: upstartjob_dir     etc/init

-14: useradd_cmd        /usr/sbin/useradd

-14: userdel_cmd        /usr/sbin/userdel

-14: usermod_cmd        /usr/sbin/usermod

-14: vendor     Tekelec

-14: warning    echo "WARNING: %{name}-%{version}-%{release}:" %* >&2

%{nil}

-14: with       %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}

-14: without    %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}

======================== active 637 empty 0

 

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux