Skip to content

Instantly share code, notes, and snippets.

# ./pkg2ng
Registering apache-2.2.17_1... To run apache www server from startup, add apache22_enable="YES"
in your /etc/rc.conf. Extra options can be found in startup script.
Your hostname must be resolvable using at least 1 mechanism in
/etc/nsswitch typically DNS or /etc/hosts or apache might
have issues starting depending on the modules you are using.
done.
Registering apg-2.3.0b_2... done.
+ id -u
+ [ 0 -ne 0 ]
+ uname -m
+ ARCH=amd64
+ pkg_info -Ea
+ echo -n 'Registering apache-2.2.17_1... '
Registering apache-2.2.17_1... + DB=/var/db/pkg/apache-2.2.17_1
+ cat /var/db/pkg/apache-2.2.17_1/+COMMENT
+ COMMENT='Version 2.2.x of Apache web server with prefork MPM.'
+ DESC=/var/db/pkg/apache-2.2.17_1/+DESC
@dnaeon
dnaeon / upgrade.c
Created April 16, 2011 12:15
initialize conf to NULL
# git diff upgrade.c
diff --git a/pkg/upgrade.c b/pkg/upgrade.c
index 664db04..3968ffb 100644
--- a/pkg/upgrade.c
+++ b/pkg/upgrade.c
@@ -33,7 +33,7 @@ exec_upgrade(int argc, char **argv)
int64_t oldsize = 0, newsize = 0;
int64_t dlsize = 0;
char size[7];
- properties conf;
@dnaeon
dnaeon / pkg2ng - pkg register core dump
Created July 18, 2011 18:12
pkg2ng - pkg register core dump
Loaded symbols for /lib/libmd.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x0000000800e0411c in kill () from /lib/libc.so.7
[New Thread 802c07400 (LWP 100169/pkg)]
(gdb) bt
#0 0x0000000800e0411c in kill () from /lib/libc.so.7
#1 0x0000000800e02d4b in abort () from /lib/libc.so.7
#2 0x0000000800dec1a5 in __assert () from /lib/libc.so.7
#3 0x000000080086907e in pkg_set () from /usr/lib/libpkgng.so.0
@dnaeon
dnaeon / pkg2ng - pkg register core dump - i386
Created July 18, 2011 19:33
pkg2ng - pkg register core dump - i386
(gdb) bt
#0 0x2822db97 in kill () from /lib/libc.so.7
#1 0x2822daf6 in raise () from /lib/libc.so.7
#2 0x2822c6ca in abort () from /lib/libc.so.7
#3 0x28214a56 in __assert () from /lib/libc.so.7
#4 0x280aa8f2 in pkg_set (pkg=0x28501280, attr=4294967294, value=0x28531104 "") at pkg.c:135
#5 0x280a8b75 in parse_mapping (pkg=0x28501280, pair=0x2852f130, document=0xbfbfe134, pkgtype=-1) at pkg_manifest.c:162
#6 0x280a8cdd in parse_node (pkg=0x28501280, node=0x28533600, document=0xbfbfe134, pkgtype=-1) at pkg_manifest.c:206
#7 0x280a8dc8 in pkg_parse_manifest (pkg=0x28501280,
buf=0x28508100 "name: vim-lite\nversion: 7.3.121\norigin: editors/vim-lite\ncomment: |\n Vi \"workalike\", with many additional features (Lite package)\nmaintainer: [email protected]\nprefix: /usr/local\ndeps:\nconflicts:\n- "...)
Registering git-1.7.4.1... pkg_info: can't find package 'perl-5.10.1_3' installed or in a file!
Assertion failed: (origin != NULL && origin[0] != '\0'), function pkg_adddep, file pkg.c, line 368.
pkg2ng: line 11: 76370 Abort trap: 6 (core dumped) pkg register -l -m ${MDIR} -f ${PLIST} ${CMD_ARGS}
failed.
[root@tsunami ~/PROJECTS/pkgng/ports]# pkg_info -Ix perl
perl-threaded-5.10.1_3 Practical Extraction and Report Language
@dnaeon
dnaeon / gist:1090538
Created July 18, 2011 20:17
pkg2ng - pkg register / perl dep
Registering git-1.7.4.1... pkg_info: can't find package 'perl-5.10.1_3' installed or in a file!
Assertion failed: (origin != NULL && origin[0] != '\0'), function pkg_adddep, file pkg.c, line 368.
pkg2ng: line 11: 76370 Abort trap: 6 (core dumped) pkg register -l -m ${MDIR} -f ${PLIST} ${CMD_ARGS}
failed.
# pkg_info -Ix perl
perl-threaded-5.10.1_3 Practical Extraction and Report Language
@dnaeon
dnaeon / gist:1094927
Created July 20, 2011 13:16
pkg info -a
perl-threaded-5.10.1_3: Practical Extraction and Report Language
php5-5.3.6: PHP Scripting Language
php5-mysql-5.3.6: The mysql shared extension for php
php5-session-5.3.6: The session shared extension for php
php5-xml-5.3.6: The xml shared extension for php
@dnaeon
dnaeon / gist:1099439
Created July 22, 2011 13:22
pkgng - multi-repos / search and update
# pkg update
Fetching from http://unix-heaven.org/FreeBSD/pkgng/dnaeon-i386/repo.txz... 100%
Fetching from http://unix-heaven.org/FreeBSD/pkgng/dnaeon-amd64/repo.txz... 100%
# pkg search -x apache
Name: apache
Version: 2.2.17_1
Origin: www/apache22
Arch: i386
Maintainer: [email protected]
@dnaeon
dnaeon / gist:1102765
Created July 24, 2011 16:00
pkgng search in multi repos - part 2
# pkg search -x apg
pkg: /!\ Working on multiple repositories /!\
pkg: /!\ This is an unsupported preview feature /!\
pkg: /!\ It can kill kittens and puppies /!\
Name: apg
Version: 2.3.0b_2
Origin: security/apg
Arch: amd64