Re: [NEW] sysutils/tarsnap-gui
Antoine suggested putting the version number in a variable. A revised tarball is attached. --- Makefile.orig Fri Jun 12 17:15:13 2015 +++ MakefileSat Jun 13 07:51:58 2015 @@ -1,7 +1,8 @@ # $OpenBSD COMMENT = frontend to the popular Tarsnap backup service -DISTNAME = tarsnap-gui-0.5 +V =0.5 +DISTNAME = tarsnap-gui-${V} CATEGORIES = sysutils HOMEPAGE = https://github.com/Tarsnap/tarsnap-gui/wiki/Tarsnap @@ -15,7 +16,7 @@ GH_ACCOUNT = Tarsnap GH_PROJECT = tarsnap-gui -GH_TAGNAME = v0.5 +GH_TAGNAME = v${V} MODULES = x11/qt5 RUN_DEPENDS = sysutils/tarsnap tarsnap-gui.tar.gz Description: application/tar-gz
Re: [maintainer update] audio/py-discogs-client
Minor update from 2.1.0 to 2.2.0. Diff and the dependencies attached. thanks, .jh On 2015-06-08 06:40, Stuart Henderson wrote: On 2015/06/05 09:23, Johan Huldtgren wrote: Any takers? If I can get all these deps imported I can proceed to actually get the py-discogs-client updated. So, py-cryptography plus its deps are now in, the remaining ones before we can update py-discogs-client are py-jwt py-test-cov py-oauthlib On 2015-05-27 07:26, Stuart Henderson wrote: >OK sthen@ if someone would like to import www/py-jwt and >devel/py-test-cov. >(Re-included in the tar.gz attached to this mail). Note that py-jwt (and >py-oauthlib) require py-cryptography (plus deps) from the port that >I already sent out, which is still awaiting OKs/import. > >http://marc.info/?l=openbsd-ports&m=143219761119821&w=2 > >Slight tweak for py-oauthlib from that file, updated version attached, >also OK sthen@ to import. > >I think it would be reasonable to defer handling the remaining oauthlib >test failures until we run into problems with real programs, they are >all of the "algorithm not supported" variety and with this version >there's nothing to suggest any major problem with the port. > >--- Makefile.orig Wed May 27 12:14:56 2015 >+++ MakefileWed May 27 12:18:01 2015 >@@ -6,22 +6,12 @@ V = 0.20150523 > GH_ACCOUNT = idan > GH_PROJECT = oauthlib > GH_COMMIT =16cd3b255b2c86ec7da412357cad899c72d8dbf7 >-DISTFILES =master${EXTRACT_SUFX} >-DISTNAME = ${GH_PROJECT}-${V} >-PKGNAME = py-${GH_PROJECT}-${V} >+DISTNAME = py-${GH_PROJECT}-$V > CATEGORIES = security > MAINTAINER = Johan Huldtgren > >-HOMEPAGE = https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/ >- >-MASTER_SITES = ${HOMEPAGE}archive/ >- > # BSD > PERMIT_PACKAGE_CDROM = Yes >- >-EXTRACT_SUFX = .zip >- >-WRKDIST = ${WRKDIR}/${GH_PROJECT}-master > > MODULES = lang/python > MODPY_SETUPTOOLS = Yes >--- distinfo.orig Wed May 27 12:20:27 2015 >+++ distinfoWed May 27 12:17:30 2015 >@@ -1,2 +1,2 @@ >-SHA256 (master.zip) = vrdYFF1cw9EXt9DAVH+Rtx7D8Y6kCEpJ3kSTuEd8CLI= >-SIZE (master.zip) = 226775 >+SHA256 (py-oauthlib-0.20150523.tar.gz) = >G9lXPHw+EIF5/s2aTkz+jrPWb4IuO6PcnoDbY4A/whM= >+SIZE (py-oauthlib-0.20150523.tar.gz) = 142548 > > >On 2015/05/26 19:26, Johan Huldtgren wrote: >>On 2015-05-20 04:43, Stuart Henderson wrote: >>> >>>The distfile unpacks with no group-readable permissions. >>>Simplest fix is probably >>> >>>post-extract: >>>chmod -R o+rX ${WRKSRC} >> >>fixed. >> >>>So either we need an older PyJWT, or we need oauthlib head. I wouldn't be >>>averse to using head from a github checkout, but that is what needs >>>py-cryptography. >> >>ok, using the py-crypotography and it's depends from the other thread, I >>cobbled together a new port of py-oauthlib head together with the latest >>py-jwt. It builds and packages, and I can use py-discogs-client together >>with beets (really my only way of testing functionality). However >>'make test' still fails, albeit with different errors than before: >> >>===> Regression tests for py-oauthlib-0.20150523 >>cd /usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master && >>/usr/local/bin/python2.7 -m unittest discover >>E..EEE...EEE..EE. >>== >>ERROR: test_rsa_signature >>(tests.oauth1.rfc5849.endpoints.test_base.SignatureVerificationTest) >>-- >>Traceback (most recent call last): >> File "/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/endpoints/test_base.py", >>line 388, in test_rsa_signature >>self.assertTrue(self.e._check_signature(r)) >> File "/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/endpoints/base.py", >>line 190, in _check_signature >>valid_signature = signature.verify_rsa_sha1(request, rsa_key) >> File "/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>line 596, in verify_rsa_sha1 >>alg = _jwt_rs1_signing_algorithm() >> File "/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>line 474, in _jwt_rs1_signing_algorithm >>_jwtrs1 = jwtalgo.RSAAlgorithm(jwtalgo.hashes.SHA1) >>AttributeError: 'module' object has no attribute 'RSAAlgorithm' >> >>== >>ERROR: test_rsa_method >>(tests.oauth1.rfc5849.test_client.SignatureMethodTest) >>-- >>Traceback (most recent call last): >> File "/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/test_client.py", >>line 89,
Re: [maintainer update] audio/py-discogs-client
OK sthen@ for anyone who wants to import/update ... On 13 June 2015 16:13:10 BST, Johan Huldtgren wrote: >Minor update from 2.1.0 to 2.2.0. Diff and the dependencies attached. > >thanks, > >.jh > >On 2015-06-08 06:40, Stuart Henderson wrote: >> On 2015/06/05 09:23, Johan Huldtgren wrote: >>> Any takers? If I can get all these deps imported I can proceed to >>> actually >>> get the py-discogs-client updated. >> >> So, py-cryptography plus its deps are now in, the remaining ones >before >> we can update py-discogs-client are >> >> py-jwt >> py-test-cov >> py-oauthlib >> >> >>> On 2015-05-27 07:26, Stuart Henderson wrote: >>> >OK sthen@ if someone would like to import www/py-jwt and >>> >devel/py-test-cov. >>> >(Re-included in the tar.gz attached to this mail). Note that py-jwt >(and >>> >py-oauthlib) require py-cryptography (plus deps) from the port that >>> >I already sent out, which is still awaiting OKs/import. >>> > >>> >http://marc.info/?l=openbsd-ports&m=143219761119821&w=2 >>> > >>> >Slight tweak for py-oauthlib from that file, updated version >attached, >>> >also OK sthen@ to import. >>> > >>> >I think it would be reasonable to defer handling the remaining >oauthlib >>> >test failures until we run into problems with real programs, they >are >>> >all of the "algorithm not supported" variety and with this version >>> >there's nothing to suggest any major problem with the port. >>> > >>> >--- Makefile.orig Wed May 27 12:14:56 2015 >>> >+++ Makefile Wed May 27 12:18:01 2015 >>> >@@ -6,22 +6,12 @@ V = 0.20150523 >>> > GH_ACCOUNT = idan >>> > GH_PROJECT = oauthlib >>> > GH_COMMIT = 16cd3b255b2c86ec7da412357cad899c72d8dbf7 >>> >-DISTFILES = master${EXTRACT_SUFX} >>> >-DISTNAME =${GH_PROJECT}-${V} >>> >-PKGNAME = py-${GH_PROJECT}-${V} >>> >+DISTNAME =py-${GH_PROJECT}-$V >>> > CATEGORIES = security >>> > MAINTAINER = Johan Huldtgren >>> > >>> >-HOMEPAGE =https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/ >>> >- >>> >-MASTER_SITES =${HOMEPAGE}archive/ >>> >- >>> > # BSD >>> > PERMIT_PACKAGE_CDROM = Yes >>> >- >>> >-EXTRACT_SUFX =.zip >>> >- >>> >-WRKDIST = ${WRKDIR}/${GH_PROJECT}-master >>> > >>> > MODULES = lang/python >>> > MODPY_SETUPTOOLS = Yes >>> >--- distinfo.orig Wed May 27 12:20:27 2015 >>> >+++ distinfo Wed May 27 12:17:30 2015 >>> >@@ -1,2 +1,2 @@ >>> >-SHA256 (master.zip) = vrdYFF1cw9EXt9DAVH+Rtx7D8Y6kCEpJ3kSTuEd8CLI= >>> >-SIZE (master.zip) = 226775 >>> >+SHA256 (py-oauthlib-0.20150523.tar.gz) = >>> >G9lXPHw+EIF5/s2aTkz+jrPWb4IuO6PcnoDbY4A/whM= >>> >+SIZE (py-oauthlib-0.20150523.tar.gz) = 142548 >>> > >>> > >>> >On 2015/05/26 19:26, Johan Huldtgren wrote: >>> >>On 2015-05-20 04:43, Stuart Henderson wrote: >>> >>> >>> >>>The distfile unpacks with no group-readable permissions. >>> >>>Simplest fix is probably >>> >>> >>> >>>post-extract: >>> >>> chmod -R o+rX ${WRKSRC} >>> >> >>> >>fixed. >>> >> >>> >>>So either we need an older PyJWT, or we need oauthlib head. I >wouldn't be >>> >>>averse to using head from a github checkout, but that is what >needs >>> >>>py-cryptography. >>> >> >>> >>ok, using the py-crypotography and it's depends from the other >thread, I >>> >>cobbled together a new port of py-oauthlib head together with the >latest >>> >>py-jwt. It builds and packages, and I can use py-discogs-client >together >>> >>with beets (really my only way of testing functionality). However >>> >>'make test' still fails, albeit with different errors than before: >>> >> >>> >>===> Regression tests for py-oauthlib-0.20150523 >>> >>cd /usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master && >>> >>/usr/local/bin/python2.7 -m unittest discover >>> >>>E..EEE...EEE..EE. >>> >>>== >>> >>ERROR: test_rsa_signature >>> >>>(tests.oauth1.rfc5849.endpoints.test_base.SignatureVerificationTest) >>> >>>-- >>> >>Traceback (most recent call last): >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/tests/oauth1/rfc5849/endpoints/test_base.py", >>> >>line 388, in test_rsa_signature >>> >>self.assertTrue(self.e._check_signature(r)) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/endpoints/base.py", >>> >>line 190, in _check_signature >>> >>valid_signature = signature.verify_rsa_sha1(request, rsa_key) >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>line 596, in verify_rsa_sha1 >>> >>alg = _jwt_rs1_signing_algorithm() >>> >> File >"/usr/ports/pobj/py-oauthlib-0.20150523/oauthlib-master/oauthlib/oauth1/rfc5849/signature.py", >>> >>lin
UPDATE: discount 2.1.6 -> 2.1.8a
Hello ports@, This updates discount from 2.1.6 to 2.1.8a. The binary is (still) renamed from "markdown" to "discount" to avoid collision with textproc/markdown. Passes all tests on amd64. OK? -- Kaashif Hymabaccus GPG: 3E810B04 Index: Makefile === RCS file: /cvs/ports/textproc/discount/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- Makefile1 Nov 2014 11:06:55 - 1.7 +++ Makefile13 Jun 2015 14:48:59 - @@ -2,7 +2,7 @@ COMMENT = fast C implementation of Markdown -DISTNAME = discount-2.1.6 +DISTNAME = discount-2.1.8a EXTRACT_SUFX = .tar.bz2 CATEGORIES = textproc Index: distinfo === RCS file: /cvs/ports/textproc/discount/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- distinfo1 Nov 2014 11:06:55 - 1.3 +++ distinfo13 Jun 2015 14:48:59 - @@ -1,2 +1,2 @@ -SHA256 (discount-2.1.6.tar.bz2) = cCuynhfjh/guQPrgYtXkk5vG+yLc9T5hCZgqX6oRB5Y= -SIZE (discount-2.1.6.tar.bz2) = 83823 +SHA256 (discount-2.1.8a.tar.bz2) = wBUC9O7bqBY9zTDGE7pe4jigaPdSkb4SeFYmFyfgNSY= +SIZE (discount-2.1.8a.tar.bz2) = 85161 Index: patches/patch-Makefile_in === RCS file: /cvs/ports/textproc/discount/patches/patch-Makefile_in,v retrieving revision 1.3 diff -u -p -r1.3 patch-Makefile_in --- patches/patch-Makefile_in 1 Nov 2014 11:06:55 - 1.3 +++ patches/patch-Makefile_in 13 Jun 2015 14:48:59 - @@ -1,6 +1,6 @@ -$OpenBSD: patch-Makefile_in,v 1.3 2014/11/01 11:06:55 jca Exp $ Makefile.in.orig Sat Aug 16 12:01:00 2014 -+++ Makefile.inSat Aug 16 12:03:28 2014 +$OpenBSD$ +--- Makefile.in.orig Sat Jun 13 15:27:59 2015 Makefile.inSat Jun 13 15:28:45 2015 @@ -9,7 +9,7 @@ MANDIR=@mandir@ LIBDIR=@libdir@ INCDIR=@prefix@/include @@ -10,7 +10,7 @@ $OpenBSD: patch-Makefile_in,v 1.3 2014/1 SAMPLE_PGMS=mkd2html makepage @THEME@SAMPLE_PGMS+= theme MKDLIB=libmarkdown -@@ -50,7 +50,8 @@ install.man: +@@ -52,7 +52,8 @@ install.man: @INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man7 @INSTALL_DATA@ markdown.7 mkd-extensions.7 $(DESTDIR)$(MANDIR)/man7 @INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man1 @@ -20,14 +20,14 @@ $OpenBSD: patch-Makefile_in,v 1.3 2014/1 install.everything: install install.man -@@ -82,8 +83,8 @@ blocktags: mktags +@@ -84,8 +85,8 @@ blocktags: mktags mkd2html: mkd2html.o $(MKDLIB) mkdio.h - $(CC) $(LFLAGS) -o mkd2html mkd2html.o -lmarkdown @LIBS@ + $(CC) $(CFLAGS) $(LFLAGS) -o mkd2html mkd2html.o -lmarkdown @LIBS@ -markdown: main.o pgm_options.o $(MKDLIB) -- $(CC) $(LFLAGS) -o markdown main.o pgm_options.o -lmarkdown @LIBS@ +- $(CC) $(CFLAGS) $(LFLAGS) -o markdown main.o pgm_options.o -lmarkdown @LIBS@ +discount: main.o pgm_options.o $(MKDLIB) -+ $(CC) $(LFLAGS) -o discount main.o pgm_options.o -lmarkdown @LIBS@ ++ $(CC) $(CFLAGS) $(LFLAGS) -o discount main.o pgm_options.o -lmarkdown @LIBS@ makepage: makepage.c pgm_options.o $(MKDLIB) mkdio.h - $(CC) $(LFLAGS) -o makepage makepage.c pgm_options.o -lmarkdown @LIBS@ + $(CC) $(CFLAGS) $(LFLAGS) -o makepage makepage.c pgm_options.o -lmarkdown @LIBS@
[UPDATE] print/cups enable/disable script for ro /usr mount
Hi there, Here's an update that enables CUPS to run on boxes which usually read-only mount both /usr & /usr/local The current rc script alters /usr, /etc & /dev on each start/stop. Inspiration taken from the postfix-{en,dis}able,install scripts: Much moved out of the rc script and into 'cups-toggle (enable|disable)'. Freely adjust to your better experience! I'm not sure if the script needs a copyright notice or not, here anyway. ? files ? pkg/MESSAGE-main Index: Makefile === RCS file: /cvs/ports/print/cups/Makefile,v retrieving revision 1.197 diff -u -p -r1.197 Makefile --- Makefile9 Jun 2015 08:01:13 - 1.197 +++ Makefile13 Jun 2015 18:24:58 - @@ -10,7 +10,7 @@ EXTRACT_SUFX= .tar.bz2 PKGNAME-main= cups-${VERSION} PKGNAME-libs= cups-libs-${VERSION} -REVISION-main= 0 +REVISION-main= 1 REVISION-libs= 0 CATEGORIES=print sysutils @@ -124,6 +124,8 @@ post-install: # Remove files now part of cups-filters rm -f ${PREFIX}/share/cups/banners/* rm -f ${PREFIX}/share/cups/data/testprint + ${SUBST_CMD} -c -g ${BINGRP} -o ${BINOWN} -m ${BINMODE} ${FILESDIR}/cups-toggle ${PREFIX}/sbin/cups-toggle + # Remove desktop file and icons; we don't really need them (it's just a # launcher for http://localhost:631 and we may actually want to Index: pkg/PLIST-main === RCS file: /cvs/ports/print/cups/pkg/PLIST-main,v retrieving revision 1.18 diff -u -p -r1.18 PLIST-main --- pkg/PLIST-main 9 Jun 2015 07:39:14 - 1.18 +++ pkg/PLIST-main 13 Jun 2015 18:24:58 - @@ -2,6 +2,7 @@ @conflict LPRng-* @pkgpath print/cups @pkgpath print/cups,ldap +@extraunexec ${TRUEPREFIX}/sbin/cups-toggle disable @extraunexec rm -rf ${SYSCONFDIR}/cups/*.conf.O /var/log/cups @bin bin/cancel @bin bin/cupstestdsc @@ -118,6 +119,7 @@ sbin/accept @bin sbin/cupsaccept @bin sbin/cupsaddsmb @bin sbin/cupsctl +sbin/cups-toggle @mode 0500 @bin sbin/cupsd @mode Index: pkg/cupsd.rc === RCS file: /cvs/ports/print/cups/pkg/cupsd.rc,v retrieving revision 1.21 diff -u -p -r1.21 cupsd.rc --- pkg/cupsd.rc6 Dec 2014 11:12:44 - 1.21 +++ pkg/cupsd.rc13 Jun 2015 18:24:58 - @@ -4,75 +4,27 @@ daemon="${TRUEPREFIX}/sbin/cupsd" -. /etc/rc.d/rc.subr +. ${RCDIR}/rc.subr pexp="${daemon}" -_lpfiles="/usr/bin/lpq /usr/bin/lpr /usr/bin/lprm /usr/sbin/lpc \ - /usr/sbin/lpd /usr/share/man/man1/lpq.1 /usr/share/man/man1/lpr.1 \ - /usr/share/man/man1/lprm.1 /usr/share/man/man8/lpc.8 \ - /usr/share/man/man8/lpd.8" -rc_pre() { - # rcexec is needed if openfiles limits are bumped and cupsd(8) - # runs in debug mode to prevent MaxClients warnings in logs - ${rcexec} "${daemon} ${daemon_flags} -t" || return 1 - [ -e /dev/lpt0 ] && chown _cups /dev/lp[a,t][0-2] - # XXX cups-driverd(8) can crash when setting up a printer driver - rm -f /var/cache/cups/* - - if [ -e /usr/sbin/lpd.pre-cups -a ! -f /usr/sbin/lpd -a -L /usr/sbin/lpc ]; then - return - elif [ ! -e /usr/sbin/lpd ]; then - return - else - for i in ${_lpfiles}; do - if [ -f $i -a ! -L $i ]; then - mv -f $i $i.pre-cups - fi - done - fi - if [ -e /etc/printcap ]; then - if [ ! -e /etc/printcap.pre-cups ]; then - mv /etc/printcap /etc/printcap.pre-cups - ln -s ${SYSCONFDIR}/cups/printcap /etc/printcap - fi - else - ln -s ${SYSCONFDIR}/cups/printcap /etc/printcap - fi - for i in lpq lpr lprm; do - rm -f /usr/bin/$i - ln -s ${TRUEPREFIX}/bin/$i /usr/bin/$i +rc_pre() +{ + for _lpfile in /usr/bin/lp{q,r,rm} /usr/sbin/lp{c,d} ${SYSCONFDIR}/printcap + do + [[ -h ${_lpfile} ]] && continue + print -u2 "${_lpfile} isn't a symlink - run 'cups-toggle enable'" + return 1 done - rm -f /usr/sbin/lpc - ln -s ${TRUEPREFIX}/sbin/lpc /usr/sbin/lpc -} -rc_post() { - if [ ! -L /usr/sbin/lpc ]; then - return - else - for i in lpq lpr lprm; do - rm -f /usr/bin/$i - done - - rm -f /usr/sbin/lpc - - if [ ! -e /usr/sbin/lpd.pre-cups ]; then - return - else - if [ -L /etc/printcap ]; then - rm /etc/printcap - fi - for i in ${_lpfiles} /etc/printcap; do - if [ -e $i.pre-cups ]; then -
Re: [UPDATE] print/cups enable/disable script for ro /usr mount
On 2015-06-13 Sat 20:18 PM |, Craig Skinner wrote: > > Inspiration taken from the postfix-{en,dis}able,install scripts: > Much moved out of the rc script and into 'cups-toggle (enable|disable)'. > So as to not clutter the last mail, here's a sample script run: $ sudo cups-toggle enable enable() Backing up: lpq lpr lprm lpc lpd lpq.1 lpr.1 lprm.1 lpc.8 lpd.8. Symlinking /etc/printcap. Symlinking binaries: lpq lpr lprm lpc lpd. chown_lp_devs() _cups devices are: crw--- 1 root wheel 16, 128 Jan 22 11:31 /dev/lpa0 crw--- 1 root wheel 16, 129 Jan 22 11:31 /dev/lpa1 crw--- 1 root wheel 16, 130 Jan 22 11:31 /dev/lpa2 crw--- 1 root wheel 16, 0 Jan 22 11:31 /dev/lpt0 crw--- 1 root wheel 16, 1 Jan 22 11:31 /dev/lpt1 crw--- 1 root wheel 16, 2 Jan 22 11:31 /dev/lpt2 devices now: crw--- 1 _cups wheel 16, 128 Jan 22 11:31 /dev/lpa0 crw--- 1 _cups wheel 16, 129 Jan 22 11:31 /dev/lpa1 crw--- 1 _cups wheel 16, 130 Jan 22 11:31 /dev/lpa2 crw--- 1 _cups wheel 16, 0 Jan 22 11:31 /dev/lpt0 crw--- 1 _cups wheel 16, 1 Jan 22 11:31 /dev/lpt1 crw--- 1 _cups wheel 16, 2 Jan 22 11:31 /dev/lpt2 lrwxr-xr-x 1 root wheel 18 May 28 21:27 /etc/printcap@ -> /etc/cups/printcap lrwxr-xr-x 1 root wheel 18 May 28 21:27 /usr/bin/lpq@ -> /usr/local/bin/lpq -r-xr-sr-x 1 root daemon 26660 Aug 8 2014 /usr/bin/lpq.pre-cups* lrwxr-xr-x 1 root wheel 18 May 28 21:27 /usr/bin/lpr@ -> /usr/local/bin/lpr -r-sr-sr-x 1 root daemon 30724 Aug 8 2014 /usr/bin/lpr.pre-cups* lrwxr-xr-x 1 root wheel 19 May 28 21:27 /usr/bin/lprm@ -> /usr/local/bin/lprm lrwxr-xr-x 1 root wheel 19 May 28 21:27 /usr/bin/lprm@ -> /usr/local/bin/lprm -r-sr-sr-x 1 root daemon 26596 Aug 8 2014 /usr/bin/lprm.pre-cups* -r-sr-sr-x 1 root daemon 26596 Aug 8 2014 /usr/bin/lprm.pre-cups* lrwxr-xr-x 1 root wheel 19 May 28 21:27 /usr/sbin/lpc@ -> /usr/local/sbin/lpc -r-xr-sr-x 1 root daemon 37796 Aug 8 2014 /usr/sbin/lpc.pre-cups* lrwxr-xr-x 1 root wheel 14 May 28 21:27 /usr/sbin/lpd@ -> /usr/bin/false -r-xr-s--- 1 root daemon 72452 Aug 8 2014 /usr/sbin/lpd.pre-cups* -r--r--r-- 1 root bin 4525 Aug 8 2014 /usr/share/man/man1/lpq.1.pre-cups -r--r--r-- 1 root bin 7230 Aug 8 2014 /usr/share/man/man1/lpr.1.pre-cups -r--r--r-- 1 root bin 4496 Aug 8 2014 /usr/share/man/man1/lprm.1.pre-cups -r--r--r-- 1 root bin 5799 Aug 8 2014 /usr/share/man/man8/lpc.8.pre-cups -r--r--r-- 1 root bin 9392 Aug 8 2014 /usr/share/man/man8/lpd.8.pre-cups Cheers -- Numeric stability is probably not all that important when you're guessing.
firefox w^x
So I was supposed to be working on making the JIT engine conform to W^X a few months ago. It took a bit longer than expected, but I had a mostly working patch. Then I disappeared from OpenBSD for a bit and took my patch with me. Last week I was just starting to feed that patch upstream to firefox, when I found out about another developer who had already done similar work. Sigh. The official firefox patch seems likely to ship in some future version, which is good news for everyone. It's quite similar to the patch I had (though more polished). To make it available sooner for OpenBSD, here's a backport to the Firefox in ports. I haven't been able to test this very much, as I'm still at BSDCan, but when I get back next week I hope to be able to devote more time to finalizing this patch. Posting now to let people know it's coming and to give a preview if you're interested. --- /dev/null Sat Jun 13 16:06:25 2015 +++ patches/patch-js_src_irregexp_NativeRegExpMacroAssembler_cppSat Jun 13 14:16:15 2015 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- js/src/irregexp/NativeRegExpMacroAssembler.cpp.origSat Jun 13 13:54:41 2015 js/src/irregexp/NativeRegExpMacroAssembler.cpp Sat Jun 13 13:55:10 2015 +@@ -450,6 +450,8 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx + writePerfSpewerJitCodeProfile(code, "RegExp"); + #endif + ++AutoWritableJitCode awjc(code); ++ + for (size_t i = 0; i < labelPatches.length(); i++) { + LabelPatch& v = labelPatches[i]; + MOZ_ASSERT(!v.label); --- /dev/null Sat Jun 13 16:06:25 2015 +++ patches/patch-js_src_jit_BaselineCompiler_cpp Sat Jun 13 14:16:15 2015 @@ -0,0 +1,39 @@ +$OpenBSD$ +--- js/src/jit/BaselineCompiler.cpp.orig Sat Jun 13 13:55:40 2015 js/src/jit/BaselineCompiler.cppSat Jun 13 13:57:13 2015 +@@ -226,7 +226,13 @@ BaselineCompiler::compile() + // Adopt fallback stubs from the compiler into the baseline script. + baselineScript->adoptFallbackStubs(&stubSpace_); + +-// Patch IC loads using IC entries ++// All barriers are emitted off-by-default, toggle them on if needed. ++if (cx->zone()->needsIncrementalBarrier()) ++baselineScript->toggleBarriers(true); ++if (cx->runtime()->jitRuntime()->isProfilerInstrumentationEnabled(cx->runtime())) ++ baselineScript->toggleProfilerInstrumentation(true); ++AutoWritableJitCode awjc(code); ++ + for (size_t i = 0; i < icLoadLabels_.length(); i++) { + CodeOffsetLabel label = icLoadLabels_[i].label; + label.fixup(&masm); +@@ -240,9 +246,6 @@ BaselineCompiler::compile() + if (modifiesArguments_) + baselineScript->setModifiesArguments(); + +-// All barriers are emitted off-by-default, toggle them on if needed. +-if (cx->zone()->needsIncrementalBarrier()) +-baselineScript->toggleBarriers(true); + + #ifdef JS_TRACE_LOGGING + // Initialize the tracelogger instrumentation. +@@ -260,10 +263,6 @@ BaselineCompiler::compile() + + if (compileDebugInstrumentation_) + baselineScript->setHasDebugInstrumentation(); +- +-// If profiler instrumentation is enabled, toggle instrumentation on. +-if (cx->runtime()->jitRuntime()->isProfilerInstrumentationEnabled(cx->runtime())) +-baselineScript->toggleProfilerInstrumentation(true); + + // Always register a native => bytecode mapping entry, since profiler can be + // turned on with baseline jitcode on stack, and baseline jitcode cannot be invalidated. --- /dev/null Sat Jun 13 16:06:25 2015 +++ patches/patch-js_src_jit_BaselineJIT_cppSat Jun 13 14:16:15 2015 @@ -0,0 +1,38 @@ +$OpenBSD$ +--- js/src/jit/BaselineJIT.cpp.origSat Jun 13 13:57:28 2015 js/src/jit/BaselineJIT.cpp Sat Jun 13 13:59:10 2015 +@@ -841,6 +841,8 @@ BaselineScript::toggleDebugTraps(JSScript* script, jsb + + SrcNoteLineScanner scanner(script->notes(), script->lineno()); + ++AutoWritableJitCode awjc(method()); ++ + for (uint32_t i = 0; i < numPCMappingIndexEntries(); i++) { + PCMappingIndexEntry& entry = pcMappingIndexEntry(i); + +@@ -887,6 +889,7 @@ BaselineScript::initTraceLogger(JSRuntime* runtime, JS + traceLoggerScriptEvent_ = TraceLoggerEvent(logger, TraceLogger_Scripts); + + if (TraceLogTextIdEnabled(TraceLogger_Engine) || TraceLogTextIdEnabled(TraceLogger_Scripts)) { ++ AutoWritableJitCode awjc(method_); + CodeLocationLabel enter(method_, CodeOffsetLabel(traceLoggerEnterToggleOffset_)); + CodeLocationLabel exit(method_, CodeOffsetLabel(traceLoggerExitToggleOffset_)); + Assembler::ToggleToCmp(enter); +@@ -910,6 +913,8 @@ BaselineScript::toggleTraceLoggerScripts(JSRuntime* ru + else + traceLoggerScriptEvent_ = TraceLoggerEvent(logger, TraceLogger_Scripts); + ++AutoWritableJitCode awjc(method()); ++ + // Enable/Disable the traceLogger prologue and epilogue. + CodeLocationLabel enter(method_, CodeOffsetLabel(traceLoggerEnter
Re: [UPDATE] print/cups enable/disable script for ro /usr mount
On Sat, Jun 13, 2015 at 08:18:41PM +0100, Craig Skinner wrote: > Hi there, > > Here's an update that enables CUPS to run on boxes which > usually read-only mount both /usr & /usr/local > > The current rc script alters /usr, /etc & /dev on each start/stop. > > Inspiration taken from the postfix-{en,dis}able,install scripts: > Much moved out of the rc script and into 'cups-toggle (enable|disable)'. > > Freely adjust to your better experience! > > I'm not sure if the script needs a copyright notice or not, here anyway. I prefer the way it's done now. It's automatic -- I don't want to have to remember to run yet another command each time I update (which is very often). > ? files > ? pkg/MESSAGE-main > Index: Makefile > === > RCS file: /cvs/ports/print/cups/Makefile,v > retrieving revision 1.197 > diff -u -p -r1.197 Makefile > --- Makefile 9 Jun 2015 08:01:13 - 1.197 > +++ Makefile 13 Jun 2015 18:24:58 - > @@ -10,7 +10,7 @@ EXTRACT_SUFX= .tar.bz2 > PKGNAME-main=cups-${VERSION} > PKGNAME-libs=cups-libs-${VERSION} > > -REVISION-main= 0 > +REVISION-main= 1 > REVISION-libs= 0 > > CATEGORIES= print sysutils > @@ -124,6 +124,8 @@ post-install: > # Remove files now part of cups-filters > rm -f ${PREFIX}/share/cups/banners/* > rm -f ${PREFIX}/share/cups/data/testprint > + ${SUBST_CMD} -c -g ${BINGRP} -o ${BINOWN} -m ${BINMODE} > ${FILESDIR}/cups-toggle ${PREFIX}/sbin/cups-toggle > + > > # Remove desktop file and icons; we don't really need them (it's just a > # launcher for http://localhost:631 and we may actually want to > Index: pkg/PLIST-main > === > RCS file: /cvs/ports/print/cups/pkg/PLIST-main,v > retrieving revision 1.18 > diff -u -p -r1.18 PLIST-main > --- pkg/PLIST-main9 Jun 2015 07:39:14 - 1.18 > +++ pkg/PLIST-main13 Jun 2015 18:24:58 - > @@ -2,6 +2,7 @@ > @conflict LPRng-* > @pkgpath print/cups > @pkgpath print/cups,ldap > +@extraunexec ${TRUEPREFIX}/sbin/cups-toggle disable > @extraunexec rm -rf ${SYSCONFDIR}/cups/*.conf.O /var/log/cups > @bin bin/cancel > @bin bin/cupstestdsc > @@ -118,6 +119,7 @@ sbin/accept > @bin sbin/cupsaccept > @bin sbin/cupsaddsmb > @bin sbin/cupsctl > +sbin/cups-toggle > @mode 0500 > @bin sbin/cupsd > @mode > Index: pkg/cupsd.rc > === > RCS file: /cvs/ports/print/cups/pkg/cupsd.rc,v > retrieving revision 1.21 > diff -u -p -r1.21 cupsd.rc > --- pkg/cupsd.rc 6 Dec 2014 11:12:44 - 1.21 > +++ pkg/cupsd.rc 13 Jun 2015 18:24:58 - > @@ -4,75 +4,27 @@ > > daemon="${TRUEPREFIX}/sbin/cupsd" > > -. /etc/rc.d/rc.subr > +. ${RCDIR}/rc.subr > > pexp="${daemon}" > > -_lpfiles="/usr/bin/lpq /usr/bin/lpr /usr/bin/lprm /usr/sbin/lpc \ > - /usr/sbin/lpd /usr/share/man/man1/lpq.1 /usr/share/man/man1/lpr.1 \ > - /usr/share/man/man1/lprm.1 /usr/share/man/man8/lpc.8 \ > - /usr/share/man/man8/lpd.8" > > -rc_pre() { > - # rcexec is needed if openfiles limits are bumped and cupsd(8) > - # runs in debug mode to prevent MaxClients warnings in logs > - ${rcexec} "${daemon} ${daemon_flags} -t" || return 1 > - [ -e /dev/lpt0 ] && chown _cups /dev/lp[a,t][0-2] > - # XXX cups-driverd(8) can crash when setting up a printer driver > - rm -f /var/cache/cups/* > - > - if [ -e /usr/sbin/lpd.pre-cups -a ! -f /usr/sbin/lpd -a -L > /usr/sbin/lpc ]; then > - return > - elif [ ! -e /usr/sbin/lpd ]; then > - return > - else > - for i in ${_lpfiles}; do > - if [ -f $i -a ! -L $i ]; then > - mv -f $i $i.pre-cups > - fi > - done > - fi > - if [ -e /etc/printcap ]; then > - if [ ! -e /etc/printcap.pre-cups ]; then > - mv /etc/printcap /etc/printcap.pre-cups > - ln -s ${SYSCONFDIR}/cups/printcap /etc/printcap > - fi > - else > - ln -s ${SYSCONFDIR}/cups/printcap /etc/printcap > - fi > - for i in lpq lpr lprm; do > - rm -f /usr/bin/$i > - ln -s ${TRUEPREFIX}/bin/$i /usr/bin/$i > +rc_pre() > +{ > + for _lpfile in /usr/bin/lp{q,r,rm} /usr/sbin/lp{c,d} > ${SYSCONFDIR}/printcap > + do > + [[ -h ${_lpfile} ]] && continue > + print -u2 "${_lpfile} isn't a symlink - run 'cups-toggle > enable'" > + return 1 > done > - rm -f /usr/sbin/lpc > - ln -s ${TRUEPREFIX}/sbin/lpc /usr/sbin/lpc > -} > > -rc_post() { > - if [ ! -L /usr/sbin/lpc ]; then > - return > - else > - for i in lpq lpr lprm; do > - rm -f /usr/bin/$i > - done > -
Re: [UPDATE] print/cups enable/disable script for ro /usr mount
On 2015-06-13 Sat 22:39 PM |, Antoine Jacoutot wrote: > On Sat, Jun 13, 2015 at 08:18:41PM +0100, Craig Skinner wrote: > > > > Inspiration taken from the postfix-{en,dis}able,install scripts: > > Much moved out of the rc script and into 'cups-toggle (enable|disable)'. > > > > I prefer the way it's done now. > It's automatic -- I don't want to have to remember to run yet another command > each time I update (which is very often). > > Would something like these in the PLIST automate it Antoine? @extraexec ${TRUEPREFIX}/sbin/cups-toggle enable @extraunexec ${TRUEPREFIX}/sbin/cups-toggle disable Cheers. -- Zero Defects, n.: The result of shutting down a production line.
Re: [UPDATE] print/cups enable/disable script for ro /usr mount
On Sat, Jun 13, 2015 at 10:31:28PM +0100, Craig Skinner wrote: > On 2015-06-13 Sat 22:39 PM |, Antoine Jacoutot wrote: > > On Sat, Jun 13, 2015 at 08:18:41PM +0100, Craig Skinner wrote: > > > > > > Inspiration taken from the postfix-{en,dis}able,install scripts: > > > Much moved out of the rc script and into 'cups-toggle (enable|disable)'. > > > > > > > I prefer the way it's done now. > > It's automatic -- I don't want to have to remember to run yet another > > command each time I update (which is very often). > > > > > > Would something like these in the PLIST automate it Antoine? > > @extraexec ${TRUEPREFIX}/sbin/cups-toggle enable > @extraunexec ${TRUEPREFIX}/sbin/cups-toggle disable No because that means it will run at pkg_add time -- which is not good at all. At least with the rc.d script it makes sense: if I want to start cups, then I obviously want it to replace lpd the time it is running. And when I stop it, lpd is back. -- Antoine