%{!?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 %define aptver 0.5.15lorg3.95 %define snapver git522 %define srcver %{aptver}.%{snapver} Summary: Debian's Advanced Packaging Tool with RPM support Name: apt Version: %{aptver} Release: 1.%{snapver}.1%{?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}-%{srcver}.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 Source52: gpg-check.lua # 150-199 for apt.conf.d # "factory defaults" Source150: default.conf Source200: apt.service # 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 # TODO: verify the required minimum Python version BuildRequires: python-devel >= 2.2 BuildRequires: swig BuildRequires: libxml2-devel BuildRequires: sqlite-devel BuildRequires: rpm-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: libstdc++-devel BuildRequires: gettext BuildRequires: perl BuildRequires: readline-devel BuildRequires: ncurses-devel BuildRequires: gawk %if %{generate_rpmpriorities} BuildRequires: %{_bindir}/xsltproc BuildRequires: %{comps} %endif # libxml2-devel, #183689 BuildRequires: pkgconfig BuildRequires: lua-devel >= 5.1 BuildRequires: systemd-units Requires: gnupg Requires: bzip2 Requires: system-release >= 4 Requires(post): systemd-sysv %if 0%{!?_with_groupinstall:1} Obsoletes: %{name}-plugins-groupinstall < %{version}-%{release} %endif %if 0%{?_without_list:1} Obsoletes: %{name}-plugins-list < %{version}-%{release} %endif %if 0%{?_without_log:1} Obsoletes: %{name}-plugins-log < %{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 plugins-groupinstall Summary: Additional commands to install and remove package groups Group: System Environment/Base Requires: %{name} = %{version}-%{release} Requires: rhpl Requires: comps %description plugins-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. %package plugins-list Summary: Additional commands to list extra packages and leaves Group: System Environment/Base Requires: %{name} = %{version}-%{release} %description plugins-list This package adds commands for listing all installed packages which are not availabe in any online repository, and packages that are not required by any other installed package: apt-cache list-extras apt-cache list-nodeps %package plugins-log Summary: Log the changes being introduced by the transaction Group: System Environment/Base Requires: %{name} = %{version}-%{release} %description plugins-log This script will log the changes being introduced by the transaction which is going to be run, and is based on an idea of Panu Matilainen. When some transaction is run, it will dump information about it in /var/log/apt.log, or in the configured file. %prep %setup -q -n %{name}-%{srcver} %patch0 -p1 -b .ppc %patch1 -p0 -b .mmap 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 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 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/ # Lua scripts mkdir -p %{buildroot}%{_datadir}/apt/scripts for script in %{SOURCE51} %{SOURCE52} ; 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 mkdir -p %{buildroot}%{_unitdir} install -Dpm 755 %{SOURCE200} %{buildroot}%{_unitdir}/apt.service 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 # apt-plugins-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 # apt-plugins-list from contrib %if 0%{!?_without_list:1} install -pm 755 contrib/list-extras/list-extras.lua %{buildroot}/%{_datadir}/apt/scripts install -pm 644 contrib/list-extras/list-extras.conf %{buildroot}/%{_sysconfdir}/apt/apt.conf.d/ install -pm 755 contrib/list-nodeps/list-nodeps.lua %{buildroot}/%{_datadir}/apt/scripts install -pm 644 contrib/list-nodeps/list-nodeps.conf %{buildroot}/%{_sysconfdir}/apt/apt.conf.d/ %endif # apt-plugins-log from contrib %if 0%{!?_without_log:1} install -pm 755 contrib/log/log.lua %{buildroot}/%{_datadir}/apt/scripts install -pm 644 contrib/log/log.conf %{buildroot}/%{_sysconfdir}/apt/apt.conf.d/ %endif # nuke .la files rm -f %{buildroot}%{_libdir}/*.la %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %triggerun -- apt < 0.5.15lorg3.95-1.git522.1 # Save the current service runlevel info # User must manually run systemd-sysv-convert --apply apt # to migrate them to systemd targets /usr/bin/systemd-sysv-convert --save apt >/dev/null 2>&1 ||: # Run these because the SysV package being removed won't do them /sbin/chkconfig --del apt >/dev/null 2>&1 || : /bin/systemctl try-restart apt.service >/dev/null 2>&1 || : %files -f %{name}.lang %doc AUTHORS* COPYING* ABOUT* TODO comps2prio.xsl doc/examples/ contrib/ %doc ChangeLog %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 %{_unitdir}/apt.service %{_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/upgradevirt.lua %{_localstatedir}/cache/apt/ %{_localstatedir}/lib/apt/ %{_mandir}/man[58]/*.[58]* %files devel %{_includedir}/apt-pkg/ %{_libdir}/libapt-pkg*.so %{_libdir}/pkgconfig/libapt-pkg.pc %files python %{python_sitearch}/_apt.so %{python_sitearch}/apt.py* %if 0%{?_with_groupinstall:1} %files plugins-groupinstall # 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 %if 0%{!?_without_list:1} %files plugins-list %config %{_sysconfdir}/apt/apt.conf.d/list-extras.conf %config %{_sysconfdir}/apt/apt.conf.d/list-nodeps.conf %{_datadir}/apt/scripts/list-extras.lua %{_datadir}/apt/scripts/list-nodeps.lua %endif %if 0%{!?_without_log:1} %files plugins-log %config %{_sysconfdir}/apt/apt.conf.d/log.conf %{_datadir}/apt/scripts/log.lua %endif %changelog * Fri Sep 9 2011 Tom Callaway - 0.5.15lorg3.95-1.git522.1 - convert to systemd * Wed Apr 13 2011 Panu Matilainen - 0.5.15lorg3.95-0.git522.1 - new upstream snapshot that has an actual chance of working... - drop now unnecessary pile of patches - replace upstart with systemd in rpmpriorities * Mon Feb 07 2011 Fedora Release Engineering - 0.5.15lorg3.95-0.git416.7.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Jan 18 2011 Panu Matilainen - 0.5.15lorg3.95-0.git416.7 - stitch it up to build with rpm 4.9.0 * Wed Jul 21 2010 David Malcolm - 0.5.15lorg3.95-0.git416.6.1 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Mon Dec 07 2009 Panu Matilainen - 0.5.15lorg3.95-0.git416.6 - rebuild for rpm 4.8.0 * Fri Mar 06 2009 Panu Matilainen - 0.5.15lorg3.95-0.git416.4 - rebuild for rpm 4.7.0 * Mon Feb 23 2009 Fedora Release Engineering - 0.5.15lorg3.95-0.git416.3.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Dec 31 2008 Panu Matilainen - 0.5.15lorg3.95-0.git416.3 - trim down ancient cruft in rpmpriorities (#444287) - depend on system-release instead of fedora-release (#474911) - look into provides when looking for DistroVerPkg * Wed Dec 31 2008 Panu Matilainen - 0.5.15lorg3.95-0.git416.2 - dont enable update "service" by default (#445096) * Tue Dec 23 2008 Panu Matilainen - 0.5.15lorg3.95-0.git416.1 - Update to upstream snapshot to get something remotely working... - Link to external Lua to match what rpm uses (#470728) - Support varying filenames in repomd (#469805) * Mon Dec 15 2008 Lubomir Rintel - 0.5.15lorg3.94-6 - Fix internal lua crash, link against system lua 5.1 * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.5.15lorg3.94-5 - Rebuild for Python 2.6 * Fri Aug 1 2008 Axel Thimm - 0.5.15lorg3.94-4 - Support for rpm 4.6 (Caolan McNamara ). * Fri Feb 22 2008 Panu Matilainen 0.5.15lorg3.94-3 - add missing include for gcc 4.3 (#433982) - remove bogus build dependencies from ancient times * Mon Feb 18 2008 Fedora Release Engineering - 0.5.15lorg3.94-2 - Autorebuild for GCC 4.3 * Fri Jan 11 2008 Panu Matilainen 0.5.15lorg3.94-1 - update to 0.5.15lorg3.94, should fix #222927, #246866, #279921, and #419811 - update rpmpriorities to match current package set (#426143) * Fri Jan 04 2008 Panu Matilainen 0.5.15lorg3.93-5 - fix build with gcc 4.3 * Mon Nov 19 2007 Panu Matilainen 0.5.15lorg3.93-4 - Fix assert failure when repomd.xml isn't available locally (#389361) * Fri Nov 16 2007 Panu Matilainen 0.5.15lorg3.93-3 - Hackery to help (multilib) obsoletes (#353271) - Drop termcap + libtermcap from rpmpriorities to avoid installing needlessly - Drop docbook-utils dependency and hackery, no longer needed * 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.