%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define generate_rpmpriorities 0 %define comps %{_datadir}/comps/%{_build_arch}/comps.xml Summary: Debian's Advanced Packaging Tool with RPM support Name: apt Version: 0.5.15lorg3.93 Release: 2%{?dist} Group: System Environment/Base URL: http://apt-rpm.org/ # SourceLicense: GPLv2+ except lua/ which is MIT License: GPLv2+ #Source0: http://laiskiainen.org/apt/testing/%{name}-%{version}.tar.bz2 Source0: http://apt-rpm.org/testing/%{name}-%{version}.tar.bz2 # user editable template configs Source1: apt.conf Source2: sources.list Source3: vendors.list Source4: apt_preferences # rpmpriorities generated + manually tweaked from comps.xml core group Source5: rpmpriorities Source19: comps2prio.xsl # Sources 50-99 are for Lua-scripts not in contrib/ Source51: upgradevirt.lua # 150-199 for apt.conf.d # "factory defaults" Source150: default.conf # Fix ppc mapping Patch0: apt-0.5.15lorg3.2-ppc.patch # band aid for mmap issues (#211254) Patch1: apt-0.5.15lorg3.x-cache-corruption.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # TODO: verify the required minimum Python version BuildRequires: python-devel >= 2.2 BuildRequires: libxml2-devel BuildRequires: sqlite-devel BuildRequires: rpm-devel, beecrypt-devel, elfutils-libelf-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: libstdc++-devel BuildRequires: gettext BuildRequires: docbook-utils BuildRequires: perl BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: gawk %if %{generate_rpmpriorities} BuildRequires: %{_bindir}/xsltproc BuildRequires: %{comps} %endif # libxml2-devel, #183689 BuildRequires: pkgconfig Requires: gnupg Requires: bzip2 Requires: fedora-release >= 4 Requires(post): chkconfig Requires(post): ldconfig Requires(preun): chkconfig %if 0%{!?_with_groupinstall:1} Obsoletes: %{name}-groupinstall < %{version}-%{release} %endif Requires: apt-config %description APT-RPM is a port of Debian's apt tools for RPM based distributions. It provides the apt-get utility that provides a simple, safe way to install and upgrade packages. APT features complete installation ordering, multiple source capability and several other useful features. %package devel Summary: Development files and documentation for APT's libapt-pkg Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: rpm-devel Requires: pkgconfig %description devel This package contains development files for developing with APT's libapt-pkg package manipulation library, modified for RPM. %package python Summary: Python bindings for libapt-pkg Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description python The apt-python package contains a module which allows python programs to access the APT library interface. %package groupinstall Summary: Additional commands to install and remove package groups Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: rhpl Requires: comps %description groupinstall This package adds four new commands to apt for installing, removing and viewing groups of packages: apt-cache groupnames apt-cache showgroup [ ..] apt-get groupinstall [ ..] apt-get groupremove [ ..] The group information is retrieved from comps.xml used by anaconda (the system installer) and other package management tools of RHL/RHEL/FC distributions. %prep %setup -q %patch0 -p1 -b .ppc %patch1 -p0 -b .mmap # fix docs to reference correct paths perl -pi -e \ 's|\bconfigure-index\.gz\b|configure-index| ; s|/usr/share/doc/apt/|%{_docdir}/%{name}-%{version}/|' \ doc/apt.ent doc/*/apt.ent.* doc/offline.sgml contrib/apt-wrapper/apt.ent install -pm 644 %{SOURCE19} comps2prio.xsl # don't require python, lua etc because of stuff in doc/contrib find contrib/ -type f | xargs chmod 0644 %build %configure --disable-dependency-tracking --disable-static SGML_CATALOG_FILES=$(ls -1 %{_sysconfdir}/sgml/sgml-docbook-3.1* | head -n 1) \ make %{?_smp_mflags} make -C python %{?_smp_mflags} PYTHON="%{__python}" python -O -c "import py_compile; py_compile.compile('python/apt.py')" cp -p %{SOURCE5} rpmpriorities %if %{generate_rpmpriorities} xsltproc -o rpmpriorities comps2prio.xsl %{comps} %endif %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} includedir=%{_includedir}/apt-pkg %find_lang %{name} # The state files mkdir -p %{buildroot}%{_localstatedir}/cache/apt/archives/partial mkdir -p %{buildroot}%{_localstatedir}/cache/apt/genpkglist mkdir -p %{buildroot}%{_localstatedir}/cache/apt/gensrclist mkdir -p %{buildroot}%{_localstatedir}/lib/apt/lists/partial # The config files mkdir -p %{buildroot}%{_sysconfdir}/apt mkdir -p %{buildroot}%{_sysconfdir}/apt/apt.conf.d mkdir -p %{buildroot}%{_sysconfdir}/apt/sources.list.d mkdir -p %{buildroot}%{_sysconfdir}/apt/vendors.list.d install -pm 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/apt/apt.conf install -pm 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/apt/sources.list install -pm 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/apt/vendors.list install -pm 644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/apt/preferences install -pm 644 rpmpriorities %{buildroot}/%{_sysconfdir}/apt/ # install config parts install -pm 644 %{SOURCE150} %{buildroot}%{_sysconfdir}/apt/apt.conf.d/ # # GPG keys mkdir -p %{buildroot}%{_sysconfdir}/apt/gpg/ # Lua scripts mkdir -p %{buildroot}%{_datadir}/apt/scripts for script in %{SOURCE51} ; do install -pm 755 $script %{buildroot}%{_datadir}/apt/scripts done # The python bindings mkdir -p %{buildroot}%{python_sitearch}/ install -pm 755 python/_apt.so %{buildroot}%{python_sitearch}/ install -pm 644 python/apt.py* %{buildroot}%{python_sitearch}/ touch %{buildroot}%{python_sitearch}/apt.pyo # Nightly updater scripts & default config install -Dpm 755 contrib/apt-cron/apt.init %{buildroot}/%{_initrddir}/apt install -Dpm 755 contrib/apt-cron/apt.cron %{buildroot}/%{_sysconfdir}/cron.daily/apt.cron install -Dpm 644 contrib/apt-cron/apt.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/apt # GPG checker from contrib install -pm 755 contrib/gpg-check/*.lua %{buildroot}/%{_datadir}/apt/scripts # apt-groupinstall from contrib %if 0%{?_with_groupinstall:1} install -pm 755 contrib/apt-groupinstall/{groupinstall-backend-comps.py,apt-groupinstall.lua} %{buildroot}/%{_datadir}/apt/scripts touch %{buildroot}%{_datadir}/apt/scripts/groupinstall-backend-comps.py{c,o} install -pm 644 contrib/apt-groupinstall/apt-groupinstall.conf \ %{buildroot}/%{_sysconfdir}/apt/apt.conf.d/ %endif # nuke .la files rm -f %{buildroot}%{_libdir}/*.la %clean rm -rf %{buildroot} %post /sbin/ldconfig /sbin/chkconfig --add apt %preun if [ $1 -eq 0 ] ; then %{_initrddir}/apt stop &>/dev/null || : /sbin/chkconfig --del apt fi %postun -p /sbin/ldconfig %files -f %{name}.lang %defattr(-, root, root) %doc AUTHORS* COPYING* ABOUT* TODO comps2prio.xsl doc/examples/ contrib/ %doc ChangeLog lua/COPYRIGHT %dir %{_sysconfdir}/apt/ %config(noreplace) %{_sysconfdir}/apt/apt.conf %config(noreplace) %{_sysconfdir}/apt/preferences %config(noreplace) %{_sysconfdir}/apt/rpmpriorities %config(noreplace) %{_sysconfdir}/apt/sources.list %config(noreplace) %{_sysconfdir}/apt/vendors.list %dir %{_sysconfdir}/apt/apt.conf.d/ # NOTE: no noreplace because we WANT to be able to change the defaults # without user intervention! %config %{_sysconfdir}/apt/apt.conf.d/default.conf %config %{_sysconfdir}/apt/apt.conf.d/multilib.conf %dir %{_sysconfdir}/apt/sources.list.d/ %dir %{_sysconfdir}/apt/vendors.list.d/ %config(noreplace) %{_sysconfdir}/sysconfig/apt %{_sysconfdir}/cron.daily/apt.cron %{_sysconfdir}/apt/gpg/ %{_initrddir}/apt %{_bindir}/apt-cache %{_bindir}/apt-cdrom %{_bindir}/apt-config %{_bindir}/apt-shell %{_bindir}/apt-get %{_bindir}/countpkglist %{_bindir}/genpkglist %{_bindir}/gensrclist %{_bindir}/genbasedir %{_libdir}/libapt-pkg*.so.* %{_libdir}/apt/ %dir %{_datadir}/apt/ %dir %{_datadir}/apt/scripts/ %{_datadir}/apt/scripts/gpg-check.lua %{_datadir}/apt/scripts/gpg-import.lua %{_datadir}/apt/scripts/upgradevirt.lua %{_localstatedir}/cache/apt/ %{_localstatedir}/lib/apt/ %{_mandir}/man[58]/*.[58]* %files devel %defattr(-,root,root,-) %{_includedir}/apt-pkg/ %{_libdir}/libapt-pkg*.so %{_libdir}/pkgconfig/libapt-pkg.pc %files python %defattr(-,root,root,-) %{python_sitearch}/_apt.so %{python_sitearch}/apt.py* %if 0%{?_with_groupinstall:1} %files groupinstall %defattr(-,root,root,-) # XXX not config? %{_sysconfdir}/apt/apt.conf.d/apt-groupinstall.conf %{_datadir}/apt/scripts/apt-groupinstall.lua %{_datadir}/apt/scripts/groupinstall-backend-comps.py %ghost %{_datadir}/apt/scripts/groupinstall-backend-comps.py[co] %endif %changelog * Thu Aug 23 2007 Panu Matilainen 0.5.15lorg3.93-2 - gah, need to buildrequire gawk now... * Thu Aug 23 2007 Panu Matilainen 0.5.15lorg3.93-1 - update to 0.5.15lorg3.93 (#253170) - -devel requires pkgconfig due to .pc addition - another license correction per latest guidelines - cronjob is not a config file * Fri Aug 3 2007 Panu Matilainen - License clarification - Include Lua license in documentation * Thu Aug 2 2007 Axel Thimm - 0.5.15lorg3.92-2 - Fix Fedora bug #249323. * Sun Jul 08 2007 Panu Matilainen - 0.5.15lorg3.92-1 - update to 0.5.15lorg3.92 - drop broken GPG keys, they belong to the config package anyway - buildrequire sqlite-devel for repomd sqlite extension support - add changelog to docs * Sun Jun 3 2007 Axel Thimm - 0.5.15lorg3.2-10 - Make autoupdates a bit more quiet (Pierre Ossman ). * Sat Dec 23 2006 Axel Thimm - 0.5.15lorg3.2-9 - Add a patch to notify user and rebuild the cache on cache corruption. * Sat Dec 9 2006 Axel Thimm - 0.5.15lorg3.2-8.1 - Rebuild against python 2.5. * Thu Nov 23 2006 Axel Thimm - 0.5.15lorg3.2-8 - Fix ppc mapping (#210833). - make-up. * Sat Sep 16 2006 Axel Thimm - 0.5.15lorg3.2-7 - Un%%ghost pyo files. * Thu Jun 22 2006 Axel Thimm - 0.5.15lorg3.2-6 - Update to 0.5.15lorg3.2. * Mon May 22 2006 Axel Thimm - Update to 0.5.15lorg3.1. * Sat May 20 2006 Axel Thimm - Update to 0.5.15lorg3.1-rc2. - Move some FC specific config bits to fedora-package-config-apt. - Remove some sources that can be found in upstream now. * Thu May 11 2006 Axel Thimm - 0.5.15lorg3-2.1 - Remove bogus final s from default(s).conf (Ville). * Mon May 8 2006 Axel Thimm - 0.5.15lorg3-2 - Split off configuration files from apt. * Tue Apr 25 2006 Axel Thimm - 0.5.15lorg3-1 - Update to 0.5.15lorg3 final. - Fix URL. * Wed Apr 19 2006 Ralf Corsépius - 0.5.15lorg3-rc2. * Mon Apr 10 2006 Ville Skyttä - Remove mirror select remainders (thanks to Panu). * Sun Apr 9 2006 Ville Skyttä - 0.5.15lorg3-0.3.rc1 - 0.5.15lorg3-rc1. - Trim pre-2005 changelog entries. * Sun Apr 09 2006 Panu Matilainen - use /var/lib/apt instead of obsolete /var/state/apt - support FC4 as well * Fri Apr 7 2006 Ville Skyttä - 0.5.15lorg3-0.2.pre4 - 0.5.15lorg3-pre4. * Fri Mar 24 2006 Ville Skyttä - 0.5.15lorg3-0.2.pre3 - 0.5.15lorg3-pre3. * Wed Mar 22 2006 Ville Skyttä - 0.5.15lorg3-0.2.pre2 - Don't ship our copies of GPG keys, use ones in /etc/pki/rpm-gpg instead. - Don't import the "Old RHL key" by default. * Wed Mar 22 2006 Panu Matilainen - 0.5.15lorg3-pre2 - set distroverpkg to fedora-release - add distro version and arch independent default source list entries for fedora core, extras + updates - remove old nasty fedora.us-time hacks from post scriptlets * Sun Mar 19 2006 Ville Skyttä - 0.5.15lorg3-0.2.pre1 - Fix Allow-Duplicated* default.conf bugs introduced in previous version. * Sun Mar 19 2006 Ville Skyttä - 0.5.15lorg3-0.1.pre1 - 0.5.15lorg3-pre1: preliminary multilib and repomd support. - Update config for kernel and module packages. - Don't ship static libraries. - Don't mark init script as config. - Don't build -groupinstall for now. - Clean up dependency lists for FC5+. - Specfile cleanup. * Sun Nov 13 2005 Ville Skyttä - 0.5.15cnc7-7 - Rebuild against new OpenSSL. * Wed Jun 22 2005 Ville Skyttä - 0.5.15cnc7-6 - Drop fedora.us GPG key and vendors.list entry. - Remove mirror list stuff (#161042). - Drop no longer needed explicit python-abi dependency. * Thu Apr 28 2005 Ville Skyttä - 0.5.15cnc7-5 - Fix apt-shell "install kernel" crash (#155990, Panu Matilainen). * Tue Apr 19 2005 Seth Vidal - tobuild test * Fri Apr 1 2005 Michael Schwendt - 0.5.15cnc7-3 - Include apt-pkg includedir in -devel package * Sat Mar 26 2005 Ville Skyttä - 0.5.15cnc7-2 - 0.5.15cnc7, drop patches applied upstream. - Fix groupinstall config file permissions. - Various specfile and build cleanups and typo fixes. * Sat Mar 19 2005 Ville Skyttä - Apply hack against missing libselinux-devel dep in rpm-devel for rpm 4.4 too. * Wed Feb 16 2005 Ville Skyttä - 0:0.5.15cnc6-16.r362 - Make mirror-select.lua write commented out rpm-src entries for Extras (Panu). - Add Extras GPG key (Panu), and add it to fedora-vendors.list. - Drop not-installed Fedora Legacy key from SRPM. - Comment out Kernel::Set-Default from default.conf; as of FC3+, the kernel packages take care of that automatically (Panu). * Sat Jan 29 2005 Warren Togami - 0:0.5.15cnc6-15.r362 - ExcludeArch: ppc64 * Fri Jan 28 2005 Ville Skyttä - 0:0.5.15cnc6-14.r362 - Add xen kernels and more kernel-*-devel variants to Allow-Duplicated in apt.conf.d/default.conf. * Sun Jan 23 2005 Ville Skyttä - 0:0.5.15cnc6-13.r362 - Add kernel-devel to Allow-Duplicated in apt.conf.d/default.conf. * Mon Jan 17 2005 Ville Skyttä - 0:0.5.15cnc6-12.r362 - Clean up -python packaging, make everything honor %%{__python}. - Build with dependency tracking disabled. - "Revert" rpmpriorities and libselinux build-dep stuff to Panu's version. - Add experimental auto-generation of rpmpriorities, but don't use it yet. - Fix up mirror-select.conf creation.