Skip to content

Commit

Permalink
Initial revision
Browse files Browse the repository at this point in the history
  • Loading branch information
imilh committed Mar 3, 2011
0 parents commit d05c9c7
Show file tree
Hide file tree
Showing 50 changed files with 147,243 additions and 0 deletions.
167 changes: 167 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
20110301
pkgin can now upgrade pkg_install with user's approval

20110228
url_stat's size is declared as off_t, will be > SSIZE_MAX on
32 bits systems. Added a fix for this.

20110227
Added -P, print package version instead of globs in sd, srd, sfd
Added warning for repositories with 0-lenght FILE_SIZE
Added -V (verbosity) flag
Moved integer flags to uint8_t

20110221
Wiped out file.c, ftpio.c, path.c, str.c, pexec.c, pkg_io.c,
pen.c, strsep.c, lpkg.c, iterate.c
Inform about logging

20110207
Replaced naive repository arch check by MACHINE_ARCH check

20110206
Bump to SQLite 3.7.5

20110205
Added statvfs64 support
Redirect stderr to logfile while pkg_{add,delete}

20110204
Feature request: -F / force-reinstall
Feature request: PR 43049

20110130
Merged 0.4.0 to HEAD
MINIX patches from Gautam are now upstream
Re-added download-only
Makefile.in / configure.ac cleanup
Integrated some of bapt's patches
- chroot
- bandwidth calculation

20110122
pkgin 0.4.0
SQLite "Amalgamation" version is now part of the tree,
No more databases/sqlite3 dependency needed

20110120
pkgin 0.3.3.4, never say "this is the last release"
Fixed a non-critical bug: some packages were marked
for upgrade more than once.

20110119
pkgin 0.3.3.3, hopefully the last 0.3 release
Double dewey match fixed, i.e. foo>=1.2.3<3.0
Duplicate entries for remove and upgrade fixed
"Missing package in repository" case handled

20100123:
Many cleanups from stacktic
- Replaced strstr's with str{n}cmp when possible
- #ifdef'ed PROVIDES
- Queries are now const chars

20100102:
Solaris 10 support
Mac OS X support
Many cleanups from stacktic

20100101:
Many fixes by stacktic :
- Added -n (no-flag)
- Various memleaks fixed
- pkgname comparison fix
- Cleaned up trailing spaces
- Got rid of recursion !

20091206:
Added -l status flags

20091203:
autoconf support
percentage redraw fix (jmcneill)
variables cleanups (PKG_SYSCONFDIR, VARBASE) (sketch)
auto-lookup for SUMEXTS, removed options.mk (sketch)
opensolaris fixes (sketch)
repositories.conf variables substitution (tuxillo)
impact mutex (Johannes Hofmann)
SunOS 5.8 support (Mikhail T.)

20090608:
pkgin-20090608 imported to pkgsrc as pkgin-0.2.5

20090605:
Added the long awaited repositories file
${PREFIX}/etc/pkgin/repositories.conf

20090527:
Glue between keep-state and pkgdb "automatic" flag.

20090526:
pkgin now handles removal of packages when an upgrade would
break dependencies, i.e. upgrading php from version 4 to 5
will break php4-modules dependencies. Modules will be removed
before php-4 is upgraded.

20090516:
Database modification. See the MIGRATION file for details on
how to safely rebuild your database.

mtime check over pkg_summary files on repositories, don't
update pkgin database if mtime have not changed.

20090515:
Database modification, see 20090507 to rebuild it

pkgin now records local pkgdb mtime so it does not rebuild
its database when pkgdb is not updated

20090509:
Parameters have changed.
Instead of getopt()-style flags, pkgin is now using commands.

i.e.:

# pkgin install foo
# pkgin remove foo

Only -y and -h have been kept.

20090508:
pkg_dry name change !

pkg_dry is now known as pkgin

20090508:
Added -c flag, clean cache: delete all downloaded packages from
/var/db/pkg_dry/cache

20090507:
A database rebuild is needed, along with a regeneration of
the ddb_create.h header in order to support multi-repository.

Record your keepables packages :

$ pkg_dry -p|cut -d' ' -f1 > pkg_dry.keep

Remove the database

# rm -f /var/db/pkg_dry/pkg_dry.db

Set the PKG_REPOS variable to your repository(ies) :

# PKG_REPOS=ftp://ftp.fr.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/5.0/All
# export PKG_REPOS

Rebuild pkg_dry

$ rm -f ddb_create.h
$ make

Regenerate the database

# pkg_dry -u

Mark your keepables packages

# for pkg in `cat pkg_dry.keep`; do pkg_dry -k $pkg; done
11 changes: 11 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Emile "iMil" Heitor <[email protected]> - main developer
Claude "zatmania" Charpentier <[email protected]> - SQL
Guillaume "GuiGui2" Lasmayous <[email protected]> - tests and manpage
Jeremy C. Reed <[email protected]> - intensive tests and feedbacks
Arnaud "stacktic" Ysmal <[email protected]> - intensive tests + patches
Antonio Huete "tuxillo" Jimenez <[email protected]> - DragonFly port
Min Sik Kim <[email protected]> - Darwin port
Filip Hajny <[email protected]> - SunOS port
Johannes Hofmann <[email protected]> - bugfix
Baptiste Daroussin <[email protected]> - FreeBSD port + patches
Gautam B.T. <[email protected]> - MINIX port
116 changes: 116 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# $Id: Makefile.in,v 1.1 2011/03/03 14:43:09 imilh Exp $

