%global oname apt # snapshot release #global snapshot 1 %if 0%{?snapshot} %global prerel ~rc1 %global commit 73c5027cf8ceabf7bb72fe08d4d86d07d3d72461 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20180415 %endif %{!?jobs:%global jobs %(/usr/bin/getconf _NPROCESSORS_ONLN)} # Disable integration tests by default, # as there is a bunch of failures on non-Debian systems currently. # Additionally, these tests take a long time to run. %bcond_with check_integration Name: apt-dpkg Version: 1.7.2%{?prerel:%{prerel}+git%{snapdate}.%{shortcommit}} Release: 0%{?dist}.1 Summary: Command-line package manager for Debian packages License: GPLv2+ URL: https://tracker.debian.org/pkg/apt %if 0%{?snapshot} Source0: https://salsa.debian.org/apt-team/%{oname}/-/archive/%{commit}/%{oname}-%{commit}.tar.gz %else Source0: https://salsa.debian.org/apt-team/%{oname}/-/archive/%{version}/%{oname}-%{version}.tar.gz %endif BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake >= 3.4 BuildRequires: ninja-build BuildRequires: pkgconfig(gnutls) >= 3.4.6 BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libseccomp) BuildRequires: pkgconfig(libudev) # Package manager BRs BuildRequires: dpkg-dev # These BRs lack pkgconfig() names BuildRequires: libdb-devel BuildRequires: gtest-devel BuildRequires: bzip2-devel # Misc BRs BuildRequires: po4a >= 0.35 BuildRequires: docbook-style-xsl, docbook-dtds BuildRequires: gettext >= 0.19 BuildRequires: doxygen BuildRequires: graphviz BuildRequires: w3m BuildRequires: %{_bindir}/xsltproc %if %{with check_integration} BuildRequires: coreutils, moreutils, BuildRequires: moreutils-parallel BuildRequires: fakeroot, lsof, sed BuildRequires: tar, wget, stunnel BuildRequires: gnupg, gnupg2 BuildRequires: perl(File::FcntlLock) BuildRequires: perl(Digest::SHA) BuildRequires: debhelper >= 9 # Unbreak running tests in non-interactive terminals BuildRequires: expect %endif # For ensuring the user is created Requires(pre): shadow-utils # To ensure matching apt libs are installed Requires: %{name}-libs%{?_isa} = %{version}-%{release} # apt-transport-curl-https is gone... Obsoletes: %{name}-transport-https < %{version}-%{release} Provides: %{name}-transport-https = %{version}-%{release} Obsoletes: %{name}-transport-curl-https < %{version}-%{release} Provides: %{name}-transport-curl-https = %{version}-%{release} %description This package provides commandline tools for searching and managing as well as querying information about packages as a low-level access to all features of the libapt-pkg library. These include: * apt-get for retrieval of packages and information about them from authenticated sources and for installation, upgrade and removal of packages together with their dependencies * apt-cache for querying available information about installed as well as installable packages * apt-cdrom to use removable media as a source for packages * apt-config as an interface to the configuration settings * apt-key as an interface to manage authentication keys %package libs Summary: Runtime libraries for %{name} %description libs This package includes two libraries: libapt-pkg and libapt-inst libapt-pkg provides the common functionality for searching and managing packages as well as information about packages. Higher-level package managers can depend upon this library. This includes: * retrieval of information about packages from multiple sources * retrieval of packages and all dependent packages needed to satisfy a request either through an internal solver or by interfacing with an external one * authenticating the sources and validating the retrieved data * installation and removal of packages in the system * providing different transports to retrieve data over cdrom, ftp, http, rsh as well as an interface to add more transports like https (apt-transport-https) and debtorrent (apt-transport-debtorrent). libapt-inst provides methods to query and extract information from deb packages. This includes the control data and the package file content. %package doc Summary: Documentation for APT BuildArch: noarch %description doc This package contains the user guide and offline guide for various APT tools which are provided in a html and a text-only version. %package devel Summary: Development files for APT's libraries Provides: libapt-pkg-devel%{?_isa} = %{version}-%{release} Provides: libapt-pkg-devel = %{version}-%{release} Requires: %{oname}-libs = %{version}-%{release} %description devel This package contains the header files and libraries for developing with APT's libapt-pkg Debian package manipulation library and the libapt-inst deb/tar/ar library. %package devel-doc Summary: Documentation for developing against APT libraries Provides: libapt-pkg-doc = %{version}-%{release} BuildArch: noarch %description devel-doc This package contains documentation for development of the APT Debian package manipulation program and its libraries. This includes the source code documentation generated by doxygen in html format. %package utils Summary: Package management related utility programs Requires: %{name}%{?_isa} = %{version}-%{release} %description utils This package contains some less used commandline utilities related to package management with APT. * apt-extracttemplates is used by debconf to prompt for configuration questions before installation. * apt-ftparchive is used to create Packages and other index files needed to publish an archive of Debian packages * apt-sortpkgs is a Packages/Sources file normalizer. %prep %if 0%{?snapshot} %autosetup -n %{oname}-%{commit} -p1 %else %autosetup -n %{oname}-%{version} -p1 %endif %build # Do out of tree build mkdir %{_target_platform} pushd %{_target_platform} %cmake .. -GNinja popd %ninja_build -C %{_target_platform} %install %ninja_install -C %{_target_platform} %find_lang %{oname} %find_lang %{oname}-utils %find_lang libapt-inst2.0 %find_lang libapt-pkg5.0 cat libapt*.lang >> %{oname}-libs.lang %check %ninja_test -C %{_target_platform} %if %{with check_integration} unbuffer ./test/integration/run-tests -q %{?jobs:-j %{jobs}} %endif # Create the _apt user+group for apt data %pre getent group _apt >/dev/null || groupadd -r _apt getent passwd _apt >/dev/null || \ useradd -r -g _apt -d /nonexistent -s /sbin/nologin \ -c "APT account for owning persistent & cache data" _apt exit 0 %ldconfig_scriptlets libs %files -f %{oname}.lang %license COPYING* %doc README.* AUTHORS %{_bindir}/apt %{_bindir}/apt-cache %{_bindir}/apt-cdrom %{_bindir}/apt-config %{_bindir}/apt-get %{_bindir}/apt-key %{_bindir}/apt-mark %dir %{_libexecdir}/apt %{_libexecdir}/apt/apt-helper %{_libexecdir}/apt/methods %{_libexecdir}/dpkg/methods/apt %attr(-,_apt,_apt) %{_sharedstatedir}/apt %attr(-,_apt,_apt) %{_localstatedir}/cache/apt %{_datadir}/bash-completion/completions/apt %{_mandir}/*/*/apt.* %{_mandir}/*/*/apt-cache.* %{_mandir}/*/*/apt-cdrom.* %{_mandir}/*/*/apt-config.* %{_mandir}/*/*/apt-get.* %{_mandir}/*/*/apt-key.* %{_mandir}/*/*/apt-mark.* %{_mandir}/*/*/apt-secure.* %{_mandir}/*/*/apt-transport-http.* %{_mandir}/*/*/apt-transport-https.* %{_mandir}/*/*/apt-transport-mirror.* %{_mandir}/*/*/apt_auth.* %{_mandir}/*/*/apt_preferences.* %{_mandir}/*/*/sources.list.* %{_mandir}/*/apt.* %{_mandir}/*/apt-cache.* %{_mandir}/*/apt-cdrom.* %{_mandir}/*/apt-config.* %{_mandir}/*/apt-get.* %{_mandir}/*/apt-key.* %{_mandir}/*/apt-mark.* %{_mandir}/*/apt-secure.* %{_mandir}/*/apt-transport-http.* %{_mandir}/*/apt-transport-https.* %{_mandir}/*/apt-transport-mirror.* %{_mandir}/*/apt_auth.* %{_mandir}/*/apt_preferences.* %{_mandir}/*/sources.list.* %doc %{_docdir}/%{oname} %files libs -f %{oname}-libs.lang %license COPYING* %{_libdir}/*.so.* %files doc %doc %{_docdir}/%{oname}-doc %files devel-doc %doc %{_docdir}/libapt-pkg-doc %files devel %{_libdir}/*.so %{_includedir}/* %files utils -f %{oname}-utils.lang %{_bindir}/apt-extracttemplates %{_bindir}/apt-ftparchive %{_bindir}/apt-sortpkgs %{_libexecdir}/apt/planners %{_libexecdir}/apt/solvers %{_mandir}/*/*/apt-extracttemplates.* %{_mandir}/*/*/apt-ftparchive.* %{_mandir}/*/*/apt-sortpkgs.* %{_mandir}/*/apt-extracttemplates.* %{_mandir}/*/apt-ftparchive.* %{_mandir}/*/apt-sortpkgs.* %doc %{_docdir}/%{oname}-utils %changelog * Tue Feb 19 06:17:11 EST 2019 Neal Gompa - 1.7.2 - Update to 1.7.2 * Sun Jun 03 09:45:17 EDT 2018 Neal Gompa - 1.6.1 - Update to 1.6.1 * Sun Apr 15 17:41:44 EDT 2018 Neal Gompa - 1.6~rc99+git - Bump to track apt git master becoming 1.6 * Thu Sep 28 2017 Neal Gompa - 1.5 - Update to 1.5 * Thu Sep 28 2017 Neal Gompa - 1.5~rc99+git - Drop apt-transport-curl-https subpackage as the code has been removed * Thu Aug 31 2017 Neal Gompa - 1.5~rc99+git - Bump to track apt git master becoming 1.5 * Mon Jun 26 2017 Neal Gompa - 1.4.6 - Update to 1.4.6 * Fri Sep 02 2016 Neal Gompa - 1.3~rc99+git - Drop merged patch for running libapt tests using gtest library - Enable unit tests by default - Disable integration tests by default * Thu Sep 01 2016 Neal Gompa - 1.3~rc99+git - Add patch to support running libapt tests using gtest library * Tue Aug 30 2016 Neal Gompa - 1.3~rc99+git - Add support for running integration tests in the check section * Tue Aug 23 2016 Neal Gompa - 1.3~rc99+git - Drop merged patch for finding DocBook stylesheets * Sun Aug 21 2016 Neal Gompa - 1.3~rc99+git - Set up for using with OBS for CI builds * Sun Aug 21 2016 Neal Gompa - 1.3~rc2+git20160821.ab59037-0.1 - Initial packaging