BUILD WITHIN CHROOT ENV /data/pkgbuild/scripts/run-sandbox 2018Q4-x86_64 cd /data/pkgsrc/erigones/powerdns40 bmake package - built packages are in /data/chroot/dev-2018Q4-x86_64/data/packages/SmartOS/2018Q4/x86_64/All/ REGENERATE REPO cd x86_64/All pkg_info -X *.tgz | gzip -9 > pkg_summary.gz pkg_info -X *.tgz | bzip2 -9 > pkg_summary.bz2 SIGN PACKAGES (do within chroot env) - /opt/local/etc/mk.conf: SIGN_PACKAGES= gpg - /opt/local/etc/pkg_install.conf GPG=/usr/bin/gpg GPG_SIGN_AS=84C12E2F - import pubkey: curl https://pkgsrc.danube.cloud/GPG.key.pub | gpg --no-default-keyring --keyring /opt/local/etc/gnupg/pkgsrc.gpg --import - import privkey: gpg --import /data/Erigones\ Package\ Signing.asc gpg --list-secret-keys bmake package - verify pkg_admin check-signature echo $? 0 <-- OK 1 <-- verify failed # verify uses /opt/local/etc/gnupg/pkgsrc.gpg pubring CREATE GPG SIGNING KEY gpg --gen-key - it asks for details gpg --list-keys gpg --list-secret-keys gpg --export-secret-keys AA205C4F > /janci-gpg-package-signing.gpg.pub gpg --export AA205C4F > /janci-gpg-package-signing.gpg.pub UPDATE PKG - vim Makefile.common - change version - regenerate distinfo bmake makedistinfo bmake package GENERATE PLIST bmake stage-install bmake print-PLIST https://wiki.netbsd.org/pkgsrc/targets/ WITHOUT CHROOT ENV md /opt/devel git clone https://github.com/joyent/pkgsrc.git cd /opt/devel/pkgsrc/bootstrap ./bootstrap --prefix /opt/pkg --make-jobs 4 --abi 64 --full export PATH=/opt/pkg/bin:$PATH cd /opt/devel/pkgsrc/lang/gcc49 /opt/pkg/bin/bmake install git checkout remotes/origin/joyent/release/trunk export PATH=/opt/pkg/gcc49/bin:/opt/pkg/bin:/opt/pkg/sbin:/opt/pkg/gnu/bin:/usr/bin:/usr/sbin:/smartdc/bin cd /opt/devel/pkgsrc/www/firefox /opt/pkg/bin/bmake install PUBLISH NEW PACKAGE ssh download.erigones.org mkdir -p /data/www/download.erigones.org/pkgsrc/packages/SmartOS/2020Q1/x86_64/All - build package(s), upload builder> scp /data/packages/SmartOS/2020Q1/x86_64/All/zabbix-* 10.100.10.30:/data/www/download.erigones.org/pkgsrc/packages/SmartOS/2020Q1/x86_64/All/ - update repo: ~/bin/update-pkgsrc-2020Q1.sh Troubleshooting =============== nss package build: ERROR: Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99 /opt/devel/pkgsrc/devel/nss/Makefile: - add line: CFLAGS+= -std=gnu99 /opt/devel/pkgsrc/devel/nss# /opt/pkg/bin/bmake clean /opt/devel/pkgsrc/devel/nss# /opt/pkg/bin/bmake install - resume build cd /opt/devel/pkgsrc/www/firefox /opt/pkg/bin/bmake install hunspell: hunspell.cxx:516:28: error: 'getnstr' was not declared in this scope cd /opt/devel/pkgsrc/textproc/hunspell /opt/local/bin/git checkout remotes/origin/joyent/release/2016Q4 /opt/devel/pkgsrc/textproc/hunspell# /opt/pkg/bin/bmake clean /opt/devel/pkgsrc/textproc/hunspell# /opt/pkg/bin/bmake install /opt/local/bin/git checkout remotes/origin/joyent/release/trunk - resume build cd /opt/devel/pkgsrc/www/firefox /opt/pkg/bin/bmake install libtheora-1.1.1nb2: ../depcomp[2]: /opt/pkg/share/libtool/config/depcomp: not found ln -s build-aux /opt/pkg/share/libtool/config ERROR: You can mark the license ``lame-license'' as acceptable by adding ERROR: ACCEPTABLE_LICENSES+= lame-license ERROR: to /opt/pkg/etc/mk.conf or by adding - resume build xmlto: /opt/devel/pkgsrc/sysutils/dbus/work/dbus-1.10.14/doc/dbus-cleanup-sockets.1.xml does not validate (status 3) /opt/devel/pkgsrc/sysutils/dbus/Makefile: CONFIGURE_ARGS+= --disable-xml-docs SETUP PKG BUILD SERVER -- 1. OUTSIDE /opt/local mkdir /data cd /data git clone https://github.com/joyent/pkgsrc.git cd /data/pkgsrc - export PATH=/usr/bin:/usr/sbin:/opt/erigones/bin:/smartdc/bin:/opt/jpkg/bin:/opt/local/bin:/opt/local/sbin:/opt/local/gcc49/bin (/opt/local contains gcc; if not bootstraping with --full, /opt/local will always be needed) ./bootstrap/bootstrap --abi 64 --prefix /opt/jpkg --make-jobs 4 [--full] cd /data/pkgsrc/x11/modular-xorg-server /opt/jpkg/bin/bmake package -- 2. CUSTOM own /opt/local - bootstrap --full some other dir (e.g. /opt/jpkg) to have gcc - remove old /opt/local, clone second git repo, e.g. to /data/pkgsrc2 cd /data/pkgsrc2 export PATH=/usr/bin:/usr/sbin:/opt/erigones/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/jpkg/bin:/opt/jpkg/gcc49/bin:/opt/jpkg/gnu/bin ./bootstrap/bootstrap --abi 64 --prefix /opt/local --make-jobs 4 --full --prefer-pkgsrc --varbase /var --pkgdbdir /opt/local/pkg - compile compiler: cd lang/gcc49 /opt/local/bin/bmake install - remove jpkg paths: export PATH=/usr/bin:/usr/sbin:/opt/erigones/bin:/smartdc/bin:/opt/local/bin:/opt/local/sbin:/opt/local/gcc49/bin:/opt/local/gnu/bin - build normally: cd /data/pkgsrc2/x11/modular-xorg-server /opt/local/bin/bmake package