1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-24 01:22:18 -05:00

Add dpkg and rpm-org

This commit is contained in:
Travis Burtrum 2016-11-09 11:31:23 -05:00
parent 3abbb97b65
commit 39841a1e03
8 changed files with 386 additions and 0 deletions

24
src/dpkg/.SRCINFO Normal file
View File

@ -0,0 +1,24 @@
# Generated by mksrcinfo v8
# Thu Sep 15 23:40:56 UTC 2016
pkgbase = dpkg
pkgdesc = The Debian Package Manager. Don't use it instead of Arch's 'pacman'.
pkgver = 1.18.10
pkgrel = 3
url = https://tracker.debian.org/pkg/dpkg
arch = i686
arch = x86_64
license = GPL
checkdepends = perl-io-string
checkdepends = perl-test-pod
makedepends = perl-io-string
makedepends = perl-timedate
makedepends = git
depends = xz
depends = zlib
depends = bzip2
depends = perl
source = dpkg-1.18.10::git+https://anonscm.debian.org/git/dpkg/dpkg.git#tag=1.18.10
sha256sums = SKIP
pkgname = dpkg

49
src/dpkg/PKGBUILD Normal file
View File

@ -0,0 +1,49 @@
# Maintainer: Alad Wenter <alad (at) archlinux.info>
# Contributor: Jochen Schalanda <jochen+aur (at) schalanda.name>
# Contributor: C. Dominik Bódi <dominik.bodi@gmx.de>
# Contributor: Pierre Carrier <pierre@spotify.com>
# Contributor: Thomas Dziedzic <gostrc (at) gmail>
# Contributor: Chris Giles <Chris.G.27 (at) Gmail.com>
# Contributor: seblu <seblu+arch (at) seblu.net>
# Contributor: squiddo <squiddo (at) intheocean.net>
# Contributor: dront78 <dront78 (at) gmail.com>
# Contributor: hugelgupf <ckoch (at) cs.nmt.edu>
pkgname=dpkg
pkgver=1.18.10
pkgrel=3
pkgdesc="The Debian Package Manager. Don't use it instead of Arch's 'pacman'."
arch=('i686' 'x86_64')
url="https://tracker.debian.org/pkg/dpkg"
license=('GPL')
depends=('xz' 'zlib' 'bzip2' 'perl')
makedepends=('perl-io-string' 'perl-timedate' 'git')
checkdepends=('perl-io-string' 'perl-test-pod')
source=("$pkgname-$pkgver::git+https://anonscm.debian.org/git/dpkg/dpkg.git#tag=$pkgver")
sha256sums=('SKIP')
check() {
cd "$pkgname-$pkgver"
make check
}
build() {
cd "$pkgname-$pkgver"
autoreconf -f -i
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
--disable-start-stop-daemon \
--disable-install-info
make
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
install -d "$pkgdir/var/$pkgname"/updates/
touch "${pkgdir}/var/lib/$pkgname"/{status,available}
}

36
src/rpm-org/.SRCINFO Normal file
View File

@ -0,0 +1,36 @@
# Generated by mksrcinfo v8
# Sat Feb 13 00:47:46 UTC 2016
pkgbase = rpm-org
pkgdesc = RPM Package Manager - RPM.org fork, used in major RPM distros
pkgver = 4.12.0.1
pkgrel = 3
url = http://www.rpm.org/
arch = i686
arch = x86_64
license = GPL2
makedepends = python2
makedepends = python
depends = lua>=5.1
depends = file
depends = nss>=3.12
depends = popt
depends = elfutils
depends = libarchive
depends = libcap
optdepends = libdbus: systemd inhibit plugin
provides = rpm=4.12.0.1
provides = rpmextract=1.0-4
conflicts = rpm
conflicts = rpmextract
options = !libtool
source = http://rpm.org/releases/rpm-4.12.x/rpm-4.12.0.1.tar.bz2
source = rpmextract.sh
source = rpmlib-filesystem-check.patch
source = lua-5.3.patch
sha1sums = d416bdb249b246b00b2d5d34c66e7f5a68a62524
sha1sums = 74849919207885ae024f1ab8ed68a76474d67ad7
sha1sums = 0c5fa516dde1f10211af896c729e4b00c313e12b
sha1sums = e8efa065eb42648ac431a48b083888ae77e8ae4b
pkgname = rpm-org

8
src/rpm-org/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
*.tar.gz
*.tar.xz
*.tgz
*.rpm
*.zip
*.bz2
src/
pkg/

74
src/rpm-org/PKGBUILD Normal file
View File

