From e2799681983234401f32977c35b79fc053484a60 Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Mar 19 2006 20:52:50 +0000 Subject: - 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. --- diff --git a/.cvsignore b/.cvsignore index 8828859..27e2802 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -apt-0.5.15cnc7.tar.bz2 +apt-0.5.15lorg3-pre1.tar.bz2 diff --git a/apt-0.5.15cnc5-manifest-limit.patch b/apt-0.5.15cnc5-manifest-limit.patch deleted file mode 100644 index e8fedca..0000000 --- a/apt-0.5.15cnc5-manifest-limit.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- apt-0.5.15cnc5/apt-pkg/rpm/rpmpm.cc.manifest 2004-01-19 13:45:17.000000000 +0200 -+++ apt-0.5.15cnc5/apt-pkg/rpm/rpmpm.cc 2004-01-19 13:45:37.000000000 +0200 -@@ -499,7 +499,7 @@ - bool FilesInArgs = true; - char *ArgsFileName = NULL; - #if RPM_VERSION >= 0x040000 -- if (op != Item::RPMErase && files.size() > 50) { -+ if (op != Item::RPMErase && files.size() > _config->FindI("RPM::Manifest-Limit", 50)) { - string FileName = _config->FindDir("Dir::Cache", "/tmp/") + - "filelist.XXXXXX"; - ArgsFileName = strdup(FileName.c_str()); diff --git a/apt-0.5.15cnc6-pymake2.patch b/apt-0.5.15cnc6-pymake2.patch deleted file mode 100644 index 10faaca..0000000 --- a/apt-0.5.15cnc6-pymake2.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- python/Makefile~ 2004-03-19 14:51:39.000000000 +0200 -+++ python/Makefile 2005-01-16 11:55:44.552686258 +0200 -@@ -8,8 +8,8 @@ - #SWIG = /var/tmp/swig/BUILD/SWIG-1.3.16/swig - LUAFLAGS = -DWITH_LUA - --PYTHONVER = $(shell python -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v" 2>/dev/null || echo NONE) --PYTHONFLAGS=-I/usr/include/python$(PYTHONVER) -+PYTHON = python -+PYTHONFLAGS = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_inc; print '-I' + get_python_inc(1)") - - all: $(MODULES) - -@@ -25,4 +25,4 @@ - rm -f *.cxx - - distclean: clean -- rm -f $(MODULES) *.pyc _*.so -+ rm -f $(MODULES) *.pyc *.pyo *.so diff --git a/apt-0.5.15cnc6-rdonly.patch b/apt-0.5.15cnc6-rdonly.patch deleted file mode 100644 index e613e52..0000000 --- a/apt-0.5.15cnc6-rdonly.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- apt-0.5.15cnc6/apt-pkg/rpm/rpmhandler.cc.rdonly 2004-04-08 17:28:12.000000000 +0300 -+++ apt-0.5.15cnc6/apt-pkg/rpm/rpmhandler.cc 2004-04-08 17:28:46.000000000 +0300 -@@ -367,7 +367,7 @@ - Handler = rpmtsCreate(); - rpmtsSetVSFlags(Handler, (rpmVSFlags_e)-1); - rpmtsSetRootDir(Handler, Dir.c_str()); -- if (rpmtsOpenDB(Handler, WriteLock?O_RDWR:O_RDONLY) != 0) -+ if (rpmtsOpenDB(Handler, O_RDONLY) != 0) - { - _error->Error(_("could not open RPM database")); - return; -@@ -376,7 +376,7 @@ - const char *RootDir = NULL; - if (!Dir.empty()) - RootDir = Dir.c_str(); -- if (rpmdbOpen(RootDir, &Handler, WriteLock?O_RDWR:O_RDONLY, 0644) != 0) -+ if (rpmdbOpen(RootDir, &Handler, O_RDONLY, 0644) != 0) - { - _error->Error(_("could not open RPM database")); - return; diff --git a/apt-pymake.patch b/apt-pymake.patch deleted file mode 100644 index db3676e..0000000 --- a/apt-pymake.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: python/Makefile -=================================================================== ---- python/Makefile (revision 373) -+++ python/Makefile (working copy) -@@ -16,10 +16,10 @@ - $(MODULES): %.py: _%.so - - _%.so: %_wrap.cxx -- $(CC) -fPIC -shared -I.. $(PYTHONFLAGS) $(LUAFLAGS) -L../bin -L../build/bin -lapt-pkg -o $@ $< -+ $(CC) -fPIC -shared -I.. -I../include $(PYTHONFLAGS) $(LUAFLAGS) -L../apt-pkg/.libs -lapt-pkg -o $@ $< - - apt_wrap.cxx: apt.i -- $(SWIG) $(SWIGFLAGS) -c++ -I.. $(LUAFLAGS) -python $< -+ $(SWIG) $(SWIGFLAGS) -c++ -I.. -I../include $(LUAFLAGS) -python $< - - clean: - rm -f *.cxx diff --git a/apt-scriptdir.patch b/apt-scriptdir.patch deleted file mode 100644 index 7fc5547..0000000 --- a/apt-scriptdir.patch +++ /dev/null @@ -1,65 +0,0 @@ -Index: contrib/apt-wrapper/apt.1.xml -=================================================================== ---- contrib/apt-wrapper/apt.1.xml (revision 373) -+++ contrib/apt-wrapper/apt.1.xml (working copy) -@@ -325,7 +325,7 @@ - - Files - -- /usr/lib/apt/scripts -+ /usr/share/apt/scripts - APT lua scripts. - Configuration item: Dir::Bin::scripts. - -Index: contrib/apt-wrapper/apt.1 -=================================================================== ---- contrib/apt-wrapper/apt.1 (revision 373) -+++ contrib/apt-wrapper/apt.1 (working copy) -@@ -157,7 +157,7 @@ - .SH "FILES" - - .TP --\fI/usr/lib/apt/scripts\fR -+\fI/usr/share/apt/scripts\fR - APT lua scripts\&. Configuration item: Dir::Bin::scripts\&. - - .SH "ENVIRONMENT" -Index: contrib/apt-files/README -=================================================================== ---- contrib/apt-files/README (revision 373) -+++ contrib/apt-files/README (working copy) -@@ -40,7 +40,7 @@ - these files in the following directories: - - /etc/apt/apt.conf.d/apt-files.conf -- /usr/lib/apt/scripts/apt-files.lua -+ /usr/share/apt/scripts/apt-files.lua - /var/state/apt/Contents.gz - - Bingo! It should be working. ;-) -Index: contrib/apt-groupinstall/apt-groupinstall.conf -=================================================================== ---- contrib/apt-groupinstall/apt-groupinstall.conf (revision 373) -+++ contrib/apt-groupinstall/apt-groupinstall.conf (working copy) -@@ -10,7 +10,7 @@ - // For RHEL/FC systems - Scripts::Groupinstall::Backend "groupinstall-backend-comps.py"; - Scripts::Groupinstall::DataPath "/usr/share/comps/i386/comps.xml"; --Synaptic::taskHelperProg "/usr/lib/apt/scripts/groupinstall-backend-comps.py"; -+Synaptic::taskHelperProg "/usr/share/apt/scripts/groupinstall-backend-comps.py"; - - // For Suse systems - //Scripts::Groupinstall::Backend "groupinstall-backend-suse"; -Index: apt-pkg/luaiface.cc -=================================================================== ---- apt-pkg/luaiface.cc (revision 373) -+++ apt-pkg/luaiface.cc (working copy) -@@ -76,7 +76,7 @@ - Lua::Lua() - : DepCache(0), Cache(0), CacheControl(0), Fix(0), DontFix(0) - { -- _config->CndSet("Dir::Bin::scripts", "/usr/lib/apt/scripts"); -+ _config->CndSet("Dir::Bin::scripts", "/usr/share/apt/scripts"); - - const luaL_reg lualibs[] = { - {"base", luaopen_base}, diff --git a/apt-shell-155990.patch b/apt-shell-155990.patch deleted file mode 100644 index 7b64448..0000000 --- a/apt-shell-155990.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: cmdline/apt-shell.cc -=================================================================== ---- cmdline/apt-shell.cc (revision 373) -+++ cmdline/apt-shell.cc (revision 374) -@@ -1328,9 +1328,9 @@ - } - } - vector GoodSolutionNames; -- for (int i = 0; i != GoodSolutionNames.size(); i++) -+ for (int i = 0; i != GoodSolutions.size(); i++) - { -- pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[0]); -+ pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - GoodSolutionNames.push_back(GoodPkg.Name()); - } - #ifdef WITH_LUA -@@ -1339,6 +1339,7 @@ - vector VS; - _lua->SetDepCache(&Cache); - _lua->SetDontFix(); -+ _lua->SetGlobal("virtualname", Pkg.Name()); - _lua->SetGlobal("packages", GoodSolutions); - _lua->SetGlobal("packagenames", GoodSolutionNames); - _lua->SetGlobal("selected"); diff --git a/apt.spec b/apt.spec index 43d1c89..0b93b0d 100644 --- a/apt.spec +++ b/apt.spec @@ -1,165 +1,150 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%define scriptdir %{_datadir}/apt/scripts/ - %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.15cnc7 -Release: 7%{?dist} -Group: System Environment/Base -URL: https://moin.conectiva.com.br/AptRpm -License: GPL -ExcludeArch: x86_64 ppc64 +Summary: Debian's Advanced Packaging Tool with RPM support +Name: apt +Version: 0.5.15lorg3 +Release: 0.1.pre1%{?dist} +Group: System Environment/Base +URL: https://moin.conectiva.com.br/AptRpm +License: GPL -# unfortunately the source isn't really directly downloadable with wget etc: -#Source0: https://moin.conectiva.com.br/AptRpm?action=AttachFile&do=get&target=apt-0.5.15cnc7.tar.bz2 -Source0: %{name}-%{version}.tar.bz2 +Source0: http://laiskiainen.org/apt/testing/apt-0.5.15lorg3-pre1.tar.bz2 # user editable template configs -Source1: apt.conf -Source2: sources.list -Source3: vendors.list -Source4: apt_preferences +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 +Source5: rpmpriorities +Source19: comps2prio.xsl # nightly updater scripts & config -Source20: apt.init -Source21: apt.cron -Source22: apt.sysconfig +Source20: apt.init +Source21: apt.cron +Source22: apt.sysconfig # Sources 50-99 are for Lua-scripts not in contrib/ -#Source50: -#Source51: -Source52: preserve-conf.lua -Source54: upgradevirt.lua +Source50: preserve-conf.lua +Source51: upgradevirt.lua # 100-149 for sources.list.d # no default entry for fedora at all -#Source100: fedora.list -#Source101: macromedia.list # 150-199 for apt.conf.d -# "factory defaults" for Fedora Core -Source150: default.conf +# "factory defaults" for Fedora Core + Extras +Source150: default.conf # 200-249 for trusted gpg keys # Fedora key -Source200: gpg-pubkey-4f2a6fd2-3f9d9d3b +Source200: gpg-pubkey-4f2a6fd2-3f9d9d3b # "Old" RHL key -Source202: gpg-pubkey-db42a60e-37ea5438 +Source202: gpg-pubkey-db42a60e-37ea5438 # Fedora Extras key -Source203: gpg-pubkey-1ac70ce6-41bebeef +Source203: gpg-pubkey-1ac70ce6-41bebeef # 250-299 for vendor.list.d -Source250: fedora-vendor.list -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Provides: apt-mirrorselect +Source250: fedora-vendor.list -# Other deps are automatically picked up by rpm -Requires: gnupg, bzip2 -Requires(post): chkconfig, ldconfig -Requires(preun): chkconfig -# Needed by the mirror-selector script -Requires: wget +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # TODO: verify the required minimum Python version -BuildRequires: python-devel >= 2.2 -BuildRequires: rpm-devel, zlib-devel, bzip2-devel, libstdc++-devel, gettext -BuildRequires: docbook-utils, perl, readline-devel, ncurses-devel, libtool +BuildRequires: python-devel >= 2.2 +BuildRequires: libxml2-devel +BuildRequires: rpm-devel +BuildRequires: zlib-devel +BuildRequires: bzip2-devel +BuildRequires: libstdc++-devel +BuildRequires: gettext +BuildRequires: docbook-utils +BuildRequires: perl +BuildRequires: readline-devel +BuildRequires: ncurses-devel %if %{generate_rpmpriorities} -BuildRequires: %{_bindir}/xsltproc, %{comps} +BuildRequires: %{_bindir}/xsltproc +BuildRequires: %{comps} +%endif +# libxml2-devel, #183689 +BuildRequires: pkgconfig +Requires: gnupg +Requires: bzip2 +# wget needed by the mirror-selector script +Requires: wget +Requires(post): chkconfig +Requires(post): ldconfig +Requires(preun): chkconfig +Provides: apt-mirrorselect +%if 0%{!?_with_groupinstall:1} +Obsoletes: %{name}-groupinstall < %{version}-%{release} %endif -# Work around missing deps in rpm-devel :-/ -BuildRequires: beecrypt-devel, elfutils-libelf-devel - -Patch0: apt-shell-155990.patch -# Fix some issues in python binding build -Patch1: apt-pymake.patch -Patch5: apt-0.5.15cnc6-pymake2.patch -# Make rpm manifest usage configurable -Patch3: apt-0.5.15cnc5-manifest-limit.patch -# Take read-only, not exclusive rpmdb lock for the initial dependency processing -Patch6: apt-0.5.15cnc6-rdonly.patch -# Move scripts from /usr/lib/apt to /usr/share/apt -Patch7: apt-scriptdir.patch %description -A port of Debian's apt tools for RPM based distributions. -It provides the apt-get utility that provides a simpler, safer way to -install and upgrade packages. APT features complete installation ordering, -multiple source capability and several other unique features. - -%package devel -Summary: Development files and documentation for APT's libapt-pkg. -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: rpm-devel -%description devel -This package contains the header files and static libraries 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 +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 + +%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: Add commands to install and remove package groups. -Group: System Environment/Base -Requires: %{name} = %{version}-%{release} -Requires: rhpl, comps -%description groupinstall -This package adds four new commands to apt for installing, removing and viewing -groups of packages: +%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. +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 -p0 -b .155990 -%patch1 -p0 -b .pymake -%patch3 -p1 -b .manifest -%patch5 -p0 -b .pymake2 -%patch6 -p1 -b .rdonly -%patch7 -p0 -b .scriptdir +%setup -q -n %{name}-%{version}-pre1 # 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/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 -# appease aclocal >= 1.8 -perl -pi -e 's|^(AC_DEFUN\()(\w+)|$1\[$2\]|' buildlib/*.m4 - -# http://distro2.conectiva.com.br/pipermail/apt-rpm/2005-March/002664.html -libtoolize -f && autoreconf - %build -%configure --disable-dependency-tracking +%configure --disable-dependency-tracking --disable-static SGML_CATALOG_FILES=$(ls -1 %{_sysconfdir}/sgml/sgml-docbook-3.1* | head -n 1) \ make %{?_smp_mflags} @@ -176,7 +161,7 @@ cp -p %{SOURCE5} rpmpriorities %install rm -rf $RPM_BUILD_ROOT -%makeinstall includedir=$RPM_BUILD_ROOT%{_includedir}/apt-pkg +make install DESTDIR=$RPM_BUILD_ROOT includedir=%{_includedir}/apt-pkg %find_lang %{name} # The state files @@ -190,104 +175,108 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/apt mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/apt/sources.list.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/apt/vendors.list.d -install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/apt.conf -install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/sources.list -install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/vendors.list -install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/preferences -install -p -m 644 rpmpriorities $RPM_BUILD_ROOT/%{_sysconfdir}/apt/ +install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/apt.conf +install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/sources.list +install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/vendors.list +install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/apt/preferences +install -pm 644 rpmpriorities $RPM_BUILD_ROOT/%{_sysconfdir}/apt/ # install config parts -install -p -m 644 %{SOURCE150} $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d/ -install -p -m 644 %{SOURCE250} $RPM_BUILD_ROOT%{_sysconfdir}/apt/vendors.list.d/fedora.list +install -pm 644 %{SOURCE150} $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d/ +install -pm 644 %{SOURCE250} \ + $RPM_BUILD_ROOT%{_sysconfdir}/apt/vendors.list.d/fedora.list # GPG keys mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/apt/gpg/ -for gpgkey in %{SOURCE200} %{SOURCE202} %{SOURCE203}; do - install -p -m 644 $gpgkey $RPM_BUILD_ROOT%{_sysconfdir}/apt/gpg/ +for gpgkey in %{SOURCE200} %{SOURCE202} %{SOURCE203} ; do + install -pm 644 $gpgkey $RPM_BUILD_ROOT%{_sysconfdir}/apt/gpg/ done # Lua scripts -mkdir -p $RPM_BUILD_ROOT%{scriptdir} -for script in %{SOURCE52} %{SOURCE54}; do - install -p -m 755 $script $RPM_BUILD_ROOT%{scriptdir} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/apt/scripts +for script in %{SOURCE50} %{SOURCE51} ; do + install -pm 755 $script $RPM_BUILD_ROOT%{_datadir}/apt/scripts done # The python bindings mkdir -p $RPM_BUILD_ROOT%{python_sitearch}/ -install -p -m 755 python/_apt.so $RPM_BUILD_ROOT%{python_sitearch}/ -install -p -m 644 python/apt.py{c,} $RPM_BUILD_ROOT%{python_sitearch}/ +install -pm 755 python/_apt.so $RPM_BUILD_ROOT%{python_sitearch}/ +install -pm 644 python/apt.py{c,} $RPM_BUILD_ROOT%{python_sitearch}/ touch $RPM_BUILD_ROOT%{python_sitearch}/apt.pyo # Nightly updater scripts & default config -install -D -p -m 755 %{SOURCE20} $RPM_BUILD_ROOT/%{_initrddir}/apt -install -D -p -m 755 %{SOURCE21} $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/apt.cron -install -D -p -m 644 %{SOURCE22} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/apt +install -Dpm 755 %{SOURCE20} $RPM_BUILD_ROOT/%{_initrddir}/apt +install -Dpm 755 %{SOURCE21} $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/apt.cron +install -Dpm 644 %{SOURCE22} $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/apt # GPG checker from contrib -install -p -m 755 contrib/gpg-check/*.lua $RPM_BUILD_ROOT/%{scriptdir}/ +install -pm 755 contrib/gpg-check/*.lua $RPM_BUILD_ROOT/%{_datadir}/apt/scripts # apt-groupinstall from contrib -install -p -m 755 contrib/apt-groupinstall/{groupinstall-backend-comps.py,apt-groupinstall.lua} $RPM_BUILD_ROOT/%{scriptdir} -install -p -m 644 contrib/apt-groupinstall/apt-groupinstall.conf $RPM_BUILD_ROOT/%{_sysconfdir}/apt/apt.conf.d/ +%if 0%{?_with_groupinstall:1} +install -pm 755 contrib/apt-groupinstall/{groupinstall-backend-comps.py,apt-groupinstall.lua} $RPM_BUILD_ROOT/%{_datadir}/apt/scripts +touch $RPM_BUILD_ROOT%{_datadir}/apt/scripts/groupinstall-backend-comps.py{c,o} +install -pm 644 contrib/apt-groupinstall/apt-groupinstall.conf \ + $RPM_BUILD_ROOT/%{_sysconfdir}/apt/apt.conf.d/ +%endif # nuke .la files rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +%clean +rm -rf $RPM_BUILD_ROOT + + %pre if [ $1 -gt 1 ] && [ ! -f %{_sysconfdir}/apt/apt.conf.d/default.conf ]; then - mv -f %{_sysconfdir}/apt/apt.conf %{_sysconfdir}/apt/apt.conf.rpmsave - echo "NOTE: Default configuration changed!" - echo "If you have made any changes to the configuration locally" - echo "Merge your local customizations from %{_sysconfdir}/apt/apt.conf.rpmsave" - echo "to %{_sysconfdir}/apt/apt.conf" + mv -f %{_sysconfdir}/apt/apt.conf %{_sysconfdir}/apt/apt.conf.rpmsave + echo "NOTE: Default configuration changed!" + echo "If you have made any changes to the configuration locally," + echo "Merge your local customizations from %{_sysconfdir}/apt/apt.conf.rpmsave" + echo "to %{_sysconfdir}/apt/apt.conf" fi -%preun -if [ $1 = 0 ]; then - /sbin/service apt stop > /dev/null 2>&1 - /sbin/chkconfig --del apt -fi -exit 0 - %post /sbin/ldconfig -if [ ! -f %{_sysconfdir}/apt/apt.conf ]; then - echo "// User customizable configuration goes here" \ +if [ ! -f %{_sysconfdir}/apt/apt.conf ] ; then + echo "// User customizable configuration goes here" \ > %{_sysconfdir}/apt/apt.conf fi /sbin/chkconfig --add apt -%postun -p /sbin/ldconfig +%preun +if [ $1 -eq 0 ] ; then + %{_initrddir}/apt stop &>/dev/null || : + /sbin/chkconfig --del apt +fi -%clean -rm -rf $RPM_BUILD_ROOT +%postun -p /sbin/ldconfig %files -f %{name}.lang %defattr(-, root, root) %doc AUTHORS* COPYING* ABOUT* TODO comps2prio.xsl doc/examples/ contrib/ -%dir %{_sysconfdir}/apt -%dir %{_sysconfdir}/apt/sources.list.d -%dir %{_sysconfdir}/apt/vendors.list.d -%dir %{_sysconfdir}/apt/apt.conf.d -%dir %{_sysconfdir}/apt/gpg -%{_sysconfdir}/apt/gpg/gpg-pubkey* -%config(noreplace) %{_sysconfdir}/sysconfig/apt -%config(noreplace) %{_sysconfdir}/apt/rpmpriorities -%config(noreplace) %{_sysconfdir}/apt/preferences + +%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 -# NOTE: no noreplace on these because we WANT to be able to change the defaults +# NOTE: no noreplace on *.d because we WANT to be able to change the defaults # without user intervention! -%config %{_sysconfdir}/apt/apt.conf.d/* -%exclude %{_sysconfdir}/apt/apt.conf.d/apt-groupinstall.conf -#%config %{_sysconfdir}/apt/sources.list.d/*.list -%config %{_sysconfdir}/apt/vendors.list.d/* -%config %{_initrddir}/apt +%dir %{_sysconfdir}/apt/apt.conf.d/ +%config %{_sysconfdir}/apt/apt.conf.d/default.conf +%config %{_sysconfdir}/apt/sources.list.d/ +%config %{_sysconfdir}/apt/vendors.list.d/ + +%config(noreplace) %{_sysconfdir}/sysconfig/apt %config %{_sysconfdir}/cron.daily/apt.cron +%{_sysconfdir}/apt/gpg/ +%{_initrddir}/apt + %{_bindir}/apt-cache %{_bindir}/apt-cdrom %{_bindir}/apt-config @@ -297,36 +286,51 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/genpkglist %{_bindir}/gensrclist %{_bindir}/genbasedir -%{_libdir}/*.so.* -%{_libdir}/apt -%{_datadir}/apt -%exclude %{scriptdir}/apt-groupinstall.lua -%exclude %{scriptdir}/groupinstall-backend-comps.py -%{_mandir}/man?/* -%{_localstatedir}/cache/apt -%{_localstatedir}/state/apt +%{_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/preserve-conf.lua +%{_datadir}/apt/scripts/upgradevirt.lua +%{_localstatedir}/cache/apt/ +%{_localstatedir}/state/apt/ +%{_mandir}/man[58]/*.[58]* %files devel -%defattr(-, root, root) +%defattr(-,root,root,-) %{_includedir}/apt-pkg/ -%{_libdir}/*.so -%{_libdir}/*.a +%{_libdir}/libapt-pkg*.so %files python -%defattr(-, root, root) +%defattr(-,root,root,-) %{python_sitearch}/_apt.so %{python_sitearch}/apt.py %{python_sitearch}/apt.pyc %ghost %{python_sitearch}/apt.pyo +%if 0%{?_with_groupinstall:1} %files groupinstall -%defattr(-, root, root) +%defattr(-,root,root,-) +# XXX not config? %{_sysconfdir}/apt/apt.conf.d/apt-groupinstall.conf -%{scriptdir}/apt-groupinstall.lua -%{scriptdir}/groupinstall-backend-comps.py +%{_datadir}/apt/scripts/apt-groupinstall.lua +%{_datadir}/apt/scripts/groupinstall-backend-comps.py +%ghost %{_datadir}/apt/scripts/groupinstall-backend-comps.py[co] +%endif %changelog +* 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. diff --git a/default.conf b/default.conf index 2e9f170..d292bdc 100644 --- a/default.conf +++ b/default.conf @@ -26,9 +26,19 @@ RPM // Completely ignore GnuPG signature packages (introduced in rpm 4.1) Ignore { "gpg-pubkey"; }; // Allow multiple kernel and kernel-related packages to be installed - Allow-Duplicated { "^kernel(-(BOOT|bigmem|debug|smp|unsupported|xen[0U]))?(-(devel|source(code)?|unsupported-modules))?$"; "^gpg-pubkey$"; }; + Allow-Duplicated { + "^kernel(-(hugemem|kdump|smp|xen[0U]))(-devel)?$"; + "^(GFS|cman|dlm|gnbd)-kernel(-(hugemem|kdump|smp|xen[0U]))$"; + "^kmod-.+$"; + "^gpg-pubkey$"; + }; // XXX: not used currently - //Allow-Duplicated-Upgrade { "^kernel(-(BOOT|bigmem|debug|smp|unsupported|xen[0U]))?(-(devel|source(code)?|unsupported-modules))?$"; }; + //Allow-Duplicated-Upgrade { + // "^kernel(-(hugemem|kdump|smp|xen[0U]))(-devel)?$"; + // "^(GFS|cman|dlm|gnbd)-kernel(-(hugemem|kdump|smp|xen[0U]))$"; + // "^kmod-.+$"; + // "^gpg-pubkey$"; + //}; // "Upgrade" allow-duplicated packages as well Upgrade-Virtual "true"; // Enable source rebuilds diff --git a/sources b/sources index 2bc5fa5..e7986b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9e44ec1503fa96832bbd9b532543e4de apt-0.5.15cnc7.tar.bz2 +5c6b3f37374d266e89805a2912d11fb6 apt-0.5.15lorg3-pre1.tar.bz2