Lines Matching refs:package
12 /// For now, the supported package formats are Deb and RPM, but
29 /// 1/ the first package and its ancillary packages (debug info and
31 /// There is one thread per package being extracted. So if there are
32 /// 3 thread packages (one package, one debug info package and one
33 /// devel package), then there are 3 threads to extracts them. Then
37 /// 2/ A similar thing is done for the second package.
54 // For package configuration macros.
159 class package;
161 /// Convenience typedef for a shared pointer to a @ref package.
162 typedef shared_ptr<package> package_sptr;
328 /// Abstracts a package.
329 class package
333 /// The kind of package we are looking at.
336 /// Main package. Contains binaries to ABI-compare.
338 /// Devel package. Contains public headers files in which public
341 /// Debug info package. Contains the debug info for the binaries
346 /// Source package. Contains the source of the binaries in the
347 /// main package.
365 /// Constructor for the @ref package type.
367 /// @param path the path to the package.
370 /// of the package.
372 /// @param pkg_kind the kind of package.
373 package(const string& path,
375 kind pkg_kind = package::KIND_MAIN)
386 /// Getter of the path of the package.
388 /// @return the path of the package.
393 /// Setter of the path of the package.
400 /// Getter of the base name of the package.
402 /// @return the base name of the package.
437 /// the elements of the package.
439 /// @return the common path prefix of package elements.
445 /// the elements of the package.
447 /// @return the common path prefix of package elements.
453 /// the elements of the package.
461 /// Getter for the file type of the current package.
463 /// @return the file type of the current package.
468 /// Setter for the file type of the current package.
474 /// Get the package kind
476 /// @return the package kind
481 /// Set the package kind
483 /// @param k the package kind.
503 /// package.
506 /// input package, as the debug info for that input package can be
510 /// package.
516 /// package.
519 /// input package, as the debug info for that input package can be
523 /// package.
529 /// package.
532 /// input package, as the debug info for that input package can be
535 /// @param p the new debug info package.
540 /// Getter for the devel package associated to the current package.
542 /// @return the devel package associated to the current package.
547 /// Setter of the devel package associated to the current package.
549 /// @param p the new devel package associated to the current package.
554 /// Getter of the associated kernel abi whitelist package, if any.
556 /// @return the associated kernel abi whitelist package.
561 /// Setter of the associated kernel abi whitelist package.
563 /// @param p the new kernel abi whitelist package.
568 /// Getter of the path to the elf files of the package.
570 /// @return the path tothe elf files of the package.
575 /// Getter of the path to the elf files of the package.
577 /// @return the path tothe elf files of the package.
583 /// package.
588 /// @return the SONAMEs of the public DSOs carried by this package.
594 /// package.
599 /// @return the SONAMEs of the public DSOs carried by this package.
604 /// Convert the absolute path of an element of this package into a
605 /// path relative to the root path pointing to this package.
607 /// That is, suppose the content of a package named 'pkg' is located
608 /// at /root/path/pkg. Suppose an element of that package is named
631 // Convert the absolute path of an element of this package into a
633 // of the package.
647 /// Retrieve the set of "interesting" package element paths by
648 /// walking the package.
742 }; // end class package.
794 package::extracted_packages_parent_dir()
840 /// A convenience typedef for shared_ptr of package.
841 typedef shared_ptr<package> package_sptr;
854 << " --debug-info-pkg1|--d1 <path> path of debug-info package of package1\n"
855 << " --debug-info-pkg2|--d2 <path> path of debug-info package of package2\n"
856 << " --devel-pkg1|--devel1 <path> path of devel package of pakage1\n"
857 << " --devel-pkg2|--devel2 <path> path of devel package of pakage1\n"
865 << " --wp <path> path to a linux kernel abi whitelist package\n"
869 "to the package as well\n"
905 "binaries inside the input package against their ABIXML representation\n"
916 /// Extract an RPM package.
918 /// @param package_path the path to the package to extract.
921 /// package to.
933 << "Extracting package "
961 /// Extract a Debian binary package.
963 /// @param package_path the path to the package to extract.
966 /// package to.
978 << "Extracting package "
1058 /// @param first_package the first package to consider.
1062 /// @param second_package the second package to consider.
1064 erase_created_temporary_directories(const package& first_package,
1065 const package& second_package,
1080 << package::extracted_packages_parent_dir()
1083 string cmd = "rm -rf " + package::extracted_packages_parent_dir();
1096 /// Extract the content of a package.
1098 /// @param package the package we are looking at.
1102 extract_package(const package& package,
1105 switch(package.type())
1109 if (!extract_rpm(package.path(), package.extracted_dir_path(), opts))
1112 << "Error while extracting package " << package.path() << "\n";
1119 "enabling it at package configure time\n";
1125 if (!extract_deb(package.path(), package.extracted_dir_path(), opts))
1128 << "Error while extracting package" << package.path() << "\n";
1135 "enabling it at package configure time\n";
1141 // The input package is just a directory that contains binaries,
1147 if (!extract_tar(package.path(), package.extracted_dir_path(), opts))
1151 << package.path() << "\n";
1158 "enabling it at package configure time\n";
1766 /// If devel packages were associated to the main package we are
1768 /// package) to generate suppression specification to filter out types
1772 /// out types that are deemed private to the package we are looking
1778 /// @param pkg the main package we are looking at.
1785 create_private_types_suppressions(const package& pkg, const options &opts)
1819 /// package, then we build the set of public DSOs as advertised in the
1820 /// package's "provides" property.
1825 /// @param pkg the package to consider.
1831 maybe_create_public_dso_sonames_set(package& pkg, const options &opts)
1843 /// Test if we should only compare the public DSOs of a given package.
1845 /// @param pkg the package to consider.
1849 must_compare_public_dso_only(package& pkg, options& opts)
1922 /// Find a kabi whitelist in a linux kernel RPM package.
1924 /// Note that the linux kernel RPM package must have been extracted
1928 /// directory inside the extracted content of the package. If it
1932 /// @param pkg the linux kernel package to consider.
1936 maybe_handle_kabi_whitelist_pkg(const package& pkg, options &opts)
2020 /// The worker task which job is to prepares a package.
2022 /// Preparing a package means:
2024 /// 1/ Extract the package and its ancillary packages.
2210 /// the extracted content of package. It's called with an entry of
2260 /// a kernel package or a userspace binary analysis point of view.
2307 /// Create maps of the content of a given package.
2311 /// the content of the package. Note that the maps are stored in the
2312 /// object that represents that package.
2314 /// @param package the package to consider.
2320 create_maps_of_package_content(package& package, options& opts)
2324 << "Analyzing the content of package "
2325 << package.path()
2327 << package.extracted_dir_path()
2333 // if package is linux kernel package and its associated debug
2334 // info package looks like a kernel debuginfo package, then try to
2336 string pkg_name = package.base_name();
2338 package.type());
2341 // For a linux kernel package, no analysis is done. It'll be
2347 << " Analysis of " << package.path() << " DONE\n";
2351 is_ok &= get_interesting_files_under_dir(package.extracted_dir_path(),
2358 << package.extracted_dir_path() << "\n";
2361 // and stick it into the package! That prefix is going to be used
2362 // later by the package::convert_path_to_unique_suffix method.
2363 package.load_elf_file_paths(opts);
2365 maybe_create_public_dso_sonames_set(package, opts);
2410 && must_compare_public_dso_only(package, opts))
2426 package.convert_path_to_unique_suffix(e->path, key);
2427 package.path_elf_file_sptr_map()[key] = e;
2441 if (must_compare_public_dso_only(package, opts))
2443 if (package.public_dso_sonames().find(key)
2444 == package.public_dso_sonames().end())
2456 if (package.convert_path_to_unique_suffix(e->path, key))
2461 package.path_elf_file_sptr_map()[key] = e;
2471 << " Analysis of " << package.path() << " DONE\n";
2478 /// Extract the content of a package (and its ancillary packages) and
2481 /// First, the content of the package and its ancillary packages are
2484 /// Then, after that extraction is done, the content of the package if
2487 /// @param pkg the package to extract and to analyze.
2540 // Analyze and map the content of the extracted package.
2553 /// first package to compare against what files from the second
2554 /// package.
2556 /// Note that preparing the first package and its ancillary packages
2557 /// happens in parallel with preparing the second package and its
2561 /// @param first_package the first package to consider.
2563 /// @param second_package the second package to consider.
2593 /// Prepare one package for the sake of comparing it to its ABIXML
2596 /// The preparation entails unpacking the content of the package into
2599 /// @param pkg the package to prepare.
2613 /// hence longer diff time. For a package containing several relatively
2689 /// @param first_package the first package to consider.
2691 /// @param second_package the second package to consider.
2695 maybe_erase_temp_dirs(package& first_package, package& second_package,
2708 /// A prepared package is a package which content has been extracted
2711 /// @param first_package the first package to consider.
2713 /// @param second_package the second package to consider.
2725 compare_prepared_userspace_packages(package& first_package,
2726 package& second_package,
2883 /// In the context of the unpacked content of a given package, compare
2884 /// the binaries inside the package against their ABIXML
2887 /// @param pkg (unpacked) package
2896 self_compare_prepared_userspace_package(package& pkg,
2992 /// A prepared package is a package which content has been extracted
2995 /// @param first_package the first package to consider.
2997 /// @param second_package the second package to consider.
3009 compare_prepared_linux_kernel_packages(package& first_package,
3010 package& second_package,
3098 /// A prepared package is a package which content has been extracted
3101 /// @param first_package the first package to consider.
3103 /// @param second_package the second package to consider.
3115 compare_prepared_package(package& first_package, package& second_package,
3136 /// Compare binaries in a package against their ABIXML
3139 /// @param pkg the package to consider.
3148 self_compare_prepared_package(package& pkg,
3161 /// @param first_package the first package to consider.
3163 /// @param second_package the second package to consider.
3181 // Note that the package preparations happens in parallel.
3191 /// Compare binaries in a package against their ABIXML
3194 /// @param pkg the package to consider.
3211 /// @param first_package the first package to consider.
3213 /// @param second_package the second package to consider.
3412 // *package*. Take that into account.
3548 // We don't need the second package, we'll ignore it later
3554 // We need at least one package to work with!
3556 << "missing input package\n";
3570 package_sptr first_package(new package(opts.package1, "package1"));
3572 package_sptr second_package(new package(opts.package2, "package2"));
3580 (package_sptr(new package(*p,
3582 /*pkg_kind=*/package::KIND_DEBUG_INFO)));
3588 (package_sptr(new package(*p,
3590 /*pkg_kind=*/package::KIND_DEBUG_INFO)));
3594 (package_sptr(new package(opts.devel_package1,
3596 /*pkg_kind=*/package::KIND_DEVEL)));
3601 (package_sptr(new package(opts.devel_package2,
3603 /*pkg_kind=*/package::KIND_DEVEL)));
3608 (package_sptr(new package
3611 /*pkg_kind=*/package::KIND_KABI_WHITELISTS)));
3614 (package_sptr(new package
3617 /*pkg_kind=*/package::KIND_KABI_WHITELISTS)));
3645 << "a Linux kernel package can only be compared to another "
3646 "Linux kernel package\n";
3656 << "a Linux Kernel package must be accompanied with its "
3657 "debug info package\n";
3714 << package_name << " should be a valid package file \n";