@ -0,0 +1,74 @@
# Contributor: Johannes Dewender arch at JonnyJD dot net
# Contributor: Konrad <konrad AT knauber DOT name>
# Contributor: Luka Perkov <archlinux <at> lukaperkov <dOt> net>
# Contributor: Fernando M <f <at> beford.net>
# Author: Wintershade <Wintershade AT google mail DOT com>
pkgname=rpm-org
pkgver=4.12.0.1
_pkgver=$pkgver
#_pkgver=4.12.0-rc1
pkgrel=3
pkgdesc="RPM Package Manager - RPM.org fork, used in major RPM distros"
arch=('i686' 'x86_64')
url="http://www.rpm.org/"
license=('GPL2')
depends=('lua>=5.1' 'file' 'nss>=3.12' 'popt' 'elfutils' 'libarchive' 'libcap')
makedepends=('python2' 'python')
optdepends=('libdbus: systemd inhibit plugin')
conflicts=('rpm' 'rpmextract')
options=('!libtool')
provides=("rpm=${pkgver}" 'rpmextract=1.0-4')
#source=(http://rpm.org/releases/testing/rpm-${_pkgver}.tar.bz2
source=(http://rpm.org/releases/rpm-4.12.x/rpm-${pkgver}.tar.bz2
rpmextract.sh rpmlib-filesystem-check.patch lua-5.3.patch)
sha1sums=('d416bdb249b246b00b2d5d34c66e7f5a68a62524'
'74849919207885ae024f1ab8ed68a76474d67ad7'
'0c5fa516dde1f10211af896c729e4b00c313e12b'
'e8efa065eb42648ac431a48b083888ae77e8ae4b')
prepare() {
cd ${srcdir}/rpm-${_pkgver}
patch -p1 < ../rpmlib-filesystem-check.patch
patch -p1 < ../lua-5.3.patch
}
build() {
cd ${srcdir}/rpm-${_pkgver}
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-python \
--with-external-db \
--with-lua \
--with-cap \
CPPFLAGS="`pkg-config --cflags nss`" \
PYTHON=python2
make
}
package() {
cd ${srcdir}/rpm-${_pkgver}
make prefix=${pkgdir}/usr localstatedir=${pkgdir}/var install
rmdir ${pkgdir}/var/tmp
rmdir ${pkgdir}/var
# rpmextract using bsdtar, needs libarchive
install -m755 ${srcdir}/rpmextract.sh ${pkgdir}/usr/bin/
# move rpm from /bin to /usr/bin
mv ${pkgdir}/bin/rpm ${pkgdir}/usr/bin/
rm ${pkgdir}/usr/bin/rpm{query,verify}
cd ${pkgdir}/usr/bin
ln -s rpm rpmquery
ln -s rpm rpmverify
rm -r ${pkgdir}/bin/
# also install python 3 files
# building with python 3 files as default doesn't seem to work
cd ${srcdir}/rpm-${_pkgver}
cd python
python setup.py install --root="$pkgdir/" --optimize=1
}

64
src/rpm-org/lua-5.3.patch Normal file
View File

@ -0,0 +1,64 @@
From 82c0aa33c904274d9d62b629c2d15990aab45050 Mon Sep 17 00:00:00 2001
From: Johannes Dewender <rpm@JonnyJD.net>
Date: Mon, 18 May 2015 10:11:13 +0200
Subject: [PATCH] remove luaL_checkint, deprecated in lua 5.3
luaL_checkint and luaL_optint are deprecated in lua 5.3
The variants luaL_checkinteger and luaL_optinteger work
the same with an implicit typecast (lua_integer -> int).
---
luaext/lposix.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/luaext/lposix.c b/luaext/lposix.c
index a59be3e..51ea2b3 100644
--- a/luaext/lposix.c
+++ b/luaext/lposix.c
@@ -361,22 +361,22 @@ static int Pfork(lua_State *L) /** fork() */
static int Pwait(lua_State *L) /** wait([pid]) */
{
- pid_t pid = luaL_optint(L, 1, -1);
+ pid_t pid = luaL_optinteger(L, 1, -1);
return pushresult(L, waitpid(pid, NULL, 0), NULL);
}
static int Pkill(lua_State *L) /** kill(pid,[sig]) */
{
- pid_t pid = luaL_checkint(L, 1);
- int sig = luaL_optint(L, 2, SIGTERM);
+ pid_t pid = luaL_checkinteger(L, 1);
+ int sig = luaL_optinteger(L, 2, SIGTERM);
return pushresult(L, kill(pid, sig), NULL);
}
static int Psleep(lua_State *L) /** sleep(seconds) */
{
- unsigned int seconds = luaL_checkint(L, 1);
+ unsigned int seconds = luaL_checkinteger(L, 1);
lua_pushnumber(L, sleep(seconds));
return 1;
}
@@ -529,7 +529,7 @@ static int Pgetprocessid(lua_State *L) /** getprocessid([selector]) */
static int Pttyname(lua_State *L) /** ttyname(fd) */
{
- int fd=luaL_optint(L, 1, 0);
+ int fd=luaL_optinteger(L, 1, 0);
lua_pushstring(L, ttyname(fd));
return 1;
}
@@ -880,7 +880,7 @@ static int exit_override(lua_State *L)
if (!have_forked)
return luaL_error(L, "exit not permitted in this context");
- exit(luaL_optint(L, 1, EXIT_SUCCESS));
+ exit(luaL_optinteger(L, 1, EXIT_SUCCESS));
}
static const luaL_Reg os_overrides[] =
--
2.1.3