PROG= pkgin
VERSION= @PACKAGE_VERSION@
SRCS= main.c summary.c tools.c pkgindb.c depends.c actions.c \
pkglist.c download.c order.c impact.c autoremove.c fsops.c \
pkgindb_queries.c
# included from libinstall
SRCS+= automatic.c decompress.c dewey.c fexec.c global.c \
opattern.c pkgdb.c var.c

SRCS+= @SRCS@

DPSRCS= pkgindb_create.h

CC= @CC@

OPSYS!= uname
OS_VER!= uname -r
OS_ARCH!= uname -p

# satisfy mk.conf
BSD_PKG_MK= 1
.for MK_CONF in "/etc/mk.conf @prefix@/etc/mk.conf /etc/pkgsrc.conf"
. if exists(${MK_CONF})
. include "${MK_CONF}"
. endif
.endfor

.if ${OPSYS} == "Minix"
PKGTOOLS?= ${PKG_TOOLS_BIN}
CPPFLAGS+= -D_POSIX_SOURCE -D_MINIX
LDADD+= -lsqlite3
.else
SRCS+= sqlite3.c
.endif

LOCALBASE?= @prefix@
PKG_SYSCONFDIR?= ${LOCALBASE}/etc
VARBASE?= /var
PKG_DBDIR?= ${VARBASE}/db/pkg

PKGIN_VERSION= "${VERSION} for ${OPSYS}-${OS_VER} ${OS_ARCH}"

CPPFLAGS+= -DPKGIN_VERSION=\"${PKGIN_VERSION}\"

MKMAN= no

.include <bsd.own.mk>

.PATH: external sqlite

.if defined(DEBUG)
CPPFLAGS+= -DDEBUG
PKGIN_DB!= pwd
.else
PKGIN_DB= ${VARBASE}/db/pkgin
.endif

.if ${OPSYS} == "NetBSD"
WARNS= 2
PKGTOOLS?= /usr/sbin
CPPFLAGS+= -DNETBSD
.else
PKGTOOLS?= ${LOCALBASE}/sbin
.endif

CPPFLAGS+= @CPPFLAGS@
CPPFLAGS+= -g

CPPFLAGS+= -DLOCALBASE=\"${LOCALBASE}\" \
-DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\" \
-DPKG_DBDIR="\"${PKG_DBDIR}\"" \
-DDEF_LOG_DIR="\"${PKG_DBDIR}\"" \
-DPKGIN_DB=\"${PKGIN_DB}\" \
-DPKGTOOLS=\"${PKGTOOLS}\"

CPPFLAGS+= -DHAVE_CONFIG_H
CPPFLAGS+= -D_FILE_OFFSET_BITS=64
CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES
CPPFLAGS+= -DCHECK_MACHINE_ARCH=\"${MACHINE_ARCH}\"
CPPFLAGS+= -Iexternal -I. -Isqlite -I${LOCALBASE}/include

LDADD+= -L${LOCALBASE}/lib @RPATH@,${LOCALBASE}/lib \
-lbz2 -lz -larchive @LIBS@

pkgindb_create.h:
@SEDCMD=@SED@ ./mkpkgindb.sh > pkgindb_create.h

# maintainer helpers

PKGINCVS=":pserver:[email protected]:/cvs"
CURDATE!=date +%Y%m%d
WIPHOME=/home/imil/netbsd-cvs/pkgsrc/wip
CURDIR!=pwd

dist:
mkdir -p export
cd export && rm -rf pkgin* && cvs -d ${PKGINCVS} co pkgin && \
tar zcvf pkgin-${CURDATE}.tar.gz pkgin

publish:
scp export/pkgin-*.tar.gz korriban:www/public/NetBSD/

bump:
rm -f ${WIPHOME}/pkgin/distinfo ${WIPHOME}/../distfiles/pkgin-*
perl -pi -e "s/pkgin-[0-9]+/pkgin-${CURDATE}/" \
${WIPHOME}/pkgin/Makefile
cd ${WIPHOME}/pkgin && make makesum

shar:
cd ${WIPHOME}/pkgin && shar `find . -print -maxdepth 1|grep -v CVS` > \
${CURDIR}/export/pkgin-pkgsrc-wip.shar
scp export/pkgin-*.shar korriban:www/public/NetBSD/

.include <bsd.prog.mk>
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Please refer to http://pkgin.net/

Emile "iMil" Heitor <[email protected]>
3 changes: 3 additions & 0 deletions REPOSITORIES
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/$arch/5.0/All
http://mirror-master.dragonflybsd.org/packages/$arch/DragonFly-$osrelease/stable/All/
ftp://ftp.minix3.org/pub/minix/packages/$osrelease/$arch/All
Loading

0 comments on commit d05c9c7

Please sign in to comment.