From 31dca46d9f8e05e7d6520e9f88c994182288d089 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 12 Sep 2006 11:29:02 +0000 Subject: [PATCH] Add support for Fedora Core 5 and yum 2.6. git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2299 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- distrib/Makefile.am | 11 ++++-- distrib/fc5/apt/rpmpriorities | 7 ++++ distrib/fc5/apt/sources.list | 7 ++++ distrib/fc5/pkgs/01 | 1 + distrib/fc5/pkgs/02 | 3 ++ distrib/fc5/pkgs/03 | 2 + distrib/fc5/rpmlist.d/00.lst | 7 ++++ distrib/fc5/yum.repos.d/fedora-core.repo | 21 +++++++++++ distrib/fc5/yum.repos.d/fedora-development.repo | 44 ++++++++++++++++++++++ .../fc5/yum.repos.d/fedora-extras-development.repo | 21 +++++++++++ distrib/fc5/yum.repos.d/fedora-extras.repo | 21 +++++++++++ distrib/fc5/yum.repos.d/fedora-legacy.repo | 13 +++++++ .../fc5/yum.repos.d/fedora-updates-testing.repo | 21 +++++++++++ distrib/fc5/yum.repos.d/fedora-updates.repo | 21 +++++++++++ distrib/fc5/yum/yum.conf | 10 +++++ distrib/redhat/initpost | 2 +- scripts/vyum-worker | 25 +++++++----- 17 files changed, 223 insertions(+), 14 deletions(-) create mode 100644 distrib/fc5/apt/rpmpriorities create mode 100644 distrib/fc5/apt/sources.list create mode 100644 distrib/fc5/pkgs/01 create mode 100644 distrib/fc5/pkgs/02 create mode 100644 distrib/fc5/pkgs/03 create mode 100644 distrib/fc5/rpmlist.d/00.lst create mode 100644 distrib/fc5/yum.repos.d/fedora-core.repo create mode 100644 distrib/fc5/yum.repos.d/fedora-development.repo create mode 100644 distrib/fc5/yum.repos.d/fedora-extras-development.repo create mode 100644 distrib/fc5/yum.repos.d/fedora-extras.repo create mode 100644 distrib/fc5/yum.repos.d/fedora-legacy.repo create mode 100644 distrib/fc5/yum.repos.d/fedora-updates-testing.repo create mode 100644 distrib/fc5/yum.repos.d/fedora-updates.repo create mode 100644 distrib/fc5/yum/yum.conf diff --git a/distrib/Makefile.am b/distrib/Makefile.am index 8ba6400..ed6755a 100644 --- a/distrib/Makefile.am +++ b/distrib/Makefile.am @@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ - fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ + fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ - fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ + fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ + fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ + fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ + $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ - centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ + centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ suse91/rpm/macros @@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ $(nobase_confdistrib_DATA) \ $(defaults_DATA) -redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 +redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 install-exec-hook: install-notify-xtra install-data-hook: install-data-xtras diff --git a/distrib/fc5/apt/rpmpriorities b/distrib/fc5/apt/rpmpriorities new file mode 100644 index 0000000..f4a90e2 --- /dev/null +++ b/distrib/fc5/apt/rpmpriorities @@ -0,0 +1,7 @@ +Essential: + basesystem + coreutils + filesystem + glibc + setup + fedora-release diff --git a/distrib/fc5/apt/sources.list b/distrib/fc5/apt/sources.list new file mode 100644 index 0000000..b833d31 --- /dev/null +++ b/distrib/fc5/apt/sources.list @@ -0,0 +1,7 @@ +# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates + +# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates +# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates +# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates +# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates +# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates diff --git a/distrib/fc5/pkgs/01 b/distrib/fc5/pkgs/01 new file mode 100644 index 0000000..1a5ef72 --- /dev/null +++ b/distrib/fc5/pkgs/01 @@ -0,0 +1 @@ +glibc diff --git a/distrib/fc5/pkgs/02 b/distrib/fc5/pkgs/02 new file mode 100644 index 0000000..9ec5d2b --- /dev/null +++ b/distrib/fc5/pkgs/02 @@ -0,0 +1,3 @@ +--reinstall + +filesystem diff --git a/distrib/fc5/pkgs/03 b/distrib/fc5/pkgs/03 new file mode 100644 index 0000000..218b1e6 --- /dev/null +++ b/distrib/fc5/pkgs/03 @@ -0,0 +1,2 @@ +coreutils +initscripts diff --git a/distrib/fc5/rpmlist.d/00.lst b/distrib/fc5/rpmlist.d/00.lst new file mode 100644 index 0000000..85a9617 --- /dev/null +++ b/distrib/fc5/rpmlist.d/00.lst @@ -0,0 +1,7 @@ +basesystem-*.rpm +filesystem-*.rpm +glibc-common-*.rpm +glibc-[0-9]*.rpm +libgcc-[0-9]*.rpm +setup-*.rpm +tzdata-*.rpm diff --git a/distrib/fc5/yum.repos.d/fedora-core.repo b/distrib/fc5/yum.repos.d/fedora-core.repo new file mode 100644 index 0000000..085499c --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-core.repo @@ -0,0 +1,21 @@ +[core] +name=Fedora Core 5 - $basearch +#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ +mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY + +[core-debuginfo] +name=Fedora Core 5 - $basearch - Debug +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY + +[core-source] +name=Fedora Core 5 - Source +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY diff --git a/distrib/fc5/yum.repos.d/fedora-development.repo b/distrib/fc5/yum.repos.d/fedora-development.repo new file mode 100644 index 0000000..12ea285 --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-development.repo @@ -0,0 +1,44 @@ +# These packages are untested and still under development. This +# repository is used for updates to test releases, and for +# development of new releases. +# +# This repository can see significant daily turnover and major +# functionality changes which cause unexpected problems with other +# development packages. Please use these packages if you want to work +# with the Fedora developers by testing these new development packages. +# +# fedora-test-list@redhat.com is available as a discussion forum for +# testing and troubleshooting for development packages in conjunction +# with new test releases. +# +# fedora-devel-list@redhat.com is available as a discussion forum for +# testing and troubleshooting for development packages in conjunction +# with developing new releases. +# +# More information is available at http://fedoraproject.org/wiki/Testing +# +# Reproducible and reportable issues should be filed at +# http://bugzilla.redhat.com/. +# +# Product: Fedora Core +# Version: devel + +[development] +name=Fedora Core - Development +#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ +mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide +enabled=0 +gpgcheck=0 + +[development-debuginfo] +name=Fedora Core - Development - Debug +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ +enabled=0 +gpgcheck=0 + +[development-source] +name=Fedora Core - Development - Source +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ +enabled=0 +gpgcheck=0 + diff --git a/distrib/fc5/yum.repos.d/fedora-extras-development.repo b/distrib/fc5/yum.repos.d/fedora-extras-development.repo new file mode 100644 index 0000000..1acfe11 --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-extras-development.repo @@ -0,0 +1,21 @@ +[extras-development] +name=Fedora Extras - Development Tree +#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ +mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras +gpgcheck=1 + +[extras-development-debuginfo] +name=Fedora Extras - Development - Debug +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras +gpgcheck=1 + +[extras-development-source] +name=Fedora Extras - Development - Source +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras +gpgcheck=1 diff --git a/distrib/fc5/yum.repos.d/fedora-extras.repo b/distrib/fc5/yum.repos.d/fedora-extras.repo new file mode 100644 index 0000000..60e4283 --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-extras.repo @@ -0,0 +1,21 @@ +[extras] +name=Fedora Extras 5 - $basearch +#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ +mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras +gpgcheck=1 + +[extras-debuginfo] +name=Fedora Extras 5 - $basearch - Debug +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras +gpgcheck=1 + +[extras-source] +name=Fedora Extras 5 - Source +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras +gpgcheck=1 diff --git a/distrib/fc5/yum.repos.d/fedora-legacy.repo b/distrib/fc5/yum.repos.d/fedora-legacy.repo new file mode 100644 index 0000000..df35479 --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-legacy.repo @@ -0,0 +1,13 @@ +[legacy-updates] +name=Fedora Legacy 5 - $basearch - Updates +mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy + +[legacy-testing] +name=Fedora Legacy 5 - $basearch - Updates Testing +mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy diff --git a/distrib/fc5/yum.repos.d/fedora-updates-testing.repo b/distrib/fc5/yum.repos.d/fedora-updates-testing.repo new file mode 100644 index 0000000..2080b9b --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-updates-testing.repo @@ -0,0 +1,21 @@ +[updates-testing] +name=Fedora Core 5 - $basearch - Test Updates +#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ +mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test + +[updates-testing-debuginfo] +name=Fedora Core 5 - $basearch - Test Updates Debug +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test + +[updates-testing-source] +name=Fedora Core 5 - Test Updates Source +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test diff --git a/distrib/fc5/yum.repos.d/fedora-updates.repo b/distrib/fc5/yum.repos.d/fedora-updates.repo new file mode 100644 index 0000000..ed10571 --- /dev/null +++ b/distrib/fc5/yum.repos.d/fedora-updates.repo @@ -0,0 +1,21 @@ +[updates] +name=Fedora Core 5 - $basearch - Updates +#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ +mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora + +[updates-debuginfo] +name=Fedora Core 5 - $basearch - Updates - Debug +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora + +[updates-source] +name=Fedora Core 5 - Updates Source +baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora diff --git a/distrib/fc5/yum/yum.conf b/distrib/fc5/yum/yum.conf new file mode 100644 index 0000000..1d21cd1 --- /dev/null +++ b/distrib/fc5/yum/yum.conf @@ -0,0 +1,10 @@ +[main] +cachedir=@YUMCACHEDIR@ +reposdir=@YUMETCDIR@/yum.repos.d +debuglevel=1 +logfile=@YUMLOGDIR@/log +lockfile=@YUMLOCKDIR@/yum.pid +pkgpolicy=newest +distroverpkg=fedora-release +installonlypkgs= +exactarch=0 diff --git a/distrib/redhat/initpost b/distrib/redhat/initpost index d4c6a38..668b822 100755 --- a/distrib/redhat/initpost +++ b/distrib/redhat/initpost @@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash -c ' f=/tmp/startwait trap "rm -f $f" EXIT mkfifo $f - ( sleep 10; kill -s 9 -- -1 ) & + ( sleep 15; kill -s 9 -- -1 ) & cat "$f" >/dev/null kill -s 9 -- -1 wait diff --git a/scripts/vyum-worker b/scripts/vyum-worker index 922afb3..2000ffa 100755 --- a/scripts/vyum-worker +++ b/scripts/vyum-worker @@ -37,12 +37,9 @@ test -z "$_YUM" || { ${YUM:=$_YUM} } -yum=${YUM:-yum} -conf=yum.conf -case $(yum --version) in - (2.[01234]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ +function check(){ + python -c "$1" &>/dev/null || { + warning "\ You are using a version of yum which is insecure and broken in chroot related operations; either apply the patches shipped in the 'contrib/' directory of util-vserver, or ask the author of yum to apply them @@ -52,9 +49,19 @@ In the meantime, 'vyum' will continue with dirty hacks which might not work when the vserver is running and local DOS attacks are possible. Execution will continue in 5 seconds..." - sleep 5 - conf=yum-hack.conf - } + sleep 5 + conf=yum-hack.conf + } +} + +yum=${YUM:-yum} +conf=yum.conf +case $($yum --version|tail -n 1) in + (2.[012345]*) + check 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' + ;; + (2.6*) + check 'import yum,sys; sys.exit(not hasattr(yum.config.YumConf, "getRootedPath"))' ;; esac -- 1.8.1.5