View File

@ -0,0 +1,6 @@
#!/bin/sh
if [ "$1" = "" -o ! -e "$1" ]; then
echo "no package supplied" 1>&2
exit 1
fi
bsdtar xf $1

View File

@ -0,0 +1,125 @@
diff -up rpm-4.10.90.git11978/lib/depends.c.rpmlib-filesystem-check rpm-4.10.90.git11978/lib/depends.c
--- rpm-4.10.90.git11978/lib/depends.c.rpmlib-filesystem-check 2012-11-01 09:40:26.000000000 +0200
+++ rpm-4.10.90.git11978/lib/depends.c 2012-11-05 10:53:42.294733695 +0200
@@ -589,6 +589,109 @@ static int rpmdbProvides(rpmts ts, depCa
return rc;
}
+/*
+ * Temporary support for live-conversion of the filesystem hierarchy
+ * mailto: kay@redhat.com, harald@redhat.com
+ * https://fedoraproject.org/wiki/Features/UsrMove
+ *
+ * X-CheckUnifiedSystemdir:
+ * /bin, /sbin, /lib, /lib64 --> /usr
+ *
+ * X-CheckUnifiedBindir:
+ * /usr/sbin -> /usr/bin
+ *
+ * X-CheckMultiArchLibdir:
+ * /usr/lib64 /usr/lib/<platform tuple> (e.g. x86_64-linux-gnu)
+ *
+ * This code is not needed for new installations, it can be removed after
+ * updates from older systems are no longer supported: Fedora 19 / RHEL 8.
+ */
+
+static int CheckLink(const char *dir, const char *root)
+{
+ char *d = NULL;
+ struct stat sbuf;
+ int rc = 0;
+
+ if (!root)
+ root = "/";
+
+ rasprintf(&d, "%s%s", root, dir);
+ if (!d) {
+ rc = -1;
+ goto exit;
+ }
+
+ /* directory or symlink does not exist, all is fine */
+ if (lstat(d, &sbuf) < 0) {
+ rc = 1;
+ goto exit;
+ }
+
+ /* if it is a symlink, all is fine */
+ if (S_ISLNK(sbuf.st_mode))
+ rc = 1;
+
+exit:
+ free(d);
+ return rc;
+}
+
+static int CheckFilesystemHierarchy(rpmds * dsp, const char *root)
+{
+ static const char *dirs[] = { "bin", "sbin", "lib", "lib64" };
+ int check;
+ int i;
+ rpmds ds;
+ rpmstrPool pool = rpmdsPool(*dsp);
+ int rc = 0;
+
+ for (i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
+ check = CheckLink(dirs[i], root);
+ if (check < 0) {
+ rc = -1;
+ goto exit;
+ }
+
+ if (check == 0)
+ goto exit;
+ }
+ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
+ "rpmlib(X-CheckUnifiedSystemdir)", "1",
+ RPMSENSE_EQUAL);
+ rpmdsMerge(dsp, ds);
+ rpmdsFree(ds);
+
+ check = CheckLink("usr/lib64", root);
+ if (check < 0) {
+ rc = -1;
+ goto exit;
+ }
+ if (check > 0) {
+ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
+ "rpmlib(X-CheckMultiArchLibdir)", "1",
+ RPMSENSE_EQUAL);
+ rpmdsMerge(dsp, ds);
+ rpmdsFree(ds);
+ }
+
+ check = CheckLink("usr/sbin", root);
+ if (check < 0) {
+ rc = -1;
+ goto exit;
+ }
+ if (check > 0) {
+ ds = rpmdsSinglePool(pool, RPMTAG_PROVIDENAME,
+ "rpmlib(X-CheckUnifiedBindir)", "1",
+ RPMSENSE_EQUAL);
+ rpmdsMerge(dsp, ds);
+ rpmdsFree(ds);
+ }
+
+exit:
+ return rc;
+}
+
/**
* Check dep for an unsatisfied dependency.
* @param ts transaction set
@@ -612,8 +715,10 @@ retry:
* Check those dependencies now.
*/
if (dsflags & RPMSENSE_RPMLIB) {
- if (tsmem->rpmlib == NULL)
+ if (tsmem->rpmlib == NULL) {
rpmdsRpmlibPool(rpmtsPool(ts), &(tsmem->rpmlib), NULL);
+ CheckFilesystemHierarchy(&(tsmem->rpmlib), rpmtsRootDir(ts));
+ }
if (tsmem->rpmlib != NULL && rpmdsSearch(tsmem->rpmlib, dep) >= 0) {
rpmdsNotify(dep, "(rpmlib provides)", rc);